/* =========================
   🌞 ROOT VARIABLES
========================= */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    
    --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-success: linear-gradient(135deg, #10b981, #34d399);
    --gradient-danger: linear-gradient(135deg, #ef4444, #f87171);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* =========================
   🌍 GLOBAL STYLES
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--light);
    color: var(--dark);
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
}
/* =========================
   🧭 NAVBAR STYLES - FIXED
========================= */

/* تأكيد أن الـ navbar له خلفية ملونة */
.bg-gradient {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
}

/* تأكيد أن لون النص في الـ navbar أبيض */
.navbar {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: white !important;
}

.navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    color: white !important;
}

/* زر dropdown */
.navbar .btn-light {
    background: white !important;
    color: #6366f1 !important;
    border: none !important;
}

.navbar .btn-light:hover {
    background: #f1f5f9 !important;
    color: #6366f1 !important;
}

.navbar .btn-outline-light {
    color: white !important;
    border-color: white !important;
}

.navbar .btn-outline-light:hover {
    background: white !important;
    color: #6366f1 !important;
}

/* قائمة dropdown */
.dropdown-menu {
    background: white !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.dropdown-item {
    color: #1e293b !important;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
}

.dropdown-item.text-danger {
    color: #ef4444 !important;
}

.dropdown-item.text-danger:hover {
    background: #ef4444 !important;
    color: white !important;
}
/* =========================
   🧭 NAVBAR
========================= */
.custom-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-light);
}

.custom-navbar .navbar-brand {
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.custom-navbar .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
    background: var(--gradient-main);
    color: white !important;
}

/* =========================
   🔘 BUTTONS
========================= */
.btn-main {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline-main {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-main:hover {
    background: var(--gradient-main);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-soft {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-soft:hover {
    background: var(--primary);
    color: white;
}

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-danger-soft:hover {
    background: var(--danger);
    color: white;
}


/* =========================
   🧭 NAVBAR ADDITIONAL STYLES
========================= */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.95) !important;
    transition: all 0.3s;
    border-radius: 8px;
    padding: 8px 16px;
}

.navbar .nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.navbar .nav-link.active {
    background: rgba(255,255,255,0.3);
}

.dropdown-item i {
    width: 24px;
    margin-left: 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: #6366f1;
}

@media (max-width: 768px) {
    .navbar .nav-link {
        text-align: center;
    }
    .d-flex.gap-2 {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* =========================
   🎴 CARDS
========================= */
.card {
    background: white;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.course-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.course-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s;
}

.course-card:hover img {
    transform: scale(1.05);
}

.course-card .course-info {
    padding: 1.25rem;
}

.course-card .course-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.course-card .course-teacher {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.course-card .course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Book Cards */
.book-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.book-cover {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-price {
    font-weight: 700;
    color: var(--primary);
}

/* Step Circle */
.step-circle {
    width: 60px;
    height: 60px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Page Hero */
.page-hero {
    background: var(--gradient-main);
    border-radius: 0 0 40px 40px;
    margin-bottom: -2rem;
    padding: 60px 0;
    color: white;
}

/* =========================
   📚 GRADE CARDS
========================= */
.grade-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.grade-card:hover {
    background: var(--gradient-main);
    color: white;
    transform: translateY(-5px);
}

.grade-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.grade-card h5 {
    margin: 0;
    font-weight: 600;
}

/* Stage Card */
.stage-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    height: 100%;
}

.stage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stage-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.grade-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.grade-link {
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s;
    display: block;
    color: var(--gray);
}

.grade-link:hover {
    background: var(--gradient-main);
    color: white;
    transform: translateX(-5px);
}

/* Feature Card */
.feature-card {
    background: white;
    border-radius: 20px;
    transition: all 0.3s;
    height: 100%;
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

/* Testimonial Card */
.testimonial-card {
    background: white;
    border-radius: 20px;
    transition: all 0.3s;
    height: 100%;
    box-shadow: var(--shadow);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* =========================
   🎬 VIDEO PLAYER
========================= */
.video-container {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-container:hover .video-controls {
    opacity: 1;
}

/* =========================
   📊 PROGRESS BAR
========================= */
.progress-bar-custom {
    height: 8px;
    background: var(--gray-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-custom .progress {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 10px;
    transition: width 0.3s;
}

/* =========================
   🏠 HERO SECTION
========================= */
.hero {
    background: var(--gradient-main);
    padding: 80px 0;
    border-radius: 0 0 40px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* =========================
   📝 FORMS
========================= */
.form-control,
.form-select {
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* =========================
   🔔 TOAST NOTIFICATIONS
========================= */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    color: var(--dark);
    padding: 12px 20px;
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s;
    font-weight: 500;
    border-right: 4px solid var(--primary);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-right-color: var(--success);
}

.toast.error {
    border-right-color: var(--danger);
}

/* =========================
   ⏳ LOADER
========================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================
   📱 RESPONSIVE
========================= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .course-card img {
        height: 150px;
    }
    
    .page-hero {
        padding: 40px 0;
    }
    
    .book-card {
        margin-bottom: 1rem;
    }
    
    .feature-card, .stage-card, .testimonial-card {
        margin-bottom: 1rem;
    }
}

/* =========================
   🎨 UTILITIES
========================= */
.bg-gradient {
    background: var(--gradient-main);
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Stat Box */
.stat-box {
    text-align: center;
}

.stat-box h3 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.stat-box p {
    margin: 0;
    font-size: 0.875rem;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 2rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.stat-card p {
    color: var(--gray);
    margin: 0;
    font-size: 0.875rem;
}

/* Stat Card Mini */
.stat-card-mini {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.stat-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-mini i {
    font-size: 2rem;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    margin-top: auto;
}

.footer h5, .footer h6 {
    color: white;
    margin-bottom: 1.25rem;
}

.footer a {
    color: #94a3b8;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--primary);
}

.footer .social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    margin-left: 8px;
    transition: all 0.3s;
}

.footer .social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Dashboard Sidebar */
.sidebar {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    min-height: calc(100vh - 200px);
}

.sidebar .nav-link {
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--gray);
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--gradient-main);
    color: white;
}

.sidebar .nav-link i {
    width: 24px;
    margin-left: 8px;
}

/* Certificate Card */
.certificate-card {
    transition: all 0.3s;
}

.certificate-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Table Styles */
.table-custom {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-custom thead th {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 1rem;
}

.table-custom tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Progress */
.progress {
    height: 8px;
    border-radius: 10px;
}

.progress-bar {
    background: var(--gradient-main);
}