/* герой и CTA - тот же приём, что на how-to-order/about. Список вопросов - аккордеон: без JS все
   ответы видны (обычный поток), JS (faq.js) добавляет .faq__list "js-ready" и сворачивает через grid-template-rows */

.faq {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 64px;
}

.faq__back {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-ink-muted);
    transition: color 0.15s ease;
}

.faq__back:hover { color: var(--color-ink); }

/* --- Hero --- */

.faq__hero {
    padding: 48px 40px;
    border-radius: var(--radius-md);
    background: var(--color-ink);
    text-align: center;
    margin-bottom: 40px;
}

.faq__hero-logo {
    display: block;
    height: 40px;
    width: auto;
    margin: 0 auto 8px;
}

.faq__eyebrow {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.faq__title {
    margin: 20px 0 16px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    letter-spacing: -0.01em;
    color: #fff;
}

.faq__subtitle {
    max-width: 560px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15.5px;
    line-height: 1.65;
}

/* --- Accordion --- без JS (.faq__list без .js-ready) ответ - обычный блок в потоке, всегда виден
   целиком. С JS - сворачивается через grid-template-rows, без max-height и без обрезки контента. */

.faq__list {
    list-style: none;
    margin: 0 0 56px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq__item {
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: border-color 0.15s ease;
}

.faq__item:hover { border-color: #D8D5CE; }

.faq__question-row {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.4;
    color: var(--color-ink);
    cursor: pointer;
    border-radius: var(--radius-md);
}

.faq__chevron {
    flex-shrink: 0;
    width: 12px;
    height: 8px;
    color: var(--color-ink-muted);
    transition: transform 0.2s ease;
}

.faq__item.is-open .faq__chevron { transform: rotate(180deg); }

.faq__answer-wrap {
    padding: 0 24px 20px;
}

/* padding-bottom не анимируется (только grid-template-rows) - переключается мгновенно, но .faq__answer-wrap реально схлопывается в 0 */
.faq__list.js-ready .faq__answer-wrap {
    display: grid;
    grid-template-rows: 0fr;
    padding: 0 24px;
    transition: grid-template-rows 0.25s ease;
}

.faq__list.js-ready .faq__item.is-open .faq__answer-wrap {
    grid-template-rows: 1fr;
    padding: 0 24px 20px;
}

.faq__answer-inner { min-height: 0; }

.faq__list.js-ready .faq__answer-inner { overflow: hidden; }

.faq__answer {
    margin: 0;
    max-width: 68ch;
    color: var(--color-ink-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

/* --- CTA --- */

.faq__cta {
    padding: 44px 40px;
    border-radius: var(--radius-md);
    background: var(--color-ink);
    color: #fff;
    text-align: center;
}

.faq__cta-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
}

.faq__cta-text {
    margin: 0 auto 28px;
    max-width: 440px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14.5px;
    line-height: 1.6;
}

.faq__cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.faq__cta-catalog {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.faq__cta-catalog:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

/* Компактный герой на мобильном - тот же приём, что на
   about/how-to-order/contacts/brought-cars/reviews. */
@media (max-width: 720px) {
    .faq__hero {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 6px 14px;
        padding: 24px 20px;
        margin-bottom: 28px;
    }
    .faq__hero-logo { margin: 0; height: 26px; }
    .faq__title { flex-basis: 100%; margin: 2px 0 0; font-size: 22px; }
    .faq__subtitle { flex-basis: 100%; max-width: 100%; margin: 0; font-size: 13.5px; line-height: 1.5; }

    .faq__question { padding: 16px 18px; font-size: 14.5px; gap: 14px; }
    .faq__answer-wrap { padding: 0 18px 16px; }
    .faq__list.js-ready .faq__answer-wrap { padding: 0 18px; }
    .faq__list.js-ready .faq__item.is-open .faq__answer-wrap { padding: 0 18px 16px; }

    .faq__cta { padding: 32px 22px; }
}
