/* ============================================
   FAQ SECTION STYLES
   ============================================ */

.faq-section {
    background-color: var(--black);
    color: var(--white);
    position: relative;
    padding: 190px 0;
    width: 100%;

}

.faq-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/black-paper.png');
    opacity: 0.1;
    pointer-events: none;
}

.faq-section .section-title h2 {
    color: var(--white);
}

.faq-section .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 25px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Amiri', 'Noto Naskh Arabic', 'Scheherazade New', serif !important;
    font-size: 1.2rem;
    font-weight: 400;
    transition: color var(--transition-medium);
    color: var(--white);
}

.faq-question:hover {
    color: var(--gold);
}

.faq-question i {
    transition: all var(--transition-medium);
    font-size: 1.2rem;
    color: var(--gold);
}

.faq-answer {
    padding: 0 0 30px 0;
    color: var(--gold);
    line-height: 1.8;
    display: none;
    font-size: 1.05rem;
    font-family: 'Noto Naskh Arabic', 'Lateef', 'Scheherazade New', serif !important;
    animation: fadeIn 0.6s ease forwards;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* RTL Specific Adjustments - Stronger Selectors */
[dir="rtl"] .faq-question,
html[dir="rtl"] .faq-question,
body[dir="rtl"] .faq-question,
html[lang="ar"] .faq-question,
body[lang="ar"] .faq-question,
.faq-section[dir="rtl"] .faq-question,
[dir="rtl"] .faq-item .faq-question {
    text-align: right !important;
    flex-direction: row !important; /* Changed from row-reverse to row */
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Position the chevron on the left side for RTL */
[dir="rtl"] .faq-question i,
html[dir="rtl"] .faq-question i,
body[dir="rtl"] .faq-question i,
html[lang="ar"] .faq-question i,
body[lang="ar"] .faq-question i,
.faq-section[dir="rtl"] .faq-question i,
[dir="rtl"] .faq-item .faq-question i {
    margin-left: 0;
    margin-right: auto; /* Push chevron to the left */
    order: -1; /* Place chevron before the text */
}

[dir="rtl"] .faq-answer,
html[dir="rtl"] .faq-answer,
body[dir="rtl"] .faq-answer,
html[lang="ar"] .faq-answer,
body[lang="ar"] .faq-answer,
.faq-section[dir="rtl"] .faq-answer,
[dir="rtl"] .faq-item .faq-answer {
    text-align: right !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* For LTR, keep chevron on the right */
[dir="ltr"] .faq-question i {
    margin-right: 0;
    margin-left: auto;
    order: 1;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .faq-section {
        padding: 80px 0;
    }
    
    .faq-question {
        font-size: 1rem !important;
        padding: 20px 0 !important;
    }
    
    .faq-answer {
        font-size: 0.95rem !important;
        padding: 0 0 20px 0 !important;
    }
    
    .faq-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .faq-section {
        padding: 60px 0;
    }
    
    .faq-question {
        font-size: 0.95rem !important;
        padding: 18px 0 !important;
    }
    
    .faq-answer {
        font-size: 0.9rem !important;
    }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 992px) {
    .faq-container {
        max-width: 90%;
    }
}

/* Performance Optimizations */
.faq-item {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Disable animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-question,
    .faq-answer,
    .faq-question i,
    .fade-in {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}