/*
 * FAQ page styles
 * Loaded via @push('styles') — only on /faq.
 * Shared, brand-aware: all accents use the --brand-* tokens
 * (resources/css/{eb,mm}/brand.css) so EB renders pink and MM gold
 * with no per-brand duplication. Never hardcode brand hex here.
 */

/* =================================================================
   1. PAGE HEADER
   ================================================================= */
.faq-page {
    max-width: 860px;
}

.faq-title {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 2rem;
    letter-spacing: 0.02em;
    color: #212529;
    margin-bottom: 1.5rem;
}

/* =================================================================
   2. IN-PAGE CATEGORY NAV
   ================================================================= */
.faq-nav {
    margin-bottom: 2.5rem;
}

.faq-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.faq-nav__link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.faq-nav__link:hover,
.faq-nav__link:focus-visible {
    color: var(--brand-on-primary, #fff);
    background-color: var(--brand-primary-fill, var(--brand-primary));
    border-color: var(--brand-primary-fill, var(--brand-primary));
    text-decoration: none;
}

.faq-nav__link:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* =================================================================
   3. CATEGORY SECTION HEADER (.section-title idiom)
   ================================================================= */
.faq-category {
    margin-bottom: 3rem;
    /* Offset so anchor jumps clear the sticky header */
    scroll-margin-top: 6rem;
}

.section-title {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    color: #212529;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--brand-primary);
    margin-top: 0.5rem;
}

/* =================================================================
   4. ACCORDION (native <details>/<summary>)
   ================================================================= */
.faq-accordion {
    border-top: 1px solid #eee;
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-item__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
    transition: color 0.15s ease;
}

/* Hide the native disclosure triangle across engines */
.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__question:hover {
    color: var(--brand-accent-text, var(--brand-primary));
}

.faq-item__question:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Chevron affordance — rotates when the item is open */
.faq-item__question::after {
    content: '';
    flex: 0 0 auto;
    width: 0.6em;
    height: 0.6em;
    margin-right: 0.25rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.faq-item[open] > .faq-item__question {
    color: var(--brand-primary);
}

.faq-item[open] > .faq-item__question::after {
    transform: rotate(-135deg);
}

.faq-item__answer {
    padding: 0 0.25rem 1.375rem;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #555;
    max-width: 68ch;
}

.faq-item__answer a {
    color: var(--brand-link);
    text-decoration: underline;
}

.faq-item__answer a:hover {
    color: var(--brand-link-hover);
}

/* =================================================================
   5. EMPTY STATE
   ================================================================= */
.faq-empty {
    padding: 4rem 0;
    text-align: center;
    color: #999;
    font-size: 1.125rem;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */

/* Tablet */
@media (max-width: 767.98px) {
    .faq-title {
        font-size: 1.75rem;
    }

    .faq-category {
        margin-bottom: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .faq-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .faq-item__question {
        font-size: 0.9375rem;
        padding: 1rem 0.25rem;
    }

    .faq-item__answer {
        font-size: 0.9375rem;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .faq-item__question,
    .faq-item__question::after,
    .faq-nav__link {
        transition: none;
    }
}
