/* ==========================================================================
   BuildX -- Massachusetts ADU FAQ (/faqs/)
   --------------------------------------------------------------------------
   Added 2026-08-11. Before this file the page shipped with NO page-level
   stylesheet at all: faqs.php never declared $critical_css, and its markup
   used a .wrap container that is not defined anywhere in the codebase. The
   result was full-bleed text hard against the left viewport edge and raw
   native disclosure triangles on every accordion.

   The accordions are deliberately <details>/<summary> and NOT the
   .faq__item/<button> pattern used on /adu-home-tour/. includes/seo.php
   parses THIS FILE'S SIBLING pages/faqs.php from disk with a <summary>-based
   regex to emit FAQPage schema; converting to buttons would silently delete
   the schema. So the markup stays, and this stylesheet makes it LOOK exactly
   like the tour toggles: hairline dividers, Montserrat 600 question, a CSS
   chevron that flips, and a light gray fill on the open row.

   Toggle visuals mirror .tour-faq in adu-home-tour.css. If that pattern is
   restyled, mirror the change here -- the two are intentional twins, not a
   shared class, because the underlying elements differ.
   ========================================================================== */

.faq-page {
    background: #FFFFFF;
}

/* Page shell -- centered measure. Replaces the undefined .wrap. */
.faq-page .faq-wrap {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

/*
   Breadcrumbs are intentionally NOT styled here. The page uses the site-wide
   .breadcrumb-bar > .container > render_breadcrumbs() pattern, fully styled in
   global.css (black band, left aligned, gray links, white current crumb). The
   first build hand-rolled a centered .breadcrumb nav in white space instead --
   the ONE thing on this page that did not match the rest of the site.
   If crumbs ever need adjusting, fix global.css so every page moves together.
*/

/* ── Intro (centered) ───────────────────────────────────────────────── */
.faq-page .faq-intro {
    padding: 48px 0 8px;
    text-align: center;
}

.faq-page h1 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 16px;
}

.faq-page .faq-page__lede {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #555;
    max-width: 680px;
    margin: 0 auto;
}

.faq-page .faq-page__lede a {
    color: #F5A623;
    font-weight: 600;
    text-decoration: underline;
}

.faq-page .faq-page__lede a:hover {
    color: #E09510;
}

/* ── Accordion section heading (centered) ───────────────────────────── */
.faq-page .faq-list-section {
    padding: 40px 0 64px;
}

.faq-page .faq-section-head {
    text-align: center;
    margin-bottom: 32px;
}

.faq-page .faq-section-head .section__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000000;
    border-bottom: 2px solid #E0E0E0;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.faq-page .faq-section-head h2 {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
}

/* ── Toggles -- twin of .tour-faq, left-aligned by design ───────────── */
.faq-page details.bx-details {
    border-bottom: 1px solid #E0E0E0;
    border-radius: 4px;
    text-align: left;
    transition: background 0.2s;
}

.faq-page details.bx-details:first-of-type {
    border-top: 1px solid #E0E0E0;
}

.faq-page details.bx-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    text-align: left;
    cursor: pointer;
    list-style: none;
}

/* Kill the native disclosure triangle in every engine. */
.faq-page details.bx-details > summary::-webkit-details-marker {
    display: none;
}

.faq-page details.bx-details > summary::marker {
    content: '';
}

/* CSS chevron, matching the tour toggles. */
.faq-page details.bx-details > summary::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
    margin-top: -4px;
}

.faq-page details.bx-details[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.faq-page details.bx-details > summary:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
}

/* Open row -- light gray fill, bled to the edges of the measure. */
.faq-page details.bx-details[open] {
    background: #F5F5F5;
    padding: 0 20px;
    margin: 0 -20px;
}

.faq-page details.bx-details[open] > summary {
    font-weight: 700;
}

.faq-page details.bx-details .details-body {
    padding: 0 0 20px;
}

.faq-page details.bx-details .details-body p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

.faq-page details.bx-details .details-body p + p {
    margin-top: 12px;
}

.faq-page details.bx-details .details-body a {
    color: #F5A623;
    text-decoration: underline;
}

.faq-page details.bx-details .details-body a:hover {
    color: #E09510;
}

/* Deep-linked question (e.g. /faqs/#septic) reads as highlighted. */
.faq-page details.bx-details:target {
    background: #F5F5F5;
    padding: 0 20px;
    margin: 0 -20px;
}

/* ── Closing CTA ────────────────────────────────────────────────────── */
.faq-page .faq-cta-section {
    padding: 0 0 64px;
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .faq-page .faq-wrap {
        width: 88%;
    }

    .faq-page .faq-intro {
        padding: 32px 0 4px;
    }

    .faq-page .faq-list-section {
        padding: 28px 0 48px;
    }

    .faq-page details.bx-details > summary {
        font-size: 0.9375rem;
        padding: 18px 0;
    }

    /* Keep the open-row fill inside the narrower gutter. */
    .faq-page details.bx-details[open],
    .faq-page details.bx-details:target {
        padding: 0 14px;
        margin: 0 -14px;
    }
}
