/* ==========================================================================
   أكاديمية الفنك الدولية للفنون القتالية - ملف تنسيقات صفحة الأسئلة الشائعة
   Fennec International Martial Arts Academy - FAQ CSS Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. متغيرات الألوان والخصائص العامة (CSS Custom Properties - Theming)
   -------------------------------------------------------------------------- */
:root {
    --primary-color: #0284c7;
    --secondary-color: #0f172a;
    --accent-color: #38bdf8;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(226, 232, 240, 0.8);
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 15px 35px -10px rgba(56, 189, 248, 0.25);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary-color: #38bdf8;
    --secondary-color: #ffffff;
    --accent-color: #38bdf8;
    --bg-color: #0b0f19;
    --text-color: #f1f5f9;
    --card-bg: rgba(15, 23, 42, 0.75);
    --card-border: rgba(51, 65, 85, 0.6);
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --hover-shadow: 0 15px 35px -10px rgba(56, 189, 248, 0.3);
}

/* --------------------------------------------------------------------------
   2. إعادة التعيين الأساسية (CSS Reset & Global Defaults)
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --------------------------------------------------------------------------
   3. الحاويات العامة والعناصر الهيكلية (Layout Containers)
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   4. تنسيقات الأزرار العلوية (Controls Bar & Interactive Buttons)
   -------------------------------------------------------------------------- */
.controls-bar {
    position: absolute;
    top: 25px;
    left: 30px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

[dir="ltr"] .controls-bar {
    left: auto;
    right: 30px;
}

.control-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-fast);
}

.control-btn:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn i {
    color: var(--accent-color);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.control-btn:hover i {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   5. ترويسة صفحة الأسئلة الشائعة (FAQ Header Section)
   -------------------------------------------------------------------------- */
.faq-header {
    background: linear-gradient(135deg, #0284c7, #0f172a);
    color: #ffffff;
    padding: 70px 20px 60px 20px;
    text-align: center;
    border-radius: 0 0 35px 35px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.faq-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    transform: rotate(30deg);
    pointer-events: none;
}

.faq-header h1 {
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.faq-header p {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   6. صندوق البحث المتقدم (Advanced Search Input Module)
   -------------------------------------------------------------------------- */
.search-container {
    text-align: center;
    margin: -35px auto 45px auto;
    max-width: 650px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.search-input {
    width: 100%;
    padding: 18px 28px;
    font-size: 1.05rem;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    background-color: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow);
    outline: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.search-input:focus::placeholder {
    opacity: 0.4;
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -5px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   7. هيكل وشبكة الأسئلة الشائعة (FAQ Main Layout & Grid System)
   -------------------------------------------------------------------------- */
.faq-main {
    padding: 0 0 60px 0;
    flex: 1;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   8. بطاقات الأسئلة بنظام الأكورديون (FAQ Accordion Cards)
   -------------------------------------------------------------------------- */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--hover-shadow);
}

.faq-question {
    padding: 22px 25px;
    font-size: 1.12rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    color: var(--text-color);
    background: transparent;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: rgba(56, 189, 248, 0.05);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    font-size: 0.95rem;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    background: transparent;
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.85;
    font-size: 1rem;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.3s ease;
}

/* حالة فتح السؤال النشطة (Active Accordion State) */
.faq-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px -10px rgba(56, 189, 248, 0.3);
}

.faq-item.active .faq-answer {
    max-height: 400px;
    padding: 0 25px 25px 25px;
    opacity: 1;
    border-top: 1px solid var(--card-border);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent-color);
}

/* --------------------------------------------------------------------------
   9. تذييل الصفحة (FAQ Footer Section)
   -------------------------------------------------------------------------- */
.faq-footer {
    text-align: center;
    padding: 35px 20px;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.92rem;
    border-top: 1px solid var(--card-border);
    margin-top: auto;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.02);
}

.faq-footer p {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* --------------------------------------------------------------------------
   10. تحسينات التجاوب مع الأجهزة المختلفة والشاشات الصغيرة (Responsive Design)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .faq-grid {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .faq-header {
        padding: 50px 15px 45px 15px;
        border-radius: 0 0 25px 25px;
        margin-bottom: 30px;
    }

    .faq-header h1 {
        font-size: 2.1rem;
    }

    .faq-header p {
        font-size: 1rem;
    }

    .search-container {
        margin: -25px auto 30px auto;
        padding: 0 15px;
    }

    .search-input {
        padding: 15px 22px;
        font-size: 1rem;
    }

    .controls-bar {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
        padding-top: 15px;
    }

    [dir="ltr"] .controls-bar {
        right: auto;
    }

    .control-btn {
        padding: 9px 16px;
        font-size: 0.85rem;
    }

    .faq-question {
        padding: 18px 20px;
        font-size: 1.02rem;
    }

    .faq-answer {
        font-size: 0.95rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 20px 20px 20px;
    }

    .faq-footer {
        padding: 25px 15px;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .faq-header h1 {
        font-size: 1.8rem;
    }

    .control-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .faq-question {
        padding: 16px 15px;
        font-size: 0.98rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 15px 15px 15px;
    }
}

/* --------------------------------------------------------------------------
   11. تأثيرات إضافية وحركات متقدمة (Advanced UI Animations & Enhancements)
   -------------------------------------------------------------------------- */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInSlide 0.5s ease backwards;
}

.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }
.faq-item:nth-child(6) { animation-delay: 0.3s; }
.faq-item:nth-child(7) { animation-delay: 0.35s; }
.faq-item:nth-child(8) { animation-delay: 0.4s; }

/* تحسين تركيز لوحة المفاتيح والوصولية (Accessibility Focus Rings) */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ميزات طباعة الصفحة (Print Stylesheet Optimization) */
@media print {
    .controls-bar,
    .search-container,
    .faq-question i {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .faq-item {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 15px;
    }

    .faq-answer {
        max-height: none !important;
        padding: 15px !important;
        opacity: 1 !important;
        display: block !important;
    }

    .faq-header {
        background: none !important;
        color: #000000 !important;
        padding: 20px 0 !important;
    }
}

/* القائمة الجانبية العائمة (Side Menu) */
html[dir="rtl"] .en-text,
html[dir="ltr"] .ar-text {
    display: none !important;
}

.side-info-container {
    position: fixed;
    top: 20px;
    z-index: 99999;
}

html[dir="rtl"] .side-info-container { right: 20px; }
html[dir="ltr"] .side-info-container { left: 20px; }

.side-main-btn {
    background: linear-gradient(135deg, #9333ea, #6b21a8);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
    transition: background 0.3s ease, transform 0.2s ease;
}

.menu-icon-symbol {
    font-size: 16px;
    font-weight: bold;
}

.side-main-btn:hover {
    background: linear-gradient(135deg, #a855f7, #7e22ce);
    transform: scale(1.05);
}

.arrow-icon {
    font-size: 8px;
    transition: transform 0.3s ease;
}

.side-submenu {
    position: absolute;
    top: 125%;
    background: rgba(26, 11, 46, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    width: 190px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInSubSide 0.3s ease;
}

html[dir="rtl"] .side-submenu { right: 0; text-align: right; }
html[dir="ltr"] .side-submenu { left: 0; text-align: left; }

@keyframes fadeInSubSide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.submenu-header-title {
    padding: 10px 15px 4px 15px;
    color: #d8b4fe;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

.submenu-divider {
    height: 1px;
    background: rgba(168, 85, 247, 0.4);
    margin: 4px 10px 8px 10px;
}

.side-submenu-item {
    padding: 10px 15px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.side-submenu-item:hover {
    background: rgba(147, 51, 234, 0.4);
}

.submenu-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.side-submenu-title {
    padding: 8px 15px;
    color: #c084fc;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-submenu-subitem {
    padding: 6px 15px 6px 25px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 12px;
    display: block;
    transition: background 0.2s ease, color 0.2s ease;
}

html[dir="ltr"] .side-submenu-subitem {
    padding: 6px 25px 6px 15px;
}

.side-submenu-subitem:hover {
    background: rgba(147, 51, 234, 0.25);
    color: #ffffff;
}

.side-info-container.active .side-submenu {
    display: flex;
}

.side-info-container.active .arrow-icon {
    transform: rotate(180deg);
}

.wave-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
    z-index: -1; /* يجعل الأمواج في الخلفية تماماً تحت كل العناصر */
}

.waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    min-height: 100px;
    max-height: 150px;
}


.parallax > use {
    animation: move-wave 25s cubic-bezier(.55,.5,.45,.5) infinite;
}

.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; fill: rgba(56, 189, 248, 0.15); }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; fill: rgba(2, 132, 199, 0.2); }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; fill: rgba(56, 189, 248, 0.25); }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; fill: var(--primary-color); opacity: 0.3; }

@keyframes move-wave {
    0% { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

.intro-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at center, #1b0c2e 0%, #0c0414 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 99999;
            transition: opacity 0.7s ease, visibility 0.7s ease;
        }

        .feedback-pulse-ring {
            position: absolute;
            width: 220px;
            height: 220px;
            border: 2px solid rgba(168, 85, 247, 0.4);
            border-radius: 50%;
            animation: pulseWave 2.5s infinite ease-out;
        }

        @keyframes pulseWave {
            0% {
                transform: scale(0.8);
                opacity: 1;
            }
            100% {
                transform: scale(1.6);
                opacity: 0;
            }
        }

        .intro-icon-box {
            position: relative;
            z-index: 2;
            width: 130px;
            height: 130px;
            background: linear-gradient(135deg, #9333ea, #6b21a8);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 25px;
            box-shadow: 0 0 30px rgba(147, 51, 234, 0.6);
            animation: cartBounce 2s ease-in-out infinite;
        }

        .intro-icon-box svg {
            width: 65px;
            height: 65px;
            fill: #ffffff;
            animation: iconWobble 2s ease-in-out infinite;
        }

        @keyframes cartBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-12px); }
        }

        @keyframes iconWobble {
            0%, 100% { transform: rotate(0deg); }
            25% { transform: rotate(-5deg); }
            75% { transform: rotate(5deg); }
        }

        .intro-content {
            position: relative;
            z-index: 2;
            text-align: center;
            padding: 0 20px;
        }

        .intro-main-title {
            font-family: 'Cairo', sans-serif;
            font-size: 2rem;
            color: #ffffff;
            margin-bottom: 8px;
            text-shadow: 0 2px 8px rgba(0,0,0,0.4);
            transition: opacity 0.3s ease;
        }

        .intro-sub-text {
            font-family: 'Cairo', sans-serif;
            font-size: 1.2rem;
            color: #d8b4fe;
            font-weight: 600;
            opacity: 0;
            transform: translateY(15px);
            animation: fadeInUpCustom 0.5s forwards 0.2s;
            transition: opacity 0.3s ease;
        }

        @keyframes fadeInUpCustom {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .sport-bg-lines {
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 1;
            opacity: 0.15;
        }
        .sport-bg-lines span {
            position: absolute;
            display: block;
            width: 200px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
            animation: sportMoveLines 6s linear infinite;
        }
        .sport-bg-lines span:nth-child(1) { left: 10%; animation-delay: 0s; }
        .sport-bg-lines span:nth-child(2) { left: 50%; animation-delay: 2s; }
        .sport-bg-lines span:nth-child(3) { left: 80%; animation-delay: 4s; }
        @keyframes sportMoveLines {
            0% { transform: translateY(-100%); }
            100% { transform: translateY(100%); }
        }

        