/* Вопрос-Ответ */
[itemtype="https://schema.org/FAQPage"],
.questions-all {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточка вопроса */
[itemtype="https://schema.org/Question"],
.question-answer {
    width: 100%;
    height: fit-content;
    background-color: var(--color-background-primary);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

/* Заголовок вопроса (кликабельный) */
[itemprop="name"],
.question-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: start;
    color: var(--color-foreground-primary);
    font-size: var(--font-size-xl);
    line-height: 120%;
    transition: color 0.3s ease;
}

/* Активное состояние заголовка */
[itemprop="name"].active,
.question-header.active {
    color: var(--color-foreground-accent);
}

/* Иконка через псевдоэлемент */
[itemprop="name"]::after,
.question-icon {
    width: 24px;
    height: 24px;
    background-image: url("/static/img/faq/question-close-icon.svg");
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: contain;
}

[itemprop="name"]::after {
    content: '';
    flex-shrink: 0;

    margin-left: 10px;
}

/* Поворот иконки при открытии */
[itemprop="name"].active::after,
.question-header.active .question-icon {
    background-image: url("/static/img/faq/question-open-icon.svg");
}

/* Блок с ответом */
[itemprop="acceptedAnswer"],
.answer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, margin-top 0.5s ease, opacity 0.4s ease;
    width: 100%;

    color: var(--color-foreground-secondary);
    font-size: var(--font-size-md);
    line-height: 125%;
}

/* Адаптация на маленькие экраны (< 768)*/
@media screen and (max-width: 1200px) {
    [itemprop="name"],
    .question-header {
        font-size: var(--font-size-md);
        line-height: 125%;
    }

    [itemprop="acceptedAnswer"],
    .answer-content {
        font-size: var(--font-size-sm);
        line-height: 140%;
    }
}

/* Адаптация на маленькие экраны (< 480)*/
@media screen and (max-width: 700px) {
    [itemtype="https://schema.org/Question"],
    .question-answer {
        padding: 12px;
    }
}