/**
 * FAQ Accordion
 * Универсальные стили для FAQ-секции со спойлерами.
 * Работает на чистом CSS + минимальный JS для toggle.
 * Адаптивные, тёмные/светлые, подходят к любому лендингу.
 */

.faq-section {
    padding: 60px 0;
}

.faq-section .faq-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
    font-weight: 700;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Accordion item */
.faq-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.faq-item.active {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Question (clickable header) */
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: transparent;
    transition: background-color 0.2s ease;
    gap: 12px;
}

.faq-question:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.faq-question h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

/* Arrow icon */
.faq-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.faq-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* Answer (collapsible content) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 16px;
}

.faq-answer p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.75;
}

/* Responsive */
@media (max-width: 768px) {
    .faq-section {
        padding: 40px 0;
    }

    .faq-section .faq-title {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    .faq-list {
        gap: 6px;
    }

    .faq-question {
        padding: 14px 16px;
    }

    .faq-question h3 {
        font-size: 0.9rem;
    }

    .faq-answer p {
        font-size: 0.875rem;
    }
}
