/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================
   FONT CLASSES
========================= */

.poppins-thin { font-family: "Poppins", sans-serif; font-weight: 100; }
.poppins-extralight { font-family: "Poppins", sans-serif; font-weight: 200; }
.poppins-light { font-family: "Poppins", sans-serif; font-weight: 300; }
.poppins-regular { font-family: "Poppins", sans-serif; font-weight: 400; }
.poppins-medium { font-family: "Poppins", sans-serif; font-weight: 500; }
.poppins-semibold { font-family: "Poppins", sans-serif; font-weight: 600; }
.poppins-bold { font-family: "Poppins", sans-serif; font-weight: 700; }
.poppins-extrabold { font-family: "Poppins", sans-serif; font-weight: 800; }
.poppins-black { font-family: "Poppins", sans-serif; font-weight: 900; }




/* Mobile-first layout */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--main-bg) center/cover no-repeat;
    z-index: -1;
}

.container {
    display: flex;
    flex-direction: column; /* stacked on mobile */
    width: 100%;
    max-width: 100%;
}

/* Both divs full width on mobile */
.right {
    width: 100%;
    padding: 20px;
}

/* Both divs full width on mobile */
.left {
    width: 100%;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}




/* =========================
   MOBILE SAFETY
========================= */

@media screen and (max-width: 767px) {

    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    img, svg {
        max-width: 100%;
        height: auto;
    }
    .heading {
        margin-top: 25px;
    }
    
    /* =========================
    BODY BACKGROUND (FIXED)
    ========================= */

    body {
        min-height: 100vh;
        position: relative;
        display: flex;
        justify-content: center;
    }

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: var(--main-bg);
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        z-index: -2;
    }

    /* =========================
    LAYOUT
    ========================= */

    .container {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .left,
    .right {
        width: 100%;
    }

    .left {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .right {
        padding: 20px;
    }

    /* =========================
    HEADING SECTION
    ========================= */

    .heading {
        width: 90%;
        padding: 20px;
        gap: 20px;

        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center; /* horizontally center content */

        border-radius: 25px;

        position: relative;     /* IMPORTANT */
        overflow: hidden;       /* keeps bg inside */
    }

    /* Heading Background Image */
    .heading_bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
    }

    /* All heading content above bg */
    .heading > *:not(.heading_bg) {
        position: relative;
        z-index: 1;
    }

    /* =========================
    SVG
    ========================= */

    .svgwish {
        width: 90%;
        display: block;
    }

    /* =========================
    USER INFO
    ========================= */

    .user_info {
        display: flex;
        width: 90%;
        gap: 20px;
        justify-content: center; /* center children horizontally */
        align-items: center;     /* ensure dp/name align vertically */
        margin: 0 auto; 
    }

    .dp {
        width: 30%;
        aspect-ratio: 1/1;
        border-radius: 50%;
        border: 3px solid #ffffff;
        object-fit: cover;
    }

    .cheque_name {
        width: auto;
        max-width: 60%;
        word-wrap: break-word;
        font-size: 1.25em;
        color: #ffffff;
    }

    /* =========================
    CHEQUE AMOUNT
    ========================= */

    .cheque_amount {
        font-size: 2em;
        margin-top: 15px;
        color: rgba(255,220,0,1);
        text-align: center;
        line-height: 1.25;
    }

    /* =========================
    SCROLL TEXT
    ========================= */

    .scroll_wrapper {
        width: 100%;
        overflow: hidden;
        text-align: center;
        font-size: .75em;
        color: #ffffff;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* =========================
    FORM
    ========================= */

    .serial_form {
        display: flex;
        width: 100%;
        gap: 8px;
        min-width: 0;
    }

    .serial_form input {
        flex: 1;
        padding: 7px;
        border-radius: 8px;
        font-size: 1em;
        color: #000000;
        border: none;
        background: rgba(255, 255, 255, 0.45);
    }

    .serial_form input::placeholder {
        color: rgba(255,255,255,0.65);
    }

    .serial_form button {
        padding: 7px 10px;
        border-radius: 10px;
        border: none;
        background-color: rgb(3, 36, 86);
        color: rgb(255, 255, 255);
        cursor: pointer;
        font-size: 1em;
    }

    .serial_form button:hover {
        background-color: rgb(0, 157, 255);
    }
}

/* =========================
   DESKTOP & LARGE SCREENS 
========================= */

@media screen and (min-width: 768px) {

    body {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .container {
        flex-direction: row; /* side by side */
        height: 100vh;       /* full viewport height */
        overflow: hidden;    /* prevent horizontal scroll */
    }

    /* Both divs full width on mobile */
    .right {
        width: 50%;          /* right half */
        height: 100vh;
        overflow-y: auto;    /* scrollable content */
        padding: 40px;
    }

    /* Both divs full width on mobile */
    .left {
        padding: 0px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50%;          /* fixed left half */
        position: sticky;    /* stay visible */
        top: 0;
        height: 100vh;
        overflow-y: auto;    /* scroll if left content is long */
    }

    /* Heading Div */
    .heading {
        width: 90%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center; /* horizontally center content */
        padding: 20px;
        gap: 20px;
        border-radius: 15px;
    }

    .heading_bg {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover; /* same as background-size: cover */
        top: 0;
        left: 0;
        z-index: -1;
    }

    /* SVG Wish */
    .svgwish {
        width: 50%;
        display: block;
        margin: 0 auto;
    }

    /* DP + Name */
    .user_info {
        display: flex;
        width: 90%;
        gap: 20px;
        justify-content: center; /* center children horizontally */
        align-items: center;     /* ensure dp/name align vertically */
        margin: 0 auto;          /* keep the whole block centered in .heading */
    }

    .dp {
        width: 20%;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        border: 6px solid #ffffff;
        object-fit: cover;
    }

    .cheque_name {
        width: auto;
        max-width: 70%;
        margin-left: 10px;
        word-wrap: break-word;
        font-size: 2em;
        color: #ffffff;
    }

    /* Cheque Amount */
    .cheque_amount {
        font-size: 3em;
        margin-top: 15px;
        color: rgba(255,220,0,1);
        text-align: center;
    }

    .scroll_wrapper {
        display: flex;
        width: 90%;
        font-size: 1.5em;
        color: #ffffff;
        margin-top: 20px;
        overflow: hidden;

        -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%
        );
        mask-image: linear-gradient(to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%
        );
    }

    .scroll-text {
        font-size: 1.5em;
        color: #ffffff;
        text-align: center;
    }

    /* Form */
    .serial_form {
        display: flex;
        width: 90%;
        gap: 15px;
    }

    .serial_form input {
        flex: 1;
        padding: 15px;
        border-radius: 8px;
        font-size: 1.5em;
        color: #000000;
        background-color: rgba(255,255,255,0.45);
        border: none;
    }

    .serial_form input::placeholder {
        color: rgba(255,255,255,0.65);
    }

    .serial_form button {
        padding: 15px 25px;
        border-radius: 10px;
        border: none;
        background-color: rgb(3,36,86);
        color: rgb(255, 255, 255);
        cursor: pointer;
        font-size: 1.5em;
    }

    .serial_form button:hover {
        background-color: rgba(0,157,255);
        color: rgb(255, 255, 255);
    }

    .user_info,
    .cheque_amount,
    .scroll_wrapper,
    .serial_form {
        justify-content: center;   /* Horizontal center */
        align-items: center;
    }
}