/* ==========================================
   FAQ SECTION
   ========================================== */

/* --- THE ALABASTER CANVAS --- */
.faq-section {
    background-color: #E6E4E0; /* Textured alabaster to match Services */
    color: #050505; /* Crisp black text */
    padding: 8rem 5%;
}

.faq-container {
    display: flex;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-container.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* --- Left Column --- */
.faq-left {
    flex: 0 0 30%;
    position: sticky;
    top: 150px;
}

/* --- THE EDITORIAL CONTACT CALLOUT --- */
.faq-contact-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 0 1.5rem; /* Space between text and the gold line */
    border-left: 2px solid #C89B3C; /* The 2px matte gold architectural line */
    margin-top: 2rem;
}

.faq-contact-card p {
    color: #555555; 
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* --- Right Column --- */
.faq-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- MINIMALIST FILTER TABS --- */
.faq-tabs {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(5, 5, 5, 0.1); /* Very faint baseline */
}

.faq-tab {
    background: transparent;
    border: none;
    color: #555555; /* Slightly muted black for inactive tabs */
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-tab:hover {
    color: #050505;
}

/* The Matte Gold Active Tab Underline */
.faq-tab.active {
    color: #050505;
}

.faq-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #C89B3C;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-tab.active::after {
    width: 100%; /* Line draws across perfectly when active */
}

/* --- Accordion Container --- */
.faq-accordion {
    border-top: 1px solid rgba(5, 5, 5, 0.1);
}

/* --- REFINED INTERACTION PHYSICS --- */
.faq-item {
    border-bottom: 1px solid rgba(5, 5, 5, 0.15); /* Clean divider line */
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.faq-question {
    background: transparent;
    color: #050505; /* Default pure black */
    border: none;
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease;
}

.faq-icon {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* The Matte Gold Active States */
.faq-item.active .faq-question {
    color: #C89B3C; /* Question turns matte gold */
}

.faq-item.active .faq-icon {
    color: #C89B3C; /* Icon turns matte gold */
    transform: rotate(180deg); /* Flips the arrow up */
}

/* Hidden Answer State */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    color: #333333; /* High readability dark grey/black for paragraphs */
    line-height: 1.6;
}

.faq-answer p {
    padding-bottom: 1.5rem;
    padding-right: 2rem; /* Prevents text from running under the icon */
    font-size: 1.05rem;
    margin: 0;
}

/* --- CROSS-FADE & STAGGER STATES (Items) --- */
/* Fading out */
.faq-item.hiding {
    opacity: 0;
    transform: translateY(10px);
}

/* Fading in */
.faq-item.showing {
    opacity: 1;
    transform: translateY(0);
}

/* Pre-state applied via JS right before showing */
.faq-item.pending {
    opacity: 0;
    transform: translateY(15px);
}

/* --- FAQ CONTACT BUTTON --- */
.faq-contact-btn {
    background: transparent;
    border: 2px solid #050505;
    color: #050505;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.faq-contact-btn:hover {
    background-color: #050505;
    color: #ffffff;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .faq-container {
        display: flex;
        flex-direction: column;
        gap: 0; 
    }
    
    .faq-left, .faq-right {
        display: contents;
    }

    /* 1. Heading stays at the top & centered */
    .faq-left .section-title {
        order: -1 !important;
        text-align: center !important;
        width: 100%;
        margin-bottom: 2.5rem !important;
    }

    /* 2. THE SWIPEABLE TABS (Concept 1) */
    .faq-tabs {
        order: 2;
        margin-bottom: 2rem;
        
        /* THE FIX: Forces the track to stay inside the screen bounds */
        width: 100%;
        max-width: 100%;
        
        /* Force single line and enable scrolling */
        justify-content: flex-start; 
        flex-wrap: nowrap; 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
        padding-bottom: 2px; 
    }

    /* Hides scrollbar on Chrome/Safari/Edge */
    .faq-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Prevents the buttons from squishing or breaking text to a new line */
    .faq-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 3. Accordion comes third */
    .faq-accordion {
        order: 3;
    }

    /* 4. Contact Card gets forced to the very bottom */
    .faq-contact-card {
        order: 4;
        margin-top: 4rem; 
        margin-bottom: 2rem;
    }
}