/* ============================================================
 * FAQ page (template-name: FAQ)
 *
 * Layout: hero with search → desktop two-col (sticky nav + content)
 *         on <=900px the side nav becomes a sticky dropdown that
 *         mirrors single-post .m-toc-sticky.
 * ============================================================ */

.faq-page-main {
    background: var(--lv-surface, #f8f9fa);
    color: var(--lv-on-surface, #191c1d);
}

/* ──────────────────────────────────────────────
 * HERO
 * ────────────────────────────────────────────── */
.faq-page__hero {
    padding: 88px 24px 40px;
    text-align: center;
    background: var(--lv-surface, #f8f9fa);
    position: relative;
}
.faq-page__hero-inner {
    max-width: 760px;
    margin: 0 auto;
}
.faq-page__eyebrow {
    display: inline-block;
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lv-secondary, #545e76);
    margin: 0 0 18px;
}
.faq-page__hero h1 {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--lv-on-surface, #191c1d);
    font-weight: 700;
    margin: 0 0 18px;
}
.faq-page__lead {
    font-size: 17px;
    line-height: 1.6;
    color: var(--lv-secondary, #545e76);
    margin: 0 auto 32px;
    max-width: 560px;
}

/* Search field */
.faq-page__search {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
}
.faq-page__search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lv-secondary, #545e76);
    pointer-events: none;
}
.faq-page__search input[type="search"] {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--lv-border-strong, #d3d7de);
    border-radius: 6px;
    padding: 14px 48px 14px 48px;
    font-family: var(--lv-font-body, 'Manrope', system-ui, sans-serif);
    font-size: 15px;
    color: var(--lv-on-surface, #191c1d);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.faq-page__search input[type="search"]::-webkit-search-cancel-button,
.faq-page__search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.faq-page__search input[type="search"]:focus {
    outline: none;
    border-color: #790000;
    box-shadow: 0 0 0 3px rgba(121, 0, 0, 0.18);
}
.faq-page__search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lv-surface-container, #edeeef);
    color: var(--lv-on-surface, #191c1d);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    transition: background 150ms ease, color 150ms ease;
}
.faq-page__search-clear:hover {
    background: var(--lv-on-surface, #191c1d);
    color: #fff;
}
.faq-page__search-empty {
    margin: 18px auto 0;
    font-size: 14px;
    color: var(--lv-secondary, #545e76);
    text-align: center;
}
.faq-page__search-empty a { color: #790000; font-weight: 600; text-decoration: underline; }

/* ──────────────────────────────────────────────
 * MOBILE STICKY DROPDOWN NAV (≤ 900px)
 * Mirrors .m-toc-sticky from single-post.css
 * ────────────────────────────────────────────── */
.faq-mnav {
    display: none;
    position: sticky;
    top: var(--header-height, 76px);
    z-index: 22;
    background: rgba(248, 249, 250, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--lv-border, #e4e6ea);
    border-bottom: 1px solid var(--lv-border, #e4e6ea);
}
.faq-mnav__bar {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    gap: 10px;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--lv-on-surface, #191c1d);
}
.faq-mnav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lv-secondary, #545e76);
}
.faq-mnav__text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.faq-mnav__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--lv-secondary, #545e76);
}
.faq-mnav__current {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--lv-on-surface, #191c1d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.faq-mnav__chev {
    transition: transform 150ms ease;
    color: var(--lv-secondary, #545e76);
    flex-shrink: 0;
}
.faq-mnav.is-open .faq-mnav__chev { transform: rotate(180deg); }

.faq-mnav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms ease;
    border-top: 1px solid transparent;
}
.faq-mnav.is-open .faq-mnav__list {
    max-height: 60vh;
    overflow-y: auto;
    border-top-color: var(--lv-border, #e4e6ea);
}
.faq-mnav__list li { list-style: none; }
.faq-mnav__list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-left: 2px solid transparent;
    text-decoration: none;
    color: var(--lv-on-surface, #191c1d);
    font-size: 14px;
    font-weight: 600;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.faq-mnav__list a:hover {
    background: var(--lv-surface-container, #edeeef);
}
.faq-mnav__list a.is-active {
    background: rgba(121, 0, 0, 0.08);
    border-left-color: #790000;
    color: #790000;
    font-weight: 700;
}
.faq-mnav__num {
    font-family: var(--lv-font-mono, ui-monospace, monospace);
    font-size: 11px;
    font-weight: 700;
    color: var(--lv-secondary, #545e76);
    flex-shrink: 0;
}
.faq-mnav__list a.is-active .faq-mnav__num { color: #790000; }
.faq-mnav__title {
    flex: 1 1 auto;
    min-width: 0;
}
.faq-mnav__count {
    font-size: 11px;
    font-weight: 700;
    color: var(--lv-secondary, #545e76);
    background: var(--lv-surface-container-lowest, #fff);
    border: 1px solid var(--lv-border, #e4e6ea);
    border-radius: 6px;
    padding: 2px 8px;
    min-width: 26px;
    text-align: center;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────
 * DESKTOP TWO-COL LAYOUT
 * ────────────────────────────────────────────── */
.faq-page__layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 24px 96px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 56px;
    align-items: start;
}

.faq-page__nav {
    position: sticky;
    top: calc(var(--header-height, 76px) + 16px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.faq-page__nav h5 {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lv-secondary, #545e76);
    margin: 0 0 10px;
    padding: 0 8px;
}
.faq-page__nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--lv-on-surface, #191c1d);
    font-size: 14px;
    font-weight: 600;
    transition: background 150ms ease, color 150ms ease;
}
.faq-page__nav a:hover {
    background: var(--lv-surface-container, #edeeef);
}
.faq-page__nav a.is-active {
    background: rgba(121, 0, 0, 0.08);
    color: #790000;
}
.faq-page__nav-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--lv-secondary, #545e76);
    background: var(--lv-surface-container-lowest, #fff);
    border: 1px solid var(--lv-border, #e4e6ea);
    border-radius: 6px;
    padding: 1px 8px;
    min-width: 24px;
    text-align: center;
}
.faq-page__nav a.is-active .faq-page__nav-count {
    background: #fff;
    border-color: #790000;
    color: #790000;
}
.faq-page__nav-extra {
    margin-top: 12px;
    border-top: 1px solid var(--lv-border, #e4e6ea);
    padding-top: 18px !important;
    border-radius: 0 !important;
}

/* ──────────────────────────────────────────────
 * CATEGORY SECTIONS + ACCORDION
 * ────────────────────────────────────────────── */
.faq-page__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 56px;
}
.faq-cat[hidden] { display: none !important; }

.faq-cat__head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--lv-border, #e4e6ea);
}
.faq-cat__num {
    font-family: var(--lv-font-mono, ui-monospace, monospace);
    font-size: 13px;
    font-weight: 700;
    color: var(--lv-secondary, #545e76);
    letter-spacing: 0.04em;
}
.faq-cat__title {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--lv-on-surface, #191c1d);
    margin: 0;
}

.faq-list {
    display: grid;
    gap: 12px;
}
.faq-item {
    background: var(--lv-surface-container-lowest, #fff);
    border: 1px solid var(--lv-border, #e4e6ea);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.faq-item[hidden] { display: none !important; }
.faq-item:hover { border-color: var(--lv-border-strong, #d3d7de); }
.faq-item.is-open { border-color: #790000; box-shadow: 0 4px 12px -4px rgba(121, 0, 0, 0.16); }

.faq-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.faq-item__q {
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: var(--lv-on-surface, #191c1d);
    margin: 0;
    line-height: 1.4;
}
.faq-item__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: var(--lv-secondary, #545e76);
    transition: transform 200ms ease, color 150ms ease;
    flex-shrink: 0;
}
.faq-item.is-open .faq-item__icon {
    transform: rotate(45deg);
    color: #790000;
}

.faq-item__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 240ms ease;
    padding: 0 22px;
}
.faq-item.is-open .faq-item__body {
    max-height: 600px;
    padding-bottom: 22px;
}
.faq-item__body p {
    margin: 0;
    color: var(--lv-secondary, #545e76);
    font-size: 15px;
    line-height: 1.65;
}

/* Search highlight */
mark.faq-mark {
    background: rgba(121, 0, 0, 0.18);
    color: #790000;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}

/* ──────────────────────────────────────────────
 * "DIDN'T FIND" CTA (bottom of content)
 * ────────────────────────────────────────────── */
.faq-page__cta {
    margin-top: 16px;
    padding: 40px 32px;
    background: var(--lv-on-surface, #191c1d);
    border-radius: 6px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.faq-page__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(165, 0, 0, 0.35), transparent 60%);
    pointer-events: none;
}
.faq-page__cta h3 {
    position: relative;
    font-family: var(--lv-font-headline, 'Space Grotesk', system-ui, sans-serif);
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 12px;
}
.faq-page__cta p {
    position: relative;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto 22px;
}
.faq-page__cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    background: #790000;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-family: var(--lv-font-mono, ui-monospace, monospace);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.faq-page__cta-btn:hover {
    background: #a50000;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(121, 0, 0, 0.55);
    color: #fff;
}

/* ──────────────────────────────────────────────
 * RESPONSIVE
 * ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .faq-page__hero {
        padding: 56px 20px 28px;
    }
    .faq-mnav { display: block; }
    .faq-page__nav { display: none; }
    .faq-page__layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 28px 20px 80px;
    }
    .faq-page__content { gap: 40px; }
    .faq-cat__title { font-size: 24px; }
    .faq-item__top { padding: 16px 18px; }
}

@media (max-width: 480px) {
    .faq-page__hero h1 { font-size: 32px; }
    .faq-page__lead { font-size: 15px; }
    .faq-page__search input[type="search"] { padding: 13px 44px 13px 44px; font-size: 14px; }
}
