/**
 * FAQ Section Component Styles
 * Modern accordion-style FAQ with smooth animations
 */

/* FAQ Section Base */
.faq-section {
    position: relative;
}

/* FAQ Title */
.faq-title {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* FAQ Item Animations */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.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(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FAQ Question Button */
.faq-question {
    position: relative;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.faq-question:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* FAQ Question Icon */
.faq-question svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-question[aria-expanded="true"] svg {
    transform: rotate(45deg);
}

/* FAQ Answer */
.faq-answer {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
}

.faq-answer.open {
    max-height: 500px;
}

/* FAQ Answer Content */
.faq-answer .prose {
    color: #6b7280;
    line-height: 1.7;
}

.faq-answer .prose p {
    margin-bottom: 1rem;
}

.faq-answer .prose p:last-child {
    margin-bottom: 0;
}

.faq-answer .prose strong {
    color: #374151;
    font-weight: 600;
}

.faq-answer .prose a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.faq-answer .prose a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.faq-answer .prose ul,
.faq-answer .prose ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer .prose li {
    margin-bottom: 0.5rem;
}

/* FAQ Card Hover Effects */
.faq-item > div {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.faq-item > div:hover {
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

/* FAQ Icon Container */
.faq-question .w-8.h-8 {
    transition: all 0.3s ease;
}

.faq-question:hover .w-8.h-8 {
    transform: scale(1.1);
}

/* Two Column Layout Adjustments */
@media (min-width: 1024px) {
    .faq-section .lg\:grid-cols-2 .faq-item {
        margin-bottom: 2rem;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .faq-question {
        padding: 1.25rem;
    }
    
    .faq-question h3 {
        font-size: 1.125rem;
        line-height: 1.5;
    }
    
    .faq-answer {
        font-size: 0.95rem;
    }
    
    .faq-answer .px-6 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .faq-item {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .faq-question svg,
    .faq-answer,
    .faq-item > div {
        transition: none;
    }
}

/* Focus Visible for Better Accessibility */
.faq-question:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .faq-question {
        border: 2px solid #374151;
    }
    
    .faq-question:hover {
        background: #f3f4f6;
        border-color: #1f2937;
    }
    
    .faq-title {
        -webkit-text-fill-color: #1f2937;
        color: #1f2937;
    }
}

/* Print Styles */
@media print {
    .faq-section {
        background: white !important;
    }
    
    .faq-answer {
        max-height: none !important;
        overflow: visible !important;
    }
    
    .faq-question svg {
        display: none;
    }
    
    .faq-item > div {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
        margin-bottom: 1rem;
        break-inside: avoid;
    }
}

/* Loading State */
.faq-section.loading .faq-item {
    opacity: 0.5;
    pointer-events: none;
}

/* Error State */
.faq-section.error .faq-item {
    opacity: 0.3;
}

.faq-section.error::after {
    content: "Error loading FAQ items";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc2626;
    font-weight: 600;
    background: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbar for FAQ Content */
.faq-answer::-webkit-scrollbar {
    width: 4px;
}

.faq-answer::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.faq-answer::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.faq-answer::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}