/* FAQ Section */
.section-faq {
    padding: 6rem 0;
    background-color: var(--mind-light);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mind-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #f9fafb;
}

.faq-question:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--mind-primary);
    font-size: 0.8rem;
    margin-left: 1rem;
}

.faq-question[aria-expanded="true"] {
    background-color: var(--mind-primary-light);
    color: var(--mind-primary-dark);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: white;
}

.faq-answer-inner {
    padding: 0 2rem 2rem;
}

.faq-item[open] .faq-answer {
    max-height: 1000px; /* Adjust based on your content */
    border-top: 1px solid var(--mind-border);
}

.faq-answer p {
    margin: 0 0 1rem;
    color: var(--mind-text);
    line-height: 1.7;
}

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

.faq-cta {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--mind-border);
}

.faq-cta p {
    margin-bottom: 1.5rem;
    color: var(--mind-text);
    font-size: 1.1rem;
}

/* Animation for FAQ items */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-item {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

/* Staggered animation for FAQ items */
.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }
.faq-item:nth-child(n+6) { animation-delay: 0.6s; }

/* Responsive Styles */
@media (max-width: 768px) {
    .section-faq {
        padding: 4rem 0;
    }
    
    .faq-question {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
    
    .faq-answer-inner {
        padding: 0 1.5rem 1.5rem;
    }
    
    .faq-cta {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .faq-cta p {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
}

/* Accessibility Improvements */
.faq-question:focus-visible {
    outline: 3px solid var(--mind-primary);
    outline-offset: 2px;
}

.faq-question::-webkit-details-marker {
    display: none;
}

/* Print Styles */
@media print {
    .faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .faq-question {
        color: black !important;
    }
    
    .faq-answer {
        display: block !important;
        max-height: none !important;
    }
}
