/*
 * Блок faq (blocks/faq.php) — по пакету medvebika-faq-assets (style-tokens.css): белый фон, вопросы в одной
 * общей рамке (радиус 20) с тонкими голубыми разделителями, знак «+»/«−» в голубом круге 44px.
 * Раскладка: слева заголовок и «Остался вопрос?», справа вопросы; на узком экране — заголовок, вопросы, приглашение.
 */

.faq__in {
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); column-gap: 64px;
    grid-template-areas: "head list" "ask list"; grid-template-rows: auto 1fr; align-items: start;
}
.faq__head { grid-area: head; }
.faq__title { color: var(--c-ink); font-size: 48px; font-weight: 700; line-height: 1.12; letter-spacing: -.04em; }
.faq__lead { max-width: 24em; margin-top: 26px; color: var(--c-muted); font-size: 20px; line-height: 1.55; }

/* вопросы: одна рамка, строки через разделитель, кликабельна вся строка */
.faq__list { grid-area: list; overflow: hidden; border: 1px solid var(--c-line); border-radius: 20px; background: #fff; }
.faq__item + .faq__item { border-top: 1px solid var(--c-line); }
.faq__q {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 98px; padding: 22px 30px 22px 34px;
    color: var(--c-ink); font-size: 22px; font-weight: 650; line-height: 1.35; letter-spacing: -.015em;
    list-style: none; cursor: pointer; transition: color .15s ease;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--c-primary); }
.faq__q:focus-visible { outline: 3px solid #849fff; outline-offset: -3px; border-radius: 20px; }

/* знак: голубой круг, «+» закрыт / «−» открыт */
.faq__sign { position: relative; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--c-soft); transition: background-color .15s ease; }
.faq__sign::before, .faq__sign::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px;
    border-radius: 2px; background: var(--c-primary); transition: scale .2s ease;
}
.faq__sign::after { rotate: 90deg; }
.faq__item[open] .faq__sign::after { scale: 0 1; }
.faq__q:hover .faq__sign { background: var(--c-line); }

.faq__a { padding: 0 110px 32px 34px; margin-top: -6px; color: var(--c-muted); font-size: 18px; line-height: 1.55; }
.faq__link { display: inline-block; margin-top: 18px; color: var(--c-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.faq__link:hover { text-decoration-thickness: 2px; }

/* плавное раскрытие там, где браузер умеет анимировать высоту <details> (остальные просто раскрывают) */
@supports (interpolate-size: allow-keywords) {
    .faq { interpolate-size: allow-keywords; }
    .faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
    .faq__item[open]::details-content { block-size: auto; }
}

/* «Остался вопрос?» */
.faq__ask { grid-area: ask; display: flex; align-items: flex-start; gap: 28px; margin-top: 100px; }
.faq__ask-ico { flex: none; width: 120px; height: auto; }
.faq__ask-title { color: var(--c-ink); font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.faq__ask-text { margin-top: 10px; color: var(--c-muted); font-size: 19px; }
.faq__ask-btn { min-width: 268px; margin-top: 22px; }

@media (max-width: 1200px) {
    .faq__in { column-gap: 40px; }
    .faq__title { font-size: 40px; }
    .faq__q { font-size: 19px; min-height: 84px; padding-inline: 26px 22px; }
    .faq__a { padding: 0 72px 26px 26px; font-size: 17px; }
    .faq__ask { gap: 20px; }
    .faq__ask-ico { width: 96px; }
    .faq__ask-title { font-size: 26px; }
    .faq__ask-btn { min-width: 0; }
}
@media (max-width: 1024px) {
    .faq__in { grid-template-columns: 1fr; grid-template-areas: "head" "list" "ask"; grid-template-rows: auto; row-gap: 32px; }
    .faq__ask { margin-top: 12px; }
}
@media (max-width: 640px) {
    .faq__title { font-size: var(--fs-h2-m); }
    .faq__lead { margin-top: 16px; font-size: 17px; }
    .faq__list { border-radius: 18px; }
    .faq__q { gap: 16px; min-height: 72px; padding: 18px 16px 18px 20px; font-size: 17px; }
    .faq__sign { flex-basis: 38px; width: 38px; height: 38px; }
    .faq__a { padding: 0 20px 22px; font-size: 16px; }
    .faq__ask { gap: 16px; }
    .faq__ask-ico { width: 72px; }
    .faq__ask-title { font-size: var(--fs-h3-m); }
    .faq__ask-text { font-size: 16px; }
    .faq__ask-btn { width: 100%; margin-top: 16px; }
}
