/**
 * FAQ Section Theme Styles
 * Works with both light and dark themes
 */

/* FAQ Section Base */
.faq-section,
.faq-section-enhanced {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--gradient-primary);
    color: #FFFFFF;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.faq-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.faq-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* FAQ Container */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ Items */
.faq-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
}

/* FAQ Question */
.faq-question {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.faq-question:hover {
    background: var(--bg-hover);
}

.faq-item.active .faq-question {
    background: var(--bg-active);
    color: var(--primary);
}

/* FAQ Icon */
.faq-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.faq-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Plus/Minus Icon Alternative */
.faq-icon-plus::before {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: all 0.3s ease;
}

.faq-item.active .faq-icon-plus::before {
    content: '−';
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 2000px;  /* Increased for longer content */
    padding: 0 1.5rem 1.5rem;
    opacity: 1;
}

.faq-answer-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-answer-content p {
    margin-bottom: 1rem;
}

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

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.faq-answer-content a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.faq-answer-content a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Light Theme Specific */
[data-theme="light"] .faq-section,
[data-theme="light"] .faq-section-enhanced {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="light"] .faq-item {
    background: #FFFFFF;
    border: 1px solid #C0BCB6;  /* Darker border for visibility */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.15);
}

[data-theme="light"] .faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 119, 204, 0.2);
    background: #FFFFFF;
}

[data-theme="light"] .faq-question {
    color: #1A1A1A;
    font-weight: 600;
    background: transparent;  /* Remove background */
}

[data-theme="light"] .faq-question:hover {
    background: rgba(0, 119, 204, 0.04);  /* Very subtle blue tint */
}

[data-theme="light"] .faq-item.active .faq-question {
    background: rgba(0, 119, 204, 0.08);  /* Slightly more visible blue tint */
    color: var(--primary);
}

[data-theme="light"] .faq-answer-content {
    color: #2A2A2A;  /* Darker for better readability */
    line-height: 1.8;
}

[data-theme="light"] .faq-answer-content p {
    color: #2A2A2A;
}

[data-theme="light"] .faq-answer-content ul li,
[data-theme="light"] .faq-answer-content ol li {
    color: #2A2A2A;
}

[data-theme="light"] .faq-answer-content a {
    color: #0077CC;
    font-weight: 500;
}

[data-theme="light"] .faq-badge {
    background: linear-gradient(135deg, #0077CC 0%, #00B574 100%);
    box-shadow: 0 2px 8px rgba(0, 119, 204, 0.25);
}

[data-theme="light"] .faq-title {
    color: #1A1A1A !important;  /* Solid dark color, no gradient */
    background: none !important;
    -webkit-text-fill-color: unset !important;
}

[data-theme="light"] .faq-subtitle {
    color: #3D3D3D;
}

/* Dark Theme Specific */
[data-theme="dark"] .faq-section,
[data-theme="dark"] .faq-section-enhanced {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .faq-item {
    background: #1A2332;
    border: 1px solid rgba(0, 217, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.2);
}

[data-theme="dark"] .faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 6px 24px rgba(0, 217, 255, 0.3);
    background: #1F2937;
}

[data-theme="dark"] .faq-question {
    color: #E2E8F0;
    font-weight: 600;
}

[data-theme="dark"] .faq-question:hover {
    background: rgba(0, 217, 255, 0.05);
}

[data-theme="dark"] .faq-item.active .faq-question {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
}

[data-theme="dark"] .faq-answer-content {
    color: #CBD5E1;
}

[data-theme="dark"] .faq-badge {
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-title {
        font-size: 2rem;
    }
    
    .faq-subtitle {
        font-size: 1rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem 1.25rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }
}

/* Smooth content appearance - removed choppy animation */
.faq-answer-content {
    padding-top: 0.5rem;  /* Add small padding for spacing */
}

/* Loading State */
.faq-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.faq-loading::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Empty State */
.faq-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}

.faq-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.faq-empty-text {
    font-size: 1.125rem;
}