/* =========================================================
   БЛОК FAQ — АККОРДЕОН
   ========================================================= */

.online-faq-list {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Элемент FAQ */
.online-faq-item {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border: 1.5px solid #e9ecef;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.online-faq-item:hover {
    box-shadow: 0 8px 22px rgba(30, 58, 138, 0.12);
    border-color: #dbeafe;
}

.online-faq-item.open {
    border-color: #dc3545;
    box-shadow: 0 10px 28px rgba(220, 53, 69, 0.15);
}

/* Вопрос (кликабельная часть) */
.online-faq-question {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.online-faq-question:hover {
    background: #f8f9fa;
}

.online-faq-item.open .online-faq-question {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

/* Иконка в красном круге */
.online-faq-icon-wrapper {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
    transition: transform 0.3s ease;
}

.online-faq-item.open .online-faq-icon-wrapper {
    transform: rotate(-8deg) scale(1.05);
}

/* Текст вопроса */
.online-faq-question-text {
    flex: 1;
    font-size: 1.02rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
    transition: color 0.25s ease;
}

.online-faq-item.open .online-faq-question-text {
    color: #dc3545;
}

/* Переключатель + / - */
.online-faq-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    font-size: 0.95rem;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.online-faq-item.open .online-faq-toggle {
    background: #dc3545;
    color: white;
    transform: rotate(180deg);
}

.online-faq-toggle .fa-minus {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
    transition: opacity 0.25s ease, transform 0.3s ease;
}

.online-faq-toggle .fa-plus {
    transition: opacity 0.25s ease, transform 0.3s ease;
}

.online-faq-item.open .online-faq-toggle .fa-plus {
    opacity: 0;
    transform: scale(0.5);
}

.online-faq-item.open .online-faq-toggle .fa-minus {
    opacity: 1;
    transform: scale(1) rotate(0);
}

/* Ответ (скрыт по умолчанию) */
.online-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.online-faq-answer-inner {
    padding: 0 1.25rem 1.4rem 4.6rem; /* отступ слева под иконку */
    font-size: 0.98rem;
    color: #495057;
    line-height: 1.65;
    border-top: 1px dashed #e9ecef;
    padding-top: 1rem;
    margin-right: 1.25rem;
}

.online-faq-item.open .online-faq-answer-inner {
    border-top-color: #fecaca;
}

/* =========================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================================================= */
@media (max-width: 767.98px) {
    .online-faq-list {
        gap: 0.7rem;
    }

    .online-faq-question {
        padding: 0.95rem 1rem;
        gap: 0.75rem;
    }

    .online-faq-icon-wrapper {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .online-faq-question-text {
        font-size: 0.92rem;
    }

    .online-faq-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .online-faq-answer-inner {
        padding: 0 1rem 1.1rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .online-faq-question-text {
        font-size: 0.88rem;
    }
}

/* Анимация появления */
.online-faq-item {
    opacity: 0;
    transform: translateY(20px);
    animation: faqItemAppear 0.5s ease forwards;
}

.online-faq-item:nth-child(1)  { animation-delay: 0.05s; }
.online-faq-item:nth-child(2)  { animation-delay: 0.10s; }
.online-faq-item:nth-child(3)  { animation-delay: 0.15s; }
.online-faq-item:nth-child(4)  { animation-delay: 0.20s; }
.online-faq-item:nth-child(5)  { animation-delay: 0.25s; }
.online-faq-item:nth-child(6)  { animation-delay: 0.30s; }
.online-faq-item:nth-child(7)  { animation-delay: 0.35s; }
.online-faq-item:nth-child(8)  { animation-delay: 0.40s; }
.online-faq-item:nth-child(9)  { animation-delay: 0.45s; }
.online-faq-item:nth-child(10) { animation-delay: 0.50s; }

@keyframes faqItemAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
