/* ===================================================
   Contact Form Section
   3-column layout: Image | Info | Form
   Stacks vertically on mobile.
   =================================================== */

body {
    font-family: polymath-display, sans-serif;
}

/* Ensure section text inherits the intended font even when embedded in a page
   whose global styles target generic tags. Font Awesome icons are excluded so their
   own icon font-family (e.g. "Font Awesome 6 Brands") is not overridden. */
.contact-form-section,
.contact-form-section *:not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-light):not(.fa-brands):not([class*="fa-"]) {
    font-family: polymath-display, sans-serif !important;
}

/* Section wrapper */
.contact-form-section {
    background-color: #FAFAFA;
    padding: 100px 16px;
}

/* Custom grid with gap */
.contact-form-section__grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Shared column styles: border-radius + overflow */
.contact-form-section__image-col,
.contact-form-section__info-col,
.contact-form-section__form-col {
    border-radius: 15px;
    overflow: hidden;
}

/* ===================================================
   Column: Image
   =================================================== */
.contact-form-section__image-col {
    position: relative;
    /* Hidden on mobile/tablet; shown only in the desktop row layout (>=992px). */
    display: none;
}

.contact-form-section__image-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.contact-form-section__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-form-section__logo {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.contact-form-section__logo img {
    max-width: 80px;
    height: auto;
}

/* ===================================================
   Column: Information
   =================================================== */
.contact-form-section__info-col {
    background-color: var(--color-primary);
    color: #ffffff;
    /* Let the content stretch to the full column height so the map can
       absorb any leftover vertical space (see __map below). */
    display: flex;
}

.contact-form-section__info-content {
    padding: 20px;
    /* Column flow lets the map grow to fill the space below the text. */
    display: flex;
    flex-direction: column;
    width: 100%;
}

.contact-form-section .contact-form-section__subtitle {
    font-size: 0.9rem !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    margin-bottom: 4px;
    opacity: 0.85;
}

.contact-form-section .contact-form-section__title {
    font-size: 1.8rem !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    margin-bottom: 12px;
}

.contact-form-section .contact-form-section__description {
    font-size: 0.85rem !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    line-height: 1.5 !important;
    margin-bottom: 20px;
    opacity: 0.9;
}

.contact-form-section__address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.contact-form-section__address .contact-form-section__icon {
    color: #ffffff !important;
    font-size: 0.8rem !important;
    margin-top: 4px;
}

.contact-form-section .contact-form-section__address p {
    font-size: 0.8rem !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    margin-bottom: 0;
}

/* Address link (opens Google Maps) inherits the white text instead of default blue */
.contact-form-section .contact-form-section__address a {
    color: #ffffff !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-form-section .contact-form-section__address a:hover {
    color: #ffffff !important;
    text-decoration: underline;
    opacity: 0.8;
}

.contact-form-section .contact-form-section__schedule {
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    font-style: italic !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    opacity: 0.75;
    margin-bottom: 16px;
    margin-left: 18px;
}

/* Contact details grid */
.contact-form-section__contacts {
    margin-bottom: 20px;
}

.contact-form-section .contact-form-section__contacts p {
    font-size: 0.8rem !important;
    font-weight: 300 !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
    margin-bottom: 6px;
}

.contact-form-section__contact-icon {
    margin-right: 6px;
    opacity: 0.7;
}

/* Social/contact links inherit the surrounding white text instead of default blue */
.contact-form-section .contact-form-section__contacts a {
    color: #ffffff !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-form-section .contact-form-section__contacts a:hover {
    color: #ffffff !important;
    text-decoration: underline;
    opacity: 0.8;
}

/* Map */
.contact-form-section__map {
    border-radius: 8px;
    overflow: hidden;
    /* Grow to fill the remaining space in the info column. The min-height
       keeps the map usable on mobile, where the column height is driven by
       its content rather than a sibling column. */
    flex: 1 1 auto;
    min-height: 200px;
}

.contact-form-section__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===================================================
   Column: Form
   =================================================== */
.contact-form-section__form-col {
    background-color: var(--color-primary);
}

.contact-form-section__form-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Form inputs */
.contact-form-section .contact-form-section__input {
    background-color: rgba(225, 225, 225, 0.10);
    border: none;
    border-radius: 6px;
    color: #ffffff !important;
    font-family: polymath-display, sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 300 !important;
    line-height: 1.4 !important;
    padding: 14px 16px;
    height: auto;
}

.contact-form-section .contact-form-section__input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.contact-form-section .contact-form-section__input:focus {
    background-color: rgba(225, 225, 225, 0.15);
    border: none;
    color: #ffffff !important;
    box-shadow: none;
    outline: none;
}

.contact-form-section__textarea {
    resize: none;
}

/* Privacy notice */
.contact-form-section .contact-form-section__privacy {
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.4 !important;
    margin-bottom: 20px;
}

.contact-form-section .contact-form-section__privacy span {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.75rem !important;
    font-weight: 300 !important;
}

.contact-form-section__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 0;
}

.contact-form-section__checkbox {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    margin-top: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-form-section__checkbox:checked {
    background-color: #ffffff;
    border-color: #ffffff;
}

.contact-form-section__privacy-icon {
    margin-right: 6px;
}

.contact-form-section .contact-form-section__privacy-link {
    color: #ffffff !important;
    text-decoration: underline;
}

.contact-form-section .contact-form-section__privacy-link:hover {
    color: #ffffff !important;
    opacity: 0.8;
}

/* Submit CTA overrides for outline on dark bg */
.contact-form-section__submit {
    margin-top: 4px;
}

/* Validation error states */
.contact-form-section__input--error {
    border: 1.5px solid rgba(255, 100, 100, 0.7) !important;
}

.contact-form-section__checkbox--error {
    border-color: rgba(255, 100, 100, 0.7) !important;
}

.contact-form-section__error-msg {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 120, 120, 0.9);
    margin-bottom: 14px;
}

/* Success message: green text */
.contact-form-section__error-msg--success {
    color: #4ade80;
}

/* ===================================================
   Submit CTA busy state
   =================================================== */

/* Hide the sliding arrow while a submission is in-flight */
.contact-form-section__submit.contact-form-section__submit--busy .dv-cta__arrow {
    display: none;
}

/* Spinner shown in place of the CTA label text while submitting */
.contact-form-section__spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-primary, #4a2c2a);
    border-top-color: transparent;
    border-radius: 50%;
    animation: contact-form-section__spin 0.7s linear infinite;
}

@keyframes contact-form-section__spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================================
   Tablet and up
   =================================================== */
@media (min-width: 768px) {
    .contact-form-section__info-content {
        padding: 30px;
    }

    .contact-form-section__form-content {
        padding: 30px;
    }

    .contact-form-section .contact-form-section__title {
        font-size: 2rem !important;
    }
}

/* ===================================================
   Desktop and up
   =================================================== */
@media (min-width: 992px) {
    .contact-form-section__grid {
        flex-direction: row;
    }

    /* Image column reappears in the desktop row layout. */
    .contact-form-section__image-col {
        display: block;
    }

    /* 4 / 4 / 4 split (image / info / form) */
    .contact-form-section__image-col,
    .contact-form-section__info-col,
    .contact-form-section__form-col {
        flex: 4 0 0;
    }

    .contact-form-section__image-wrapper {
        height: 100%;
    }

    .contact-form-section__info-content {
        padding: 35px;
    }

    .contact-form-section__form-content {
        padding: 35px;
    }

    .contact-form-section .contact-form-section__title {
        font-size: 2.2rem !important;
    }
}

/* ===================================================
   Large desktop
   =================================================== */
@media (min-width: 1200px) {
    .contact-form-section__info-content {
        padding: 40px;
    }

    .contact-form-section__form-content {
        padding: 40px;
    }
}
