/* ============================================================
   public/css/sections/faqs.css
   FAQ page — KNEST Civic Bold system
   Loads after tokens.css. No inline styles, no <style> blocks.
   ============================================================ */

/* ── MASTHEAD SEARCH ──────────────────────────────────────────────────────
   The header is shared (components/masthead); these style the search that
   sits in its default slot. */
.faq-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 560px;
    background: var(--surface);
    border-radius: var(--r-pill);
    box-shadow: 0 20px 44px -18px rgba(0 0 0 / 0.5), 0 0 0 6px rgba(255 255 255 / 0.08);
    transition: box-shadow var(--dur-fast) var(--ease);
}
.faq-search:focus-within {
    box-shadow: 0 20px 44px -18px rgba(0 0 0 / 0.5), 0 0 0 6px rgba(249 165 27 / 0.45);
}
.faq-search__icon {
    position: absolute; left: 1.25rem;
    width: 20px; height: 20px;
    color: var(--brand);
    pointer-events: none;
}
.faq-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 1.05rem 3.5rem 1.05rem 3.25rem;
    font-size: var(--fs-400);
    font-weight: 500;
    color: var(--ink);
    border-radius: var(--r-pill);
}
.faq-search__input::placeholder { color: var(--muted); }
.faq-search__input:focus { outline: none; }
.faq-search__input::-webkit-search-cancel-button { cursor: pointer; }
.faq-search__kbd {
    position: absolute; right: 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.75rem; height: 1.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font: 600 0.8rem/1 var(--font-sans);
}
.faq-search:focus-within .faq-search__kbd { opacity: 0; }
@media (hover: none) { .faq-search__kbd { display: none; } .faq-search__input { padding-right: 1.25rem; } }

.faq-search__popular {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 0.5rem;
    margin-top: var(--sp-4);
    font-size: var(--fs-300);
    color: rgba(255 255 255 / 0.7);
}
.faq-search__chip {
    padding: 0.35rem 0.8rem;
    border-radius: var(--r-pill);
    border: 1px solid rgba(255 255 255 / 0.22);
    color: var(--on-brand);
    font-size: var(--fs-300);
    font-weight: 600;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.faq-search__chip:hover { background: rgba(255 255 255 / 0.12); border-color: rgba(255 255 255 / 0.4); }

/* Search results feedback */
.faq-status {
    font-size: var(--fs-300);
    font-weight: 700;
    color: var(--brand);
    padding: 0.6rem 1rem;
    background: var(--green-050);
    border-radius: var(--r-pill);
    align-self: flex-start;
}
.faq-empty {
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--green-300);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 1rem + 3vw, 3rem);
    color: var(--muted);
}
.faq-empty__title { font: 700 var(--fs-500)/1.3 var(--font-display); color: var(--ink); margin-bottom: var(--sp-2); }
.faq-empty a { color: var(--brand); font-weight: 700; }
.faq-empty__reset {
    margin-top: var(--sp-4);
    padding: 0.6rem 1.2rem;
    border-radius: var(--r-pill);
    background: var(--brand); color: var(--on-brand);
    font-weight: 600; font-size: var(--fs-300);
}
.faq-item[hidden], .faq-category[hidden], .faq-status[hidden], .faq-empty[hidden] { display: none !important; }

/* ── BODY LAYOUT ──────────────────────────────────────────────────────── */
.faq-body {
    background: var(--color-surface);
    padding-block: clamp(3rem, 8vw, 5.5rem);
}

.faq-body__layout {
    display: grid;
    grid-template-columns: 256px 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────── */
.faq-sidebar {
    position: sticky;
    top: calc(var(--header-height, 72px) + 1.5rem);
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid rgba(0 0 0 / 0.07);
    padding: 1.5rem;
}

.faq-sidebar__label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    margin-block-end: 0.875rem;
}

.faq-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-block-end: 1.75rem;
    padding-block-end: 1.75rem;
    border-bottom: 1px solid rgba(0 0 0 / 0.07);
}

.faq-sidebar__link {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(0 0 0 / 0.65);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1.35;
}
.faq-sidebar__link:hover {
    background: rgba(7 84 43 / 0.05);
    color: var(--color-green-deep);
}
.faq-sidebar__link.is-active {
    background: rgba(7 84 43 / 0.07);
    color: var(--color-green-deep);
    font-weight: 700;
    border-left-color: var(--color-green-bright);
}

/* Sidebar contact block */
.faq-sidebar__contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    margin-block-end: 0.75rem;
}

.faq-sidebar__contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-green-deep);
    text-decoration: none;
    padding: 0.4rem 0;
    transition: color 0.15s;
}
.faq-sidebar__contact-link:hover,
.faq-sidebar__contact-link:focus-visible {
    color: var(--color-green-bright);
    outline: none;
}

/* Office numbers: a label plus one tel: link per number */
.faq-sidebar__contact-office {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    padding: 0.4rem 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--color-green-deep);
}
.faq-sidebar__contact-office svg { flex-shrink: 0; margin-top: 0.15rem; }
.faq-sidebar__contact-office a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; white-space: nowrap; }
.faq-sidebar__contact-office a:hover { text-decoration-thickness: 2px; }

/* ── ACCORDION WRAP ───────────────────────────────────────────────────── */
.faq-accordion-wrap {
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
}

/* ── CATEGORY ─────────────────────────────────────────────────────────── */
.faq-category {
    scroll-margin-top: calc(var(--header-height, 84px) + 1.5rem);
}

.faq-category__heading {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 800;
    color: var(--color-green-deep);
    margin-block-end: 0.875rem;
    letter-spacing: -0.01em;
}

.faq-category__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(12 169 75 / 0.12);
    color: var(--color-green-deep);
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0;
    min-width: 1.4rem;
    height: 1.4rem;
    border-radius: 100px;
    padding-inline: 0.35rem;
}

/* ── ACCORDION ITEMS ──────────────────────────────────────────────────── */
.faq-accordion {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--surface);
    border-radius: 0.875rem;
    border: 1px solid rgba(0 0 0 / 0.08);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid rgba(0 0 0 / 0.07);
    transition: opacity 0.2s;
}
.faq-item:last-child { border-bottom: none; }
.faq-item.is-hidden { display: none; }

.faq-item__trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.125rem 1.25rem;
    text-align: left;
    font-family: var(--font-body);
    color: var(--color-text);
    transition: background 0.15s, color 0.15s;
}
.faq-item__trigger:hover {
    background: rgba(7 84 43 / 0.03);
    color: var(--color-green-deep);
}
.faq-item__trigger:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(7 84 43 / 0.4);
}
.faq-item__trigger[aria-expanded="true"] {
    background: rgba(7 84 43 / 0.04);
}
.faq-item__trigger[aria-expanded="true"] .faq-item__q {
    color: var(--color-green-deep);
}

.faq-item__q {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.45;
}
.faq-item__q mark {
    background: rgba(244 125 32 / 0.22);
    color: inherit;
    border-radius: 2px;
    padding-inline: 1px;
}

.faq-item__icon {
    flex-shrink: 0;
    color: var(--color-green-bright);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.faq-item__trigger[aria-expanded="true"] .faq-item__icon {
    transform: rotate(180deg);
}

.faq-item__body { overflow: hidden; }
.faq-item__body.is-animating { display: block !important; }

.faq-item__answer {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid rgba(0 0 0 / 0.06);
    padding-top: 1rem;
}

.faq-item__answer p,
.faq-item__answer li {
    font-size: 0.9375rem;
    line-height: 1.72;
    color: rgba(0 0 0 / 0.65);
}

.faq-item__list {
    padding-inline-start: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
}
.faq-item__list li::marker { color: var(--color-green-bright); }


/* ── BOTTOM CTA ───────────────────────────────────────────────────────── */
.faq-cta {
    background: var(--color-green-deep);
    color: var(--on-brand);
    padding-block: clamp(3rem, 8vw, 5.5rem);
}

.faq-cta__inner { text-align: center; }

.faq-cta__eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--orange-300);
    margin-block-end: 0.5rem;
}

.faq-cta__heading {
    color: var(--on-brand);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-block-end: 2.75rem;
}

.faq-cta__contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.faq-cta__contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255 255 255 / 0.07);
    border: 1px solid rgba(255 255 255 / 0.14);
    border-radius: 0.875rem;
    padding: 1.25rem 1.75rem;
    text-decoration: none;
    color: var(--on-brand);
    min-width: 220px;
    transition: background 0.2s, transform 0.2s;
}
/* Only cards that are themselves links lift; the office card is a plain
   box holding one link per number. */
a.faq-cta__contact:hover,
a.faq-cta__contact:focus-visible {
    background: rgba(255 255 255 / 0.13);
    transform: translateY(-2px);
    outline: none;
}

.faq-cta__contact-icon {
    color: var(--color-green-bright);
    flex-shrink: 0;
    display: flex;
}

.faq-cta__contact-detail {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
}
.faq-cta__numbers a { color: var(--on-brand); text-decoration: underline; text-underline-offset: 0.15em; white-space: nowrap; }
.faq-cta__numbers a:hover { text-decoration-thickness: 2px; }
.faq-cta__contact-detail strong {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: rgba(255 255 255 / 0.8);
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .faq-body__layout {
        grid-template-columns: 1fr;
    }
    .faq-sidebar {
        position: static;
    }
    .faq-sidebar__list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.375rem;
        border-bottom: none;
        margin-block-end: 0;
        padding-block-end: 0;
    }
    .faq-sidebar__link {
        border-left: none;
        border: 1.5px solid rgba(0 0 0 / 0.1);
        border-radius: 100px;
        padding: 0.375rem 0.875rem;
        font-size: 0.8125rem;
    }
    .faq-sidebar__link.is-active {
        background: var(--color-green-deep);
        color: var(--on-brand);
        border-color: var(--color-green-deep);
    }
    .faq-sidebar__contact { display: none; }
}

@media (max-width: 600px) {
    .faq-cta__contacts { flex-direction: column; align-items: stretch; }
    .faq-cta__contact  { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .faq-item__icon { transition: none; }
}
