/* FAQ Block Styles - Исправленная версия с контрастностью */
.faq-section {
    position: relative;
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

/* Применяем те же стили к блоку "Области применения" */
.faq-section.bg-dark-trans {
    position: relative;
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

/* Переопределение для секции с классом bg-light-trans */
section.bg-light-trans .faq-section.bg-dark-trans {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    margin: -4rem -15px;
    padding: 4rem 15px;
}

/* Дополнительное переопределение для десктопа */
@media (min-width: 768px) {
    section.bg-light-trans .faq-section.bg-dark-trans {
        margin: -4rem 0;
        padding: 4rem 0;
        border-radius: 0;
    }
}

/* Переопределение стилей bg-dark-trans для FAQ */
.faq-section.bg-dark-trans h2 {
    color: #ffffff !important;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 3rem;
    position: relative;
}

.faq-section.bg-dark-trans h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #007bff, #28a745);
    border-radius: 2px;
}

/* Современный дизайн аккордеона */
.faq-section .accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-color: rgba(255, 255, 255, 0.2);
    --bs-accordion-border-radius: 15px;
}

.faq-section .accordion-item {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px !important;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-section .accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.faq-section .accordion-button {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    border-radius: 15px !important;
    color: #212529 !important;
    font-weight: 600;
    padding: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    position: relative;
    transition: all 0.3s ease;
}

.faq-section .accordion-button:not(.collapsed) {
    background: rgba(255, 255, 255, 1) !important;
    color: #212529 !important;
    box-shadow: none !important;
}

.faq-section .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25) !important;
    border: none !important;
}

.faq-section .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
    transform: rotate(-180deg);
    transition: transform 0.3s ease;
}

.faq-section .accordion-button.collapsed::after {
    transform: rotate(0deg);
}

.faq-section .accordion-body {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #495057 !important;
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Табы для десктопа */
.faq-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.faq-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #ffffff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.faq-tab:hover,
.faq-tab.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: #ffffff !important;
}

/* Контент табов */
.faq-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.faq-content h3 {
    color: #212529 !important;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.faq-content ul {
    list-style: none;
    padding: 0;
}

.faq-content li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #495057 !important;
}

.faq-content li:last-child {
    border-bottom: none;
}

.faq-content strong {
    color: #212529 !important;
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 768px) {
    .faq-section h2 {
        font-size: 2rem;
    }
    
    .faq-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .faq-tab {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .accordion-button {
        font-size: 1rem;
        padding: 1.25rem;
    }
    
    .accordion-body {
        font-size: 0.95rem;
        padding: 1.25rem;
    }
    
    .faq-content {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .faq-section h2 {
        font-size: 1.75rem;
    }
    
    .accordion-button {
        font-size: 0.95rem;
        padding: 1rem;
    }
    
    .accordion-body {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .faq-content {
        padding: 1rem;
    }
}

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

.accordion-item:nth-child(1) { animation-delay: 0.1s; }
.accordion-item:nth-child(2) { animation-delay: 0.2s; }
.accordion-item:nth-child(3) { animation-delay: 0.3s; }
.accordion-item:nth-child(4) { animation-delay: 0.4s; }
.accordion-item:nth-child(5) { animation-delay: 0.5s; }

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

/* Принудительные исправления для контрастности */
.faq-section h2,
.accordion-button,
.accordion-body,
.faq-content,
.faq-content h3,
.faq-content li,
.faq-content strong {
    color: #212529 !important;
}

.accordion-button {
    color: #212529 !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.accordion-body {
    color: #495057 !important;
    background: rgba(255, 255, 255, 0.98) !important;
}

.faq-section h2 {
    color: #ffffff !important;
}

/* Выравнивание карточек по высоте в десктопной версии */
@media (min-width: 768px) {
    .faq-section .row.d-none.d-md-flex {
        align-items: flex-start;
    }
    
    .faq-section .col-md-6 {
        display: flex;
        flex-direction: column;
    }
    
    .faq-section .accordion-item {
        height: auto;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    .faq-section .accordion-button {
        min-height: 80px;
        display: flex;
        align-items: center;
        flex: 1;
    }
    
    /* Обеспечиваем одинаковую высоту левой и правой колонок */
    .faq-section .row.d-none.d-md-flex .col-md-6:first-child .accordion,
    .faq-section .row.d-none.d-md-flex .col-md-6:last-child .accordion {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .faq-section .row.d-none.d-md-flex .col-md-6 .accordion-item {
        flex: 1;
        margin-bottom: 1rem;
    }
    
    .faq-section .row.d-none.d-md-flex .col-md-6 .accordion-item:last-child {
        margin-bottom: 0;
    }
}

/* Дополнительные стили для блока "Области применения" */
.faq-section.bg-dark-trans .accordion-item {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px !important;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-section.bg-dark-trans .accordion-button {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    border-radius: 15px !important;
    color: #212529 !important;
    font-weight: 600;
    padding: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    position: relative;
    transition: all 0.3s ease;
}

.faq-section.bg-dark-trans .accordion-body {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #495057 !important;
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
