/* --- General and Background Styles --- */
html,
body {
    height: 100%;
    margin: 0;
    background: #000;
    font-family: 'Montserrat', sans-serif;
}

.bg {
    position: fixed;
    /* Keeps image locked in place */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Sits at the bottom, but visible */

    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

/* --- Popup Styles --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: clamp(1rem, 2vw, 1.25rem);
    box-sizing: border-box;
}

.popup-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup-container {
    background-color: #fff;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: clamp(0.75rem, 1.5vw, 1rem);
    text-align: center;
    max-width: clamp(20rem, 90vw, 37.5rem);
    width: clamp(20rem, 90vw, 37.5rem);
    box-shadow: 0 0.3125rem 1.5625rem rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    overflow-y: auto;
}

.popup-container-1 {
    background-color: #fff;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: clamp(0.75rem, 1.5vw, 1rem);
    text-align: center;
    max-width: clamp(20rem, 90vw, 37.5rem);
    max-height: 80vh;
    min-height: 40vh;
    width: clamp(20rem, 90vw, 37.5rem);
    box-shadow: 0 0.3125rem 1.5625rem rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    overflow-y: auto;
}

/* --- STYLES FOR STEP 1 (Initial Offer) --- */
.popup-logo-img {
    max-width: clamp(8rem, 25vw, 11.25rem);
    width: 100%;
    height: auto;
    margin-bottom: clamp(0.75rem, 2vh, 1.25rem);
}

.popup-image {
    max-width: clamp(60%, 15vw + 50%, 70%);
    width: 100%;
    height: auto;
    margin: clamp(0.5rem, 1.5vh, 1rem) auto;
}

.popup-headline {
    font-size: clamp(1.25rem, 3.5vw, 2.25rem);
    font-weight: bold;
    color: #1a1a1a;
    margin: clamp(1rem, 2.5vh, 1.5625rem) 0;
    line-height: 1.3;
}

.popup-button {
    background-color: #020126;
    color: #C6CB3B;
    border: none;
    border-radius: clamp(0.4rem, 1vw, 0.5rem);
    padding: clamp(0.75rem, 2vh, 0.9375rem) clamp(2rem, 5vw, 2.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 90%;
    margin-top: clamp(0.5rem, 1.5vh, 1rem);
}

.popup-button:hover {
    background-color: #16153f;
}

.popup-button:disabled {
    background-color: #05043a;
    color: #777a33;
    cursor: not-allowed;
}


/* --- STYLES FOR STEPS 2 & 3 (Forms) --- */
#popup-step-2,
#popup-step-3 {
    max-width: clamp(20rem, 90vw, 42rem);
}

.subscribe-title {
    font-size: clamp(1.25rem, 3.5vw, 2.375rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 clamp(1rem, 2.5vh, 1.875rem) 0;
    text-align: center;
    line-height: 1.2;
}

.form-container {
    max-width: 100%;
}

.form-subheading {
    margin: clamp(-0.75rem, -1.5vh, -0.9375rem) 0 clamp(0.75rem, 2vh, 1.25rem) 0;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    color: #555;
    line-height: 1.4;
}

.form-headline {
    font-size: clamp(1.125rem, 2.5vw, 1.75rem);
    font-weight: bold;
    color: #020126;
    margin-bottom: clamp(1rem, 2.5vh, 1.5625rem);
    line-height: 1.3;
}

.dark-blue-headline {
    color: #10102c;
}

/* Category Select Dropdown */
.select-wrapper {
    position: relative;
    margin-bottom: clamp(1rem, 2.5vh, 1.5625rem);
}

.custom-select {
    width: 100%;
    padding: clamp(0.75rem, 2vh, 0.9375rem) clamp(1rem, 2.5vw, 1.25rem);
    border: 0.0625rem solid #ccc;
    border-radius: clamp(0.4rem, 1vw, 0.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: #555;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    cursor: pointer;
}

.select-wrapper::after {
    content: '▼';
    font-size: clamp(0.625rem, 1.5vw, 0.75rem);
    color: #555;
    position: absolute;
    right: clamp(1rem, 2.5vw, 1.25rem);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: clamp(0.875rem, 2vh, 1.25rem);
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    color: #333;
    margin-bottom: clamp(0.375rem, 1vh, 0.5rem);
}

.form-group input {
    width: 100%;
    padding: clamp(0.75rem, 2vh, 0.9375rem);
    border: 0.0625rem solid #ccc;
    border-radius: clamp(0.4rem, 1vw, 0.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-button-wrapper {
    text-align: center;
    margin-top: clamp(0.5rem, 1.5vh, 0.625rem);
}

.confirmation-container {
    text-align: center;
    max-width: clamp(18rem, 80vw, 30rem);
    padding: clamp(1.5rem, 4vh, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.confirmation-text {
    font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
    color: #333;
    line-height: 1.6;
    margin: clamp(0.875rem, 2vh, 1.25rem) 0;
}

.confirmation-subtext {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    color: #777;
    line-height: 1.5;
}

.popup-container1 {
    position: relative;
    margin: 0 auto;
    max-width: clamp(18rem, 90vw, 35rem);
    width: clamp(18rem, 90vw, 35rem);
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 1.5rem);
    border-radius: clamp(0.6rem, 1.5vw, 0.75rem);
    max-height: 80vh;
    min-height: 40vh;
    overflow-y: auto;
    box-shadow: 0 0.3125rem 1.5625rem rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}


.popup-overlay.verified-bg {
    background-color: #f4f4f7;
}

.verification-container {
    background-color: #fff;
    padding: clamp(2rem, 5vh, 3.125rem) clamp(1.5rem, 4vw, 2.5rem);
    border-radius: clamp(0.75rem, 1.5vw, 1rem);
    text-align: center;
    max-width: clamp(20rem, 90vw, 40.625rem);
    width: 100%;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.verification-logo {
    max-width: clamp(9rem, 28vw, 12.5rem);
    width: 100%;
    height: auto;
    margin-bottom: clamp(1.25rem, 2.5vh, 1.875rem);
}

.verification-tick {
    width: clamp(3.5rem, 9vw, 5rem);
    height: clamp(3.5rem, 9vw, 5rem);
    margin-bottom: clamp(0.875rem, 2vh, 1.25rem);
}

.verification-headline {
    font-size: clamp(1.125rem, 2.8vw, 1.75rem);
    font-weight: bold;
    color: #10102c;
    margin: clamp(0.5rem, 1.2vh, 0.625rem) 0 clamp(0.75rem, 1.8vh, 0.9375rem) 0;
    line-height: 1.3;
}

.verification-text {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: #555;
    line-height: 1.6;
    max-width: clamp(18rem, 80vw, 30rem);
    margin: 0 auto;
}

#contact-form {
    text-align: left;
}

.form-group {
    margin-bottom: clamp(0.875rem, 2vh, 1.25rem);
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    color: #333;
    margin-bottom: clamp(0.375rem, 1vh, 0.5rem);
}

.form-group input {
    width: 100%;
    padding: clamp(0.75rem, 2vh, 0.9375rem);
    border: 0.0625rem solid #ccc;
    border-radius: clamp(0.4rem, 1vw, 0.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: #aaa;
}

/* Wrapper for the form button to center it */
.form-button-wrapper {
    text-align: center;
    margin-top: clamp(0.5rem, 1.5vh, 0.625rem);
}

.error-message {
    color: #d93025;
    font-size: clamp(0.6875rem, 1.6vw, 0.8125rem);
    font-weight: 400;
    margin-top: clamp(0.25rem, 0.8vh, 0.3125rem);
    text-align: left;
    display: block;
}

.error-message:empty {
    display: none;
    margin: 0;
    padding: 0;
}

/* Desktop - No scrolling, content fits naturally */
@media (min-width: 1081px) {

    .popup-container,
    .popup-container-1,
    .popup-container1 {
        max-height: none;
        min-height: auto;
        overflow-y: visible;
    }

    .popup-container {
        padding: 2.5rem;
        max-width: 37.5rem;
        width: 37.5rem;
    }

    .popup-container-1 {
        padding: 2.5rem;
        max-width: 37.5rem;
        width: 37.5rem;
    }

    .popup-container1 {
        padding: 2.5rem 1.5rem;
        max-width: 35rem;
        width: 35rem;
    }

    .popup-logo-img {
        max-width: 11.25rem;
        margin-bottom: 1.25rem;
    }

    .popup-headline {
        font-size: 2.25rem;
        margin: 1.5625rem 0;
    }

    .subscribe-title {
        font-size: 2.375rem;
        margin: 0 0 1.875rem 0;
    }

    .form-subheading {
        font-size: 1.125rem;
        margin: -0.9375rem 0 1.25rem 0;
    }

    .form-headline {
        font-size: 1.75rem;
        margin-bottom: 1.5625rem;
    }

    .popup-button {
        padding: 0.9375rem 2.5rem;
        font-size: 1rem;
    }

    .verification-logo {
        max-width: 12.5rem;
        margin-bottom: 1.875rem;
    }

    .verification-tick {
        width: 5rem;
        height: 5rem;
        margin-bottom: 1.25rem;
    }

    .verification-headline {
        font-size: 1.75rem;
        margin: 0.625rem 0 0.9375rem 0;
    }

    .verification-text {
        font-size: 1rem;
    }

    .confirmation-text {
        font-size: 1.125rem;
        margin: 1.25rem 0;
    }

    .confirmation-subtext {
        font-size: 0.875rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .custom-select {
        padding: 0.9375rem;
        font-size: 1rem;
    }
}

@media (min-width: 1258px) {
    .bg {
        background-image: url('assets/desktop.png');
    }
}

/* Tablet (1081px - 1258px) - Triggers between 1081px and 1258px */
@media (min-width: 1081px) and (max-width: 1258px) {
    .bg {
        background-image: url('assets/tablet.png');
        background-size: 100% 100%;
    }
}

/* Mobile (Portrait) - Triggers on screens smaller than 1081px */
@media (max-width: 1080px) {
    .bg {
        background-image: url('assets/mobile.png');
    }
}

/* Tall Mobile Screens (like 1080x2340) - Better scaling for high-res mobile */
@media (max-width: 1080px) and (min-height: 2000px) {

    .popup-logo-img {
        max-width: clamp(12rem, 35vw, 16rem);
        margin-bottom: clamp(1.5rem, 3vh, 2rem);
    }

    .popup-image {
        max-width: clamp(75%, 22vw + 60%, 85%);
        margin: clamp(1.25rem, 2.5vh, 1.75rem) auto;
    }

    .popup-headline {
        font-size: clamp(2rem, 5.5vw, 3rem);
        margin: clamp(1.75rem, 3.5vh, 2.5rem) 0;
    }

    .subscribe-title {
        font-size: clamp(2rem, 5.5vw, 3.25rem);
        margin: 0 0 clamp(1.75rem, 3.5vh, 2.5rem) 0;
    }

    .form-subheading {
        font-size: clamp(1.375rem, 3.5vw, 1.75rem);
        margin: clamp(-1rem, -2vh, -1.25rem) 0 clamp(1.25rem, 3vh, 1.75rem) 0;
    }

    .form-headline {
        font-size: clamp(1.75rem, 4.5vw, 2.5rem);
        margin-bottom: clamp(1.5rem, 3.5vh, 2rem);
    }

    .popup-container,
    .popup-container-1 {
        padding: clamp(2.5rem, 6vw, 3.5rem);
    }

    .form-group {
        margin-bottom: clamp(1.5rem, 3.2vh, 2rem);
    }

    .form-group label {
        font-size: clamp(1.125rem, 2.8vw, 1.5rem);
        margin-bottom: clamp(0.625rem, 1.5vh, 0.875rem);
    }

    .form-group input,
    .custom-select {
        padding: clamp(1.25rem, 3vh, 1.5rem);
        font-size: clamp(1.25rem, 3.2vw, 1.625rem);
    }

    .popup-button {
        padding: clamp(1.25rem, 3vh, 1.5rem) clamp(3rem, 7vw, 3.5rem);
        font-size: clamp(1.25rem, 3.2vw, 1.625rem);
        margin-top: clamp(1.25rem, 2.5vh, 1.75rem);
    }

    .verification-logo {
        max-width: clamp(13rem, 38vw, 17rem);
        margin-bottom: clamp(2rem, 4vh, 2.5rem);
    }

    .verification-tick {
        width: clamp(6rem, 14vw, 7.5rem);
        height: clamp(6rem, 14vw, 7.5rem);
        margin-bottom: clamp(1.5rem, 3.2vh, 2rem);
    }

    .verification-headline {
        font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    }

    .verification-text {
        font-size: clamp(1.25rem, 3.2vw, 1.625rem);
    }

    .confirmation-text {
        font-size: clamp(1.375rem, 3.5vw, 1.75rem);
        margin: clamp(1.5rem, 3.2vh, 2rem) 0;
    }

    .confirmation-subtext {
        font-size: clamp(1.125rem, 2.8vw, 1.375rem);
    }

    .select-wrapper::after {
        font-size: clamp(0.875rem, 2.2vw, 1.125rem);
    }

    .error-message {
        font-size: clamp(0.9375rem, 2.4vw, 1.125rem);
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 640px) {

    .popup-headline,
    .subscribe-title {
        font-size: clamp(1.125rem, 4.5vw, 1.5rem);
        margin: clamp(0.75rem, 2vh, 1rem) 0;
    }

    .popup-container {
        padding: clamp(1rem, 3.5vw, 1.5625rem) clamp(0.875rem, 2.5vw, 1.25rem);
        min-height: auto;
    }

    .popup-logo-img {
        max-width: clamp(7rem, 22vw, 10rem);
        margin-bottom: clamp(0.625rem, 1.5vh, 1rem);
    }

    .form-headline {
        font-size: clamp(1rem, 3.8vw, 1.375rem);
        margin-bottom: clamp(0.875rem, 2vh, 1.25rem);
    }

    .form-subheading {
        font-size: clamp(0.8125rem, 2.2vw, 1rem);
        margin: clamp(-0.625rem, -1.2vh, -0.75rem) 0 clamp(0.625rem, 1.5vh, 1rem) 0;
    }

    .popup-image {
        max-width: clamp(65%, 18vw + 50%, 75%);
        margin: clamp(0.5rem, 1.2vh, 0.75rem) auto;
    }

    .verification-logo {
        max-width: clamp(7.5rem, 24vw, 10rem);
        margin-bottom: clamp(1rem, 2vh, 1.5rem);
    }

    .verification-tick {
        width: clamp(3rem, 8vw, 4rem);
        height: clamp(3rem, 8vw, 4rem);
        margin-bottom: clamp(0.75rem, 1.5vh, 1rem);
    }

    .verification-headline {
        font-size: clamp(1rem, 3.5vw, 1.375rem);
    }

    .verification-text {
        font-size: clamp(0.8125rem, 2.2vw, 0.9375rem);
    }

    .confirmation-text {
        font-size: clamp(0.875rem, 2.5vw, 1rem);
        margin: clamp(0.75rem, 1.8vh, 1rem) 0;
    }

    .confirmation-subtext {
        font-size: clamp(0.6875rem, 2vw, 0.8125rem);
    }
}