
/* ==========================================
   1. الإعدادات العامة والمتغيرات
   ========================================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --accent: #38bdf8;
    --bg-dark: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
}

/* توهج خلفي جمالي */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1e3a8a 0%, transparent 50%);
    opacity: 0.15;
    z-index: -1;
}

/* ==========================================
   2. شريط التنقل (Navbar)
   ========================================== */
.navbar {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
}

/* روابط القائمة */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

/* زر القائمة للجوال */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* ==========================================
   3. الصفحة الرئيسية (Hero Section)
   ========================================== */
.hero {
    padding: 100px 5% 60px;
    text-align: center;
}

.hero h1 {
    font-size: 45px;
    margin-bottom: 20px;
    color: white;
}

.hero .highlight {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.main-search {
    max-width: 600px;
    margin: 40px auto;
    display: flex;
    background: var(--glass);
    padding: 8px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.main-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    color: white;
    outline: none;
}

.main-search button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

/* ==========================================
   4. صفحة الأرشيف (Filter & Grid)
   ========================================== */
.archive-container {
    display: flex;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 30px;
}

.smart-filter-bar {
    background: var(--glass);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-row select, .filter-row input, .btn-filter-apply {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    outline: none;
}

.btn-filter-apply {
    background: var(--primary);
    border: none;
    font-weight: bold;
    cursor: pointer;
    flex: 0.5;
}

/* تقسيم المستويات */
.level-section {
    margin-bottom: 40px;
}

.level-title {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* شبكة المواد */
.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.subject-card {
    background: var(--glass);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.subject-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.subject-code {
    background: var(--primary);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: inline-block;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-view {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
}

.btn-view:hover {
    background: var(--primary);
}

.btn-solution {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================
   5. صفحة تفاصيل المادة (Subject Details)
   ========================================== */
.subject-header {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 20px;
}

.file-list {
    list-style: none;
    margin-top: 15px;
}

.file-list li a {
    display: block;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    transition: 0.3s;
}

.file-list li a:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================
   6. لوحة التحكم (Admin Panel)
   ========================================== */
.admin-grid {
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.setup-card, .editor-card {
    background: var(--glass);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.admin-grid input, .admin-grid select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #0f172a;
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 10px;
}

/* ==========================================
   7. التوافق مع الشاشات (Responsiveness)
   ========================================== */

/* للهواتف (أقل من 768px) */
@media screen and (max-width: 768px) {
    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        padding-top: 100px;
        transition: 0.4s;
        z-index: 1001;
    }

    .nav-links.active { right: 0; }

    .nav-overlay {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.7);
        display: none;
        z-index: 1000;
    }
    .nav-overlay.active { display: block; }

    .hero h1 { font-size: 30px; }
    
    .archive-container, .admin-grid {
        flex-direction: column;
        display: block;
    }

    .filter-row { flex-direction: column; }
    
    .level-grid, .content-grid {
        grid-template-columns: 1fr;
    }

    .setup-card { margin-bottom: 30px; }
}

/* للآيباد (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .level-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 38px; }
}

/* حالة فارغة */
.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    grid-column: 1 / -1;
}
/* ==========================================
   تنسيق قسم الخدمات (Cards Section)
   ========================================== */

.features {
    padding: 80px 10%;
    background: transparent;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 32px;
    color: #fff;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 18px;
}

/* شبكة البطاقات - Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* تصميم البطاقة الفردية */
.card {
    background: var(--glass); /* تأثير الزجاج الشفاف */
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* تأثير التوهج عند الوقوف على البطاقة */
.card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* الأيقونة داخل البطاقة */
.card-icon {
    font-size: 50px;
    margin-bottom: 25px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

/* العنوان داخل البطاقة */
.card h3 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* النص الوصفي */
.card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
    flex-grow: 1; /* لجعل الأزرار متساوية المحاذاة */
}

/* الرابط/الزر داخل البطاقة */
.card a {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 25px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    transition: 0.3s;
}

.card a:hover {
    background: var(--accent);
    color: var(--secondary);
    box-shadow: 0 0 15px var(--accent);
}

/* ==========================================
   توافق الشاشات (Responsive)
   ========================================== */
@media (max-width: 768px) {
    .features {
        padding: 50px 5%;
    }
    
    .cards-grid {
        grid-template-columns: 1fr; /* بطاقة واحدة في السطر للجوال */
    }
    
    .card {
        padding: 30px 20px;
    }
}


/* تنسيق النافذة المنبثقة (Modal) */
/* تحويل نافذة التجميعات لتصبح ملء الشاشة */
#resource-modal .modal-content {
    width: 100% !important;
    max-width: 100% !important; /* إلغاء حد الـ 500 بكسل */
    height: 100vh !important;   /* ملء ارتفاع الشاشة بالكامل */
    margin: 0 !important;       /* إلغاء الهوامش */
    border-radius: 0 !important; /* حواف حادة لتبدو كتطبيق كامل */
}

/* تأكد من أن الـ iframe يأخذ المساحة المتبقية بالكامل */
#resource-modal .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#resource-iframe {
    width: 100%;
    height: 100%;
    flex: 1;
}

/* تحسين شكل الهيدر في وضع ملء الشاشة */
#resource-modal .modal-content > div:first-child {
    border-radius: 0 !important;
    padding: 10px 20px !important;
}

.modal-header {
    padding: 15px 20px;
    background: #0f172a;
    border-bottom: 1px solid var(--glass-border);
}

.modal-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#modal-search-input {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: white;
    outline: none;
}

.modal-body {
    flex: 1;
    background: white; /* لجعل صفحات التجميعات واضحة */
}

#resource-iframe {
    width: 100%;
    height: 100%;
}

.btn-close {
    background: #ef4444;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
}
.search-nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 8px;
}

#search-status {
    color: var(--accent);
    font-size: 13px;
    min-width: 40px;
    text-align: center;
}

.btn-nav {
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-nav:hover { background: var(--accent); }

/* هذه الكلاسات سيتم حقنها داخل الـ Iframe لتظليل الكلمات */
/* ملاحظة: سنضيفها برمجياً لملف الـ Iframe */
.itg-mark {
    background-color: yellow !important;
    color: black !important;
    border-radius: 2px;
}

.itg-mark-current {
    background-color: orange !important;
    box-shadow: 0 0 8px orange;
    outline: 2px solid red;
}
/* حاوية البحث الكبرى */
.modal-search-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* الحاوية التي تجعل العناصر داخل المربع */
.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

#modal-search-input {
    width: 100%;
    padding: 12px 15px;
    padding-left: 110px; /* مساحة للأزرار جهة اليسار (إذا كان الاتجاه RTL) */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
    border-radius: 12px;
    color: white;
    outline: none;
    font-size: 15px;
}

/* موضع العناصر داخل مربع البحث */
.inner-search-controls {
    position: absolute;
    left: 10px; /* بما أن اللغة عربية، الأزرار تكون غالباً جهة اليسار */
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
}

/* عداد النتائج (0/0) */
#search-status {
    color: var(--accent);
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    user-select: none;
}

/* الفاصل الصغير بين العداد والأزرار */
.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    margin: 0 5px;
}

/* أزرار الأسهم الداخلية */
.btn-inner-nav {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
    transition: 0.2s;
    line-height: 1;
}

.btn-inner-nav:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.btn-inner-nav:active {
    transform: scale(0.9);
}

/* زر الإغلاق الخارجي */
.btn-close {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

/* index.php*/

        /* تنسيقات النافذة المنبثقة (المودال) لضمان السكرول/السلايد */
        .modal {
            display: none; position: fixed; z-index: 10000;
            left: 0; top: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
            justify-content: center; align-items: center; padding: 20px;
        }
        .modal-content {
            background: #fff; padding: 25px; border-radius: 20px;
            width: 100%; max-width: 450px; max-height: 85vh; 
            overflow-y: auto; position: relative; animation: fadeIn 0.3s ease;
        }
        .close-modal { position: absolute; top: 15px; left: 15px; font-size: 24px; cursor: pointer; color: #666; }
        .auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #eee; }
        .tab-link { flex: 1; padding: 10px; border: none; background: none; cursor: pointer; font-family: 'Cairo'; font-weight: bold; color: #666; }
        .tab-link.active { color: #2563eb; border-bottom: 2px solid #2563eb; }
        .auth-form { display: none; flex-direction: column; gap: 12px; }
        .auth-form.active { display: flex; }
        .input-group label { display: block; margin-bottom: 5px; font-size: 14px; color: #4b5563; }
        .input-group input, .input-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-family: 'Cairo'; }
        .submit-btn { width: 100%; padding: 12px; background: #2563eb; color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
        
        /* تنسيق المستخدم المسجل في الناف بار */
        .user-info { display: flex; align-items: center; gap: 10px; background: #f1f5f9; padding: 5px 12px; border-radius: 20px; }
        .user-name { font-weight: bold; color: #2563eb; font-size: 13px; }
        .logout-btn { color: #ef4444; font-size: 12px; text-decoration: none; font-weight: bold; }
   /* تنسيق القائمة المنسدلة للمستخدم */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    background: #f1f5f9;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.dropdown-trigger:hover {
    background: #e2e8f0;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: #fff;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #eee;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: 0.2s;
    text-align: right;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: #2563eb;
}

.dropdown-content a.logout-item {
    color: #ef4444;
    border-top: 1px solid #eee;
}

/* إظهار القائمة عند الحوم بالماوس */
.user-dropdown:hover .dropdown-content {
    display: block;
}

/* سهم صغير بجانب الاسم */
.dropdown-trigger::after {
    content: '\25BC';
    font-size: 10px;
    margin-right: 5px;
}
/* حاوية القائمة المنسدلة */
.user-dropdown {
    position: relative;
    display: inline-block;
}

/* الزر الأساسي الذي يظهر فيه الاسم */
.dropdown-trigger {
    background: #1e293b; /* نفس لون الكروت في الموقع */
    color: #f8fafc;
    padding: 8px 18px;
    border-radius: 50px; /* شكل بيضاوي عصري */
    border: 1px solid #334155;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dropdown-trigger:hover {
    background: #334155;
    border-color: #3b82f6; /* تغيير لون الإطار للأزرق عند التحويم */
    transform: translateY(-1px);
}

/* أيقونة المستخدم الصغيرة */
.user-avatar-icon {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* القائمة المنسدلة نفسها */
.dropdown-content {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background: #1e293b;
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

/* روابط القائمة */
.dropdown-content a {
    color: #cbd5e1;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: 0.2s;
    border-bottom: 1px solid #334155;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: #0f172a;
    color: #3b82f6;
    padding-right: 20px; /* حركة بسيطة عند التحويم */
}

/* ستايل خاص لزر تسجيل الخروج */
.dropdown-content a.logout-item {
    color: #fb7185; /* لون أحمر هادئ */
}

.dropdown-content a.logout-item:hover {
    background: rgba(251, 113, 133, 0.1);
    color: #f43f5e;
}
/* تنسيق الزر العلوي ليطابق أزرار السايد بار */
.dropdown-trigger.btn-outline-light {
    border-radius: 8px !important; /* زوايا منحنية بسيطة مثل السايد بار */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 5px 12px !important;
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    color: #fff !important;
    cursor: pointer;
    transition: 0.3s;
}

/* تأثير وضع الماوس (يصبح خلفية بيضاء ونص أسود) */
.dropdown-trigger.btn-outline-light:hover {
    background: #f8fafc !important;
    color: #0b1120 !important; /* لون خلفية الموقع الداكن */
    border-color: #fff !important;
}

/* تنسيق أيقونة الحرف لتتناسق مع الإطار */
.user-avatar-icon {
    width: 20px;
    height: 20px;
    border: 1px solid currentColor; /* يأخذ لون النص تلقائياً */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* تعديل موضع القائمة المنسدلة لتبدأ تحت الزر مباشرة */
.dropdown-content {
    top: 105%;
    right: 0;
    min-width: 180px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.5);
}
/*تنسيق السلايدر*/
/* تنسيق السلايدر - نمط الكريمي الاحترافي */
.success-stories-section {
    padding: 60px 0;
    background: #020617; /* خلفية داكنة لبروز النتائج */
}

.swiper {
    width: 100%;
    padding-top: 50px;
    padding-bottom: 50px;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    /* الأبعاد المثالية لصور النتائج (عرضية) */
    width: 500px; 
    height: 320px;
    border-radius: 25px; /* زوايا منحنية مثل الصورة */
    overflow: hidden;
    transition: 0.5s;
}

/* التباين: جعل الصور الجانبية باهتة قليلاً لتبرز الصورة الوسطى */
.swiper-slide:not(.swiper-slide-active) {
    opacity: 0.5;
    filter: blur(1px);
}

.grade-card {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 25px;
}

.grade-card img {
    width: 100%;
    height: 100%;
    /* السطر السحري: ضغط الصورة (Fill) لتظهر كاملة داخل الإطار دون قص */
    object-fit: fill; 
    display: block;
}

/* تحسين شكل نقاط التنقل في الأسفل */
.swiper-pagination-bullet {
    background: var(--accent) !important;
}

@media (max-width: 768px) {
    .swiper-slide {
        width: 320px;
        height: 200px;
    }
}




/* تأكد من وجود هذه التنسيقات في ملف الـ CSS الخاص بك لكي يعمل السكريبت */
@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        right: -280px; /* مخفي خارج الشاشة */
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 9999;
        transition: right 0.3s ease;
        background: #111827;
    }
    .sidebar.active {
        right: 0; /* يظهر عند إضافة كلاس active */
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }
    .sidebar-overlay.active {
        display: block;
    }
}

/* تنسيق شبكة الخدمات */
.social-btn.tg { background: #24a1de; } /* تيلجرام */
.social-btn.wa { background: #25d366; } /* واتساب */
.social-btn.tt { background: #000000; border: 1px solid #ff0050; } /* تيك توك */
.social-btn.snap { background: #fffc00; color: #000; } /* سناب شات */
.social-btn {
    border: none;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.3s;
}
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* صفين */
    gap: 5px;
    margin: 10px 0;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 12px;
}

.service-item {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e2e8f0;
    font-weight: 600;
}

.service-item i {
    color: #38bdf8; /* لون الأيقونات */
    font-size: 12px;
}

.service-item.text-warning {
    color: #fbbf24;
}
.service-item.text-warning i {
    color: #fbbf24;
}
/* تنسيق الإعلان المطور - حل مشكلة الظهور المفاجئ */
.tg-super-toast {
    position: fixed;
    bottom: 30px; /* نثبت المكان النهائي */
    right: 25px;
    background: linear-gradient(135deg, #0088cc 0%, #24a1de 100%);
    color: white;
    padding: 22px;
    border-radius: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 400px;
    box-shadow: 0 20px 50px rgba(0, 136, 204, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    
    /* الحل الجذري هنا */
    transform: translateY(150%); /* دفع العنصر بعيداً جداً للأسفل */
    opacity: 0;                  /* شفاف تماماً */
    visibility: hidden;          /* غير مرئي نهائياً للمتصفح */
    transition: all 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* حالة الظهور */
.tg-super-toast.show {
    transform: translateY(0);    /* العودة لمكانه الطبيعي */
    opacity: 1;                  /* يظهر بوضوح */
    visibility: visible;         /* يصبح مرئياً */
}
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.social-btn {
    padding: 7px !important;
    font-size: 11px !important;
}

@media (max-width: 500px) {
    .tg-super-toast {
        width: calc(100% - 30px) !important;
    }
}

/* ==========================================
   تنسيق الفوتر الاحترافي - ITG
   ========================================== */
.main-footer {
    background: #0f172a; /* لون أفتح قليلاً من خلفية الموقع لتمييزه */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0 20px;
    margin-top: 50px;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr; /* 4 أعمدة */
    gap: 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-col p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links li a:hover {
    color: var(--accent);
    padding-right: 8px;
}

.footer-social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.copyright-text {
    color: #64748b;
    font-size: 13px;
}

/* توافق الشاشات */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 550px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    .footer-social-links {
        justify-content: center;
    }
    .footer-links li a {
        justify-content: center;
    }
}


        /* إعلان التيلجرام المطور - لافت للنظر */
.tg-super-toast {
    position: fixed;
    bottom: -200px;
    right: 25px;
    background: linear-gradient(135deg, #0088cc 0%, #24a1de 100%);
    color: white;
    padding: 22px;
    border-radius: 24px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 18px;
    width: 380px;
    box-shadow: 0 20px 50px rgba(0, 136, 204, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    backdrop-filter: blur(8px);
}

/* حركة الظهور المرتدة */
.tg-super-toast.show {
    bottom: 30px;
    animation: pulse-glow 2s infinite;
}

/* نبض الحواف */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(36, 161, 222, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(36, 161, 222, 0); }
    100% { box-shadow: 0 0 0 0 rgba(36, 161, 222, 0); }
}

.tg-icon-wrap {
    position: relative;
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #0088cc;
    flex-shrink: 0;
    transform: rotate(-10deg);
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: rotate(-10deg) translateY(0); }
    50% { transform: rotate(10deg) translateY(-10px); }
}

.tg-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff3e3e;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: bold;
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tg-content h5 {
    margin: 0 0 5px 0;
    font-size: 17px;
    font-weight: 800;
}

.tg-content p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.95;
}

.tg-action-btn {
    background: #fff;
    color: #0088cc;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
    transition: 0.3s;
    text-transform: uppercase;
}

.tg-action-btn:hover {
    background: #000;
    color: #fff;
}

/* زر الإغلاق */
.tg-close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.1);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 500px) {
    .tg-super-toast { width: calc(100% - 40px); right: 20px; left: 20px; }
}
   