/* ====================================================
   АККОРДЕОН ВОПРОС-ОТВЕТ (БЕЗ JAVASCRIPT)
   Работает на тегах <details> и <summary>
   Автозакрытие через атрибут name="faq"
   ==================================================== */

/* --- Основной контейнер --- */
.faq-accordion {
    max-width: 800px;
    margin: 20px auto 30px auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --- Каждый блок вопроса --- */
.faq-item {
    border-bottom: 1px solid #e8e8e8;
}

.faq-item:last-child {
    border-bottom: none;
}

/* --- Заголовок вопроса (summary) --- */
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    font-family: 'Nunito Sans', Arial, sans-serif;
    font-weight: 600;
    font-size: 17px;
    color: #1a1a1a;
    background: #fafafa;
    transition: background 0.25s ease, color 0.25s ease;
    user-select: none;
    list-style: none; /* Убираем стандартный треугольник браузера */
}

/* Убираем стандартный маркер у summary (для всех браузеров) */
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question::marker {
    content: '';
}

.faq-question:hover {
    background: #f0f4f9;
    color: #0056b3;
}

/* --- Стрелка-индикатор --- */
.faq-arrow {
    font-size: 14px;
    transition: transform 0.35s ease;
    color: #0056b3;
    margin-left: 15px;
    flex-shrink: 0;
}

/* Поворот стрелки при открытом состоянии */
.faq-item[open] .faq-arrow {
    transform: rotate(180deg);
}

/* --- Блок с ответом --- */
.faq-answer {
    padding: 0 22px 22px 22px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #444444;
    background: #ffffff;
}

/* Дополнительная стилизация для вложенных элементов в ответе */
.faq-answer p:last-child {
    margin-bottom: 0;
}
.faq-answer ul, 
.faq-answer ol {
    padding-left: 22px;
}

/* --- Адаптивность для мобильных устройств --- */
@media (max-width: 600px) {
    .faq-accordion {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .faq-question {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .faq-answer {
        padding: 0 16px 16px 16px;
        font-size: 15px;
    }
}