* {
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    height: 100%;
    margin: 0;
    background-color: #f8f9fa;
    position: relative;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    background-image: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('../img/songkranbg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Removed the background properties from here */

a {
    text-decoration: none;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Deferred heavy visual assets (banner/background) */
body.defer-heavy-visuals {
    background-color: #f8f9fa;
    background-image: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.45s ease, background-color 0.45s ease;
}

.banner-image {
    width: 100%;
    height: auto;
}

.banner-image.banner-placeholder {
    min-height: 120px;
    background: linear-gradient(90deg, #edf8ff 0%, #f8fcff 50%, #edf8ff 100%);
    background-size: 200% 100%;
    animation: bannerShimmer 1.4s linear infinite;
}

@keyframes bannerShimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Layout Page */
.navbar {
    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25) !important;
    padding: 0px;
}

.navbar-nav {
    justify-content: space-between;
}

    .navbar-nav > li {
        border-right: 1px solid #E2E2E2;
    }

        .navbar-nav > li:last-child {
            border: none;
        }

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    color: #000;
    font-size: 18px;
    padding: 10px 15px;
    text-align: center;
    white-space: nowrap;
}

    /* Remove hover background if you want cleaner look with borders */
    .nav-link:hover {
        text-decoration: underline;
    }

    .nav-link.active {
        color: #fff !important;
        background-color: #29B6F6;
        font-weight: bold;
    }

/* Main Page CSS */
.main-page {
    background-color: #f8f9fa;
    display: block;
    flex-direction: row;
    justify-content: center;
    width: 100%;
}

    .main-page .div {
        background-color: #f8f9fa;
        overflow: hidden;
        width: 1440px;
        height: 1600px;
        position: relative;
    }



    .main-page .overlap-group {
        position: relative;
        width: 1440px;
        height: 120px;
        background-color: #29b6f6;
        box-shadow: 0px -4px 4px #00000040;
    }

    .main-page .element {
        position: absolute;
        top: 21px;
        left: 56px;
        font-family: "Sarabun-SemiBold", Helvetica;
        font-weight: 600;
        color: #ffffff;
        font-size: 20px;
        letter-spacing: 0;
        line-height: normal;
    }

    .main-page .menu-bar {
        position: absolute;
        width: 3888px;
        height: 136px;
        top: 263px;
        left: -388px;
    }

    .main-page .overlap {
        position: relative;
        width: 3878px;
        height: 136px;
    }

    .main-page .scrolling-text {
        position: absolute;
        width: 3878px;
        height: 85px;
        top: 51px;
        left: 0;
        overflow: hidden;
    }

    .main-page .navbar {
        display: inline-flex;
        height: 100px;
        align-items: center;
        gap: 10px;
        position: relative;
        left: -486px;
        background-color: #f8f9fa;
    }

    .main-page .text-wrapper {
        position: relative;
        width: fit-content;
        font-family: "Inter-Regular", Helvetica;
        font-weight: 400;
        color: #ff0000;
        font-size: 18px;
        letter-spacing: 0;
        line-height: normal;
    }

    .main-page .rectangle {
        width: 1440px;
        background-color: #ffffff;
        position: absolute;
        height: 75px;
        top: 0;
        left: 388px;
        box-shadow: 0px 4px 4px #00000040;
    }

    .main-page .line {
        left: 880px;
        position: absolute;
        width: 1px;
        height: 75px;
        top: 0;
        object-fit: cover;
    }

    .main-page .img {
        left: 520px;
        position: absolute;
        width: 1px;
        height: 75px;
        top: 0;
        object-fit: cover;
    }

.home-page .line-2 {
    left: 1264px;
    position: absolute;
    width: 1px;
    height: 75px;
    top: 0;
    object-fit: cover;
}

.main-page .line-3 {
    left: 1684px;
    position: absolute;
    width: 1px;
    height: 75px;
    top: 0;
    object-fit: cover;
}

.main-page .rectangle-2 {
    width: 132px;
    background-color: #29b6f6;
    position: absolute;
    height: 75px;
    top: 0;
    left: 388px;
    box-shadow: 0px 4px 4px #00000040;
}

.main-page .text-wrapper-2 {
    top: 25px;
    left: 417px;
    font-family: "Sarabun-SemiBold", Helvetica;
    font-weight: 600;
    color: #ffffff;
    font-size: 20px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-3 {
    top: 25px;
    left: 545px;
    font-family: "Sarabun-SemiBold", Helvetica;
    font-weight: 600;
    color: #000000;
    font-size: 20px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-4 {
    top: 25px;
    left: 1290px;
    font-family: "Sarabun-SemiBold", Helvetica;
    font-weight: 600;
    color: #000000;
    font-size: 20px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-5 {
    top: 25px;
    left: 1710px;
    font-family: "Sarabun-SemiBold", Helvetica;
    font-weight: 600;
    color: #000000;
    font-size: 20px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-6 {
    top: 25px;
    left: 905px;
    font-family: "Sarabun-SemiBold", Helvetica;
    font-weight: 600;
    color: #000000;
    font-size: 20px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .image {
    position: absolute;
    width: 1439px;
    height: 263px;
    top: 0;
    left: 0;
    object-fit: cover;
}

.main-page .div-wrapper {
    position: absolute;
    width: 1335px;
    height: 423px;
    top: 400px;
    left: 52px;
    background-image: url(./img/card-3.svg);
    background-size: 100% 100%;
}

.main-page .p {
    top: 33px;
    left: 243px;
    font-family: "Sarabun-SemiBold", Helvetica;
    font-weight: 600;
    color: #d19a3b;
    font-size: 24px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .overlap-2 {
    position: absolute;
    width: 1347px;
    height: 600px;
    top: 846px;
    left: 56px;
}

.main-page .images-list {
    position: absolute;
    width: 1347px;
    height: 600px;
    top: 0;
    left: 0;
}

.main-page .overlap-3 {
    position: relative;
    height: 608px;
    left: -4px;
}

.main-page .select-images-field {
    position: absolute;
    width: 1343px;
    height: 450px;
    top: 53px;
    left: 4px;
}

.main-page .overlap-group-2 {
    position: relative;
    height: 450px;
}

.main-page .images-list-2 {
    position: absolute;
    width: 1219px;
    height: 450px;
    top: 0;
    left: 57px;
    background-color: #ffffff;
    border-top-width: 1px;
    border-top-style: solid;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-color: #c2c2c2;
}

.main-page .chevron-right {
    left: 1242px;
    position: absolute;
    width: 101px;
    height: 101px;
    top: 121px;
}

.main-page .chevron-left {
    left: 0;
    position: absolute;
    width: 101px;
    height: 101px;
    top: 121px;
}

.main-page .card-2 {
    width: 346px;
    top: 25px;
    left: 915px;
    position: absolute;
    height: 406px;
}

.main-page .element-2 {
    position: absolute;
    width: 340px;
    height: 300px;
    top: 22px;
    left: 915px;
}

.main-page .card-3 {
    width: 456px;
    top: 22px;
    left: 450px;
    position: absolute;
    height: 406px;
}

.main-page .element-3 {
    position: absolute;
    width: 450px;
    height: 300px;
    top: 22px;
    left: 450px;
    object-fit: cover;
}

.main-page .card-4 {
    width: 347px;
    top: 22px;
    left: 94px;
    position: absolute;
    height: 406px;
}

.main-page .element-4 {
    position: absolute;
    width: 341px;
    height: 300px;
    top: 22px;
    left: 94px;
}

.main-page .text-wrapper-7 {
    top: 17px;
    left: 544px;
    font-family: "Sarabun-Medium", Helvetica;
    font-weight: 500;
    color: #000000;
    font-size: 16px;
    text-align: center;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-8 {
    top: 413px;
    left: 101px;
    font-family: "Sarabun-Regular", Helvetica;
    font-weight: 400;
    color: #000000;
    font-size: 12px;
    text-align: right;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .button {
    all: unset;
    box-sizing: border-box;
    display: flex;
    width: 150px;
    height: 43px;
    align-items: center;
    justify-content: center;
    gap: var(--size-space-200);
    padding: var(--size-space-300);
    position: absolute;
    top: 522px;
    left: 1126px;
    background-color: #f2f2f7;
    border-radius: var(--size-radius-200);
    overflow: hidden;
    box-shadow: 0px 4px 4px #00000040;
}

.main-page .button-2 {
    all: unset;
    box-sizing: border-box;
    position: relative;
    width: fit-content;
    font-family: "Sarabun-Regular", Helvetica;
    font-weight: 400;
    color: var(--color-text-default-secondary);
    font-size: 16px;
    letter-spacing: 0;
    line-height: 16px;
    white-space: nowrap;
}

.main-page .text-wrapper-9 {
    top: 399px;
    left: 488px;
    font-family: "Sarabun-Regular", Helvetica;
    font-weight: 400;
    color: #000000;
    font-size: 12px;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-10 {
    top: 433px;
    left: 488px;
    font-family: "Sarabun-Regular", Helvetica;
    font-weight: 400;
    color: #000000;
    font-size: 12px;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

.main-page .text-wrapper-11 {
    top: 412px;
    left: 940px;
    font-family: "Sarabun-Regular", Helvetica;
    font-weight: 400;
    color: #000000;
    font-size: 12px;
    position: absolute;
    letter-spacing: 0;
    line-height: normal;
}

/* Page loader */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(248, 249, 250, 0.96);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-card {
    width: min(100%, 420px);
    padding: 2rem 1.5rem;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #eef9ff 100%);
    box-shadow: 0 18px 48px rgba(15, 116, 162, 0.16);
    text-align: center;
    border: 1px solid rgba(41, 182, 246, 0.16);
}

.page-loader-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-loader-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(41, 182, 246, 0.12);
    color: #1aaee8;
    font-size: 1.8rem;
    animation: loaderFloat 1.8s ease-in-out infinite;
}

.page-loader-icon:nth-child(2) {
    animation-delay: 0.2s;
}

.page-loader-icon:nth-child(3) {
    animation-delay: 0.4s;
}

.page-loader-title {
    margin-bottom: 0.5rem;
    color: #0f4c75;
    font-size: 1.35rem;
    font-weight: 700;
}

.page-loader-text {
    margin: 0;
    color: #5f7786;
    line-height: 1.8;
}

.page-loader-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.page-loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #8fdcff;
    animation: loaderPulse 1.1s ease-in-out infinite;
}

.page-loader-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.page-loader-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes loaderFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes loaderPulse {
    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.55;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@media (max-width: 576px) {
    .page-loader-card {
        padding: 1.5rem 1.25rem;
        border-radius: 22px;
    }

    .page-loader-icons {
        gap: 0.75rem;
    }

    .page-loader-icon {
        width: 56px;
        height: 56px;
        border-radius: 18px;
        font-size: 1.5rem;
    }
}

/* Footer fallback (global) */
footer.songkran-footer {
    background: linear-gradient(135deg, #0f4c75 0%, #1375a7 55%, #1b9ad1 100%) !important;
    color: rgba(255, 255, 255, 0.92) !important;
    padding: 2rem;
}

footer.songkran-footer a {
    color: rgba(255, 255, 255, 0.9);
}

footer.songkran-footer a:hover {
    color: #ffffff;
}

/* Songkran animated cursor effect */
body.songkran-water-enabled {
    cursor: none;
}

#songkran-water-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1100;
}

#songkran-bowl-cursor {
    position: fixed;
    width: 35px;
    height: 35px;
    pointer-events: none;
    z-index: 1101;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
    transition: transform 0.05s ease-out;
}

@media (pointer: coarse), (max-width: 767.98px) {
    body.songkran-water-enabled {
        cursor: auto;
    }

    #songkran-bowl-cursor,
    #songkran-water-canvas {
        display: none !important;
    }
}

/* Thank-you modal fallback styles (global) */
.thankyou-modal-content {
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #edf9ff 100%);
    box-shadow: 0 18px 40px rgba(15, 116, 162, 0.2);
}

.thankyou-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(41, 182, 246, 0.15);
    color: #15a9e5;
    font-size: 1.5rem;
}

.thankyou-title {
    color: #0f4c75;
    font-weight: 700;
}

.thankyou-text {
    color: #4f6f7e;
    line-height: 1.7;
}

.thankyou-gif {
    width: 80%;
    min-width: 220px;
    border-radius: 16px;
    border: 2px solid #0f4c75;
}

.thankyou-fallback {
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(41, 182, 246, 0.12);
    color: #29b6f6;
    font-size: 2.2rem;
}
