:root {
  --primary: #1A237E;
  --primary-dark: #0d1452;
  --secondary: #00A99D;
  --gradient: linear-gradient(135deg, #1A237E, #00A99D);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --bs-body-font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html, body, p, span, h1, h2, h3, h4, h5, h6, a, li, label, th, td, input, select, textarea, button {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

.btn, .form-control, .form-select, .nav-link, .dropdown-item, .badge, .alert, .table, .card, .card-body, .card-header, .modal-content, .modal-header, .modal-body, .modal-footer, .form-label {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif !important;
}

body {
  padding-top: 85px;
  color: #333;
  background: #fff;
}

/* Navbar */
#mainNav {
  background: rgba(26, 35, 126, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(26, 35, 126, 0.2);
  transition: var(--transition);
  padding: 12px 0;
}

#mainNav .navbar-brand {
  font-weight: 900;
  font-size: clamp(1rem, 0.8rem + 0.35vw, 1.5rem);
  color: #fff;
  padding: 0;
}
#mainNav .navbar-brand img {
  max-height: 65px;
  width: auto;
  display: block;
}

#mainNav .navbar-brand .brand-text {
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.1rem, 0.9rem + 0.5vw, 1.6rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: 0.5px;
}

#mainNav .nav-link {
  color: #fff;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 0;
  font-size: clamp(0.75rem, 0.5rem + 0.35vw, 1rem);
  transition: var(--transition);
  position: relative;
}

#mainNav .nav-link::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #00A99D;
  border-radius: 2px;
  transition: height 0.25s ease;
}

#mainNav .nav-link:hover::before,
#mainNav .nav-link.active::before {
  height: 20px;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
  color: #00E0D0;
  background: transparent;
}

/* Navbar action buttons */
#mainNav .nav-link.btn-outline-light {
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}
#mainNav .nav-link.btn-outline-light:hover {
  border-color: #00E0D0;
  color: #00E0D0 !important;
}

/* Dropdown menus */
#mainNav .dropdown-menu {
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 8px;
  margin-top: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  min-width: 220px;
}

#mainNav .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}

#mainNav .dropdown-item {
  color: #333;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

#mainNav .dropdown-item i {
  font-size: 1.1rem;
  color: #00A99D;
  width: 22px;
  text-align: center;
  transition: all 0.2s ease;
}

#mainNav .dropdown-item::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #00A99D;
  border-radius: 0 3px 3px 0;
  transition: height 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

#mainNav .dropdown-item:hover::before {
  height: 55%;
  opacity: 1;
}

#mainNav .dropdown-item:hover {
  background: transparent;
  color: #00E0D0;
}

#mainNav .dropdown-item:hover i {
  color: #00A99D;
}

#mainNav .nav-link i {
  margin-left: 6px;
  vertical-align: middle;
}

#mainNav .dropdown-toggle::after {
  margin-right: 6px;
  vertical-align: middle;
  transition: transform 0.3s;
}

#mainNav .dropdown.show .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Desktop hover dropdowns (expanded state) */
@media (min-width: 1200px) {
  #mainNav .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
  #mainNav .dropdown > .dropdown-toggle:active {
    pointer-events: none;
  }
}

/* Compact expanded navbar (1200-1399px) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  #mainNav .nav-link {
    padding: 6px 8px;
  }
  #mainNav .nav-link i {
    margin-left: 3px;
    font-size: clamp(0.7rem, 0.5rem + 0.3vw, 0.85rem);
  }
  #mainNav .navbar-brand img {
    max-height: 50px;
  }
  #mainNav .dropdown-toggle::after {
    margin-right: 2px;
    font-size: 0.6rem;
  }
  #mainNav .nav-link.btn-outline-light {
    font-size: clamp(0.65rem, 0.5rem + 0.2vw, 0.75rem);
    padding: 3px 6px !important;
  }
}

/* Mobile collapsed navbar (below xl breakpoint) */
@media (max-width: 1199.98px) {
  #mainNav .nav-link::before { display: none; }
  #mainNav .nav-link { padding: 10px 16px; }
  #mainNav .navbar-collapse {
    background: rgba(26, 35, 126, 0.98);
    border-radius: 0 0 12px 12px;
    padding: 8px;
    max-height: 70vh;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
  #mainNav .navbar-collapse .navbar-nav {
    flex-direction: column;
    width: 100%;
  }
  #mainNav .dropdown-menu {
    background: transparent;
    box-shadow: none;
    padding: 0;
    padding-right: 16px;
    border: none;
    margin-top: 0;
    min-width: auto;
  }
  #mainNav .dropdown-menu::before { display: none; }
  #mainNav .dropdown-item {
    color: rgba(255,255,255,0.85);
    padding: 8px 12px;
    gap: 8px;
  }
  #mainNav .dropdown-item i { color: #00A99D; }
  #mainNav .dropdown-item:hover {
    background: rgba(0,169,157,0.15);
    color: #fff;
  }
  #mainNav .dropdown-item:hover i { color: #fff; }
}


/* Stats Section */
  border-radius: 10px;
  min-height: 54px;
}


/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 6px 24px rgba(37,211,102,0.4);
  z-index: 1002;
  transition: all 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,0.55);
  color: #fff;
}
.whatsapp-float i {
  line-height: 1;
}

/* Hero Banner Slider */
.hero-section {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
}
.hero-slider {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,35,126,0.88) 0%, rgba(0,169,157,0.65) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 50px 0;
  transition: opacity 0.4s ease;
}
.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
}
.hero-title .text-highlight {
  background: linear-gradient(135deg, #00E0D0, #4DD0E1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 640px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-cta .btn {
  white-space: nowrap;
  padding: 14px 36px;
  font-size: 1.1rem;
  border-radius: 12px;
  min-height: 54px;
  font-weight: 700;
  transition: all 0.3s ease;
}
.hero-cta .btn-primary {
  background: linear-gradient(135deg, #00A99D, #00C9B5);
  border: none;
  box-shadow: 0 4px 25px rgba(0,169,157,0.4);
}
.hero-cta .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(0,169,157,0.6);
}
.hero-cta .btn-outline-light:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}
/* Hero slider dots */
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.hero-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

/* Hero nav arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  line-height: 1;
}
.hero-arrow:hover {
  background: rgba(0,169,157,0.6);
  border-color: #00A99D;
  transform: translateY(-50%) scale(1.1);
}
.hero-arrow-prev {
  right: 24px;
}
.hero-arrow-next {
  left: 24px;
}
@media (max-width: 576px) {
  .hero-arrow { width: 36px; height: 36px; font-size: 1rem; }
  .hero-arrow-prev { right: 10px; }
  .hero-arrow-next { left: 10px; }
}
@media (max-width: 576px) {
  .whatsapp-float {
    bottom: 80px;
    right: 12px;
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
  }
  .hero-section { min-height: 40vh; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; text-align: center; }
}

/* Stats Section */
.stats-section {
  padding: 60px 0;
  background: #fff;
  margin-top: -60px;
  position: relative;
  z-index: 3;
}

.stat-card {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #f0f0f0;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  color: #fff;
  font-size: 1.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.stat-label { color: #666; font-weight: 500; }

/* Sections */
.section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  margin: 10px auto 0;
}

.section-desc { color: #666; font-size: 1.1rem; }

/* Course Card */
.course-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #f5f5f5;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.course-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.course-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e8eaf6, #e0f2f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
}

.course-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-body .btn { margin-bottom: 0; margin-top: auto !important; }

.course-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.course-desc { color: #666; font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; }

.course-duration {
  display: inline-block;
  background: #e8eaf6;
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Course Detail */
.course-detail-card, .news-detail-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.course-detail-img, .news-detail-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.course-detail-body, .news-detail-body { padding: 30px; }

.course-sidebar {
  background: #fff;
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: #555;
}

.sidebar-item i { color: var(--secondary); font-size: 1.2rem; }

/* News Card */
.news-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.news-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.news-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e8eaf6, #fce4ec);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
}

.news-body {
  padding: 20px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-body .btn { margin-bottom: 0; margin-top: auto !important; }

.news-date { color: #999; display: block; margin-bottom: 8px; }

.news-title {
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px;
}

.news-desc { color: #666; font-size: 0.9rem; margin-bottom: 8px; }

/* CTA Section */
.cta-section {
  padding: 70px 0;
  background: var(--gradient);
  color: #fff;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.cta-text {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
}

/* Page Hero */
.page-hero {
  padding: 30px 0 40px;
  background: var(--gradient);
  color: #fff;
  text-align: center;
}

.page-hero h1 { font-weight: 800; font-size: 2.5rem; }

.page-hero p { opacity: 0.9; font-size: 1.1rem; }

/* Verify Card */
.verify-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.verify-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2.5rem;
  color: #fff;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: #fff;
  padding: 60px 0 30px;
}

.footer h5 {
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}

.footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover { color: var(--secondary); }

.footer hr { border-color: rgba(255,255,255,0.1); }

.footer .text-muted { color: rgba(255,255,255,0.5) !important; }

.footer i { margin-left: 8px; }

/* Global button reset */
.btn {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  letter-spacing: 0;
}

/* Back Button */
/* Buttons */
.btn-primary {
  background: var(--primary);
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 10px;
  padding: 10px 28px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  border-radius: 10px;
  padding: 12px 30px;
  font-weight: 600;
  transition: var(--transition);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Ripple Effect */
.btn-ripple { position: relative; overflow: hidden; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .section { padding: 50px 0; }
  .stats-section { margin-top: -30px; }
  .stat-number { font-size: 1.5rem; }
  .page-hero { padding: 20px 0 30px; }
  .page-hero h1 { font-size: 2rem; }
}
