/* =========================================
   Contact Hero
   ========================================= */
.contact-hero {
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--navy-black) 100%);
    padding: 8rem 4% 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

.contact-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.contact-hero-content .section-label {
    color: var(--blaze-orange);
}

.contact-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--white);
    letter-spacing: -1px;
    margin: 0.5rem 0 1rem;
}

.contact-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* =========================================
   Contact Layout
   ========================================= */
.contact-section {
    padding: 6rem 4%;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 5rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

/* =========================================
   Contact Info (left column)
   ========================================= */
.contact-info-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: var(--navy-black);
    letter-spacing: -0.3px;
    margin-bottom: 1rem;
}

.contact-info-body {
    color: #5a6872;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-detail-icon {
    width: 44px;
    height: 44px;
    background: var(--muted-teal);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--dark-teal);
}

.contact-detail-icon .material-icons-outlined {
    font-size: 20px;
}

.contact-detail-label {
    display: block;
    font-size: 0.75rem;
    font-family: 'Funnel Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8a9299;
    margin-bottom: 0.2rem;
}

.contact-detail-value {
    display: block;
    font-size: 0.95rem;
    color: var(--navy-black);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a.contact-detail-value:hover {
    color: var(--blaze-orange);
}

/* =========================================
   Form Card (right column)
   ========================================= */
.contact-form-card {
    background: var(--white);
    border: 1px solid rgba(7, 80, 86, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.07);
}

/* =========================================
   Status Message
   ========================================= */
.contact-status {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.75rem;
    font-family: 'Funnel Sans', sans-serif;
}

.contact-status[hidden] {
    display: none;
}

.contact-status--success {
    background: #e8f5ee;
    border: 1px solid #a3d9b8;
    color: #1a6b3a;
}

.contact-status--error {
    background: #fef0ea;
    border: 1px solid #f9b898;
    color: #8b2500;
}

.contact-status .material-icons-outlined {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* =========================================
   Form Fields
   ========================================= */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.form-row--two {
    grid-template-columns: 1fr 1fr;
}

.form-row .form-field {
    flex: 1;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-family: 'Funnel Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-black);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-required {
    color: var(--blaze-orange);
    font-size: 1rem;
    line-height: 1;
}

.form-optional {
    font-size: 0.72rem;
    font-weight: 400;
    color: #8a9299;
    font-family: 'Montserrat', sans-serif;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(7, 80, 86, 0.15);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--navy-black);
    background: var(--soft-cream);
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.form-input::placeholder {
    color: #aab4bb;
}

.form-input:focus {
    border-color: var(--dark-teal);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(7, 80, 86, 0.08);
}

.form-input.is-invalid {
    border-color: #e05a2b;
    background: #fff8f5;
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(224, 90, 43, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.form-error {
    font-size: 0.78rem;
    color: #e05a2b;
    font-family: 'Funnel Sans', sans-serif;
    min-height: 1rem;
    display: block;
}

/* =========================================
   Newsletter Opt-in
   ========================================= */
.form-field--checkbox {
    margin-bottom: 1.5rem;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(7, 80, 86, 0.3);
    border-radius: 4px;
    background: var(--white);
    transition: all 0.2s ease;
    margin-top: 1px;
    position: relative;
}

.form-checkbox:checked + .form-checkbox-custom {
    background: var(--sea-green);
    border-color: var(--sea-green);
}

.form-checkbox:checked + .form-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: 2px solid var(--white);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.form-checkbox-label:hover .form-checkbox-custom {
    border-color: var(--sea-green);
}

.form-checkbox-text {
    font-size: 0.9rem;
    color: #5a6872;
    line-height: 1.6;
}

/* =========================================
   Submit Button
   ========================================= */
.contact-submit {
    align-self: flex-start;
    position: relative;
    min-width: 180px;
    justify-content: center;
}

.contact-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.contact-submit-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-submit-loading[hidden],
.contact-submit-text[hidden] {
    display: none;
}

.contact-submit-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.contact-submit:hover:not(:disabled) .contact-submit-icon {
    transform: translateX(3px);
}

/* Spinner */
.contact-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* =========================================
   HubSpot Contact Form overrides
   Outer wrapper styles apply from here.
   Inner field styles must go in HubSpot
   form editor > Style > Custom CSS.
   ========================================= */
.contact-form-card .hbspt-form {
    width: 100%;
}

.contact-form-card .hs-form-iframe {
    display: block;
    width: 100% !important;
    border: none !important;
    min-height: 500px;
}

/*
 * ---- HubSpot inner form CSS (copy into HubSpot form editor > Style > Custom CSS) ----
 *
 * body, .hs-form { font-family: 'Montserrat', sans-serif; }
 *
 * .hs-form-field { margin-bottom: 1.5rem; }
 *
 * .hs-form-field label {
 *   font-family: 'Funnel Sans', sans-serif;
 *   font-size: 0.85rem;
 *   font-weight: 600;
 *   color: #16232B;
 *   margin-bottom: 0.4rem;
 *   display: block;
 * }
 *
 * .hs-input, input[type="text"], input[type="email"], input[type="tel"],
 * input[type="number"], select, textarea {
 *   width: 100% !important;
 *   padding: 0.75rem 1rem;
 *   border: 1.5px solid rgba(7,80,86,0.15);
 *   border-radius: 8px;
 *   font-family: 'Montserrat', sans-serif;
 *   font-size: 0.9rem;
 *   color: #16232B;
 *   background: #f8f7f5;
 *   outline: none;
 *   transition: border-color 0.3s ease, box-shadow 0.3s ease;
 *   box-sizing: border-box;
 * }
 *
 * .hs-input:focus {
 *   border-color: #075056;
 *   background: #fff;
 *   box-shadow: 0 0 0 3px rgba(7,80,86,0.08);
 * }
 *
 * textarea.hs-input { min-height: 140px; resize: vertical; }
 *
 * .hs-fieldtype-select .input select {
 *   appearance: none;
 *   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23075056' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
 *   background-repeat: no-repeat;
 *   background-position: right 1rem center;
 *   padding-right: 2.5rem;
 * }
 *
 * .hs-button, input[type="submit"] {
 *   background: #FF5B04 !important;
 *   color: #fff !important;
 *   border: none !important;
 *   border-radius: 4px !important;
 *   padding: 0.875rem 1.75rem !important;
 *   font-family: 'Funnel Sans', sans-serif !important;
 *   font-weight: 500 !important;
 *   font-size: 0.95rem !important;
 *   cursor: pointer !important;
 *   transition: background 0.3s ease, transform 0.2s ease !important;
 *   min-width: 180px !important;
 * }
 *
 * .hs-button:hover, input[type="submit"]:hover {
 *   background: #e65200 !important;
 *   transform: translateY(-2px) !important;
 *   box-shadow: 0 8px 25px rgba(255,91,4,0.35) !important;
 * }
 *
 * .hs-error-msg, .hs-main-font-element {
 *   font-size: 0.78rem;
 *   color: #e05a2b;
 *   font-family: 'Funnel Sans', sans-serif;
 *   margin-top: 0.25rem;
 *   display: block;
 * }
 *
 * .hs-form-required { color: #FF5B04; }
 *
 * .submitted-message {
 *   font-family: 'Funnel Sans', sans-serif;
 *   color: #075056;
 *   font-size: 1rem;
 *   padding: 1rem;
 *   background: #e8f5ee;
 *   border: 1px solid #a3d9b8;
 *   border-radius: 8px;
 * }
 * ---- end HubSpot CSS snippet ----
 */

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-form-card {
        padding: 1.75rem;
    }

    .contact-submit {
        width: 100%;
    }

    .contact-info {
        text-align: center;
    }

    .contact-detail-item {
        justify-content: center;
    }

    .contact-detail-label {
        text-align: start;
    }
}
