/* ============================================
   FAQ Section - Zencia.AI
   ============================================ */

/* ===== FAQ SECTION ===== */
.faq-section {
    background: linear-gradient(135deg, #0f1419 0%, #082928 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Background image layer */
.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/application-bvg.svg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.25;
    z-index: 1;
    pointer-events: none;
}

/* Gradient overlays */
.faq-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 40% 20%, rgba(0, 217, 213, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 60% 80%, rgba(0, 139, 139, 0.04) 0%, transparent 50%),
                rgba(15, 20, 25, 0.4);
    z-index: 2;
    pointer-events: none;
}

.faq-section .container {
    position: relative;
    z-index: 3;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== SECTION HEADER ===== */
.faq-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease-out;
}

.faq-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.faq-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.faq-link {
    color: #00D9D5;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.faq-link:hover {
    border-bottom-color: #00D9D5;
}

/* ===== FAQ CONTAINER ===== */
.faq-container {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* ===== FAQ ITEM ===== */
.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 217, 213, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.faq-item:last-child {
    margin-bottom: 0;
}

/* ===== FAQ QUESTION ===== */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #FFFFFF;
    font-family: inherit;
}

.faq-question:hover {
    background: rgba(0, 217, 213, 0.05);
}

.faq-question[aria-expanded="true"] {
    background: rgba(0, 217, 213, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.question-text {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    font-weight: 600;
    text-align: left;
    line-height: 1.4;
    padding-right: 1rem;
}

/* ===== FAQ ICON ===== */
.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: #00D9D5;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

/* ===== FAQ ANSWER ===== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust based on content */
}

.answer-content {
    padding: 0 2rem 1.5rem 2rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.95rem, 1vw, 1rem);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease 0.1s;
}

.faq-item.active .answer-content {
    opacity: 1;
    transform: translateY(0);
}

/* ===== STAGGERED ANIMATIONS ===== */
.faq-item:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s backwards; }
.faq-item:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.15s backwards; }
.faq-item:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.2s backwards; }
.faq-item:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.25s backwards; }
.faq-item:nth-child(5) { animation: fadeInUp 0.6s ease-out 0.3s backwards; }
.faq-item:nth-child(6) { animation: fadeInUp 0.6s ease-out 0.35s backwards; }
.faq-item:nth-child(7) { animation: fadeInUp 0.6s ease-out 0.4s backwards; }
.faq-item:nth-child(8) { animation: fadeInUp 0.6s ease-out 0.45s backwards; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .faq-section {
        padding: 80px 0;
    }
    
    .faq-header {
        margin-bottom: 60px;
    }
    
    .faq-question {
        padding: 1.25rem 1.5rem;
    }
    
    .answer-content {
        padding: 0 1.5rem 1.25rem 1.5rem;
    }
    
    .question-text {
        padding-right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .faq-section .container {
        padding: 0 1rem;
    }
    
    .faq-question {
        padding: 1rem 1.25rem;
    }
    
    .answer-content {
        padding: 0 1.25rem 1rem 1.25rem;
    }
    
    .question-text {
        padding-right: 0.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .faq-header,
    .faq-container,
    .faq-item {
        animation: none !important;
    }
    
    .faq-icon {
        transition: none;
    }
    
    .answer-content {
        transition: opacity 0.1s ease;
    }
}

/* Focus states for accessibility */
.faq-question:focus {
    outline: 2px solid #00D9D5;
    outline-offset: 2px;
}

/* ===== JAVASCRIPT ENHANCED STATES ===== */
.faq-item.expanding .faq-answer {
    max-height: 500px;
    transition: max-height 0.4s ease;
}

.faq-item.collapsing .faq-answer {
    max-height: 0;
    transition: max-height 0.3s ease;
}

.faq-item.expanding .answer-content,
.faq-item.collapsing .answer-content {
    transition-delay: 0s;
}

/* ===== PRINT STYLES ===== */
@media print {
    .faq-section {
        background: white !important;
        padding: 2rem 0;
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .faq-section .container {
        max-width: none !important;
        margin-left: 0 !important;
    }
    
    .faq-item {
        border: 1px solid #ddd;
        margin-bottom: 1rem;
        background: white;
        page-break-inside: avoid;
    }
    
    .faq-answer {
        max-height: none !important;
    }
    
    .answer-content {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .faq-title {
        color: #000 !important;
    }
    
    .question-text {
        color: #000 !important;
    }
    
    .answer-content {
        color: #333 !important;
    }
    
    .faq-icon {
        display: none;
    }
}