/* 
 * FAQ Styles Only
 * Стили для аккордеона FAQ на страницах руководств
 */

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
    margin: 4rem 0 3rem;
    animation: fadeInUp 0.6s ease forwards;
}

.faq-section h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
}

.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00eaff, #008cff);
    border-radius: 2px;
}

.faq-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.faq-item {
    border-bottom: 1px solid rgba(0, 140, 255, 0.15);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item:hover {
    background: rgba(15, 23, 42, 0.85);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: 'Exo 2', sans-serif;
}

.faq-question:hover {
    background: rgba(0, 140, 255, 0.08);
}

.faq-question[aria-expanded="true"] {
    background: rgba(0, 140, 255, 0.12);
}

.faq-question span {
    flex: 1;
    margin-right: 1.5rem;
    line-height: 1.5;
}

.faq-question i {
    color: #00eaff;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
    color: #008cff;
}

/* Анимация для открытия/закрытия ответа */
.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    opacity: 0;
}

.faq-answer:not([hidden]) {
    padding: 0 1.5rem 1.5rem;
    max-height: 1000px;
    opacity: 1;
}

.faq-answer p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
}

.faq-answer strong {
    color: #00eaff;
    font-weight: 600;
}

/* Плавное появление FAQ элементов */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    opacity: 0;
    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; }

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .faq-section {
        margin: 3rem 0 2rem;
    }
    
    .faq-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .faq-question {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    .faq-question span {
        margin-right: 1rem;
    }
    
    .faq-answer:not([hidden]) {
        padding: 0 1.25rem 1.25rem;
    }
    
    .faq-answer p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .faq-section {
        margin: 2.5rem 0 1.5rem;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-answer:not([hidden]) {
        padding: 0 1rem 1rem;
    }
}

/* Стили для фокуса при навигации с клавиатуры */
.faq-question:focus {
    outline: 2px solid #00eaff;
    outline-offset: 2px;
    border-radius: 4px;
}

.faq-question:focus:not(:focus-visible) {
    outline: none;
}

.faq-question:focus-visible {
    outline: 2px solid #00eaff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Темная тема для печати */
@media print {
    .faq-section h2 {
        color: #000;
    }
    
    .faq-question {
        color: #000;
        border-bottom: 1px solid #ccc;
    }
    
    .faq-answer p {
        color: #333;
    }
    
    .faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}