/* المسار: Assets/css/style.css */

/* ==========================================================================
   EduGate Enterprise Platform - Next-Gen CSS Engine
   ========================================================================== */

/* --- 1. CSS Variables (The Brain of the Theme) --- */
:root {
    /* Main Color Palette */
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --dark-color: #0b132b;
    --dark-light: #1c2541;
    --light-color: #f8f9fa;
    --text-muted: #6c757d;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    --hero-gradient: radial-gradient(circle at 15% 50%, rgba(67, 97, 238, 0.12), transparent 30%),
                     radial-gradient(circle at 85% 30%, rgba(76, 201, 240, 0.15), transparent 30%),
                     linear-gradient(180deg, #0b132b 0%, #1c2541 100%);
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
    
    /* Advanced Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(67, 97, 238, 0.15);
    --shadow-glow: 0 0 20px rgba(67, 97, 238, 0.4);
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- Dark Mode Variables Overrides --- */
body.theme-dark {
    --glass-bg: rgba(20, 25, 40, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --dark-color: #f8f9fa;
    --light-color: #0b132b;
    --text-muted: #a0aec0;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    background-color: #0a0e17 !important;
}

/* ==========================================================================
   2. Base Styles & Global Resets
   ========================================================================== */
body {
    font-family: 'Cairo', sans-serif;
    background-color: #f4f7f6;
    color: var(--dark-color);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Custom Scrollbar (لمسة احترافية) */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--light-color);
}
::-webkit-scrollbar-thumb {
    background: #caced1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Text Selection */
::selection {
    background-color: rgba(67, 97, 238, 0.3);
    color: var(--primary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.font-en {
    font-family: 'Poppins', sans-serif !important;
}

/* ==========================================================================
   3. Premium Navbar
   ========================================================================== */
.custom-navbar {
    height: 85px;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.custom-navbar .nav-link {
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem !important;
    margin: 0 0.2rem;
    color: var(--text-muted) !important;
    font-weight: 600;
    position: relative;
    transition: var(--transition-smooth);
}

.custom-navbar .nav-link:hover, 
.custom-navbar .nav-link.active {
    color: var(--primary-color) !important;
}

/* Animated Underline for Nav Links */
.custom-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 5px;
    transition: var(--transition-smooth);
    transform: translateX(-50%);
    opacity: 0;
}

.custom-navbar .nav-link:hover::after,
.custom-navbar .nav-link.active::after {
    width: 80%;
    opacity: 1;
}

/* ==========================================================================
   4. Glassmorphism Utilities & Cards
   ========================================================================== */
.bg-glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.8); /* إضاءة علوية للزجاج */
    box-shadow: var(--glass-shadow);
    border-radius: 1rem;
    transition: var(--transition-smooth);
}

.glass-card-dark {
    background: rgba(11, 19, 43, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   5. Hero Section & Typography
   ========================================================================== */
.bg-dark-blue {
    background: var(--hero-gradient) !important;
    position: relative;
}

/* إضافة لمعة خفيفة للنصوص الرئيسية */
.text-primary-light {
    background: linear-gradient(to right, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(76, 201, 240, 0.3);
}

/* ==========================================================================
   6. Buttons & Interactive Elements
   ========================================================================== */
.text-nowrap { white-space: nowrap !important; }

.btn-pill-custom {
    padding: 0.5rem 1.2rem; /* تم تقليل الحجم ليتناسب مع الشاشات المتوسطة */
    border-radius: 50px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
    transition: var(--transition-smooth);
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Hover Primary Icons */
.hover-primary { transition: color 0.3s ease; }
.hover-primary:hover { color: var(--primary-color) !important; transform: scale(1.1); }

/* ==========================================================================
   7. Advanced Teacher Cards
   ========================================================================== */
.teacher-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border) !important;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.teacher-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color) !important;
}

/* Card Image Overlay Effect */
.teacher-card .img-wrapper {
    position: relative;
    overflow: hidden;
}

.teacher-card img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.teacher-card:hover img {
    transform: scale(1.08);
}

/* Play Button Glow */
.play-btn {
    transition: var(--transition-smooth);
    background: rgba(11, 19, 43, 0.8) !important;
    backdrop-filter: blur(5px);
}

.teacher-card:hover .play-btn {
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.6) !important;
    transform: scale(1.15);
}

/* ==========================================================================
   8. Animations & Keyframes (السحر الحقيقي)
   ========================================================================== */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg) !important;
}

/* أنيميشن الطفو (يستخدم للبطاقات في الهيرو) */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out 3s infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* أنيميشن النبض المضيء */
.animate-pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

/* ==========================================================================
   9. Footer Styling
   ========================================================================== */
footer {
    position: relative;
    overflow: hidden;
}

.filter-light {
    filter: brightness(0) invert(1);
}

.hover-white {
    transition: color 0.3s ease;
}
.hover-white:hover {
    color: #fff !important;
}

.group-hover:hover span {
    color: var(--accent-color) !important;
}
.group-hover img {
    transition: transform 0.3s ease;
}
.group-hover:hover img {
    transform: rotate(5deg) scale(1.1);
}

/* ==========================================================================
   10. Dynamic Theme Adjustments (الوضع المظلم للعناصر المخصصة)
   ========================================================================== */
body.theme-dark .navbar-brand span.text-dark { color: #fff !important; }
body.theme-dark .text-muted { color: #a0aec0 !important; }
body.theme-dark .bg-white { background-color: rgba(30, 30, 35, 0.9) !important; }
body.theme-dark .bg-light { background-color: #1a202c !important; }
body.theme-dark .border-secondary { border-color: rgba(255,255,255,0.1) !important; }
body.theme-dark .teacher-card { background: rgba(25, 30, 45, 0.8); border-color: rgba(255,255,255,0.05) !important; }
body.theme-dark .teacher-card h5 { color: #fff !important; }

/* ==========================================================================
   Advanced Unified Hero Carousel & Floating Cards (مطابق للصورة تماماً)
   ========================================================================== */
.unified-hero-section {
    background: var(--hero-gradient) !important;
    background-color: #0b132b !important;
    position: relative;
    padding-top: 60px;
    padding-bottom: 80px;
    overflow: hidden;
}

/* خلفية متوهجة دائرية متلاشية الحواف خلف الطالب */
.hero-glow-circle {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.45) 0%, rgba(11, 19, 43, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    filter: blur(50px);
    pointer-events: none;
}

/* حاوية صورة الطالب والبطاقات المحيطة */
.hero-image-wrapper {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-top: 20px;
}

/* صورة الطالب 3D مع دمج الحواف الخلفية */
.hero-student-image {
    position: relative;
    z-index: 2;
    max-height: 520px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.4));
    -webkit-mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 95%);
    mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 95%);
}

/* تنسيق البطاقات العائمة الزجاجية */
.hero-float-card {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-radius: 1.25rem;
    z-index: 4;
}

.hero-float-card-dark {
    background: rgba(18, 24, 43, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-radius: 1.25rem;
    color: #fff;
    z-index: 4;
}

/* الأزرار العائمة الجانبية بتأثير تفاعلي وحركة طفو */
.hero-side-badge {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* تأثير لمعة خفيفة عند المرور */
.hero-side-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.5s;
}

.hero-side-badge:hover::before {
    left: 100%;
}

.hero-side-badge:hover {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.95), rgba(63, 55, 201, 0.95));
    border-color: rgba(76, 201, 240, 0.6);
    transform: translateX(-8px) scale(1.03);
    box-shadow: 0 0 25px rgba(67, 97, 238, 0.5);
    color: #fff;
}

/* تخصيص وتوزيع حركات الطفو (Floating Animation) لكل عنصر لتبدو غير متطابقة وطبيعية */
.badge-float-1 {
    animation: badgeFloat1 5s ease-in-out infinite;
}

.badge-float-2 {
    animation: badgeFloat2 6s ease-in-out infinite 1s;
}

.badge-float-3 {
    animation: badgeFloat3 5.5s ease-in-out infinite 2s;
}

@keyframes badgeFloat1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes badgeFloat2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes badgeFloat3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.hero-side-badge:hover {
    background: rgba(67, 97, 238, 0.85);
    border-color: transparent;
    transform: translateX(-5px);
}


/* تنسيق حاوية صورة الطالب والبطاقات */
.hero-visual-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 500px;
}

.hero-main-img {
    position: relative;
    z-index: 2;
    max-height: 550px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
}

/* ==========================================================================
   Floating Glass Cards (البطاقات العائمة حول الطالب المطابقة للتصميم)
   ========================================================================== */
.float-card {
    position: absolute;
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.4);
}

.float-card-dark {
    background: rgba(28, 37, 65, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 0.8rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

/* أماكن البطاقات بدقة (كما في 12_3.png) */
.pos-top-right { top: 10%; right: -10%; } /* فيديوهات بجودة عالية */
.pos-top-left { top: 15%; left: -5%; } /* 15K طالب نشط */
.pos-bottom-left { bottom: 25%; left: -10%; } /* التقييم 4.9 */
.pos-bottom-right { bottom: 15%; right: -15%; display: flex; flex-direction: column; gap: 10px;} /* الأزرار الجانبية اليمنى */

/* تخصيص مؤشرات السلايدر (النقاط السفلية) */
.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    margin: 0 6px;
    transition: all 0.3s ease;
}
.carousel-indicators .active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 10px;
}