/* ==========================================================================
   المركز الليبي للاستشارات والتنمية البشرية - أنماط صفحة الأسئلة الشائعة (FAQ)
   ========================================================================== */

/* 1. قسم البانر الرئيسي (Hero Banner) */
.faq-hero-banner {
    position: relative;
    background-color: var(--navy-corporate);
    background-image: linear-gradient(135deg, rgba(10, 15, 29, 0.95), rgba(20, 31, 54, 0.85)), 
                      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg stroke='%23B68D2E' stroke-width='1' stroke-opacity='0.05' fill='none'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px;
    padding: 68px 4% 62px;
    text-align: center;
    color: var(--white);
    border-bottom: 3px solid var(--gold-premium);
    overflow: hidden;
}
.faq-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    margin-bottom: 15px;
    border: 1px solid rgba(212,175,55,.42);
    border-radius: 999px;
    background: rgba(212,175,55,.08);
    color: var(--gold-glow);
    font-size: 12px;
    font-weight: 800;
}

.faq-hero-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at 50% 50%, rgba(182, 141, 46, 0.1), transparent 60%);
    pointer-events: none;
}

.faq-hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.faq-hero-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.faq-hero-banner p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* 2. التقسيم الرئيسي لصفحة الأسئلة (Layout) */
.faq-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    grid-template-areas: "content sidebar";
    gap: 34px;
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 4%;
    align-items: start;
    direction: ltr;
}

/* 3. شريط التصفية الجانبي (Sidebar) */
.faq-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 100px;
    direction: rtl;
}

.faq-sidebar-card {
    background-color: var(--white);
    border-radius: 18px;
    border: 1px solid rgba(182, 141, 46, 0.12);
    box-shadow: 0 10px 30px rgba(10, 15, 29, 0.04);
    padding: 26px;
}

.faq-sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-corporate);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(182, 141, 46, 0.1);
    display: flex;
    align-items: center;
}

.faq-sidebar-title i {
    font-size: 14px;
    margin-left: 8px;
    color: var(--gold-premium);
}

/* صندوق البحث المباشر */
.faq-search-box {
    position: relative;
    margin-bottom: 30px;
}

.faq-search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1.5px solid rgba(20, 31, 54, 0.1);
    border-radius: 8px;
    font-family: 'Almarai', sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background-color: #F8FAFC;
    transition: var(--transition-smooth);
}

/* لغات RTL */
[dir="rtl"] .faq-search-box input {
    padding: 12px 40px 12px 15px;
}

.faq-search-box input:focus {
    outline: none;
    border-color: var(--gold-premium);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(182, 141, 46, 0.1);
}

.faq-search-box i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
}

[dir="ltr"] .faq-search-box i {
    right: 15px;
}

[dir="rtl"] .faq-search-box i {
    right: auto;
    left: 15px;
}

/* أزرار التصنيفات */
.faq-categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-cat-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Almarai', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    text-align: right;
    transition: var(--transition-smooth);
    width: 100%;
}

[dir="ltr"] .faq-cat-btn {
    text-align: left;
}

.faq-cat-btn i {
    font-size: 14px;
    color: var(--navy-corporate);
    opacity: 0.7;
    transition: var(--transition-smooth);
    width: 20px;
    text-align: center;
}

.faq-cat-btn span {
    flex: 1;
}

.faq-cat-btn:hover {
    background-color: rgba(182, 141, 46, 0.05);
    color: var(--gold-premium);
    padding-right: 20px;
}

[dir="ltr"] .faq-cat-btn:hover {
    padding-right: 15px;
    padding-left: 20px;
}

.faq-cat-btn.active {
    background-color: var(--navy-corporate);
    color: var(--white);
}

.faq-cat-btn.active i {
    color: var(--gold-glow);
    opacity: 1;
}

.faq-cat-btn.active:hover {
    color: var(--white);
    padding-right: 15px;
}

[dir="ltr"] .faq-cat-btn.active:hover {
    padding-left: 15px;
}

/* 4. لوحة الأسئلة الشائعة (Content Panel) */
.faq-content-panel {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 20px;
    direction: rtl;
    min-width: 0;
}

.faq-count-text {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    padding: 14px 18px;
    border: 1px solid rgba(182,141,46,.14);
    border-radius: 12px;
    background: #fff;
}

.faq-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* عناصر الأكورديون (Accordion Item) */
.faq-acc-item {
    background-color: var(--white);
    border: 1px solid rgba(182, 141, 46, 0.1);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
    transition: var(--transition-smooth);
}

.faq-acc-item:hover {
    box-shadow: 0 8px 25px rgba(182, 141, 46, 0.05);
    border-color: rgba(182, 141, 46, 0.3);
    transform: translateY(-2px);
}

.faq-acc-header {
    width: 100%;
    border: 0;
    text-align: start;
    padding: 21px 24px;
    background-color: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--navy-corporate);
    transition: var(--transition-smooth);
    user-select: none;
}

.faq-acc-header:focus-visible,
.faq-cat-btn:focus-visible,
#faq-search-input:focus-visible {
    outline: 3px solid rgba(182, 141, 46, 0.55);
    outline-offset: 3px;
}

.faq-acc-header i {
    font-size: 14px;
    color: var(--gold-premium);
    transition: transform 0.4s ease;
}

.faq-acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: #FAFBFD;
}

.faq-acc-content p {
    padding: 20px 25px;
    margin: 0;
    font-size: 14.5px;
    color: #475569;
    line-height: 1.8;
}

/* حالة الفتح (Active/Open State) */
.faq-acc-item.active {
    border-color: var(--gold-premium);
    box-shadow: 0 10px 30px rgba(182, 141, 46, 0.06);
}

.faq-acc-item.active .faq-acc-header {
    background-color: rgba(182, 141, 46, 0.03);
    color: var(--gold-premium);
}

.faq-acc-item.active .faq-acc-header i {
    transform: rotate(180deg);
}

.faq-acc-item.active .faq-acc-content {
    max-height: 500px; /* القيمة القصوى للمحتوى المنسدل */
    border-top: 1px solid rgba(182, 141, 46, 0.08);
}

/* حالة عدم وجود نتائج (Empty State) */
.faq-empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--white);
    border-radius: 12px;
    border: 1px dashed rgba(182, 141, 46, 0.2);
}

.faq-empty-state i {
    font-size: 45px;
    color: var(--gold-premium);
    opacity: 0.5;
    margin-bottom: 20px;
}

.faq-empty-state h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-corporate);
    margin-bottom: 8px;
}

.faq-empty-state p {
    font-size: 14px;
    color: #64748B;
}

/* 5. قواعد التجاوب (Responsive Queries) */
@media (max-width: 992px) {
    .faq-main-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "content";
        gap: 30px;
        margin: 40px auto;
    }
    
    .faq-sidebar {
        position: static;
    }
}

@media (max-width: 576px) {
    .faq-hero-banner {
        padding: 60px 4%;
    }
    
    .faq-hero-banner h1 {
        font-size: 1.8rem;
    }
    .faq-main-layout { padding: 0 16px; margin: 28px auto 45px; }
    .faq-sidebar-card { padding: 20px; }
    
    .faq-acc-header {
        font-size: 14.5px;
        padding: 15px 20px;
    }
    
    .faq-acc-content p {
        padding: 15px 20px;
        font-size: 13.5px;
    }
}
