/* FAQ секция */
.faq-section {
    padding: 40px 0 60px;
    position: relative;
}

/* Заголовок */
.section-title {
    font-size: 42px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-family-heading);
    letter-spacing: 1.5px;
}

/* Подзаголовок */
.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: #94a3b8;
    margin-bottom: 60px;
    font-weight: 400;
}

/* Сетка FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 60px auto 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Элемент */
.faq-item {
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.12);
    border-left: 4px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 24px 28px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    transition: border-color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Градиентная полоса */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(139, 92, 246, 0.35) 0%,
        rgba(99, 102, 241, 0.25) 50%,
        rgba(139, 92, 246, 0.35) 100%);
    transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover состояние */
.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.22);
    border-left-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
    box-shadow: 
        -4px 0 20px rgba(139, 92, 246, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.65);
}

.faq-item:hover::before {
    width: 6px;
    background: linear-gradient(180deg, 
        rgba(139, 92, 246, 0.45) 0%,
        rgba(99, 102, 241, 0.35) 50%,
        rgba(139, 92, 246, 0.45) 100%);
}

/* Активное состояние */
.faq-item.active {
    border-color: rgba(139, 92, 246, 0.25);
    border-left-color: rgba(139, 92, 246, 0.5);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 
        -4px 0 24px rgba(139, 92, 246, 0.18),
        0 6px 20px rgba(0, 0, 0, 0.25);
}

.faq-item.active::before {
    width: 6px;
    background: linear-gradient(180deg, 
        rgba(139, 92, 246, 0.55) 0%,
        rgba(99, 102, 241, 0.45) 50%,
        rgba(139, 92, 246, 0.55) 100%);
}

/* Вопрос */
.faq-question {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding: 4px 0;
}

/* Иконка */
.faq-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
    display: inline-block;
    filter: drop-shadow(0 1px 2px rgba(139, 92, 246, 0.3))
            drop-shadow(0 0 6px rgba(139, 92, 246, 0.25));
    text-shadow: 
        0 0 3px rgba(139, 92, 246, 0.4),
        0 0 6px rgba(99, 102, 241, 0.25);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                text-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover .faq-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 1px 3px rgba(139, 92, 246, 0.4))
            drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
    text-shadow: 
        0 0 4px rgba(139, 92, 246, 0.5),
        0 0 8px rgba(99, 102, 241, 0.3);
}

.faq-item.active .faq-icon {
    filter: drop-shadow(0 1px 3px rgba(139, 92, 246, 0.45))
            drop-shadow(0 0 10px rgba(139, 92, 246, 0.35));
    transform: scale(1.05);
    text-shadow: 
        0 0 5px rgba(139, 92, 246, 0.6),
        0 0 10px rgba(99, 102, 241, 0.35);
}

/* Заголовок вопроса */
.faq-question h3 {
    font-family: var(--font-family-serif);
    font-size: 20px;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.5;
    letter-spacing: 0.4px;
    flex: 1;
    margin: 0;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    white-space: normal;
    transition: color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                text-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.faq-item:hover .faq-question h3 {
    color: #f1f5f9;
}

.faq-item.active .faq-question h3 {
    color: #ffffff;
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Стрелка */
.faq-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: auto;
    color: rgba(139, 92, 246, 0.5);
    opacity: 0.9;
}

.faq-arrow svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
    display: block;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 3px rgba(139, 92, 246, 0.2));
    transition: filter 0.1s cubic-bezier(0.4, 0, 0.2, 1), stroke-width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: rgba(139, 92, 246, 0.85);
    opacity: 1;
}

.faq-item.active .faq-arrow svg {
    filter: drop-shadow(0 2px 6px rgba(139, 92, 246, 0.35));
    stroke-width: 2.5;
}

.faq-question:hover .faq-arrow {
    color: rgba(139, 92, 246, 0.75);
    opacity: 1;
    transform: scale(1.1);
}

.faq-item.active .faq-question:hover .faq-arrow {
    transform: rotate(180deg) scale(1.1);
}

.faq-question:active .faq-arrow {
    transform: scale(0.9);
}

.faq-item.active .faq-question:active .faq-arrow {
    transform: rotate(180deg) scale(0.9);
}

/* Ответ */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 0 0 42px;
    opacity: 0;
    transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Раскрытый ответ */
.faq-item.active .faq-answer {
    max-height: 1000px;
    padding-top: 18px;
    padding-bottom: 4px;
    opacity: 1;
}

/* Текст ответа */
.faq-answer p {
    font-size: 15px;
    line-height: 1.75;
    color: #cbd5e1;
    margin: 0;
    font-weight: 400;
}

.faq-answer strong {
    color: rgba(139, 92, 246, 0.85);
    font-weight: 600;
}

/* Планшеты (769px-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Мобильные (≤768px) */
@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 40px;
    }
    
    .faq-item {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        background: rgba(15, 23, 42, 0.6);
        padding: 20px 22px;
        border-left-width: 3px;
    }
    
    .faq-item::before {
        width: 3px;
    }
    
    .faq-item:hover::before,
    .faq-item.active::before {
        width: 4px;
    }
    
    .faq-icon {
        font-size: 24px;
    }
    
    .faq-section {
        padding: 30px 0 50px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }
    
    .faq-question {
        gap: 12px;
    }
    
    .faq-question h3 {
        font-size: 18px;
    }
    
    .faq-arrow {
        width: 18px;
        height: 18px;
    }
    
    .faq-arrow svg {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
        max-width: 18px;
        max-height: 18px;
    }
    
    .faq-answer {
        padding-left: 36px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
}

/* Маленькие мобильные (≤480px) */
@media (max-width: 480px) {
    .faq-section {
        padding: 24px 0 40px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .faq-item {
        padding: 18px 20px;
    }
    
    .faq-icon {
        font-size: 22px;
    }
    
    .faq-question h3 {
        font-size: 17px;
    }
    
    .faq-answer {
        padding-left: 32px;
    }
    
    .faq-answer p {
        font-size: 14px;
    }
}

/* Очень маленькие (≤360px) */
@media (max-width: 360px) {
    .faq-section {
        padding: 20px 0 36px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    
    .faq-item {
        padding: 16px 18px;
    }
    
    .faq-icon {
        font-size: 20px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer {
        padding-left: 28px;
    }
    
    .faq-answer p {
        font-size: 13px;
    }
}
