﻿/* ─────────────────────────────────────────
   faq.css
   ───────────────────────────────────────── */

/* ── Page Hero ── */
.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.page-hero-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink, #0f1111);
    letter-spacing: -.02em;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .page-hero-title i {
        color: var(--blue, #0071dc);
    }

.page-hero-sub {
    font-size: 14px;
    color: var(--grey-600, #4b5563);
    margin: 0;
}

/* ── FAQ list ── */
.faq-list {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── FAQ item ── */
.faq-item {
    background: #fff;
    border: 1px solid var(--grey-200, #e5e7eb);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

    .faq-item:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,.06);
    }

    .faq-item.open {
        border-color: var(--blue, #0071dc);
        box-shadow: 0 4px 20px rgba(0,113,220,.10);
    }

/* ── Trigger button ── */
.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

    .faq-trigger:focus-visible {
        outline: 2px solid var(--blue, #0071dc);
        outline-offset: -2px;
        border-radius: 14px;
    }

.faq-question {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #0f1111);
    line-height: 1.4;
}

/* ── Chevron badge ── */
.faq-chevron {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--grey-50, #f9fafb);
    border: 1px solid var(--grey-200, #e5e7eb);
    display: grid;
    place-items: center;
    font-size: 11px;
    color: var(--grey-600, #4b5563);
    flex-shrink: 0;
    transition: background 200ms ease, border-color 200ms ease, transform 280ms ease, color 200ms ease;
}

.faq-item.open .faq-chevron {
    background: rgba(0,113,220,.10);
    border-color: rgba(0,113,220,.20);
    color: var(--blue, #0071dc);
    transform: rotate(180deg);
}

/* ── Accordion answer (CSS grid trick — no JS height needed) ── */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 280ms ease;
}

.faq-item.open .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer-inner {
    overflow: hidden;
    padding: 0 20px;
    transition: padding 280ms ease;
}

.faq-item.open .faq-answer-inner {
    padding: 0 20px 22px;
}

/* ── Answer content ── */
.faq-answer-inner p {
    font-size: 14px;
    color: var(--grey-600, #4b5563);
    line-height: 1.75;
    margin-bottom: 10px;
}

    .faq-answer-inner p:last-child,
    .faq-answer-inner a:last-child {
        margin-bottom: 0;
    }

.faq-answer-inner code {
    background: var(--grey-50, #f9fafb);
    border: 1px solid var(--grey-200, #e5e7eb);
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12.5px;
    color: var(--ink, #0f1111);
    font-family: 'Consolas', 'Fira Code', monospace;
}

/* ── Links ── */
.faq-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--blue, #0071dc);
    text-decoration: none;
    transition: color 140ms ease;
}

    .faq-link:hover {
        color: var(--blue-dark, #0055a5);
        text-decoration: underline;
    }

    .faq-link i {
        font-size: 11px;
    }

/* ── Responsive ── */
@media (max-width: 480px) {
    .faq-trigger {
        padding: 16px;
    }

    .faq-question {
        font-size: 14px;
    }

    .faq-item.open .faq-answer-inner {
        padding: 0 16px 18px;
    }
}
