@font-face {
    font-family: "Montserrat";
    src: url("../font/Montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../font/Montserrat/Montserrat-Italic-VariableFont_wght.ttf")
        format("truetype");
    font-weight: 100 900;
    font-style: italic;
}

/* ---------- Base date input styling ---------- */
input[type="date"] {
    display: inline-block;
    width: 100%;
    height: 44px;
    padding: 12px 12px;
    font-size: 16px;
    line-height: 1.2;
    box-sizing: border-box;
}

/* ---------- Universal iOS Safari fix ---------- */
@supports (-webkit-touch-callout: none) {
    input[type="date"] {
        -webkit-appearance: none;
        appearance: none;
        padding-top: 12px;
        padding-bottom: 12px;
        height: 44px;
    }
}

input[type="date"]:focus {
    outline: none;
    border-color: #ffa94d;
    box-shadow: 0 0 0 0.2rem rgba(255, 169, 77, 0.25);
}

input[type="radio"],
input[type="checkbox"] {
    cursor: pointer;
}

label:not(:has(strong)) {
    cursor: pointer;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Montserrat", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    color: #000;
}

/* ---------- Layout Sections ---------- */
.header,
.middle,
.footer {
    width: 100%;
}

/* ---------- Native radio buttons color ---------- */
input[type="radio"] {
    accent-color: #1000ff;
}

/* ---------- HEADER ---------- */
.header {
    position: relative;
    width: 100%;
    height: 414px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Use a pseudo-element for the background image + filter */
.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/header-bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    filter: contrast(170%) brightness(1.15);
    z-index: 0;
}

.green-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 255, 0, 0.05);
    z-index: 1;
}

.logo {
    position: absolute;
    top: 30px;
    left: 20%;
    width: 175px;
    z-index: 10;
    filter: none;
}

.header-text {
    color: white;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    position: absolute;
    top: clamp(20%, 30%, 35%);
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.header-text span {
    display: inline-block;
}

.header-arrow {
    position: absolute;
    left: 50%;
    top: calc(30% + 2.5rem);
    transform: translateX(-50%) rotate(90deg);
    width: clamp(35px, 6vw, 65px);
    z-index: 1;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* ---------- Rounded Box ---------- */
:root {
    --accent-orange: #ea7c0f;
    --accent-blue: #1d628d;
    --txt-white: #fff;
    --box-shadow: 0 24px 40px rgba(0, 0, 0, 0.25);
    --box-shadow-pop: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.rounded-box {
    position: absolute;
    left: 50%;
    top: 1vh;
    transform: translate(-50%, -33%);
    width: min(90%, 900px);
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--box-shadow), var(--box-shadow-pop);
    z-index: 10;
    padding: 2rem;
}

.rounded-box-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 1.5rem;
}

.vertical-insured {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

/* ---------- Box text and buttons ---------- */

.box-heading h1 {
    font-weight: bolder;
    color: var(--accent-blue);
    white-space: nowrap;
    font-size: 50px;
}

.box-heading h5 {
    margin-top: 0.25rem;
    color: #444;
    white-space: nowrap;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: bold;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    min-width: 286px;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    color: var(--txt-white);
    background-color: var(--accent-orange);
    border: 2px solid var(--accent-orange);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    text-align: left;
    border-radius: 25px;
    white-space: nowrap;
    margin: 0 auto;
}

.btn-primary:hover {
    background-color: #d36d0f;
}

/* Questions line inside rounded box */
.rounded-box .row .col-md-8 {
    white-space: nowrap;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    left: 7.5%;
}

/* ---------- MIDDLE SECTION ---------- */
.middle {
    position: relative;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 850px;
    text-align: left;
    padding-bottom: 4rem;
    padding-top: calc(225px + 6.5vw);
}

.prescribing-info {
    max-width: 800px;
    line-height: 1.6;
    margin: 0 auto;
}

.prescribing-info span {
    color: var(--accent-blue);
    font-weight: 700;
}

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    background-color: var(--accent-blue);
    color: #fff;
    padding: 2rem;
    text-align: left;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    width: 175px;
    height: auto;
    pointer-events: none;
}

.footer-privacy-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-privacy-link:hover {
    color: #44c9f2;
}

.footer-bottom p {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 800px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1250.98px) {
    .header {
        background-size: cover;
    }
}

@media (max-width: 991.98px) {
    .header-text {
        top: clamp(35%, 40%, 45%);
    }

    .header-arrow {
        top: calc(35% + 2.5rem);
    }

    .rounded-box {
        transform: translate(-50%, -25%);
    }

    .box-heading h5 {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .btn-primary {
        font-size: clamp(0.7rem, 2.25vw, 0.9rem);
        min-width: 260px;
    }

    .rounded-box .row .col-md-8 {
        white-space: nowrap;
        font-size: clamp(0.8rem, 2vw, 1rem);
        left: 4.5em;
    }
    .box-heading h1 {
        font-size: 45px;
    }
}

@media (max-width: 875.98px) {
    .rounded-box .row .col-md-8 {
        white-space: nowrap;
        font-size: clamp(0.6rem, 1.75vw, 0.8rem);
        left: 5em;
    }
    .box-heading h1 {
        font-size: 42.5px;
    }
}

@media (max-width: 801.98px) {
    .box-heading h1 {
        font-size: 40px;
    }
}

@media (max-width: 767.98px) {
    .header {
        min-height: 400px;
    }

    .logo {
        left: 5%;
        width: 175px;
    }

    .header-text {
        left: 5%;
    }

    .header-text {
        white-space: normal;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
        text-align: left;
        top: 125px;
    }

    .header-text span {
        display: block;
        line-height: 1.05;
        font-size: 2.5rem;
    }
    .header-arrow {
        display: none;
    }

    .rounded-box {
        top: -100px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        padding: 1.5rem;
        z-index: 10;
        border-radius: 0;
        height: 60%;
    }

    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        top: -300px;
        left: 60%;
    }

    .col-md-9.col-12 {
        top: -300px;
        left: 0%;
    }

    .rounded-box-content img {
        max-width: 40%;
    }

    .middle {
        padding-top: 500px;
    }

    .box-heading h1 {
        font-size: 2.5rem;
        font-weight: bold;
        text-align: center;
    }

    .box-heading h5 {
        text-align: center;
        font-weight: bold;
        margin-bottom: 1rem;
    }

    .rounded-box-content-img img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .rounded-box .row .col-md-8 {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .col-md-4.col-12.mb-2.mb-md-0 {
        align-items: center;
    }

    .btn-primary {
        font-size: clamp(0.8rem, 3vw, 1rem);
        text-align: center;
    }

    .rounded-box .row .col-md-8 {
        align-self: center !important;
        text-align: center !important;
        width: auto !important;
        margin-left: 0 !important;
        left: auto !important;
        white-space: normal !important;
    }

    .footer .mt-3 {
        margin-left: -1rem !important;
    }

    .front-page {
        transform: scale(calc(100vw / 768));
        transform-origin: top center;
        width: 768px;
        margin: 0 auto;
    }

    .rounded-box-content {
        transform: scale(calc(100vw / 768));
        transform-origin: top center;
    }

    /* keep the box itself centered and consistent */
    .rounded-box {
        width: 768px;
        left: 50%;
        transform: translateX(-50%);
        overflow: visible;
    }

    .rounded-box-content {
        transform: scale(calc(100vw / 768));
    }

    .prescribing-info {
        margin-left: -100px !important;
        padding-top: 0;
    }
}

@media (max-width: 747.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 58%;
    }
    .col-md-9.col-12 {
        left: -2%;
    }
}

@media (max-width: 727.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 56%;
    }
    .col-md-9.col-12 {
        left: -4%;
    }
}

@media (max-width: 707.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 54%;
    }
    .col-md-9.col-12 {
        left: -6%;
    }
}

@media (max-width: 687.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 52%;
    }
    .col-md-9.col-12 {
        left: -8%;
    }
}

@media (max-width: 667.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 50%;
    }
    .col-md-9.col-12 {
        left: -10%;
    }
}

@media (max-width: 647.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 48%;
    }
    .col-md-9.col-12 {
        left: -12%;
    }
    .prescribing-info {
        width: 90%;
        margin-left: -75px !important;
    }
    .rounded-box {
        height: 55%;
    }
}

@media (max-width: 627.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 46%;
    }
    .col-md-9.col-12 {
        left: -14%;
    }
}

@media (max-width: 607.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 44%;
    }
    .col-md-9.col-12 {
        left: -16%;
    }
}

@media (max-width: 587.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 42%;
    }
    .col-md-9.col-12 {
        left: -18%;
    }
}

@media (max-width: 576.98px) {
    .rounded-box-content-img {
        max-width: 80% !important;
        margin-left: 10%;
    }
    .vertical-insured {
        max-width: 30% !important;
    }
    .btn-primary {
        max-width: 400px;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 40%;
    }
    .col-md-9.col-12 {
        left: -16%;
    }
    .prescribing-info {
        width: 70%;
        margin-left: 0 !important;
        padding-top: 200px;
    }
    .footer .mt-3 {
        margin-left: -1rem !important;
    }
    .footer-top {
        align-items: flex-start !important;
    }
    .footer-bottom {
        width: 70% !important;
    }
}

@media (width: 576px) {
    .rounded-box {
        height: 50%;
    }
    .prescribing-info {
        padding-top: 0 !important;
        margin-top: -7rem;
    }
    .middle-container {
        max-width: 100% !important;
    }
}

@media (max-width: 575.98px) {
    .rounded-box {
        height: 55%;
    }
    .prescribing-info {
        padding-top: 0 !important;
    }
    .middle-container {
        max-width: 100% !important;
    }
}

@media (max-width: 567.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 38%;
    }
    .col-md-9.col-12 {
        left: -15%;
    }
}

@media (max-width: 547.98px) {
    .col-md-9.col-12 {
        max-width: 78% !important;
        left: -6%;
    }
    .prescribing-info {
        width: 65%;
        margin-left: 0 !important;
        margin-top: -3rem;
    }
    .rounded-box {
        height: 52.5%;
    }
}

@media (max-width: 527.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 36%;
    }
    .col-md-9.col-12 {
        left: -6%;
    }
}

@media (max-width: 507.98px) {
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 34%;
    }
    .col-md-9.col-12 {
        left: -8%;
    }
    .footer-bottom {
        width: 65% !important;
    }
}

@media (max-width: 487.98px) {
    .vertical-insured {
        max-width: 28% !important;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 32%;
    }
    .col-md-9.col-12 {
        max-width: 74% !important;
        left: -8%;
    }
    .prescribing-info {
        width: 60%;
        margin-left: 0 !important;
        margin-top: -5rem;
    }
    .rounded-box {
        height: 47.5%;
    }
}

@media (max-width: 467.98px) {
    .vertical-insured {
        max-width: 26% !important;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 32%;
    }
    .col-md-9.col-12 {
        max-width: 70% !important;
        left: -6%;
    }
    .prescribing-info {
        width: 55%;
        margin-left: 0 !important;
        padding-top: 200px;
    }
    .footer-bottom {
        width: 60% !important;
    }
    .box-heading h1 {
        font-size: 2rem;
    }
}

@media (max-width: 447.98px) {
    .box-heading h1 {
        font-size: 2rem;
    }
    .vertical-insured {
        max-width: 22% !important;
        margin-top: 5rem;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 32%;
    }
    .col-md-9.col-12 {
        max-width: 65% !important;
        left: -6%;
    }
    .prescribing-info {
        width: 50%;
        margin-left: 0 !important;
    }
    .footer-bottom {
        width: 55% !important;
    }
    .rounded-box {
        height: 42.5%;
    }
}

@media (max-width: 423.98px) {
    .box-heading h1 {
        font-size: 2rem;
    }
    .vertical-insured {
        max-width: 22% !important;
        margin-top: 5rem;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 30%;
    }
    .col-md-9.col-12 {
        max-width: 65% !important;
        left: -6%;
    }
    .btn-primary {
        max-width: 300px;
    }
}

@media (max-width: 410.98px) {
    .box-heading h1 {
        font-size: 2rem;
    }
    .vertical-insured {
        max-width: 22% !important;
        margin-top: 5rem;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 28%;
    }
    .col-md-9.col-12 {
        max-width: 65% !important;
        left: -8%;
    }
}

@media (max-width: 397.98px) {
    .rounded-box {
        height: 40%;
    }
    .box-heading h1 {
        font-size: 1.75rem;
    }
    .vertical-insured {
        max-width: 20% !important;
        margin-top: 5.5rem;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 25%;
    }
    .col-md-9.col-12 {
        max-width: 60% !important;
        left: -7%;
    }
    .prescribing-info {
        width: 45%;
        margin-left: 0 !important;
        padding-top: 0px;
        margin-top: -7rem;
    }
    .footer-bottom {
        width: 45% !important;
    }
}

@media (max-width: 350.98px) {
    .rounded-box {
        height: 42.5%;
    }
    .box-heading h1 {
        font-size: 1.5rem;
    }
    .vertical-insured {
        max-width: 18% !important;
        margin-top: 12.5rem;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 17.5%;
    }
    .col-md-9.col-12 {
        max-width: 60% !important;
        left: -8.5%;
    }
    .prescribing-info {
        width: 40%;
        margin-left: 0 !important;
        margin-top: 0;
    }
    .footer-bottom {
        width: 40% !important;
    }
}

@media (max-width: 335.98px) {
    .box-heading h1 {
        font-size: 1.5rem;
    }
    .vertical-insured {
        max-width: 18% !important;
        margin-top: 12.5rem;
    }
    .col-md-3.col-12.text-center.text-md-start.mb-3.mb-md-0 {
        left: 15%;
    }
    .col-md-9.col-12 {
        max-width: 60% !important;
        left: -10%;
    }
}

/* ---------- FOOTER ALIGNMENT FIX ---------- */
@media (max-width: 575.98px) {
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-privacy-link {
        margin-top: 0.5rem;
    }
}

@media (min-width: 576px) {
    .footer-top {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 1rem;
    }

    .footer-logo {
        margin-right: 1rem;
    }

    .footer-privacy-link {
        margin-top: 0;
    }
}

/* ---------- HEADER FORM ---------- */
.header-form {
    position: relative;
    width: 100%;
    height: 414px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background-image: url("../img/header-bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 100%;
    filter: contrast(170%) brightness(1.1);
    clip-path: inset(0 0 150px 0);
}

.green-front-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 255, 0, 0.085);
    z-index: 1;
}

.form-logo {
    position: absolute;
    margin-top: -200px;
    width: 175px;
    z-index: 1;
}
/* ---------- FORM SECTION ---------- */

.hidden {
    display: none !important;
}

.form-section {
    margin-top: -250px;
}

.vertical-form-insured {
    max-width: 175px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    margin-top: -100px;
}

.form-heading {
    margin-top: 7.5rem;
    margin-left: 4rem;
}

.header-form-text {
    position: absolute;
    top: 0;
    transform: none;
    color: white;
    font-weight: 700;
    font-size: 3.5rem;
    z-index: 1;
    text-align: left;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.form-heading h5 {
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 0;
}

.imp-note-heading {
    color: var(--accent-blue);
    font-weight: bold;
    font-size: 16px;
}

.imp-note-text {
    font-size: 14px;
    font-family: "Montserrat";
}

#tris-savings-form {
    margin-left: 10px;
    font-family: "Montserrat";
    font-size: 14px;
}

.form-consent-img {
    max-width: 5rem;
    padding-right: 1rem;
}

#tris-savings-form button.btn {
    min-width: 50px !important;
    max-width: 160px !important;
    text-align: center;
}

.ineligibility_message {
    color: red;
    font-weight: 600;
    margin-top: 1rem;
    display: none;
}

/* ---------- VALIDATION VISUALS ---------- */

.validation-error {
    color: #ff0000;
    font-size: 1rem;
    font-weight: 700;
    padding-top: 0.5rem;
}

input[type="radio"].is-invalid {
    border: none; /* remove native border */
    outline: none; /* remove default outline */
    position: relative; /* needed for pseudo-element */
    background-color: #fff; /* keep the inner circle white */
}

/* Add circular red outline using ::before */
input[type="radio"].is-invalid::before {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border: 2px solid rgba(220, 53, 69, 0.6); /* red circle */
    border-radius: 50%; /* circular outline */
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.25); /* subtle glow */
    pointer-events: none; /* allow clicks through */
}

/* error message styling — only for the error element (DIV) */
div.validation-error {
    color: #ff0000;
    font-size: 1rem;
    font-weight: 700;
    padding-top: 0.5rem;
}

/* ensure inputs/selects/textarea are not affected if they accidentally get the class */
input.validation-error,
textarea.validation-error,
select.validation-error {
    color: inherit !important;
    border-color: #dc3545 !important; /* keep border if you want invalid border, but not text color */
    background-color: inherit !important;
}

/* ---------- ALIGNMENT FIXES ---------- */
.form-check {
    display: inline-flex; /* keep radios and labels inline */
    align-items: center;
    gap: 0.4rem;
    margin-right: 1rem; /* spacing between options */
    flex-wrap: nowrap; /* prevent wrapping into columns */
}

.form-check-input {
    margin-top: 0 !important;
    position: relative;
    top: 0;
}

.mb-3 .validation-error {
    display: block;
    margin-top: 0.25rem;
    line-height: 1.2;
}

/* Ensure radio groups stay horizontal */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---------- FOOTER FORM SECTION ---------- */

.prescribing-info-footer span {
    color: #44c9f2;
    font-weight: 700;
}

/* ---------- RESPONSIVE HEADER FORM SECTION ---------- */

@media (max-width: 1250.98px) {
    .header-form {
        background-size: cover;
    }
}

@media (max-width: 992.98px) {
    .form-logo {
        margin-top: -225px;
    }
    .header-form-text {
        font-size: 48px;
    }
}

@media (max-width: 767.98px) {
    .form-heading,
    #tris-savings-form {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    .header-form-text {
        font-size: 50px;
        white-space: normal;
        width: 33%;
    }
    .form-left {
        margin-top: -18.5rem;
    }
    .header-form {
        clip-path: inset(0 0 0 0);
    }
    .form-logo {
        left: -5rem;
        margin-top: -460px;
    }
    .form-heading {
        margin-top: 20rem;
        margin-left: 0.5rem;
    }
    .vertical-form-insured {
        margin-top: -375px;
        margin-left: 20rem;
    }
    #tris-savings-form {
        margin-left: -1rem;
    }
    .d-md-none.row.hide_fields.flex-column {
        margin-left: 0rem;
    }
    .form-consent-img {
        display: none;
    }
    .center-btn {
        text-align: center !important;
    }
    .align-margins {
        margin-left: 0.5rem;
    }
    .no-flex {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 700.98px) {
    .form-logo {
        left: -3rem;
    }
}

@media (max-width: 580.98px) {
    .form-logo {
        left: 1rem;
    }
}

@media (max-width: 535.98px) {
    .form-logo {
        left: 2rem;
    }
    .vertical-form-insured {
        margin-left: 19rem;
    }
}

@media (max-width: 515.98px) {
    .vertical-form-insured {
        margin-left: 18rem;
    }
}

@media (max-width: 500.98px) {
    .vertical-form-insured {
        margin-left: 17rem;
    }
}

@media (max-width: 482.98px) {
    .form-logo {
        margin-top: -482.5px;
    }
    .vertical-form-insured {
        margin-left: 16rem;
        margin-top: -420px;
    }
}

@media (max-width: 465.98px) {
    .vertical-form-insured {
        margin-left: 15rem;
    }
}

@media (max-width: 452.98px) {
    .form-logo {
        margin-top: -506.5px;
    }
    .vertical-form-insured {
        margin-left: 14rem;
        margin-top: -470px;
    }
}

@media (max-width: 439.98px) {
    .form-logo {
        margin-top: -529px;
    }
    .vertical-form-insured {
        margin-left: 13rem;
        margin-top: -515px;
    }
}

@media (max-width: 414.98px) {
    .vertical-form-insured {
        margin-left: 12rem;
    }
    .header-form-text {
        font-size: 40px;
    }
}

@media (max-width: 398.98px) {
    .form-logo {
        margin-top: -551.5px;
    }
    .vertical-form-insured {
        margin-left: 11rem;
        margin-top: -560px;
    }
}

@media (max-width: 383.98px) {
    .vertical-form-insured {
        margin-left: 9.5rem;
    }
    .header-form-text {
        font-size: 35px;
    }
}

@media (max-width: 364.98px) {
    .form-logo {
        margin-top: -574px;
    }
    .vertical-form-insured {
        margin-left: 9rem;
        margin-top: -605px;
    }
}

@media (max-width: 362.98px) {
    .form-logo {
        margin-top: -596.5px;
    }
    .vertical-form-insured {
        margin-left: 9rem;
        margin-top: -550px;
        max-width: 120px;
    }
    .header-form-text {
        font-size: 40px;
    }
}

@media (max-width: 348.98px) {
    .form-logo {
        margin-top: -619px;
    }
    .vertical-form-insured {
        margin-top: -595px;
    }
}

/*---------- Terms and Conditions ----------*/

html,
body {
    height: 100%;
    margin: 0;
}

.tandc {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.tandc-message {
    flex: 1; /* this pushes the footer to the bottom */
    margin: clamp(2rem, 6vw, 9rem);
    margin-top: -17rem;
}

.header-tandc {
    position: relative;
    width: 100%;
    height: 414px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clip-path: inset(0 0 314px 0);
}

/* Use a pseudo-element for the background image + filter */
.header-tandc::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/header-bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    filter: contrast(170%) brightness(1.15);
    z-index: 0;
}

.green-tandc-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 255, 0, 0.085);
    z-index: 1;
}

.tandc-logo {
    position: absolute;
    margin-left: -65vw;
    margin-top: -320px;
    width: 175px;
    z-index: 1;
}

.tandc-message h5 {
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 1rem;
}
.footer-tandc-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem; /* space between logo and link */
}

@media (max-width: 1250.98px) {
    .header-tandc {
        background-size: cover;
    }
}

@media (max-width: 767px) {
    .tandc-logo {
        margin-left: -42.5vw;
    }
}

@media (max-width: 576px) {
    .footer-tandc-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-privacy-link {
        margin-left: 0 !important; /* remove Bootstrap’s ms-5 spacing */
        margin-top: 0.5rem;
    }
}

/* ---------- ERROR MESSAGE SECTION ----------*/

.error-logo {
    position: absolute;
    width: 175px;
    z-index: 1;
    margin-top: -120px;
}

.header-error-text {
    color: white;
    font-weight: 700;
    font-size: 50px;
    position: absolute;
    margin-top: -70px;
    left: 31.5%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.error-message-heading {
    position: relative;
    margin-top: 6rem;
    left: 10%;
}

.error-message-container {
    position: relative;
}

.error-message-container img.vertical-form-insured {
    margin-top: -60px;
}
.error-message-heading h5 {
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 20px;
    font-family: "Montserrat";
}

#backToFrontBtn {
    min-width: 50px !important;
    max-width: 160px !important;
    text-align: center;
    font-family: "Montserrat";
    font-weight: bold;
}

/* ---------- ERROR PAGE LAYOUT ---------- */

.header-error {
    position: relative;
    width: 100%;
    height: 414px; /* fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background-image: url("../img/header-bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 100%;
    filter: contrast(170%) brightness(1.15);
    clip-path: inset(0 0 12.5rem 0);
}

.green-error-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 255, 0, 0.1);
    z-index: 0;
    clip-path: inset(0 0 15rem 0);
}

.vertical-error-insured {
    max-width: 175px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    margin-top: -2rem;
}

.error-section {
    margin-top: -280px;
}

.error-page {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.error-message-container {
    flex: 1;
}

/* Ensures footer stays visually consistent */
.error-page .footer {
    margin-top: auto;
}

@media (max-width: 1250.98px) {
    .header-error {
        background-size: cover;
    }
}

@media (width: 992px) {
    .error-logo {
        margin-top: -180px;
    }
    .error-text {
        margin-top: 1rem;
    }
}

@media (max-width: 992.98px) {
    .error-message-container {
        margin-left: 0;
    }
    .error-message-heading {
        left: 20%;
        margin-top: 5rem;
    }
    .header-error-text {
        left: 41.5%;
    }
}

@media (max-width: 892.98px) {
    .error-message-heading h5 {
        white-space: normal;
        text-align: left;
        width: 80%;
    }
}

@media (max-width: 767.98px) {
    .header-error-text {
        white-space: normal;
        text-align: left;
        font-size: 35px;
        left: 33.5%;
    }
    .error-message-heading {
        left: 35%;
    }
}

@media (max-width: 585.98px) {
    .error-message-container {
        margin-left: -1rem;
    }
}

@media (max-width: 575.98px) {
    .error-message-container {
        margin-left: -2rem;
    }
}

@media (max-width: 560.98px) {
    .error-message-container {
        margin-left: -3rem;
    }
}

@media (max-width: 515.98px) {
    .header-error {
        clip-path: inset(0 0 5rem 0);
    }
    .header-error-text {
        margin-top: 0px;
        left: 40%;
        text-align: left;
        font-size: 50px;
    }
    .error-section {
        margin-top: 0;
    }
    .error-message-container {
        top: -300px;
    }
    .error-text {
        position: relative;
        top: 15rem;
        left: -7.5rem;
        text-align: center;
    }
    .error-message-heading h5 {
        width: 100%;
        text-align: center;
    }
    .error-logo {
        margin-top: -100px;
    }
}

@media (max-width: 463.98px) {
    .header-error-text {
        left: 45%;
    }
}

@media (max-width: 438.98px) {
    .header-error-text {
        left: 45%;
        font-size: 40px;
    }
    .error-text {
        left: -6.5rem;
    }
}

@media (max-width: 420.98px) {
    .header-error-text {
        left: 45%;
        font-size: 40px;
    }
    .vertical-error-insured {
        max-width: 150px;
    }
    .error-logo {
        margin-top: -115px;
    }
    .error-text {
        left: -5.5rem;
    }
}

@media (max-width: 390.98px) {
    .header-error-text {
        left: 45%;
        font-size: 37.5px;
    }
    .vertical-error-insured {
        max-width: 140px;
    }
    .error-logo {
        margin-top: -115px;
    }
    .error-text {
        left: -5.5rem;
    }
}

@media (max-width: 366.98px) {
    .header-error-text {
        left: 50%;
        font-size: 35px;
        margin-top: 1rem;
    }
    .vertical-error-insured {
        max-width: 130px;
        margin-top: 1rem;
    }
    .error-logo {
        margin-top: -115px;
    }
    .error-text {
        left: -5.5rem;
    }
}

@media (width: 365px) {
    .header-error-text {
        margin-top: 2rem;
    }
}

@media (max-width: 364.98px) {
    .header-error-text {
        margin-top: 2.5rem;
    }
    .error-text {
        left: -5rem;
    }
}

@media (max-width: 350.98px) {
    .header-error-text {
        margin-top: 2.5rem;
    }
    .error-text {
        left: -4.5rem;
    }
    .error-logo {
        margin-top: -135px;
    }
}

@media (max-width: 335.98px) {
    .error-text {
        left: -4.5rem;
    }
    .vertical-error-insured {
        max-width: 120px;
    }
    .header-error-text {
        margin-top: 3rem;
        font-size: 30px;
    }
    .error-logo {
        margin-top: -115px;
    }
}
