/* ===================================
   FAQ PAGE STYLES - UPDATED WITH GREEN THEME
   =================================== */

/* FAQ Introduction */
.faq-introduction {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
}

.faq-introduction h2 {
    background: linear-gradient(135deg, #D97706 0%, #059669 50%, #0D9488 100%);;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: clamp(1.875rem, 4vw, 2.5rem);
}

.faq-introduction p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

.faq-introduction a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.faq-introduction a:hover,
.faq-introduction a:focus {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

/* FAQ Categories */
.faq-categories {
    max-width: 900px;
    margin: 0 auto;
}

.faq-category {
    margin-bottom: 4rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.faq-category h2 {
    background: linear-gradient(135deg, #D97706 0%, #059669 50%, #0D9488 100%);;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    padding: 2.5rem 3rem 1rem;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
}

.faq-category h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 3rem;
    right: 3rem;
    height: 3px;
    background: linear-gradient(90deg, #059669 0%, #0D9488 100%);
    border-radius: 1.5px;
}

/* FAQ Items */
.faq-items {
    padding: 1rem 0 2rem;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.faq-item:last-child {
    border-bottom: none;
}

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

/* FAQ Questions */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 2rem 3rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

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

.faq-question:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: -2px;
    background: var(--bg-secondary);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
    font-weight: 600;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.faq-question:hover h3,
.faq-question:focus h3 {
    color: var(--primary-blue);
}

.faq-question[aria-expanded="true"] h3 {
    color: var(--primary-blue);
}

/* FAQ Toggle Icon */
.faq-toggle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    margin-top: 0.125rem;
}

.faq-question:hover .faq-toggle,
.faq-question:focus .faq-toggle {
    background: rgba(37, 99, 235, 0.2);
    transform: scale(1.1);
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
    background: var(--primary-blue);
    color: var(--text-light);
}

/* FAQ Answers */
.faq-answer {
    padding: 0 3rem 2rem;
    background: var(--bg-secondary);
    display: none;
    animation: fadeInAnswer 0.3s ease-out;
}

.faq-answer.show {
    display: block;
}

@keyframes fadeInAnswer {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

.faq-answer li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

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

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

.faq-answer a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.faq-answer a:hover,
.faq-answer a:focus {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

/* FAQ Contact Section */
.faq-contact {
    margin-top: 5rem;
    text-align: center;
}

.contact-card {
    background: var(--bg-card);
    padding: 4rem 3rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #059669 0%, #0D9488 100%);
}

.contact-card h2 {
    background: linear-gradient(135deg, #D97706 0%, #059669 50%, #0D9488 100%);;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    font-size: 1.875rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.contact-options {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.125rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.contact-btn.primary {
    background: linear-gradient(135deg, #D97706 0%, #059669 50%, #0D9488 100%);;
    color: var(--text-light);
    border: 2px solid transparent;
}

.contact-btn.primary:hover,
.contact-btn.primary:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: var(--text-light);
    filter: brightness(1.05);
}

.contact-btn.secondary {
    background: var(--bg-primary);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.contact-btn.secondary:hover,
.contact-btn.secondary:focus {
    background: var(--primary-blue);
    color: var(--text-light);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-note {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.contact-note p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.contact-note strong {
    color: var(--primary-blue);
    font-weight: 600;
}

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

/* Skip links for FAQ sections */
.faq-skip-nav {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    z-index: 1000;
    transition: all var(--transition-fast);
}

.faq-skip-nav:focus {
    top: 1rem;
}

/* Enhanced animations for better UX */
.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    max-height: 1000px; /* Large enough to accommodate content */
    display: block;
}

/* Loading state for dynamic content */
.faq-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.faq-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    margin-right: 0.75rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   RESPONSIVE DESIGN FOR FAQ
   =================================== */

@media (max-width: 1024px) {
    .faq-category h2 {
        padding: 2rem 2.5rem 1rem;
        font-size: 1.5rem;
    }
    
    .faq-category h2::after {
        left: 2.5rem;
        right: 2.5rem;
    }
    
    .faq-question {
        padding: 1.75rem 2.5rem;
    }
    
    .faq-answer {
        padding: 0 2.5rem 1.75rem;
    }
    
    .contact-card {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .faq-category {
        margin-bottom: 3rem;
        border-radius: var(--radius-lg);
    }
    
    .faq-category h2 {
        padding: 1.5rem 2rem 1rem;
        font-size: 1.375rem;
    }
    
    .faq-category h2::after {
        left: 2rem;
        right: 2rem;
    }
    
    .faq-question {
        padding: 1.5rem 2rem;
        gap: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .faq-question h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .faq-toggle {
        position: absolute;
        top: 1.5rem;
        right: 2rem;
        margin-top: 0;
    }
    
    .faq-answer {
        padding: 0 2rem 1.5rem;
    }
    
    .contact-card {
        padding: 2.5rem 2rem;
    }
    
    .contact-options {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .contact-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .faq-introduction {
        margin-bottom: 3rem;
    }
    
    .faq-category h2 {
        padding: 1.25rem 1.5rem 0.75rem;
        font-size: 1.25rem;
    }
    
    .faq-category h2::after {
        left: 1.5rem;
        right: 1.5rem;
    }
    
    .faq-question {
        padding: 1.25rem 1.5rem;
    }
    
    .faq-question h3 {
        font-size: 1.0625rem;
        padding-right: 2.5rem; /* Space for toggle button */
    }
    
    .faq-toggle {
        top: 1.25rem;
        right: 1.5rem;
        width: 28px;
        height: 28px;
        font-size: 1.5rem;
    }
    
    .faq-answer {
        padding: 0 1.5rem 1.25rem;
    }
    
    .faq-answer p,
    .faq-answer li {
        font-size: 1rem;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-card h2 {
        font-size: 1.5rem;
    }
    
    .contact-card p {
        font-size: 1.0625rem;
    }
    
    .contact-btn {
        padding: 1rem 1.5rem;
        font-size: 1.0625rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .faq-question {
        border: 2px solid var(--text-primary);
    }
    
    .faq-toggle {
        border: 2px solid var(--primary-blue);
    }
    
    .contact-card {
        border: 3px solid var(--primary-blue);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .faq-question,
    .faq-toggle,
    .contact-btn,
    .faq-category {
        transition: none;
    }
    
    .faq-answer {
        animation: none;
        transition: none;
    }
    
    .faq-question[aria-expanded="true"] .faq-toggle {
        transform: none;
    }
    
    .faq-loading::before {
        animation: none;
    }
}

/* Print styles */
@media print {
    .faq-contact,
    .contact-card {
        display: none;
    }
    
    .faq-question {
        background: none !important;
        page-break-inside: avoid;
    }
    
    .faq-answer {
        display: block !important;
        max-height: none !important;
        page-break-inside: avoid;
    }
    
    .faq-toggle {
        display: none;
    }
}