/* FAQ page
--------------------------------------------- */
.faq-page {
    --faq-navy: #06285f;
    --faq-navy-dark: #031f50;
    --faq-orange: #e5a92d;
    --faq-text: #202631;
    --faq-muted: #606b79;
    --faq-border: #d9e1eb;
    --faq-surface: #f5f8fc;
    --faq-surface-blue: #eef5ff;
}

.faq-page *,
.faq-page *::before,
.faq-page *::after {
    box-sizing: border-box;
}

.faq-page__content {
    max-width: 960px;
    margin-right: auto;
    margin-left: auto;
    padding-bottom: 80px;
}

.faq-page__header {
    margin-bottom: 28px;
    text-align: center;
}

.faq-page__title {
    margin: 0;
    color: var(--faq-navy);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.04em;
}

.faq-page__title::after {
    display: block;
    width: 54px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: var(--faq-orange);
    content: "";
}

.faq-page__lead {
    margin: 15px 0 0;
    color: var(--faq-muted);
    font-size: 15px;
    line-height: 1.8;
}

.faq-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 52px;
}

.faq-nav__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    color: var(--faq-navy);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.faq-nav__link:hover,
.faq-nav__link:focus-visible {
    border-color: var(--faq-navy-dark);
    color: #fff;
    background: var(--faq-navy-dark);
    text-decoration: none;
}

.faq-section {
    margin-bottom: 64px;
    scroll-margin-top: 120px;
}

.faq-section:last-child {
    margin-bottom: 0;
}

.faq-section__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: var(--faq-navy);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}

.faq-section__title::before {
    flex: 0 0 auto;
    width: 5px;
    height: 29px;
    border-radius: 4px;
    background: var(--faq-orange);
    content: "";
}

.app-manual {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
    padding: 20px 22px;
    border: 1px solid #c8d8ed;
    border-radius: 10px;
    background: var(--faq-surface-blue);
}

.app-manual__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    background: var(--faq-navy-dark);
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
}

.app-manual__title {
    margin: 0 0 5px;
    padding: 0;
    border: 0;
    color: var(--faq-navy);
    background: none;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.app-manual__text {
    margin: 0;
    color: var(--faq-muted);
    font-size: 14px;
    line-height: 1.7;
}

.app-manual__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.app-manual__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid var(--faq-navy-dark);
    border-radius: 6px;
    color: var(--faq-navy);
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.app-manual__button--primary {
    color: #fff;
    background: var(--faq-navy-dark);
}

.app-manual__button:hover,
.app-manual__button:focus-visible {
    color: var(--faq-navy);
    text-decoration: none;
    opacity: 0.78;
}

.app-manual__button--primary:hover,
.app-manual__button--primary:focus-visible {
    color: #fff;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    overflow: hidden;
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    background: #fff;
}

.faq-question {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 13px 18px;
    color: var(--faq-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    list-style: none;
    cursor: pointer;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question__mark {
    color: var(--faq-orange);
    font-size: 20px;
    font-weight: 700;
}

.faq-question__toggle {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #fff;
    background: var(--faq-navy-dark);
    font-size: 17px;
    line-height: 1;
}

.faq-question__toggle::before {
    content: "+";
}

.faq-item[open] .faq-question__toggle::before {
    content: "−";
}

.faq-question:hover,
.faq-question:focus-visible {
    background: #fafbfd;
}

.faq-answer {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 56px 20px 18px;
    border-top: 1px solid var(--faq-border);
    background: var(--faq-surface);
}

.faq-answer__mark {
    color: var(--faq-navy);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.7;
}

.faq-answer__content {
    min-width: 0;
    color: var(--faq-text);
    font-size: 14px;
    line-height: 1.9;
}

.faq-answer__content > :first-child {
    margin-top: 0;
}

.faq-answer__content > :last-child {
    margin-bottom: 0;
}

.faq-answer__content a {
    color: var(--faq-navy);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.faq-answer__content img,
.faq-answer__content iframe,
.faq-answer__content video {
    max-width: 100%;
}

.faq-answer__content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.faq-empty {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    color: var(--faq-muted);
    background: var(--faq-surface);
    text-align: center;
}

@media (max-width: 760px) {
    .faq-page__content {
        padding-bottom: 56px;
    }

    .faq-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 40px;
    }

    .faq-section {
        margin-bottom: 52px;
        scroll-margin-top: 88px;
    }

    .app-manual {
        grid-template-columns: 44px minmax(0, 1fr);
        padding: 17px;
    }

    .app-manual__icon {
        width: 44px;
        height: 44px;
        font-size: 21px;
    }

    .app-manual__actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .app-manual__button {
        flex: 1 1 180px;
    }
}

@media (max-width: 480px) {
    .faq-page__header {
        text-align: left;
    }

    .faq-page__title {
        font-size: 27px;
        text-align: center;
    }

    .faq-page__lead {
        text-align: left;
    }

    .faq-nav__link {
        padding-right: 7px;
        padding-left: 7px;
        font-size: 13px;
    }

    .faq-section__title {
        font-size: 21px;
    }

    .app-manual {
        grid-template-columns: 1fr;
    }

    .app-manual__icon {
        display: none;
    }

    .faq-question {
        grid-template-columns: 28px minmax(0, 1fr) 26px;
        padding: 12px;
    }

    .faq-answer {
        grid-template-columns: 28px minmax(0, 1fr);
        padding: 16px 12px;
    }
}
