/* FAQ page styles — theme-aware, hero split, clearer accordion */

/* ---------- Page intro / hero ---------- */
.page-intro {
    background-color: var(--bg-tint);
    padding: 40px 0;
    margin-bottom: 10px;
}

.faq-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--s-8);
    align-items: center;
    max-width: var(--container);
    margin: 0 auto var(--s-7);
}
.faq-hero .hero-text h1 {
    text-align: left;
    margin-bottom: var(--s-3);
}
.faq-hero .hero-text .subtitle {
    text-align: left;
    margin: 0 0 var(--s-5);
    color: var(--ink-soft);
}
.faq-hero .hero-text .intro-content {
    max-width: none;
    margin: 0;
    text-align: left;
}
.faq-hero .hero-text .intro-content p {
    margin: 0 0 var(--s-3);
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.65;
}
.faq-hero .hero-text .intro-content .faq-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--s-3);
    padding: 10px 14px;
    background: var(--surface-accent);
    color: var(--ink);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
}
.faq-hero .hero-text .intro-content .faq-hint i {
    color: var(--acc);
}
.faq-hero .hero-image {
    position: relative;
    border-radius: var(--r-l);
    overflow: hidden;
    box-shadow: var(--shadow-3);
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
}
.faq-hero .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 900px) {
    .faq-hero { grid-template-columns: 1fr; gap: var(--s-6); }
    .faq-hero .hero-text h1,
    .faq-hero .hero-text .subtitle,
    .faq-hero .hero-text .intro-content { text-align: center; }
    .faq-hero .hero-text .intro-content .faq-hint { display: inline-flex; }
    .faq-hero .hero-image { aspect-ratio: 16 / 10; }
}

/* ---------- Category quick-links ---------- */
.faq-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--s-4);
    max-width: var(--container);
    margin: 0 auto;
}

.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: var(--s-4);
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-2);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.category-link:hover {
    transform: translateY(-3px);
    border-color: var(--acc);
    box-shadow: var(--shadow-3);
}

.category-link i {
    font-size: 22px;
    color: var(--acc);
}

.category-link span {
    font-weight: 500;
    text-align: center;
    color: var(--ink);
}

/* ---------- Section wrapper ---------- */
.faq-section {
    padding: var(--s-7) 0;
}
.faq-section:nth-child(even) {
    background: var(--bg-tint);
}

/* Section title underline accent — matches family-support */
.section-title {
    position: relative;
    text-align: center;
    color: var(--ink);
    margin-bottom: var(--s-6);
    font-size: 2rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 72px;
    height: 3px;
    margin: 12px auto 0;
    background: linear-gradient(90deg, var(--acc), var(--link));
    border-radius: 2px;
}

/* ---------- Accordion ---------- */
.faq-grid {
    display: grid;
    gap: var(--s-3);
    max-width: 900px;
    margin: var(--s-5) auto 0;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-m);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.faq-item:hover {
    border-color: var(--acc);
}

.faq-item.open {
    border-color: var(--acc);
    box-shadow: var(--shadow-3);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: 18px 56px 18px 22px;
    position: relative;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    transition: background-color .2s ease;
}

.faq-question:hover {
    background: var(--surface-accent);
}

.faq-question::after {
    content: '\f078'; /* chevron-down */
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 18px;
    top: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-accent);
    color: var(--acc);
    border-radius: 50%;
    font-size: 13px;
    transform: translateY(-50%) rotate(0deg);
    transition: transform .25s ease, background-color .2s ease, color .2s ease;
}

.faq-item.open .faq-question {
    background: var(--surface-accent);
}

.faq-item.open .faq-question::after {
    transform: translateY(-50%) rotate(180deg);
    background: var(--acc);
    color: var(--surface);
}

.faq-answer {
    padding: 0 22px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .3s ease;
}

/* Open-state max-height is set inline by js/faq.js to the real scrollHeight
   so both directions animate smoothly. Do NOT set max-height here — animating
   to/from `none` doesn't work. */
.faq-item.open .faq-answer {
    padding: 4px 22px 22px;
    border-top: 1px solid var(--border-soft);
}

.faq-answer p {
    color: var(--ink-soft);
    margin: 0 0 12px;
    line-height: 1.65;
}

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

.faq-answer ul {
    list-style: disc;
    padding-left: 22px;
    margin: 10px 0;
    color: var(--ink-soft);
}

.faq-answer ul li {
    margin: 6px 0;
    line-height: 1.55;
}

.faq-answer a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.faq-answer a:hover { color: var(--link-hover); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .faq-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-link {
        padding: var(--s-3);
    }
    .category-link i {
        font-size: 20px;
    }
    .category-link span {
        font-size: 14px;
    }
    .section-title {
        font-size: 1.75rem;
    }
    .faq-question {
        font-size: 16px;
        padding: 16px 50px 16px 18px;
    }
    .faq-question::after {
        right: 14px;
        width: 28px;
        height: 28px;
    }
    .faq-answer {
        padding: 0 18px;
    }
    .faq-item.open .faq-answer {
        padding: 4px 18px 18px;
    }
}

@media (max-width: 480px) {
    .faq-categories {
        grid-template-columns: 1fr;
    }
}
