#contact {
    background-image: url(../img/contact_page_bg.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 753px;
    display: flex;
    justify-content: space-between;
    padding: 50px;
}

#contact .form-wrapper {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    gap: 7px;
    border-radius: 11.5px 11.5px;
    backdrop-filter: blur(15.40772533416748px);
    width: fit-content;
    height: fit-content;
    display: flex;
}

#contact-form {
    display: flex;
    flex-direction: column;
    width: 525px;
    border-radius: 16px 16px;
    padding: 50px 40px;
    gap: 21px;
    background-color: #FFF;
    margin-bottom: 0;
}

#contact-form .contact-title h2 {
    line-height: 35px;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: 0;
    color: var(--v2-fg);
    font-family: var(--v2-font);
    text-align: left;
}

#contact-form .form-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

#contact-form .form-body .form-group {
    margin-bottom: 0;
    width: 100%;
}

#contact-form .form-body .form-group input.form-control,
#contact-form .form-body .form-group textarea.form-control {
    display: flex;
    gap: 10px;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0;
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    width: 100%;
    height: 60px;
    color: var(--v2-fg);
}

#contact-form .form-body .form-group input.form-control::placeholder,
#contact-form .form-body .form-group textarea.form-control::placeholder {
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 16px;
    color: var(--v2-muted);
    opacity: 1;
}

#contact-form .form-body .form-group textarea.form-control {
    height: 155px;
}

#contactSubmitBtn {
    color: #FFF;
    background-color: var(--btn-color-green);
    border-color: var(--btn-color-green);
    font-family: var(--v2-font);
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 0;
    line-height: 23px;
    padding: 24px 27px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 59px;
}

#contactSubmitBtn:hover {
    color: #FFF;
    background-color: var(--btn-color-green-hover);
    border-color: var(--btn-color-green-hover);
}

@media only screen and (max-width: 769px) {
    #contact {
        background-image: url(../img/contact_page_mobile_bg.webp);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    #contact-form {
        width: 440px;
    }
}

@media only screen and (max-width: 550px) {
    #contact {
        padding: 30px 20px;
        min-height: 650px;
    }

    #contact .form-wrapper {
        padding: 15px;
        gap: 5px;
        border-radius: 8.68px;
        backdrop-filter: blur(11.579329490661621px);
        width: auto;
    }

    #contact-form {
        padding: 37.58px 30.06px;
        border-radius: 12.14px;
        gap: 15.78px;
        width: 100%;
        max-width: none;
    }

    #contactSubmitBtn {
        gap: 21.79px;
        border-radius: 75.15px;
        padding: 22px 20px;
        height: 59px;
    }
}

@media only screen and (max-width: 376px) {
    #contact {
        padding: 30px 5px;
    }

    #contact .container {
        padding-left: 0px;
        padding-right: 0px;
    }

    #contact-form {
        padding: 15px;
        border-radius: 12.14px;
        gap: 15.78px;
        width: 100%;
        max-width: none;
    }
}

/* Narrow mobile (300–359px). Two things bite the contact form here:
   (1) Bootstrap .row's default -15px lateral margins make the row physically
       wider than its container — kills containment on a 300px viewport.
   (2) The Cloudflare Turnstile iframe defaults to 300px; even with the JS
       size swap to "compact" we still need the wrapper to not impose a
       minimum width on the form column. */
@media only screen and (max-width: 359px) {
    #contact {
        padding: 24px 0;
    }

    #contact .row,
    #contact .container .row {
        margin-left: 0;
        margin-right: 0;
    }

    #contact .col,
    #contact [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
        min-width: 0;
    }

    #contact .form-wrapper {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #contact-form {
        padding: 18px 14px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Turnstile in compact mode renders at ~150x140px — keep the wrapper
       fluid so it centres rather than imposing a min-width on the form. */
    #contact-form .cf-turnstile {
        min-width: 0;
        max-width: 100%;
        display: flex;
        justify-content: center;
    }

    #contactSubmitBtn {
        padding: 14px;
        height: 48px;
        font-size: 15px;
    }
}
