:root {
  --primary: #24C6FF; /* Electric Blue */
  --primary-dark: #141B2D; /* Navbar / Darker Navy */
  --secondary: #8A2BE2; /* Vibrant Purple */
  --accent: #24C6FF;
  --gradient: linear-gradient(135deg, #24C6FF 0%, #8A2BE2 100%);
  --gradient-secondary: linear-gradient(135deg, #8A2BE2 0%, #24C6FF 100%);
  --light-bg: #0A0E1A; /* Deep Navy Background */
  --text-dark: #FFFFFF; /* Pure White for dark mode */
  --text-light: #c6d0dc; /* Light gray for secondary text */
  --shadow: 0 20px 40px rgba(0,0,0,0.3);
  --shadow-hover: 0 30px 60px rgba(36, 198, 255, 0.2);
  --card-bg: #485581; /* Slightly lighter than background for cards */
}

 .book-image {
      width: 80px;
      height: 100px;
      object-fit: cover;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .book-card {
      display: flex;
      gap: 15px;
      align-items: center;
    }
    .featured-book-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
      border-radius: 8px 8px 0 0;
    }
    .timeline-item img {
      width: 50px;
      height: 60px;
      object-fit: cover;
      border-radius: 4px;
      margin-left: 10px;
    }

* {
  font-family: 'Cairo', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--light-bg);
  color: var(--text-dark);
  overflow-x: hidden;
  padding-top: 76px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: #0A0E1A;
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float-slow {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px rgba(36, 198, 255, 0.5); }
  50% { box-shadow: 0 0 30px rgba(138, 43, 226, 0.8); }
  100% { box-shadow: 0 0 5px rgba(36, 198, 255, 0.5); }
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Custom Classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulse 3s ease-infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 80px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.3s;
}

.section-title:hover:after {
  width: 120px;
}

.section-title-center:after {
  right: 50%;
  transform: translateX(50%);
}

.gradient-bg {
  background: var(--gradient);
}

.gradient-secondary-bg {
  background: var(--gradient-secondary);
}

.card-hover {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  background: var(--card-bg);
  z-index: 1;
}

.card-hover:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, rgba(36, 198, 255, 0.1) 0%, rgba(138, 43, 226, 0) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card-hover:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.card-hover:hover:before {
  opacity: 1;
}

.badge-custom {
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--gradient);
  color: white;
  display: inline-block;
  transition: all 0.3s;
}

.badge-custom:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(36, 198, 255, 0.3);
}

.btn-custom {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-custom:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn-custom:hover:before {
  width: 300px;
  height: 300px;
}

.btn-primary-custom {
  background: var(--gradient);
  color: white !important;
  border: none;
  box-shadow: 0 10px 20px rgba(36, 198, 255, 0.3);
  display: inline-block;
  text-decoration: none;
  position: relative;
  z-index: 10;
}

.btn-primary-custom:hover {
  background: var(--gradient-secondary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(138, 43, 226, 0.4);
}

.btn-outline-custom {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-custom:hover {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
}

/* Navbar */
.navbar {
  background: rgba(20, 27, 45, 0.95); /* #141B2D with transparency */
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  background: rgba(20, 27, 45, 0.98);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: var(--primary) !important;
}

.nav-link {
  color: white !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: all 0.3s;
}

.nav-link:after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover {
  color: var(--primary) !important;
  transform: translateY(-2px);
}

.nav-link:hover:after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary) !important;
}

.nav-link.active:after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  background: radial-gradient(circle at center, #141B2D 0%, #0A0E1A 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: -76px;
}

.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 100 100" opacity="0.05"><circle cx="50" cy="50" r="40" fill="none" stroke="%2324C6FF" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="%238A2BE2" stroke-width="0.5"/><circle cx="50" cy="50" r="20" fill="none" stroke="%2324C6FF" stroke-width="0.5"/></svg>');
  background-size: 200px;
  animation: rotate 60s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
}

.hero-badge {
  background: rgba(36, 198, 255, 0.1);
  backdrop-filter: blur(5px);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 2rem;
  border: 1px solid rgba(36, 198, 255, 0.3);
  animation: pulse 2s ease-infinite;
  color: var(--primary);
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-img-circular {
  width: 500px;
  height: 500px;
  object-fit: cover;
  border-radius: 50% !important;
  border: 8px solid rgba(36, 198, 255, 0.2);
  box-shadow: 0 0 50px rgba(36, 198, 255, 0.3);
  transition: all 0.5s ease;
}

.hero-img-circular:hover {
  border-color: var(--primary);
  box-shadow: 0 0 80px rgba(138, 43, 226, 0.5);
  transform: scale(1.02);
}

.hero-highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
  animation: glow 2s ease-in-out infinite;
}

.floating-shape {
  position: absolute;
  background: rgba(138, 43, 226, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  border: 1px solid rgba(138, 43, 226, 0.2);
  animation: float 10s ease-in-out infinite;
}

/* Stats Section */
.stats-section {
  background: var(--card-bg);
  border-radius: 50px 50px 0 0;
  margin-top: -50px;
  position: relative;
  z-index: 10;
  box-shadow: 0 -20px 40px rgba(0,0,0,0.2);
}

.stat-item {
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: all 0.3s;
}

.stat-item:hover {
  transform: translateY(-10px);
}

.stat-item:not(:last-child):after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--primary), transparent);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Features Section */
.feature-box {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--card-bg);
  border-radius: 30px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-box:before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background: var(--gradient);
  opacity: 0.1;
  border-radius: 50%;
  transition: all 0.5s;
}

.feature-box:hover {
  transform: translateY(-15px);
}

.feature-box:hover:before {
  transform: scale(15);
  opacity: 0;
}

.feature-icon {
  width: 100px;
  height: 100px;
  line-height: 100px;
  text-align: center;
  background: var(--gradient);
  color: white;
  font-size: 2.5rem;
  border-radius: 30px;
  margin: 0 auto 2rem;
  position: relative;
  box-shadow: 0 20px 30px rgba(36, 198, 255, 0.3);
  animation: float-slow 5s ease-in-out infinite;
}

/* Course Cards */
.course-card {
  background: var(--card-bg);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s;
  height: 100%;
  position: relative;
}

.course-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.course-header {
  padding: 2rem;
  background: var(--gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.course-header:before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s linear infinite;
}

.course-level {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Product Cards */
.product-card {
  background: var(--card-bg);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  position: relative;
}

.product-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  z-index: 2;
  animation: pulse 2s ease-in-out infinite;
}

.product-img {
  height: 200px;
  background: linear-gradient(135deg, #141B2D 0%, #0A0E1A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 4rem;
  transition: all 0.3s;
}

.product-card:hover .product-img {
  transform: scale(1.1);
}

.product-price {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Book Cards */
.book-card {
  display: flex;
  background: var(--card-bg);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  margin-bottom: 1.5rem;
}

.book-card:hover {
  transform: translateX(-10px) translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.book-cover {
  width: 120px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: 800;
  transition: all 0.3s;
}

.book-card:hover .book-cover {
  transform: rotate(5deg) scale(1.1);
}

/* Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline:before {
  content: '';
  position: absolute;
  top: 0;
  right: 20px;
  height: 100%;
  width: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-right: 60px;
  margin-bottom: 3rem;
  animation: slideInRight 0.5s ease-out;
}

.timeline-marker {
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 50%;
  border: 4px solid var(--light-bg);
  box-shadow: var(--shadow);
  animation: pulse 2s ease-in-out infinite;
}

/* Testimonials */
.testimonial-card {
  background: var(--card-bg);
  border-radius: 30px;
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.3s;
}

.testimonial-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.testimonial-card:before {
  content: '\201C';
  position: absolute;
  top: -20px;
  right: 30px;
  font-size: 8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.2;
  font-family: serif;
}

.student-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.5rem;
  animation: float-slow 4s ease-in-out infinite;
}

/* Footer */
.footer {
  background: #141B2D;
  color: white;
  position: relative;
  overflow: hidden;
  margin-top: 50px;
  border-top: 1px solid rgba(36, 198, 255, 0.1);
}

.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="%2324C6FF" opacity="0.05"></path></svg>');
  background-size: cover;
  animation: float-slow 10s ease-in-out infinite;
}

/* Page Content */
.page-content {
  min-height: 100vh;
  background: var(--light-bg);
}

.page-header {
  background: var(--gradient);
  color: white;
  padding: 60px 0;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
}

.page-header:before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s linear infinite;
}

.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: white;
  text-decoration: none;
  transition: all 0.3s;
}

.breadcrumb-item a:hover {
  color: var(--primary);
  transform: translateX(-5px);
}
.text-muted{
  color: #FFFFFF;
}

/* Loading Animation (Optimized) */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0A0E1A;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease-out;
  contain: layout style paint;
}

.page-loader[style*="display: none"] {
  pointer-events: none;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid #141B2D;
  border-top: 4px solid var(--primary);
  border-right: 4px solid var(--secondary);
  border-bottom: 4px solid var(--primary);
  border-left: 4px solid var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  will-change: transform;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  border: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
  z-index: 1000;
  transition: all 0.3s;
  animation: pulse 2s ease-in-out infinite;
}

#backToTop:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Student Progress */
.student-progress {
  background: var(--card-bg);
  border-radius: 30px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .stat-item:after {
    display: none;
  }
}

/* Circular Image Styling */
.circular-image {
  width: 200px; /* Adjust as needed */
  height: 200px; /* Should be equal to width for a perfect circle */
  object-fit: cover; /* Ensures the image covers the area without distortion */
  border-radius: 50%; /* Makes the image circular */
  border: 5px solid var(--primary); /* Optional: Add a border */
  box-shadow: 0 0 15px rgba(36, 198, 255, 0.5); /* Optional: Add a subtle glow */
  transition: all 0.3s ease-in-out; /* Smooth transition for hover effects */
}

.circular-image:hover {
  transform: scale(1.05); /* Slightly enlarge on hover */
  box-shadow: 0 0 25px rgba(138, 43, 226, 0.7); /* Enhance glow on hover */
}

/* Language Switcher Styles */
.language-switcher {
  display: flex;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}

.lang-btn {
  padding: 0.5rem 0.8rem;
  border: 2px solid transparent;
  background: rgba(36, 198, 255, 0.1);
  color: var(--primary);
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
}

.lang-btn:hover {
  background: rgba(36, 198, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.lang-btn.active {
  background: var(--gradient);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(36, 198, 255, 0.3);
}

/* RTL/LTR Adjustments */
body.rtl {
  direction: rtl;
  text-align: right;
}

body.ltr {
  direction: ltr;
  text-align: left;
}

/* Navbar Language Switcher Alignment */
body.rtl .language-switcher {
  margin-left: 0;
  margin-right: auto;
}

body.ltr .language-switcher {
  margin-left: auto;
  margin-right: 0;
}