/* ==========================================================
   AnimeHub - Страница «Часто задаваемые вопросы (FAQ)» (/faq)
   ========================================================== */

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 20px;
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .faq-container {
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

.faq-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.faq-back-link:hover {
    color: #ff3b5c;
    transform: translateX(-3px);
}

/* Hero блок */
.faq-hero {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.14) 0%, rgba(20, 21, 28, 0.7) 100%);
    border: 1px solid rgba(255, 59, 92, 0.25);
    border-radius: 20px;
    padding: 36px 32px;
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.faq-hero::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 59, 92, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.faq-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 59, 92, 0.15);
    color: #ff3b5c;
    border: 1px solid rgba(255, 59, 92, 0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.faq-hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

@media (max-width: 768px) {
    .faq-hero {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .faq-hero h1 {
        font-size: 24px;
    }
}

.faq-hero-sub {
    font-size: 15.5px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 20px;
    max-width: 680px;
}

/* Поиск по вопросам */
.faq-search-wrap {
    position: relative;
    max-width: 620px;
}

.faq-search-input {
    width: 100%;
    background: rgba(14, 15, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 13px 18px 13px 44px;
    color: #ffffff;
    font-size: 14.5px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.faq-search-input:focus {
    border-color: #ff3b5c;
    background: rgba(20, 21, 28, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.18);
}

.faq-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

/* Фильтры категорий */
.faq-filter-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.faq-tab-btn {
    background: #121319;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.faq-tab-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}

.faq-tab-btn.active {
    background: #ff3b5c;
    border-color: #ff3b5c;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(255, 59, 92, 0.35);
}

/* Аккордеон вопросов */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
}

.faq-item {
    background: #121319;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.faq-item.is-open {
    border-color: rgba(255, 59, 92, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.faq-question-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

@media (max-width: 768px) {
    .faq-question-btn {
        padding: 16px 16px;
        font-size: 15px;
    }
}

.faq-question-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-category-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ff3b5c;
    background: rgba(255, 59, 92, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.faq-chevron {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.65);
    stroke-width: 2.2;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.2s ease;
    flex-shrink: 0;
}

.faq-item.is-open .faq-chevron {
    transform: rotate(180deg);
    stroke: #ff3b5c;
}

.faq-answer-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    opacity: 0;
}

.faq-item.is-open .faq-answer-wrap {
    grid-template-rows: 1fr;
    opacity: 1;
}

.faq-answer-content {
    overflow: hidden;
    padding: 0 20px 20px 20px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.65;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

@media (max-width: 768px) {
    .faq-answer-content {
        padding: 0 16px 16px 16px;
        padding-top: 12px;
        font-size: 14px;
    }
}

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

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

.faq-answer-content a {
    color: #ff3b5c;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Кнопка-баннер перехода на страницу AniPlus */
.faq-aniplus-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.18) 0%, rgba(255, 59, 92, 0.3) 100%);
    border: 1px solid rgba(255, 59, 92, 0.45);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14.5px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none !important;
    margin-top: 14px;
    box-shadow: 0 4px 16px rgba(255, 59, 92, 0.25);
    transition: all 0.22s ease;
}

.faq-aniplus-cta-link:hover {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.28) 0%, rgba(255, 59, 92, 0.45) 100%);
    border-color: rgba(255, 59, 92, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(255, 59, 92, 0.4);
}

.faq-aniplus-cta-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 59, 92, 0.9));
}


/* Карточка платной подписки */
.faq-sub-card {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.08) 0%, rgba(20, 21, 28, 0.85) 100%);
    border: 1px solid rgba(255, 59, 92, 0.28);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 16px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.faq-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}

.faq-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 59, 92, 0.16);
    color: #ff3b5c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 59, 92, 0.32);
}

.faq-sub-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.faq-sub-amount {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.faq-sub-period {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.faq-sub-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-sub-feat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.faq-sub-icon {
    font-size: 18px;
    line-height: 1.2;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    margin-top: 1px;
}

.faq-sub-feat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.faq-sub-feat-text strong {
    font-size: 14.5px;
    color: #ffffff;
    font-weight: 600;
}

.faq-sub-feat-text span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.45;
}

.faq-sub-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 12px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .faq-sub-card {
        padding: 14px 16px;
    }

    .faq-sub-amount {
        font-size: 22px;
    }

    .faq-sub-feat-text strong {
        font-size: 13.5px;
    }

    .faq-sub-feat-text span {
        font-size: 12.5px;
    }
}


.faq-empty-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

/* Нижний баннер поддержки */
.faq-footer-card {
    background: linear-gradient(135deg, rgba(20, 21, 28, 0.95) 0%, rgba(28, 29, 39, 0.85) 100%);
    border: 1px solid rgba(255, 59, 92, 0.25);
    border-radius: 18px;
    padding: 30px 28px;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.faq-footer-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.faq-footer-card p {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0;
}

.faq-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}

.faq-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.faq-action-btn.primary {
    background: #ff3b5c;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 59, 92, 0.3);
}

.faq-action-btn.primary:hover {
    background: #ff5270;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 92, 0.45);
}

.faq-action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.faq-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}
