/* ===================================================================
   АКАДЕМИЧЕСКИЙ ДИЗАЙН ДЛЯ СТРАНИЦЫ ВОПРОСОВ И ОТВЕТОВ
   =================================================================== */

/* ----- Общие стили ----- */
.faq-page-body {
    font-family: 'Georgia', serif;
    background-color: #fafafa;
    color: #1e293b;
}

/* ----- Хлебные крошки — КОНТРАСТНЫЕ ----- */
.faq-breadcrumbs {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    padding: 6px 0;
}
.faq-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.faq-breadcrumbs a {
    color: #1E3D79;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, text-decoration 0.2s;
}
.faq-breadcrumbs a:hover {
    color: #E51A4B;
    text-decoration: underline;
}
.faq-breadcrumbs span {
    color: #0f172a;
    font-weight: 600;
}
.faq-breadcrumbs .ic {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    margin: 0 4px;
    flex-shrink: 0;
}
.faq-breadcrumbs .ic.-arrow {
    stroke: #94a3b8;
    width: 10px;
    height: 10px;
}

/* ----- Заголовок ----- */
.faq-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}
.faq-page-subtitle {
    font-size: 1.1rem;
    color: #475569;
    max-width: 700px;
    line-height: 1.6;
    margin-top: 8px;
}
.faq-product-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1e40af;
    background: #dbeafe;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
}

/* ----- Поиск ----- */
.faq-search {
    margin: 20px 0 28px;
    max-width: 500px;
}
.faq-search__wrapper {
    position: relative;
}
.faq-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
}
.faq-search__input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.faq-search__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.faq-search__input::placeholder {
    color: #64748b;
}
.faq-search__results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    z-index: 100;
    display: none;
}
.faq-search__results.is-visible {
    display: block;
}
.faq-search__result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #1e293b;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.faq-search__result-item:last-child {
    border-bottom: none;
}
.faq-search__result-item:hover,
.faq-search__result-item.is-highlighted {
    background: #f1f5f9;
}
.faq-search__result-question {
    font-size: 13px;
    line-height: 1.4;
}
.faq-search__result-empty {
    padding: 20px 16px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}
.faq-search__result-highlight {
    background: #fef08a;
}
.faq-search__result-category {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}
.faq-search__result-item {
    gap: 8px;
}

/* ----- Категории (фильтры) ----- */
.faq-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.faq-category-filters__label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-right: 8px;
    display: flex;
    align-items: center;
}
.faq-category-filters__btn {
    padding: 4px 16px;
    border: 2px solid transparent;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
}
.faq-category-filters__btn:hover {
    border-color: #94a3b8;
    color: #1e293b;
}
.faq-category-filters__btn.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.faq-category-filters__btn.is-active:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}
.faq-category-filters__count {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #64748b;
    margin-left: auto;
}

/* ----- Секции вопросов (группировка по продуктам) ----- */
.faq-section {
    margin-bottom: 48px;
    scroll-margin-top: 120px;
}
.faq-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}
.faq-section__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.faq-section__count {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
}
.faq-section__description {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #64748b;
    margin: -8px 0 20px;
    line-height: 1.6;
}

/* ----- Аккордеон (вопросы) ----- */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.faq-accordion__item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-accordion__item:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.faq-accordion__question {
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    background: #fafafa;
    transition: background .2s;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.faq-accordion__question-h {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    line-height: inherit;
    color: inherit;
    display: inline;
}
.faq-accordion__question::-webkit-details-marker {
    display: none;
}
.faq-accordion__question::after {
    content: '+';
    font-size: 22px;
    color: #2563eb;
    font-weight: 300;
    transition: transform .2s;
    flex-shrink: 0;
}
.faq-accordion__item[open] .faq-accordion__question {
    background: #f1f5f9;
}
.faq-accordion__item[open] .faq-accordion__question::after {
    content: '−';
}
.faq-accordion__answer {
    padding: 16px 20px 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
    border-top: 1px solid #f1f5f9;
}
.faq-accordion__answer p {
    margin: 0 0 12px;
}
.faq-accordion__answer p:last-child {
    margin: 0;
}
.faq-accordion__answer a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.faq-accordion__answer a:hover {
    color: #1d4ed8;
}
.faq-accordion__answer ul,
.faq-accordion__answer ol {
    margin: 8px 0 12px;
    padding-left: 24px;
}
.faq-accordion__answer li {
    margin-bottom: 4px;
}
.faq-accordion__answer img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}
.faq-answer__term-link {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
}
.faq-answer__term-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.faq-answer__term-link a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

/* ----- Скрытые блоки (показываются по кнопке "Показать все") ----- */
.faq-accordion__more.hidden-items {
    display: none;
}
.faq-accordion__more.hidden-items.is-visible {
    display: block;
}

/* Кнопка "Показать все" */
.faq-accordion__show-more-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2563eb;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    margin-top: 12px;
    align-self: flex-start;
}
.faq-accordion__show-more-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ----- Состояние скрытых элементов при фильтрации ----- */
.faq-accordion__item.is-hidden {
    display: none;
}
.faq-section.is-hidden {
    display: none;
}

/* ----- Пустой результат ----- */
.faq-empty {
    text-align: center;
    padding: 48px 20px;
    color: #64748b;
}
.faq-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}
.faq-empty__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}
.faq-empty__text {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ----- Продающий блок ----- */
.faq-cta {
    margin: 40px 0 20px;
    padding: 40px 0;
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    border-bottom: 2px solid #e2e8f0;
}
.faq-cta__inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}
.faq-cta__content {
    background: #ffffff;
    padding: 32px 36px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.faq-cta__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.faq-cta__description {
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 20px;
}
.faq-cta__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-cta__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.faq-cta__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.faq-cta__group label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}
.faq-cta__group input,
.faq-cta__group textarea {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fafafa;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.faq-cta__group input:focus,
.faq-cta__group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}
.faq-cta__group textarea {
    resize: vertical;
    min-height: 70px;
    font-family: 'Georgia', serif;
}
.faq-cta__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.faq-cta__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    line-height: 1.4;
}
.faq-cta__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #2563eb;
    cursor: pointer;
}
.faq-cta__btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    padding: 10px 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.faq-cta__btn:hover {
    background: #1d4ed8;
}
.faq-cta__visual {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px 24px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.faq-cta__benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-cta__benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
}
.faq-cta__benefit svg {
    flex-shrink: 0;
    color: #2563eb;
}
.faq-cta__contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.faq-cta__contacts-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}
.faq-cta__phone {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
}
.faq-cta__phone:hover {
    color: #2563eb;
}
.faq-cta__email {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #2563eb;
    text-decoration: none;
}
.faq-cta__email:hover {
    text-decoration: underline;
}

/* ----- Адаптив ----- */
@media (max-width: 1024px) {
    .faq-cta__inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .faq-cta__visual {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 20px;
    }
    .faq-cta__benefits {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 20px;
    }
    .faq-cta__contacts {
        border-top: none;
        padding-top: 0;
        align-items: flex-start;
    }
}
@media (max-width: 768px) {
    .faq-page-title {
        font-size: 1.5rem;
    }
    .faq-cta {
        padding: 24px 0;
    }
    .faq-cta__content {
        padding: 20px;
    }
    .faq-cta__row {
        grid-template-columns: 1fr;
    }
    .faq-cta__footer {
        flex-direction: column;
        align-items: stretch;
    }
    .faq-cta__btn {
        width: 100%;
        text-align: center;
    }
    .faq-cta__visual {
        flex-direction: column;
        padding: 16px;
    }
    .faq-cta__benefits {
        flex-direction: column;
    }
    .faq-cta__contacts {
        align-items: center;
        text-align: center;
        border-top: 1px solid #f1f5f9;
        padding-top: 14px;
    }
    .faq-category-filters {
        padding: 12px 16px;
    }
    .faq-category-filters__label {
        width: 100%;
        margin-bottom: 4px;
    }
    .faq-category-filters__count {
        margin-left: 0;
        width: 100%;
        margin-top: 4px;
    }
    .faq-accordion__question {
        font-size: 0.9rem;
        padding: 14px 16px;
    }
    .faq-accordion__answer {
        font-size: 0.9rem;
        padding: 14px 16px;
    }
}
@media (max-width: 480px) {
    .faq-cta__content {
        padding: 16px;
    }
    .faq-cta__group input,
    .faq-cta__group textarea {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    .faq-cta__btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}