/* ==========================================
   CONTACT US PAGE
   Alabaster Theme with Deep Red Focus Interactions
   ========================================== */

/* The Canvas */
.contact-section {
    background-color: #E6E4E0; /* Textured Alabaster */
    color: #050505;
    min-height: 100vh;
    padding: 12rem 5% 8rem 5%; /* Clears the taller navbar */
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    gap: 8rem; /* Wide, airy gap between form and details */
}

/* --- LEFT: FORM COLUMN --- */
.contact-form-column {
    flex: 1;
}

.contact-title {
    font-size: clamp(3.5rem, 5vw, 4.5rem);
    line-height: 1;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* --- UPDATED TYPOGRAPHY --- */
/* Completely removes the cursive Playfair italic styling */
.contact-title .accent-red {
    color: #8B0000; /* Deep red for "Touch." */
    font-style: normal;
    font-family: inherit;
}

.contact-subtitle {
    color: #555555;
    font-size: 1.1rem;
    margin-bottom: 3.5rem;
    max-width: 80%;
}

/* Form Inputs */
.custom-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(5, 5, 5, 0.3);
    padding: 1rem 0;
    font-family: var(--font-main);
    font-size: 1rem;
    color: #050505;
    transition: border-color 0.3s ease;
    display: block; /* Fixes the baseline gap */
}

.form-textarea {
    resize: vertical; /* Allows the user to drag the bottom corner to expand it */
    height: 3.5rem; /* Forces the initial height to match your other form inputs */
    min-height: 3.5rem; /* Removes the massive 100px gap */
    vertical-align: bottom;
    margin-bottom: -1px;
}

.form-input::placeholder {
    color: rgba(5, 5, 5, 0.5);
    font-weight: 400;
}

/* Remove default focus outlines */
.form-input:focus {
    outline: none;
}

/* --- THE DEEP RED FOCUS INTERACTION --- */
/* This span sits exactly over the bottom border and scales from 0 to 100% width on focus */
.border-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #8B0000; /* Deep Red */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.form-input:focus ~ .border-highlight {
    transform: scaleX(1);
}

/* The Submit Button (Inverted Pill) */
.contact-submit-btn {
    align-self: flex-start; /* Keeps it tight to its own padding, not full width */
    background: #050505;
    color: #ffffff;
    border: 2px solid #050505;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.contact-submit-btn:hover {
    background: transparent;
    color: #050505;
}

/* Success Message State */
.form-success-msg {
    position: absolute;
    inset: 0;
    background: #E6E4E0; /* Matches background to cover form smoothly */
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.form-success-msg p {
    font-size: 1.5rem;
    color: #8B0000;
    font-family: inherit; /* Removing the italicized serif here as well */
    font-style: normal;
}

/* --- RIGHT (NOW LEFT): DETAILS COLUMN --- */
.contact-details-column {
    flex: 0 0 300px;
    border-right: 2px solid #8B0000; /* Swapped to border-right */
    padding-right: 3.5rem; /* Swapped to padding-right */
    padding-left: 0; /* Ensures the left edge is flush */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.detail-block .detail-heading {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555555;
    margin-bottom: 0.75rem;
    font-weight: bold; /* Added to maintain the standard heading weight */
}

.detail-block p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #050505;
}

/* --- UPDATED SOCIAL ICONS (MATCHING FOOTER) --- */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #111; /* Deep architectural black background */
    color: #8B0000; /* Default icon color is deep red */
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1.125rem;
}

.social-icon:hover {
    background-color: #8B0000;
    color: #000000; /* Icon turns solid black */
    transform: none; /* Removes the subtle lift to match footer perfectly */
}

/* --- LIGHT THEME NAV OVERRIDES --- */
.light-theme-nav .flip-link {
    color: #555555; /* Dark grey for resting state */
}
.light-theme-nav .flip-link::before {
    color: #050505; /* Solid black on hover */
}
.light-theme-nav .nav-btn {
    border-color: #050505;
    color: #050505;
}
.light-theme-nav .nav-btn:hover {
    background-color: #050505;
    color: #ffffff;
}
.light-theme-nav .mobile-menu-btn {
    color: #050505;
}

/* --- CUSTOM ENTRANCE ANIMATION --- */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUpEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- EDGE-TO-EDGE MAPBOX --- */
.edge-to-edge-map {
    width: 100%;
    height: 50vh; /* Takes up half the screen height */
    min-height: 400px;
    background-color: #D8D6D2; /* Fallback color matching your theme */
    border-top: 2px solid #8B0000; /* Architectural deep red line to separate from the form */
    position: relative;
    z-index: 10;
}

/* Overriding default Mapbox popup/UI styles to keep it clean */
.mapboxgl-ctrl-bottom-right {
    bottom: 20px;
    right: 20px;
}

/* --- KILL THE DARK SCROLL OVERLAY FROM NAV.JS --- */
.navbar.light-theme-nav.scrolled {
    background: transparent !important;
    border-bottom: none;
}

/* Get Directions link in the details column */
.get-directions-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #050505;
    text-decoration: none;
    border-bottom: 2px solid #8B0000;
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.get-directions-link:hover {
    color: #8B0000;
    border-bottom-color: #050505;
    transform: translateX(4px);
}

/* If you prefer a button style instead, use this instead: */
.get-directions-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.8rem;
    background: #050505;
    color: #fff;
    border: 2px solid #050505;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.get-directions-btn:hover {
    background: transparent;
    color: #050505;
}

/* ==========================================
   DATA CONSENT CHECKBOX
   ========================================== */
.consent-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Custom Checkbox Styling */
.consent-wrapper input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(5, 5, 5, 0.4);
    border-radius: 2px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 3px;
    transition: all 0.3s ease;
}

.consent-wrapper input[type="checkbox"]:checked {
    background-color: #8B0000;
    border-color: #8B0000;
}

/* The checkmark */
.consent-wrapper input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    color: #ffffff;
    font-size: 12px;
    left: 3px;
    top: 0px;
}

.consent-wrapper label {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.5;
    cursor: pointer;
}

/* ==========================================
   CUSTOM FORM DROPDOWNS
   ========================================== */
.custom-dropdown-wrapper {
    position: relative;
    cursor: pointer;
}

.custom-dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: #050505;
    transition: transform 0.3s ease;
}

/* Rotates the arrow 180 degrees when the menu is open */
.custom-dropdown-wrapper.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* The actual dropdown menu container */
.custom-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid rgba(5, 5, 5, 0.1);
    border-top: 3px solid #8B0000; /* Deep red architectural accent */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    list-style: none; /* Strips out the bullet points */
    padding: 0;
    margin: 0;
    z-index: 100; /* Ensures the menu floats above elements below it */
    
    /* Hidden by default with a smooth slide-up animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Shows the menu when the JS adds the 'open' class */
.custom-dropdown-wrapper.open .custom-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* The individual clickable options */
.custom-option {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #050505;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
}

.custom-option:hover {
    background-color: #FAFAFA;
    color: #8B0000; /* Changes text to deep red on hover */
}

/* ============================================================
   MOBILE RESPONSIVE (Contact Page)
   ============================================================ */
@media (max-width: 768px) {
    /* --- 1. Mobile Nav Layout --- */
    .main-nav .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding: 1rem 1.5rem !important;
        box-sizing: border-box;
    }

    .main-nav .nav-brand {
        display: none !important;
    }

    .main-nav .mobile-toggle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        order: 1;
        display: flex !important;
        /* Note: No white background override here so it stays dark */
    }

    .main-nav .nav-actions {
        position: relative !important;
        display: block !important;
        order: 2;
    }

    .main-nav .nav-quote-pill {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    /* --- 2. Contact Form Optimizations --- */
    /* Center the Send button */
    .contact-submit-btn {
        align-self: center !important;
        width: 100%; 
        text-align: center;
    }

    /* --- 3. Existing Page Layout Overrides --- */
    .contact-container {
        flex-direction: column-reverse; /* Forces the form to the top on mobile */
        gap: 5rem;
    }

    .contact-title {
        text-align: center;
        width: 100%;
    }

    .contact-subtitle {
        text-align: center;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 2.5rem;
    }

    .contact-details-column {
        flex: auto;
        align-items: center;
        text-align: center;
        border-right: none;
        padding-right: 0;
        padding-left: 0;
        border-top: 2px solid #8B0000;
        padding-top: 2.5rem;
        gap: 2rem;
    }

    .detail-block h4,
    .detail-block p {
        text-align: center;
    }

    .social-links {
        justify-content: center;
        width: 100%;
    }
}