﻿/* 
 * 1) الألوان والمتغيرات العامة
 * --------------------------------------------------
 */
:root {
    /* لوحة ألوان رئيسية */
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    /* ألوان إضافية */
    --dark-color: #1b263b;
    --light-color: #f8f9fa;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f72585;
    /* ألوان النص */
    --text-dark: #2C3E50;
    --text-light: #F8F9FA;
}

/* 
 * 2) إعدادات الخط والجسم
 * --------------------------------------------------
 */
body {
    font-family: 'Tajawal','Cairo', sans-serif; /* يمكنك اختيار أحدهما أو إبقائهما */
    background-color: #f5f7fb; /* خلفية عامة */
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* اختياري: يمكنك استخدام هذا المزيج من الألوان للخلفية التدرجية */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* 
 * 3) القوائم العلوية (Navbar)
 * --------------------------------------------------
 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 4px 20px rgba(67, 97, 238, 0.15);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease;
}

    .navbar-brand img {
        transition: transform 0.3s ease;
    }

    .navbar-brand:hover img {
        transform: rotate(15deg);
    }

/* الروابط داخل النافبار */
.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    color: #fff !important;
}

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }

    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
    }

/* 
 * 4) القائمة المنسدلة (Dropdown)
 * --------------------------------------------------
 */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem;
    background-color: #fff;
}

/* عناصر القائمة المنسدلة */
.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    margin-bottom: 0.2rem;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-dark);
}

    .dropdown-item:hover {
        background-color: var(--primary-color);
        color: #fff;
        transform: translateX(-5px);
    }

/* 
 * 5) تصميم البطاقات (Cards) 
 * --------------------------------------------------
 */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }

/* رأس البطاقة */
.card-header {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: #fff;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* تأثير للبطاقات التحريكية */
.animated-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* بطاقات تقارير أو إحصائيات */
.report-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 15px;
    border: none;
}

    .report-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

/* 
 * 6) ترويسات الأقسام (Heroes) 
 * --------------------------------------------------
 */
.hero-section {
    background: linear-gradient(135deg, #2C3E50, #3498DB);
    color: #fff;
    padding: 100px 0;
}

    .hero-section h1 {
        font-weight: 700;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

/* 
 * 7) الجداول (Tables)
 * --------------------------------------------------
 */
.table {
    border-radius: 10px;
    overflow: hidden;
}

    .table thead {
        background: var(--primary-color);
        color: #fff;
    }

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table th,
.table td {
    vertical-align: middle;
}

/* تخصيص .data-table إن كنت تستخدمها */
.data-table {
    border-radius: 0.5rem;
    overflow: hidden;
}

    .data-table thead {
        background: var(--primary-color);
        color: #fff;
    }

    .data-table th {
        font-weight: 700;
    }

/* 
 * 8) الأزرار (Buttons)
 * --------------------------------------------------
 */
.btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
        transform: translateY(-2px);
        color: #fff !important;
    }

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* أزرار التخطيط Outline */
.btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-success {
    border-color: #198754;
    color: #198754;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-warning {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-outline-info {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.btn:hover {
    color: #fff !important;
}

/* 
 * 9) الشارات أو الوسوم (Badges)
 * --------------------------------------------------
 */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 0.5rem;
}

/* 
 * 10) النوافذ المنبثقة (Modals)
 * --------------------------------------------------
 */
.modal-content {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.modal-header {
    background: var(--primary-color);
    color: #fff;
    border-bottom: none;
}

/* 
 * 11) زر العودة للأعلى
 * --------------------------------------------------
 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.3s;
    cursor: pointer;
}

    .back-to-top:hover {
        opacity: 1;
        transform: scale(1.1);
    }

/* 
 * 12) تنسيق فوتـر (footer) أو أقسام إضافية
 * --------------------------------------------------
 */
.footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #0d1b2a 100%);
    padding: 2rem 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    color: #fff;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

    .social-links a:hover {
        background-color: var(--primary-color);
        transform: translateY(-3px);
    }

/* 
 * 13) فئات إضافية حسب الحاجة
 * --------------------------------------------------
 */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.hover-scale {
    transition: transform 0.3s ease;
}

    .hover-scale:hover {
        transform: scale(1.03);
    }

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

    .hover-shadow:hover {
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

/* مثال لصورة رمزية */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
}

/* 
 * 14) التصميم المستجيب (Responsive Design)
 * --------------------------------------------------
 */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
    }

    /* يمكنك ضبط العرض أو مكان القائمة المنسدلة */
    .dropdown-menu {
        margin-left: 1rem;
        width: 90%;
        z-index: 1060 !important;
        position: absolute !important;
    }

    .hero-section {
        padding: 50px 0;
    }

        .hero-section h1 {
            font-size: 2rem;
        }

        .hero-section p {
            font-size: 1rem;
        }


    .card-body {
        overflow: visible !important;
    }

    .dropdown {
        position: static !important;
    }

    card {
        overflow: visible !important; /* الأهم - يسمح بعرض المحتوى خارج حدود البطاقة */
    }

    .member-card {
        position: relative; /* إنشاء سياق مكدس جديد */
    }

    .dropdown-menu {
        position: absolute !important;
        z-index: 1060 !important;
        width: 100%;
        margin-top: 0;
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        /* التأكد من ظهور القائمة خارج البطاقة */
        top: 100% !important;
        left: 0 !important;
        transform: none !important;
    }
        :root {
            --primary-color: #4361ee;
            --secondary-color: #3f37c9;
            --accent-color: #4895ef;
            --success-color: #4cc9f0;
            --warning-color: #f8961e;
            --danger-color: #f72585;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --gray-color: #6c757d;
            --white-color: #ffffff;
            --border-radius: 12px;
            --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Tajawal', sans-serif;
            background-color: var(--light-color);
            color: var(--dark-color);
            line-height: 1.6;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* Header Styles */
        .main-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
            padding: 15px 0;
            transition: var(--transition);
        }

        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            font-weight: 700;
            font-size: 1.5rem;
            color: var(--primary-color);
        }

            .logo img {
                height: 40px;
                margin-left: 10px;
            }

        .nav-menu {
            display: flex;
            list-style: none;
        }

        .nav-item {
            margin-right: 20px;
            position: relative;
        }

        .nav-link {
            font-weight: 500;
            padding: 8px 15px;
            border-radius: var(--border-radius);
            transition: var(--transition);
        }

            .nav-link:hover {
                color: var(--primary-color);
                background: rgba(67, 97, 238, 0.1);
            }

            .nav-link.active {
                color: var(--white-color);
                background: var(--primary-color);
            }

        .user-profile {
            display: flex;
            align-items: center;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-right: 10px;
        }

        /* Hero Section */
        .hero-section {
            padding: 180px 0 100px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            position: relative;
            overflow: hidden;
        }

        .hero-content {
            max-width: 600px;
            position: relative;
            z-index: 2;
        }

        .hero-title {
            font-size: 2.8rem;
            font-weight: 800;
            line-height: 1.2;
            margin-bottom: 20px;
            animation: fadeInUp 1s ease;
        }

        .hero-subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            margin-bottom: 30px;
            animation: fadeInUp 1s ease 0.2s forwards;
            opacity: 0;
        }

        .hero-buttons {
            display: flex;
            gap: 15px;
            animation: fadeInUp 1s ease 0.4s forwards;
            opacity: 0;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 24px;
            border-radius: var(--border-radius);
            font-weight: 600;
            transition: var(--transition);
            border: none;
            cursor: pointer;
        }

        .btn-primary {
            background: var(--white-color);
            color: var(--primary-color);
        }

            .btn-primary:hover {
                transform: translateY(-3px);
                box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            }

        .btn-outline {
            background: transparent;
            color: var(--white-color);
            border: 2px solid var(--white-color);
        }

            .btn-outline:hover {
                background: var(--white-color);
                color: var(--primary-color);
                transform: translateY(-3px);
            }

        .hero-image {
            position: absolute;
            right: 0;
            bottom: 0;
            height: 90%;
            animation: fadeInRight 1s ease;
        }

        /* Features Section */
        .features-section {
            padding: 100px 0;
        }

        .section-title {
            text-align: center;
            margin-bottom: 60px;
        }

            .section-title h2 {
                font-size: 2.2rem;
                font-weight: 800;
                color: var(--dark-color);
                margin-bottom: 15px;
                position: relative;
                display: inline-block;
            }

                .section-title h2::after {
                    content: '';
                    position: absolute;
                    bottom: -10px;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 80px;
                    height: 4px;
                    background: var(--primary-color);
                    border-radius: 2px;
                }

            .section-title p {
                color: var(--gray-color);
                max-width: 700px;
                margin: 0 auto;
            }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .feature-card {
            background: var(--white-color);
            border-radius: var(--border-radius);
            padding: 30px;
            box-shadow: var(--box-shadow);
            transition: var(--transition);
            text-align: center;
        }

            .feature-card:hover {
                transform: translateY(-10px);
                box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
            }

        .feature-icon {
            width: 80px;
            height: 80px;
            background: rgba(67, 97, 238, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 25px;
            font-size: 30px;
            color: var(--primary-color);
        }

        .feature-card h3 {
            font-size: 1.4rem;
            margin-bottom: 15px;
            color: var(--dark-color);
        }

        .feature-card p {
            color: var(--gray-color);
            margin-bottom: 20px;
        }

        /* Stats Section */
        .stats-section {
            padding: 80px 0;
            background: linear-gradient(135deg, var(--accent-color) 0%, var(--success-color) 100%);
            color: white;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
        }

        .stat-card {
            text-align: center;
            padding: 30px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: var(--border-radius);
            backdrop-filter: blur(5px);
            transition: var(--transition);
        }

            .stat-card:hover {
                transform: translateY(-5px);
                background: rgba(255, 255, 255, 0.2);
            }

        .stat-number {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 10px;
        }

        .stat-label {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        /* Exams Section */
        .exams-section {
            padding: 100px 0;
            background: var(--light-color);
        }

        .exams-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .exam-card {
            background: var(--white-color);
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--box-shadow);
            transition: var(--transition);
        }

            .exam-card:hover {
                transform: translateY(-10px);
                box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
            }

        .exam-header {
            padding: 20px;
            background: var(--primary-color);
            color: white;
        }

        .exam-body {
            padding: 20px;
        }

        .exam-details {
            margin-bottom: 20px;
        }

        .exam-detail {
            display: flex;
            margin-bottom: 10px;
        }

            .exam-detail i {
                width: 30px;
                color: var(--primary-color);
            }

        /* Footer */
        .main-footer {
            background: var(--dark-color);
            color: var(--white-color);
            padding: 50px 0 20px;
        }

        .footer-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
            margin-bottom: 40px;
        }

        .footer-logo {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 20px;
            color: var(--white-color);
        }

        .footer-links h3 {
            font-size: 1.2rem;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 10px;
        }

            .footer-links h3::after {
                content: '';
                position: absolute;
                bottom: 0;
                right: 0;
                width: 50px;
                height: 2px;
                background: var(--primary-color);
            }

        .footer-links ul {
            list-style: none;
        }

        .footer-links li {
            margin-bottom: 10px;
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.7);
            transition: var(--transition);
        }

            .footer-links a:hover {
                color: var(--white-color);
                padding-right: 5px;
            }

        .footer-bottom {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
        }

        /* Responsive Styles */
        @@media (max-width: 992px) {
            .hero-title

        {
            font-size: 2.2rem;
        }

        .hero-image {
            height: 70%;
            opacity: 0.3;
        }

        }

        @@media (max-width: 768px) {
            .header-container

        {
            flex-direction: column;
        }

        .logo {
            margin-bottom: 15px;
        }

        .nav-menu {
            margin-bottom: 15px;
        }

        .hero-section {
            padding: 150px 0 80px;
            text-align: center;
        }

        .hero-content {
            max-width: 100%;
        }

        .hero-buttons {
            justify-content: center;
        }

        .hero-image {
            display: none;
        }

        }

        @@media (max-width: 576px) {
            .hero-title

        {
            font-size: 1.8rem;
        }

        .hero-buttons {
            flex-direction: column;
            gap: 10px;
        }

        .btn {
            width: 100%;
        }

        }

        /* Animations */
        @@keyframes fadeInUp {
            from

        {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }

        }

        @@keyframes fadeInRight {
            from

        {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }

        }

    /* ======= Hero Section Styles ======= */

    /* 1) تقليل المسافة من الأعلى */
    .hero-section {
        padding-top: 2rem; /* كان أكبر – قللناه */
        padding-bottom: 4rem; /* احتفظنا بمسافة سفليّة مريحة */
        background-color: #004c97; /* إن أردت لون خلفية موحّد */
    }

    /* 2) تصغير الخلفية الزرقاء / النجوم */
    .hero-particles {
        top: 0; /* يبدأ من الأعلى الحقيقي */
        left: 40%; /* ندفعها للمنتصف لإزاحة الهامش الأبيض */
        width: 50%; /* بدلاً من 80% */
        height: 50%; /* بدلاً من 80% */
        transform: translateX(-50%);
        z-index: 0;
        pointer-events: none; /* لا تُعيق التفاعل */
    }

    /* 3) تصغير الصورة وجعلها تستجيب */
    .hero-img {
        max-width: 320px; /* أقصى عرض على أكبر شاشة */
        width: 80%; /* بالنسبة للحاوية */
    }

    /* تأثير عائم بسيط (إذا كنت تستخدمه) */
    .floating-animation {
        animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-12px);
        }
    }

    /* 4) تحسين الموجة الخلفيّة إذا لزم الأمر */
    .hero-wave {
        height: 120px; /* أصغر من قبل */
        background: url('../img/wave.svg') no-repeat bottom center / cover;
        margin-top: -80px; /* تسحبه للأعلى قليلاً ليلمس القسم السفلي */
    }

    /* شاشات أصغر من 768px */
    @media (max-width: 767.98px) {
        .hero-section {
            padding-top: 3rem;
            padding-bottom: 4rem;
        }

        .hero-img {
            max-width: 240px;
            width: 70%;
        }

        .hero-particles {
            width: 90%;
            height: 90%;
            left: 50%;
            transform: translateX(-50%);
        }
    }

   
}
