/* ========== FAQ: стили публичной страницы ========== */

.faq-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.faq-hero {
    text-align: center;
    margin-bottom: 2rem;
}
.faq-hero h1 {
    font-size: 2.25rem;
    margin: 0 0 0.75rem;
    color: #1e293b;
}
.faq-subtitle {
    color: #475569;
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.55;
}
.faq-subtitle a {
    color: #e74c3c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ========== КОНТРОЛЫ (поиск) ========== */
.faq-controls {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.faq-search {
    margin-bottom: 0.75rem;
}
.faq-search input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}
.faq-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ========== СПИСОК ВОПРОСОВ (аккордеон) ========== */
.faq-stats {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.faq-item.open {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}
.faq-q {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font: inherit;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.4;
}
.faq-q:hover { background: #f8fafc; }
.faq-q:focus { outline: 2px solid #3b82f6; outline-offset: -2px; }
.faq-q-text { flex: 1; }
.faq-q-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    transition: transform 0.2s;
}
.faq-item.open .faq-q-icon { transform: rotate(45deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}
.faq-item.open .faq-a {
    max-height: 1000px;
    transition: max-height 0.3s ease-in;
}
.faq-a-inner {
    padding: 0 1.25rem 1.25rem;
    color: #475569;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}
.faq-a-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ========== КОНТАКТЫ ========== */
.faq-contact {
    margin-top: 3rem;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 12px;
    color: #fff;
    text-align: center;
}
.faq-contact h2 { margin: 0 0 0.5rem; }
.faq-contact p { margin: 0 0 1.25rem; opacity: 0.95; }
.faq-contact-methods {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.faq-contact-btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s;
}
.faq-contact-btn:hover { background: rgba(255, 255, 255, 0.32); color: #fff; }

/* ========== ПУСТОЕ СОСТОЯНИЕ / ЗАГРУЗКА ========== */
.faq-loading, .faq-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
    font-size: 1rem;
}
.faq-empty { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; }

/* ========== ОШИБКА ЗАГРУЗКИ ========== */
.faq-error {
    text-align: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 2rem 1.5rem;
}
.faq-error-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #b91c1c;
}
.faq-error-text {
    margin: 0 0 1.25rem;
    color: #7f1d1d;
    font-size: 0.95rem;
    word-break: break-word;
}
.faq-retry-btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.faq-retry-btn:hover:not(:disabled) { background: #c0392b; }
.faq-retry-btn:disabled { opacity: 0.6; cursor: default; }

/* ========== АДАПТИВ ========== */
@media (max-width: 640px) {
    .faq-hero h1 { font-size: 1.7rem; }
    .faq-q { padding: 0.85rem 1rem; }
    .faq-a-inner { padding: 0 1rem 1rem; }
    .faq-contact { padding: 1.5rem 1rem; }
}