/* ---------- Общая обёртка ---------- */
.faq-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}
.faq-page__title {
    margin: 0 0 .5rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.faq-page__intro {
    margin-bottom: 2rem;
    color: #555;
	margin-top: -50px;
}
.faq-empty {
    padding: 1rem;
    background: #fff7e6;
    border-left: 4px solid #f0b429;
}

/* ---------- Поиск ---------- */
.faq-search {
    margin-bottom: 1.5rem;
}
.faq-search__input {
    width: 100%;
    max-width: 520px;
    padding: .75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.faq-search__input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34,113,177,.15);
}
.faq-search__empty {
    margin-top: .75rem;
    color: #b32d2e;
}

/* ---------- Сетка ---------- */
.faq-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ---------- Оглавление ---------- */
.faq-toc {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding-right: .5rem;
}
.faq-toc__title {
    margin: 0 0 .75rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #777;
}
.faq-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.faq-toc__list a {
    display: block;
    padding: .5rem .75rem;
    color: #333;
    text-decoration: none;
    font-size: .95rem;
    transition: background .15s, color .15s;
}
.faq-toc__list a:hover {
    background: #f0f0f1;
}
.faq-toc__list a.is-active {
    background: #8a71eb;
    color: #fff;
    font-weight: 600;
    border: 3px solid #c8c8c8;
}

/* ---------- Секции ---------- */
.faq-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 90px; /* чтобы sticky-хедер не перекрывал заголовок */
}
.faq-section__title {
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #e5e5e5;
    font-size: 1.35rem;
}

/* ---------- Аккордеон ---------- */
.faq-item {
    border-bottom: 1px solid #e5e5e5;
}
.faq-item:first-of-type {
    border-top: 1px solid #e5e5e5;
}
.faq-item__question {
    margin: 0;
    font-size: 1rem;
	padding-bottom: 14px;
}
.faq-item__trigger {
    position: relative;
    width: 100%;
    padding: 1rem 2.5rem 1rem 0;
    background: none;
    border: 0;
    text-align: left;
    font: inherit;
    font-weight: 600;
    color: #1d2327;
    cursor: pointer;
}
.faq-item__trigger::after {
    content: "+";
    position: absolute;
    right: .25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: #2271b1;
    transition: transform .2s;
}
.faq-item__trigger[aria-expanded="true"]::after {
    content: "−";
    transform: translateY(-50%) rotate(180deg);
}
.faq-item__trigger:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}
.faq-item__answer {
    padding: 0 0 1.25rem;
    color: #444;
    line-height: 1.6;
}
.faq-item__answer > :first-child { margin-top: 0; }
.faq-item__answer > :last-child  { margin-bottom: 0; }

/* ---------- Кнопка наверх ---------- */
.faq-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: .6rem 1rem;
    border: 0;
    border-radius: 999px;
    background: #2271b1;
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    transform: translateY(10px);
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
    z-index: 50;
}
.faq-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ---------- Мобильные ---------- */
@media (max-width: 900px) {
    .faq-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .faq-toc {
        position: static;
        max-height: none;
        padding: .75rem;
        background: #f6f7f7;
        border-radius: 8px;
    }
    .faq-toc__list {
        display: flex;
        flex-wrap: wrap;
        gap: .25rem;
    }
    .faq-toc__list a {
        padding: .35rem .7rem;
        font-size: .9rem;
    }
}

/* ---------- Скрытый текст для скринридеров ---------- */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Плавный скролл */
html { scroll-behavior: smooth; }