/* ═══════════════════════════════════════════════════════════════
   EduSystem — Modern Website UI Design System
   RTL-first, Arabic-ready, Bootstrap 5 compatible
═══════════════════════════════════════════════════════════════ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  /* Brand */
  --es-primary:       #1a56db;
  --es-primary-dark:  #1241b0;
  --es-primary-light: #e8f0fe;
  --es-secondary:     #7c3aed;
  --es-accent:        #f59e0b;
  --es-success:       #10b981;
  --es-danger:        #ef4444;

  /* Gradient */
  --es-grad-primary: linear-gradient(135deg, #1a56db 0%, #7c3aed 100%);
  --es-grad-hero:    linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1a56db 100%);
  --es-grad-warm:    linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --es-grad-glass:   linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);

  /* Neutral */
  --es-dark:    #0f172a;
  --es-gray-1:  #1e293b;
  --es-gray-2:  #334155;
  --es-gray-3:  #64748b;
  --es-gray-4:  #94a3b8;
  --es-gray-5:  #cbd5e1;
  --es-gray-6:  #e2e8f0;
  --es-gray-7:  #f1f5f9;
  --es-gray-8:  #f8fafc;
  --es-white:   #ffffff;

  /* Typography */
  --es-font-ar: 'Cairo', 'Tajawal', sans-serif;
  --es-font-en: 'Inter', 'Segoe UI', sans-serif;
  --es-font:    var(--es-font-ar);

  /* Radius */
  --es-r-sm: 8px;
  --es-r-md: 12px;
  --es-r-lg: 20px;
  --es-r-xl: 32px;
  --es-r-pill: 100px;

  /* Shadow */
  --es-shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --es-shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --es-shadow-lg:  0 10px 25px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.05);
  --es-shadow-xl:  0 25px 50px rgba(0,0,0,.15);
  --es-shadow-glow: 0 0 40px rgba(26,86,219,.25);

  /* Transition */
  --es-tr: all .3s cubic-bezier(.4,0,.2,1);
  --es-tr-fast: all .15s ease;

  /* Spacing */
  --es-section-py: 80px;
  --es-section-py-sm: 50px;
  --navbar-h: 70px;
}

/* Dynamic school colors (set inline per school) */
[data-school-primary] { --es-primary: attr(data-school-primary color); }

/* ── 2. Base & Typography ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--es-font);
  color: var(--es-gray-1);
  background: var(--es-white);
  line-height: 1.7;
  overflow-x: hidden;
}

[dir="rtl"] body { text-align: right; }
[dir="ltr"] body { text-align: left; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--es-font);
  font-weight: 700;
  line-height: 1.3;
  color: var(--es-dark);
}

a { color: var(--es-primary); text-decoration: none; transition: var(--es-tr); }
a:hover { color: var(--es-primary-dark); }

img { max-width: 100%; height: auto; }

/* ── 3. Navbar ────────────────────────────────────────────── */
.es-navbar {
  height: var(--navbar-h);
  background: transparent;
  transition: var(--es-tr);
  position: fixed; top: 0; width: 100%; z-index: 1000;
}
.es-navbar.scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--es-shadow-md);
}
.es-navbar.scrolled .nav-link { color: var(--es-gray-1) !important; }
.es-navbar.scrolled .navbar-brand-text { color: var(--es-primary) !important; }
.es-navbar .nav-link {
  color: rgba(255,255,255,.90) !important;
  font-weight: 600; font-size: .9rem;
  padding: .5rem 1rem !important;
  border-radius: var(--es-r-sm);
  transition: var(--es-tr);
}
.es-navbar .nav-link:hover, .es-navbar .nav-link.active {
  color: var(--es-white) !important;
  background: rgba(255,255,255,.15);
}
.es-navbar.scrolled .nav-link:hover, .es-navbar.scrolled .nav-link.active {
  color: var(--es-primary) !important;
  background: var(--es-primary-light);
}
.es-navbar-brand { display: flex; align-items: center; gap: .75rem; }
.es-navbar-logo { width: 44px; height: 44px; border-radius: var(--es-r-sm); object-fit: cover; }
.es-navbar-brand-text { font-size: 1.1rem; font-weight: 800; color: white; white-space: nowrap; }

/* ── 4. Hero Sections ─────────────────────────────────────── */
.es-hero {
  min-height: 100vh;
  background: var(--es-grad-hero);
  position: relative;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: var(--navbar-h);
}
.es-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.es-hero-wave {
  position: absolute; bottom: -2px; left: 0; right: 0;
  line-height: 0;
}
.es-hero-wave svg { width: 100%; height: auto; }
.es-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; color: white;
  line-height: 1.2; margin-bottom: 1.5rem;
}
.es-hero-title span { color: var(--es-accent); }
.es-hero-subtitle {
  font-size: 1.15rem; color: rgba(255,255,255,.80);
  margin-bottom: 2.5rem; max-width: 560px;
}
.es-hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25);
  color: white; font-size: .8rem; font-weight: 600;
  padding: .4rem 1rem; border-radius: var(--es-r-pill);
  margin-bottom: 1.5rem;
}
.es-hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--es-accent);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.5; transform:scale(1.4); }
}
.es-hero-img {
  border-radius: var(--es-r-xl);
  box-shadow: var(--es-shadow-xl), var(--es-shadow-glow);
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: var(--es-tr);
  max-height: 500px; object-fit: cover; width: 100%;
}
.es-hero-img:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }

/* ── 5. Section Styles ────────────────────────────────────── */
.es-section { padding: var(--es-section-py) 0; }
.es-section-sm { padding: var(--es-section-py-sm) 0; }
.es-section-dark {
  background: var(--es-dark);
  color: var(--es-gray-5);
}
.es-section-gray { background: var(--es-gray-8); }
.es-section-primary {
  background: var(--es-grad-primary);
  color: white;
}

.es-section-header { text-align: center; margin-bottom: 3.5rem; }
.es-section-header .overline {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--es-primary);
  background: var(--es-primary-light);
  padding: .3rem .9rem; border-radius: var(--es-r-pill);
  margin-bottom: .75rem;
}
.es-section-dark .es-section-header .overline { background: rgba(255,255,255,.1); color: var(--es-accent); }
.es-section-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800; margin-bottom: 1rem;
}
.es-section-dark .es-section-header h2 { color: white; }
.es-section-header p { color: var(--es-gray-3); max-width: 580px; margin: 0 auto; }
.es-section-dark .es-section-header p { color: var(--es-gray-4); }

/* Decorative line */
.es-section-header::after {
  content: '';
  display: block; margin: 1.2rem auto 0;
  width: 50px; height: 4px;
  background: var(--es-grad-primary);
  border-radius: 2px;
}

/* ── 6. Cards ─────────────────────────────────────────────── */
.es-card {
  background: var(--es-white);
  border-radius: var(--es-r-lg);
  border: 1px solid var(--es-gray-6);
  box-shadow: var(--es-shadow-sm);
  overflow: hidden;
  transition: var(--es-tr);
}
.es-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--es-shadow-lg);
  border-color: var(--es-primary);
}
.es-card-img { width: 100%; height: 220px; object-fit: cover; }
.es-card-body { padding: 1.5rem; }
.es-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.es-card-text { font-size: .9rem; color: var(--es-gray-3); }
.es-card-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: .8rem; color: var(--es-gray-4);
  margin-bottom: .75rem;
}
.es-card-meta i { color: var(--es-primary); }

.es-card-icon {
  width: 64px; height: 64px;
  background: var(--es-primary-light);
  color: var(--es-primary);
  border-radius: var(--es-r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.25rem;
  transition: var(--es-tr);
}
.es-card:hover .es-card-icon {
  background: var(--es-grad-primary);
  color: white;
  transform: scale(1.1) rotate(-5deg);
}

/* Glass card */
.es-card-glass {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--es-r-lg);
  color: white;
}

/* ── 7. Buttons ───────────────────────────────────────────── */
.es-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.75rem; font-size: .95rem; font-weight: 700;
  border-radius: var(--es-r-pill); border: 2px solid transparent;
  cursor: pointer; transition: var(--es-tr);
  white-space: nowrap; text-decoration: none;
  font-family: var(--es-font);
}
.es-btn-primary {
  background: var(--es-grad-primary);
  color: white; border-color: transparent;
  box-shadow: 0 4px 15px rgba(26,86,219,.35);
}
.es-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26,86,219,.45);
  color: white;
}
.es-btn-white {
  background: white; color: var(--es-primary);
  border-color: transparent;
  box-shadow: var(--es-shadow-md);
}
.es-btn-white:hover {
  background: var(--es-primary); color: white;
  transform: translateY(-2px);
}
.es-btn-outline {
  background: transparent; color: white;
  border-color: rgba(255,255,255,.5);
}
.es-btn-outline:hover {
  background: white; color: var(--es-primary);
  border-color: white;
}
.es-btn-outline-primary {
  background: transparent; color: var(--es-primary);
  border-color: var(--es-primary);
}
.es-btn-outline-primary:hover {
  background: var(--es-primary); color: white;
}
.es-btn-lg { padding: .9rem 2.2rem; font-size: 1.05rem; }
.es-btn-sm { padding: .45rem 1.1rem; font-size: .85rem; }
.es-btn-icon { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }

/* ── 8. Stats Counter ─────────────────────────────────────── */
.es-stat {
  text-align: center; padding: 2rem 1.5rem;
}
.es-stat-number {
  font-size: 2.8rem; font-weight: 900;
  background: var(--es-grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
  margin-bottom: .35rem;
}
.es-stat-label { color: var(--es-gray-3); font-size: .9rem; font-weight: 600; }

/* ── 9. Feature Icons ─────────────────────────────────────── */
.es-feature-icon {
  width: 80px; height: 80px;
  background: var(--es-grad-primary);
  border-radius: var(--es-r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: white;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 20px rgba(26,86,219,.3);
  transition: var(--es-tr);
}
.es-feature-icon:hover { transform: scale(1.1) rotate(5deg); }

/* ── 10. Image Gallery Grid ───────────────────────────────── */
.es-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px,1fr));
  gap: 1rem;
}
.es-gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--es-r-md); aspect-ratio: 4/3;
  cursor: pointer;
}
.es-gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.es-gallery-item:hover img { transform: scale(1.08); }
.es-gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.8) 0%, transparent 60%);
  opacity: 0; transition: var(--es-tr);
  display: flex; align-items: flex-end;
  padding: 1.2rem;
}
.es-gallery-item:hover .es-gallery-overlay { opacity: 1; }

/* ── 11. Team Card ────────────────────────────────────────── */
.es-team-card {
  text-align: center;
  background: var(--es-white);
  border-radius: var(--es-r-lg);
  padding: 2rem 1.5rem;
  border: 1px solid var(--es-gray-6);
  box-shadow: var(--es-shadow-sm);
  transition: var(--es-tr);
}
.es-team-card:hover { transform: translateY(-5px); box-shadow: var(--es-shadow-lg); }
.es-team-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1.25rem;
  border: 4px solid var(--es-primary-light);
  transition: var(--es-tr);
}
.es-team-card:hover .es-team-avatar { border-color: var(--es-primary); }
.es-team-name { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.es-team-role { font-size: .85rem; color: var(--es-primary); font-weight: 600; }
.es-team-social { margin-top: 1rem; display: flex; gap: .5rem; justify-content: center; }
.es-team-social a {
  width: 34px; height: 34px;
  background: var(--es-gray-7); color: var(--es-gray-3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: var(--es-tr);
}
.es-team-social a:hover { background: var(--es-primary); color: white; }

/* ── 12. FAQ Accordion ────────────────────────────────────── */
.es-faq-item {
  border: 1px solid var(--es-gray-6);
  border-radius: var(--es-r-md);
  margin-bottom: .75rem;
  overflow: hidden;
  transition: var(--es-tr);
}
.es-faq-item.open { border-color: var(--es-primary); box-shadow: var(--es-shadow-md); }
.es-faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 700; font-size: .97rem;
  color: var(--es-gray-1);
  user-select: none;
  background: var(--es-white);
  transition: var(--es-tr);
}
.es-faq-item.open .es-faq-question { color: var(--es-primary); background: var(--es-primary-light); }
.es-faq-arrow { transition: transform .3s ease; color: var(--es-gray-4); }
.es-faq-item.open .es-faq-arrow { transform: rotate(180deg); color: var(--es-primary); }
.es-faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .4s cubic-bezier(0,.0,.2,1), padding .3s;
  color: var(--es-gray-2); font-size: .93rem; line-height: 1.75;
  padding: 0 1.5rem;
  background: var(--es-white);
}
.es-faq-item.open .es-faq-answer { max-height: 500px; padding: 1rem 1.5rem 1.5rem; }

/* ── 13. Contact Form ─────────────────────────────────────── */
.es-form-control {
  width: 100%;
  padding: .8rem 1.2rem;
  font-family: var(--es-font); font-size: .95rem;
  border: 2px solid var(--es-gray-6);
  border-radius: var(--es-r-md);
  background: var(--es-white);
  color: var(--es-gray-1);
  transition: var(--es-tr);
  outline: none;
}
.es-form-control:focus {
  border-color: var(--es-primary);
  box-shadow: 0 0 0 4px rgba(26,86,219,.12);
}
.es-form-control::placeholder { color: var(--es-gray-4); }
textarea.es-form-control { resize: vertical; min-height: 140px; }
.es-form-group { margin-bottom: 1.25rem; }
.es-form-label {
  display: block; font-size: .875rem; font-weight: 700;
  color: var(--es-gray-2); margin-bottom: .4rem;
}

/* ── 14. Breadcrumb ───────────────────────────────────────── */
.es-page-header {
  background: var(--es-grad-hero);
  padding: calc(var(--navbar-h) + 50px) 0 60px;
  position: relative; overflow: hidden;
}
.es-page-header::before {
  content:''; position:absolute; inset:0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/svg%3E");
}
.es-page-header-title { font-size: 2.2rem; font-weight: 900; color: white; margin-bottom: .5rem; }
.es-breadcrumb { display: flex; align-items: center; gap: .5rem; }
.es-breadcrumb a { color: rgba(255,255,255,.7); font-size: .875rem; }
.es-breadcrumb a:hover { color: white; }
.es-breadcrumb .sep { color: rgba(255,255,255,.4); font-size: .75rem; }
.es-breadcrumb .current { color: var(--es-accent); font-size: .875rem; font-weight: 600; }

/* ── 15. Testimonials ─────────────────────────────────────── */
.es-testimonial {
  background: var(--es-white);
  border-radius: var(--es-r-lg);
  padding: 2rem;
  border: 1px solid var(--es-gray-6);
  box-shadow: var(--es-shadow-sm);
  position: relative;
}
.es-testimonial::before {
  content: '"';
  position: absolute; top: 1rem;
  font-size: 5rem; line-height: 1;
  color: var(--es-primary-light);
  font-family: Georgia, serif;
}
[dir="rtl"] .es-testimonial::before { right: 1.5rem; }
[dir="ltr"] .es-testimonial::before { left: 1.5rem; }
.es-testimonial-text {
  color: var(--es-gray-2); font-size: .95rem;
  line-height: 1.8; margin-bottom: 1.5rem;
  padding-top: 1.5rem;
}
.es-testimonial-author { display: flex; align-items: center; gap: .75rem; }
.es-testimonial-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.es-testimonial-name { font-weight: 700; font-size: .9rem; }
.es-testimonial-role { font-size: .8rem; color: var(--es-primary); }
.es-stars { color: var(--es-accent); font-size: .8rem; letter-spacing: .15rem; }

/* ── 16. Partners / Logos ─────────────────────────────────── */
.es-partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: 1.5rem; align-items: center;
}
.es-partner-item {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  border: 1px solid var(--es-gray-6);
  border-radius: var(--es-r-md);
  filter: grayscale(1); opacity: .6;
  transition: var(--es-tr);
}
.es-partner-item:hover { filter: grayscale(0); opacity: 1; box-shadow: var(--es-shadow-md); }
.es-partner-item img { max-height: 50px; object-fit: contain; }

/* ── 17. News / Event Cards ───────────────────────────────── */
.es-news-card .es-card-img { height: 200px; }
.es-news-tag {
  display: inline-block;
  background: var(--es-primary-light); color: var(--es-primary);
  font-size: .72rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: var(--es-r-pill); margin-bottom: .75rem;
}
.es-event-date-box {
  width: 60px; height: 60px;
  background: var(--es-grad-primary);
  border-radius: var(--es-r-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.es-event-date-box .day { font-size: 1.4rem; font-weight: 900; line-height: 1; }
.es-event-date-box .mon { font-size: .7rem; font-weight: 600; opacity: .85; }

/* ── 18. Downloads ────────────────────────────────────────── */
.es-download-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--es-gray-6);
  border-radius: var(--es-r-md);
  background: var(--es-white);
  transition: var(--es-tr);
  margin-bottom: .5rem;
}
.es-download-item:hover {
  border-color: var(--es-primary);
  box-shadow: var(--es-shadow-md);
  transform: translateX(-3px);
}
[dir="ltr"] .es-download-item:hover { transform: translateX(3px); }
.es-download-icon {
  width: 44px; height: 44px;
  background: var(--es-primary-light);
  color: var(--es-primary);
  border-radius: var(--es-r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.es-download-name { font-weight: 600; font-size: .9rem; flex: 1; }
.es-download-size { font-size: .78rem; color: var(--es-gray-4); }

/* ── 19. Footer ───────────────────────────────────────────── */
.es-footer {
  background: var(--es-dark);
  color: var(--es-gray-5);
  padding: 60px 0 0;
}
.es-footer-brand { margin-bottom: 1.25rem; }
.es-footer-tagline { color: var(--es-gray-4); font-size: .875rem; line-height: 1.7; max-width: 280px; }
.es-footer-title {
  font-size: .8rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--es-gray-4); margin-bottom: 1.25rem;
}
.es-footer-links { list-style: none; padding: 0; margin: 0; }
.es-footer-links li { margin-bottom: .6rem; }
.es-footer-links a {
  color: var(--es-gray-5); font-size: .875rem;
  transition: var(--es-tr-fast);
}
.es-footer-links a:hover { color: var(--es-accent); padding-right: 4px; }
[dir="ltr"] .es-footer-links a:hover { padding-right: 0; padding-left: 4px; }
.es-footer-contact p { font-size: .875rem; margin-bottom: .5rem; display: flex; align-items: center; gap: .6rem; }
.es-footer-contact i { color: var(--es-primary); width: 16px; }
.es-footer-social { display: flex; gap: .75rem; margin-top: 1.25rem; }
.es-footer-social a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--es-gray-4); font-size: .9rem;
  transition: var(--es-tr);
}
.es-footer-social a:hover { background: var(--es-primary); color: white; transform: translateY(-2px); }
.es-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0; margin-top: 3rem;
  text-align: center; font-size: .8rem; color: var(--es-gray-4);
}

/* ── 20. Slider (Swiper) ──────────────────────────────────── */
.es-slider { border-radius: var(--es-r-xl); overflow: hidden; }
.es-slider .swiper-slide img { width: 100%; height: 480px; object-fit: cover; }
.es-slider-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
  padding: 2rem;
  color: white;
}
.swiper-button-next, .swiper-button-prev {
  color: white !important;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  width: 44px !important; height: 44px !important;
  border-radius: 50%;
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 1rem !important; }

/* ── 21. Admission Steps ──────────────────────────────────── */
.es-step {
  display: flex; gap: 1.25rem;
  margin-bottom: 2rem;
}
.es-step-number {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--es-grad-primary);
  color: white; font-weight: 900; font-size: 1.1rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(26,86,219,.3);
  position: relative;
}
.es-step:not(:last-child) .es-step-number::after {
  content: '';
  position: absolute; top: 48px;
  left: 50%; transform: translateX(-50%);
  width: 2px; height: calc(100% + 0.75rem);
  background: var(--es-primary-light);
}
.es-step-content h5 { font-weight: 700; margin-bottom: .4rem; }
.es-step-content p { color: var(--es-gray-3); font-size: .9rem; margin: 0; }

/* ── 22. Subscription / Newsletter ───────────────────────── */
.es-subscribe-box {
  background: var(--es-grad-primary);
  border-radius: var(--es-r-xl);
  padding: 3rem; text-align: center;
  position: relative; overflow: hidden;
}
.es-subscribe-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.1) 0%, transparent 60%);
}
.es-subscribe-form {
  display: flex; gap: .75rem; max-width: 420px; margin: 1.5rem auto 0;
  flex-wrap: wrap; justify-content: center;
}
.es-subscribe-form input {
  flex: 1; min-width: 220px;
  padding: .75rem 1.2rem;
  border: none; border-radius: var(--es-r-pill);
  font-family: var(--es-font); font-size: .9rem;
}

/* `outline: none` كان هنا بلا بديل، فحقلُ الاشتراك على الصفحة العامّة
   يفقد أثرَ التركيز كلَّه: من يتنقّل بلوحة المفاتيح لا يعرف أين هو.
   وإزالةُ الحدِّ الافتراضيّ مقبولةٌ **إن حلّ محلَّها أثرٌ مرئيّ** —
   و:focus-visible وحدَها كي لا يظهر الأثرُ لمن ينقر بالفأرة. */
.es-subscribe-form input:focus-visible {
  outline: 2px solid var(--es-primary, #2563eb);
  outline-offset: 2px;
}

/* ── 23. Map Embed ────────────────────────────────────────── */
.es-map { border-radius: var(--es-r-lg); overflow: hidden; height: 350px; }
.es-map iframe { width: 100%; height: 100%; border: none; }

/* ── 24. Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--es-gray-8); }
::-webkit-scrollbar-thumb { background: var(--es-primary); border-radius: 3px; }

/* ── 25. Utilities ────────────────────────────────────────── */
.text-gradient {
  background: var(--es-grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-gradient-primary { background: var(--es-grad-primary) !important; }
.rounded-es { border-radius: var(--es-r-lg); }
.shadow-es { box-shadow: var(--es-shadow-lg); }
.overflow-hidden { overflow: hidden; }

/* AOS fallback */
[data-aos] { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
[data-aos].aos-animate { opacity: 1; transform: none; }

/* ── 26. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --es-section-py: 50px; --es-section-py-sm: 30px; }
  .es-hero-title { font-size: 1.8rem; }
  .es-hero-img { transform: none; margin-top: 2rem; }
  .es-stat-number { font-size: 2rem; }
  .es-slider .swiper-slide img { height: 280px; }
  .es-subscribe-form { flex-direction: column; }
  .es-subscribe-form input { min-width: 100%; }
}

@media (max-width: 480px) {
  .es-hero-title { font-size: 1.5rem; }
  .es-section-header h2 { font-size: 1.4rem; }
  .es-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 27. RTL Specific Overrides ───────────────────────────── */
[dir="rtl"] .es-navbar .nav-link { padding: .5rem 1rem !important; }
[dir="rtl"] .es-footer-links a:hover { padding-right: 4px; padding-left: 0; }
[dir="rtl"] .es-step:not(:last-child) .es-step-number::after { left: auto; right: 50%; transform: translateX(50%); }

/* ── 28. Print ────────────────────────────────────────────── */
@media print {
  .es-navbar, .es-footer, .es-hero-wave { display: none !important; }
  .es-hero { min-height: auto; padding: 2rem 0; }
}

/* ── Reduced motion ───────────────────────────────────────────
   هذا الملفُّ يُحمَّل في تخطيطين: `frontend/views/school/layout.php`
   مع `website.css` التي فيها قاعدةٌ شاملة، و`frontend/views/layout.php`
   **وحدَه** — فالصفحةُ الرئيسةُ العامّةُ كانت تُشغّل أربعًا وعشرين حركةً
   بلا حارس. فالقاعدةُ تُكتب هنا لا هناك، لتُرافق الملفَّ حيث حُمِّل.

   ومكرَّرةٌ مع website.css عند تحميلهما معًا، وتكرارُ تصريحٍ متطابقٍ
   لا أثرَ له — بخلاف غيابِه. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
