/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== HEADER ===== */
.faq-header {
    text-align: center;
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #5865F2, #404EED);
    border-radius: 20px;
    color: white;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.faq-header::before {
    content: "❓";
    position: absolute;
    font-size: 8rem;
    opacity: 0.1;
    right: -20px;
    bottom: -30px;
    transform: rotate(10deg);
}

.faq-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.faq-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-block;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-5px);
}

/* ===== ПОИСК ===== */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: #5865F2;
    box-shadow: 0 4px 30px rgba(88, 101, 242, 0.2);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-box button {
    padding: 1rem 2rem;
    background: #5865F2;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    font-size: 1rem;
}

.search-box button:hover {
    background: #4752c4;
}

.search-stats {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===== КАТЕГОРИИ ===== */
.categories {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: center;
}

.category-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 2px solid #e0e2ff;
    background: white;
    color: #666;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.category-btn:hover {
    border-color: #5865F2;
    color: #5865F2;
}

.category-btn.active {
    background: #5865F2;
    color: white;
    border-color: #5865F2;
}

/* ===== FAQ СПИСОК ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    overflow: hidden;
    border: 1px solid transparent;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border-color: #e0e2ff;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #f8f9ff;
}

.faq-question-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.faq-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.faq-icon.purple { background: #f0f2ff; }
.faq-icon.green { background: #e8f5e9; }
.faq-icon.blue { background: #e3f2fd; }
.faq-icon.orange { background: #fff3e0; }
.faq-icon.red { background: #ffebee; }

.faq-question h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2C2F33;
}

.faq-toggle {
    font-size: 1.5rem;
    color: #5865F2;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 2rem;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 2rem 1.5rem 2rem;
}

.faq-answer p {
    color: #555;
    line-height: 1.8;
}

.faq-answer code {
    background: #f0f2ff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: #5865F2;
    font-family: monospace;
    font-size: 0.9rem;
}

.faq-answer a {
    color: #5865F2;
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ===== НЕТ РЕЗУЛЬТАТОВ ===== */
.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 16px;
    display: none;
}

.no-results .emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #666;
}

/* ===== АНИМАЦИЯ ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInUp 0.5s ease forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(6) { animation-delay: 0.6s; }
.faq-item:nth-child(7) { animation-delay: 0.7s; }
.faq-item:nth-child(8) { animation-delay: 0.8s; }
.faq-item:nth-child(9) { animation-delay: 0.9s; }
.faq-item:nth-child(10) { animation-delay: 1.0s; }
.faq-item:nth-child(11) { animation-delay: 1.1s; }
.faq-item:nth-child(12) { animation-delay: 1.2s; }
.faq-item:nth-child(13) { animation-delay: 1.3s; }
.faq-item:nth-child(14) { animation-delay: 1.4s; }
.faq-item:nth-child(15) { animation-delay: 1.5s; }
.faq-item:nth-child(16) { animation-delay: 1.6s; }
.faq-item:nth-child(17) { animation-delay: 1.7s; }
.faq-item:nth-child(18) { animation-delay: 1.8s; }
.faq-item:nth-child(19) { animation-delay: 1.9s; }

/* ===== АДАПТИВ ===== */
@media (max-width: 600px) {
    .container { padding: 1rem; }
    .faq-header { padding: 2rem 1.5rem; }
    .faq-header h1 { font-size: 2rem; }
    .faq-question { padding: 1.2rem 1.5rem; flex-wrap: wrap; }
    .faq-question h3 { font-size: 0.95rem; }
    .faq-answer { padding: 0 1.5rem; }
    .faq-item.open .faq-answer { padding: 0 1.5rem 1rem 1.5rem; }
    .search-box input { padding: 0.8rem 1rem; font-size: 0.9rem; }
    .search-box button { padding: 0.8rem 1.2rem; font-size: 0.9rem; }
    .categories { gap: 0.5rem; }
    .category-btn { padding: 0.4rem 1rem; font-size: 0.8rem; }
}