/* ========================================
   FAQ Block
   ======================================== */
.faq-block {
    margin: 40px 0;
    background-color: #383369;
    border-radius: 12px;
    overflow: hidden;
    color: #fff;
}

/* Header */
.faq-block__header {
    padding: 28px 28px 20px;
    text-align: center;
}

.faq-block .faq-block__title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
    text-decoration: none !important;
    border: none;
    padding: 0;
}

.faq-block__subtitle {
    font-size: 13px;
    color: #c9b8f0;
    margin: 0;
    line-height: 1.4;
}

/* Search */
.faq-block__search {
    display: flex;
    align-items: center;
    margin: 0 28px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
}

.faq-block__search-icon {
    flex-shrink: 0;
    margin: 0 10px 0 14px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.faq-block__search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: 14px;
    padding: 9px 0;
    min-width: 0;
}

.faq-block__search-input:focus {
    color: #fff;
    -webkit-text-fill-color: #fff;
    background-color: transparent;
}

.faq-block__search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.faq-block__search-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #4C49FF;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border-radius: 0 6px 6px 0;
}

.faq-block__search-btn:hover {
    background: linear-gradient(315deg, #4C49FF 0%, #4C49FF 25%, #c84dff 50%, #4C49FF 75%, #4C49FF 100%);
    background-size: 200% 200%;
    animation: faqBtnShimmer 0.8s ease infinite;
}

@keyframes faqBtnShimmer {
    0%   { background-position: 0% 100%; }
    50%  { background-position: 100% 0%; }
    100% { background-position: 0% 100%; }
}

/* Tabs */
.faq-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 28px 20px;
}

.faq-tabs__btn {
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.faq-tabs__btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.faq-tabs__btn--active:hover {
    background: rgba(118, 11, 255, 0.68) !important;
}

.faq-tabs__btn--active {
    background: #760BFF;
    color: #fff;
}

.faq-tabs__btn--active:focus {
    background: #760BFF;
    color: #fff;
}

/* List */
.faq-block__list {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Item */
.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toggle button (вся строка с вопросом) */
.faq-block .faq-item__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    text-align: left;
    color: #fff;
    font-size: inherit;
    line-height: inherit;
    text-transform: none;
    letter-spacing: normal;
    transition: background 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.faq-block .faq-item__toggle:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.faq-item__question {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: #fff;
}

.faq-item__chevron-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.faq-block .faq-item__toggle:hover .faq-item__chevron-wrap {
    background: rgba(255, 255, 255, 0.18);
}

.faq-item--open .faq-item__chevron-wrap {
    background: rgba(255, 255, 255, 0.18);
}

.faq-item__chevron {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s, transform 0.25s ease;
}

.faq-block .faq-item__toggle:hover .faq-item__chevron {
    color: #fff;
}

.faq-item--open .faq-item__chevron {
    transform: rotate(90deg);
    color: #fff;
}

/* Тело аккордеона */
.faq-item__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.faq-item--open .faq-item__body {
    grid-template-rows: 1fr;
}

.faq-item__body-inner {
    overflow: hidden;
    padding: 0 24px 0;
    transition: padding-bottom 0.3s ease;
}

.faq-item--open .faq-item__body-inner {
    padding-bottom: 20px;
}

.faq-item__answer {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.65;
}

.faq-item__answer p {
    margin: 0 0 10px;
}

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

.faq-item__answer a {
    color: #c9a8ff;
    text-decoration: underline;
}

.faq-item__answer a:hover {
    color: #fff;
}

.faq-item__answer ul,
.faq-item__answer ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

.faq-item__answer li {
    margin-bottom: 4px;
}

/* Кнопка копирования ссылки */
.faq-item__actions {
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
}

.faq-block .faq-item__copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.faq-block .faq-item__copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
    box-shadow: none;
}

/* ========================================
   Related news card
   ======================================== */

.faq-news-card {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    border-radius: 0;
    text-decoration: none !important;
    color: #fff;
    overflow: hidden;
}

.faq-news-card:hover {
    color: #fff;
}

/* Верхняя полоса с лейблом: линия тянется слева, текст прижат вправо */
.faq-news-card__label {
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    padding-right: 14px;
}

.faq-news-card__label::before {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin-right: 10px;
}

.faq-news-card__content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
}

.faq-news-card__thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.faq-news-card__title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Полоса на всю ширину перед футером */
.faq-news-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}

.faq-news-card__date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.faq-news-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.faq-news-card__arrow,
.faq-news-card__pin {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    cursor: pointer;
}

.faq-news-card:hover .faq-news-card__arrow {
    color: #fff;
}

.faq-news-card__pin:hover {
    color: #fff;
}

/* Hidden states */
.faq-item--hidden,
.faq-item--over-limit,
.faq-item--search-hidden {
    display: none;
}

/* Show all button */
.faq-block__show-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.faq-block__show-all:hover {
    color: #fff;
}

.faq-block__show-all svg {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s, transform 0.2s;
}

.faq-block__show-all:hover svg {
    color: #fff;
    transform: translateX(2px);
}

/* Пустой список */
.faq-block__list--empty {
    border-top: none;
}

/* No results message */
.faq-block__no-results {
    padding: 24px 28px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    display: none;
}

.faq-block__no-results--visible {
    display: block;
}

/* ========================================
   FAQ Popup
   ======================================== */
.faq-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.faq-popup--active {
    pointer-events: auto;
}

/* Backdrop */
.faq-popup__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.faq-popup--active .faq-popup__backdrop {
    opacity: 1;
}

/* Sheet — mobile: full screen */
.faq-popup__sheet {
    position: fixed;
    inset: 0;
    background: #232257;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-popup--active .faq-popup__sheet {
    transform: translateX(0);
}

/* Header */
.faq-popup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 52px 20px 16px;
    flex-shrink: 0;
}

.faq-popup__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
}

.faq-popup__label-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fa8a35;
    flex-shrink: 0;
}

.faq-popup__back {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}

.faq-popup__back:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Body */
.faq-popup__body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 20px 24px;
    -webkit-overflow-scrolling: touch;
}

.faq-popup__question {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 20px;
    text-decoration: none !important;
    border: none;
    padding: 0;
}

.faq-popup__answer {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}

.faq-popup__answer p { margin: 0 0 14px; }
.faq-popup__answer p:last-child { margin-bottom: 0; }
.faq-popup__answer a { color: #a88df5; text-decoration: underline; }
.faq-popup__answer a:hover { color: #fff; }
.faq-popup__answer strong, .faq-popup__answer b { color: #fff; font-weight: 600; }

/* Footer */
.faq-popup__footer {
    flex-shrink: 0;
    padding: 20px;
}

.faq-popup__pin-btn,
.faq-popup__country-link {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 12px 14px;
    min-height: 41px;
    background: rgba(59, 55, 106, .01);
    -webkit-box-shadow: 0px 4px 4px rgba(0, 0, 0, .2);
    box-shadow: 0px 4px 4px rgba(0, 0, 0, .2);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.1;
    color: #fff;
    width: 100%;
    margin-top: 10px;
}

.faq-popup__country-link {
    border-bottom: none !important;
}

.faq-popup__pin-btn:hover,
.faq-popup__country-link:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #fff;
}

/* ========================================
   Desktop: centered modal (≥576px)
   ======================================== */
@media (min-width: 576px) {
    .faq-popup {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .faq-popup__sheet {
        position: relative;
        inset: auto;
        max-width: 600px;
        width: 100%;
        max-height: 90vh;
        border-radius: 16px;
        transform: scale(0.92) translateY(12px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .faq-popup--active .faq-popup__sheet {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    .faq-popup__head {
        padding: 28px 28px 16px;
    }

    .faq-popup__body {
        padding: 4px 28px 28px;
    }

    .faq-popup__pin-btn,
    .faq-popup__country-link {
        padding: 17px 28px;
    }

    .faq-popup__question {
        font-size: 24px;
    }
}

/* ========================================
   Mobile (block styles)
   ======================================== */
@media (max-width: 575px) {
    .faq-block__header {
        padding: 22px 20px 16px;
    }

    .faq-block__search {
        margin: 0 20px 16px;
    }

    .faq-tabs {
        padding: 0 20px 16px;
    }

    .faq-related-news-wrap {
        padding: 0 20px 14px;
    }

    .faq-news-card__content {
        padding: 10px 0;
    }

    .faq-news-card__footer {
        padding: 8px 0;
    }

    .faq-block .faq-item__toggle {
        padding: 14px 20px;
    }

    .faq-item__body-inner {
        padding: 0 20px 0;
    }

    .faq-item--open .faq-item__body-inner {
        padding-bottom: 16px;
    }

    .faq-block__show-all {
        padding: 14px 20px;
    }
}

/* Страница вопроса: пустой main под попапом */
.country--faq {
    min-height: 100vh;
}

.faq-popup__backdrop {
    display: block;
}

/* Страница вопроса: шапка кликабельна поверх фона, окно попапа под шапкой */
.faq-page .header {
    z-index: 10000;
}

.faq-page .faq-popup__sheet {
    top: var(--faq-header-h, 65px);
}

.faq-page .faq-popup__head {
    padding-top: 20px;
}

@media (min-width: 576px) {
    .faq-page .faq-popup {
        padding-top: calc(var(--faq-header-h, 65px) + 20px);
    }

    .faq-page .faq-popup__sheet {
        top: auto;
        max-height: calc(100vh - var(--faq-header-h, 65px) - 40px);
    }

    .faq-page .faq-popup__head {
        padding-top: 28px;
    }
}
