/* ============================================================
   FAQ Page Styles
   Extends main.css — faq-specific components only
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.faq-hero {
    padding: 120px 24px 64px;
    text-align: center;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, #e8f2ff 0%, #ffffff 60%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}

.faq-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 113, 227, 0.07);
    border: 1px solid rgba(0, 113, 227, 0.18);
    border-radius: 40px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: 24px;
}

.faq-hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 20px;
    background: linear-gradient(170deg, #1d1d1f 0%, #3a3a3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-hero-desc {
    font-size: clamp(15px, 2vw, 17px);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* ── Search bar ───────────────────────────────────────────── */
.faq-search-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto 32px;
}

.faq-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 13px 44px 13px 44px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1), 0 2px 12px rgba(0, 0, 0, 0.05);
}

.faq-search-input::placeholder {
    color: #b0b0b5;
}

.faq-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.faq-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 4px;
    border-radius: 50%;
    line-height: 1;
    display: none;
    transition: color 0.2s, background 0.2s;
}

.faq-search-clear:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.06);
}

.faq-search-clear.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Category Pills ───────────────────────────────────────── */
.faq-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.faq-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.04);
    border: 1.5px solid rgba(0, 0, 0, 0.09);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.faq-cat-pill:hover,
.faq-cat-pill.is-active {
    background: rgba(0, 113, 227, 0.08);
    border-color: rgba(0, 113, 227, 0.25);
    color: var(--accent-blue);
}

/* ── Search no-results ────────────────────────────────────── */
.faq-no-results {
    text-align: center;
    padding: 56px 24px;
    display: none;
}

.faq-no-results.is-visible {
    display: block;
}

.faq-no-results-icon {
    font-size: 40px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.faq-no-results-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.faq-no-results-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Main Content Layout ──────────────────────────────────── */
.faq-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 24px 80px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}

/* ── Sidebar TOC ──────────────────────────────────────────── */
.faq-sidebar {
    position: sticky;
    top: 72px;
}

.faq-sidebar-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.faq-sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faq-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
    line-height: 1.4;
}

.faq-sidebar-nav a i {
    font-size: 12px;
    width: 16px;
    flex-shrink: 0;
    text-align: center;
}

.faq-sidebar-nav a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.faq-sidebar-nav a.is-active {
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-blue);
    font-weight: 500;
}

.faq-sidebar-count {
    margin-left: auto;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 1px 7px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── FAQ Content ──────────────────────────────────────────── */
.faq-content {
    min-width: 0;
}

/* ── Category Section ─────────────────────────────────────── */
.faq-category {
    margin-bottom: 56px;
}

.faq-category:last-child {
    margin-bottom: 0;
}

.faq-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.faq-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 113, 227, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 16px;
    flex-shrink: 0;
}

.faq-category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.faq-category-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 2px 10px;
    font-weight: 500;
}

/* ── Accordion Item ───────────────────────────────────────── */
.faq-item {
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 0;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
    border-color: rgba(0, 113, 227, 0.2);
}

.faq-item.is-open {
    border-color: rgba(0, 113, 227, 0.3);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.08);
}

.faq-item.is-hidden {
    display: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    user-select: none;
    gap: 16px;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--accent-blue);
}

.faq-question-text {
    flex: 1;
    min-width: 0;
}

.faq-question-icon {
    font-size: 13px;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), color 0.2s;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.faq-item.is-open .faq-question-icon {
    transform: rotate(180deg);
    color: var(--accent-blue);
}

.faq-answer-wrap {
    height: 0;
    overflow: hidden;
    transition: height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    border-top: 0px solid rgba(0, 0, 0, 0.07);
}

.faq-item.is-open .faq-answer-wrap {
    border-top-width: 1px;
}

.faq-answer {
    max-height: none;
    overflow: visible;
    padding: 16px 22px 20px;
    font-size: 14.5px;
    color: #555;
    line-height: 1.75;
}

.faq-answer p {
    margin-bottom: 12px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 20px;
    margin: 10px 0;
}

.faq-answer li {
    margin-bottom: 6px;
    line-height: 1.65;
}

.faq-answer code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: #c0392b;
}

.faq-answer strong {
    color: var(--text-main);
    font-weight: 600;
}

.faq-answer a {
    color: var(--accent-blue);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Search highlight */
.faq-highlight {
    background: rgba(255, 214, 0, 0.4);
    border-radius: 3px;
    padding: 0 2px;
}

/* ── CTA Section ──────────────────────────────────────────── */
.faq-cta {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 60%, #0d1117 100%);
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.faq-cta::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(0, 113, 227, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.faq-cta-inner {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.faq-cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.faq-cta h2 {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.faq-cta p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
    margin-bottom: 36px;
}

.faq-cta-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--accent-blue);
    color: #fff;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.faq-cta-btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.faq-cta-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.faq-cta-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 840px) {
    .faq-body {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .faq-sidebar {
        position: static;
        margin-bottom: 36px;
    }

    .faq-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .faq-sidebar-nav a {
        padding: 7px 14px;
        border-radius: 40px;
        background: rgba(0, 0, 0, 0.04);
        border: 1.5px solid rgba(0, 0, 0, 0.09);
        font-size: 13px;
    }

    .faq-sidebar-nav a:hover,
    .faq-sidebar-nav a.is-active {
        background: rgba(0, 113, 227, 0.08);
        border-color: rgba(0, 113, 227, 0.25);
    }

    .faq-sidebar-count {
        display: none;
    }

    .faq-sidebar-title {
        display: none;
    }
}

@media (max-width: 600px) {
    .faq-hero {
        padding: 100px 20px 48px;
    }

    .faq-body {
        padding: 48px 20px 64px;
    }

    .faq-question {
        padding: 16px 18px;
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 18px 18px;
        font-size: 14px;
    }

    .faq-category-header {
        gap: 12px;
    }

    .faq-cta {
        padding: 56px 20px;
    }
}
