/* ═══════════════════════════════════════════════════════════
   الصفحة الرئيسية — تصميم نظيف واحترافي
   هوية: أحمر · كحلي · أبيض · أسود
   ═══════════════════════════════════════════════════════════ */

:root {
  --red: #C41E3A;
  --red-dark: #9B1830;
  --red-soft: #FEF2F2;
  --navy: #1A2744;
  --navy-light: #2A3F6B;
  --navy-soft: #F0F3F9;
  --ink: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --white: #FFFFFF;
  --bg: #FAFBFC;

  --shadow-sm: 0 1px 3px rgba(26, 39, 68, 0.06);
  --shadow: 0 4px 20px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 39, 68, 0.12);

  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --container-max: 1140px;
  --section-pad: clamp(3rem, 6vw, 5rem);
  --ease: 0.22s ease;
}

/* ── Base ── */
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

.container { max-width: var(--container-max) !important; }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -100px;
  background: var(--white); color: var(--ink);
  padding: 0.5rem 1rem; border-radius: 8px; font-weight: 700;
  z-index: 10000; transition: top var(--ease);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--red); }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,0.97) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0;
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled { box-shadow: var(--shadow); }
.navbar-brand {
  font-weight: 800; font-size: 1.05rem; color: var(--navy) !important;
  display: flex; align-items: center; gap: 0.5rem;
}
.navbar-brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.nav-link {
  color: var(--muted) !important; font-weight: 600; font-size: 0.9rem;
  padding: 0.45rem 0.85rem !important; border-radius: 8px;
  transition: color var(--ease), background var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--red) !important; background: var(--red-soft); }
.nav-link i { margin-inline-start: 0.25rem; font-size: 0.8rem; }

.nav-login-dropdown .nav-login-trigger {
  background: var(--red) !important; color: #fff !important;
  border-radius: var(--radius-full); padding: 0.4rem 1rem !important;
  font-weight: 700; font-size: 0.85rem; box-shadow: none;
  border: none;
}
.nav-login-dropdown .nav-login-trigger:hover,
.nav-login-dropdown .nav-login-trigger.show {
  background: var(--red-dark) !important; color: #fff !important;
}
.nav-login-menu {
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg) !important; padding: 0.5rem;
}
.nav-login-menu .dropdown-item {
  border-radius: 8px; padding: 0.6rem 0.85rem; font-weight: 600; font-size: 0.88rem;
}
.nav-login-menu .dropdown-item:hover { background: var(--red-soft); color: var(--red); }

@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 0.5rem; padding: 0.75rem;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
  }
}

/* ── Hero ── */
.hero-section {
  background: var(--white);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  min-height: auto;
}
.hero-section::before {
  content: '';
  position: absolute; top: 0; inset-inline-end: 0;
  width: 45%; height: 100%;
  background: linear-gradient(135deg, var(--navy-soft) 0%, transparent 70%);
  pointer-events: none;
}
.hero-orb { display: none !important; }
.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--red-soft); color: var(--red);
  padding: 0.35rem 0.9rem; border-radius: var(--radius-full);
  font-size: 0.82rem; font-weight: 700; margin-bottom: 1rem;
  border: 1px solid rgba(196, 30, 58, 0.15);
}
.hero-title {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 900; color: var(--navy);
  line-height: 1.2; margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-title::after {
  content: '';
  display: block; width: 60px; height: 4px;
  background: var(--red); border-radius: 2px; margin-top: 0.75rem;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--muted); line-height: 1.85;
  max-width: 520px; margin-bottom: 1.75rem;
}
.hero-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn-custom {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-full);
  font-weight: 700; font-size: 0.92rem; text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
  border: none; cursor: pointer;
}
.btn-primary-custom {
  background: var(--red); color: #fff;
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.3);
}
.btn-primary-custom:hover { background: var(--red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(196, 30, 58, 0.35); }
.btn-outline-custom {
  background: var(--white); color: var(--navy);
  border: 2px solid var(--line);
}
.btn-outline-custom:hover { border-color: var(--navy); color: var(--navy); transform: translateY(-2px); }

.hero-video-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--navy);
  transform: none !important;
  padding: 0;
  border: none;
}
.hero-video-wrapper:hover { transform: none !important; }
.hero-video-wrapper video {
  width: 100%; display: block;
  aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .hero-buttons { flex-direction: column; }
  .btn-custom { width: 100%; justify-content: center; }
}

/* ── Stats Band ── */
.stats-section {
  background: var(--navy);
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
}
.stats-section .container { padding-block: 2.5rem; }
.stat-card {
  text-align: center; padding: 1rem 0.5rem;
  background: transparent; border: none; box-shadow: none;
  border-radius: 0;
  position: relative;
}
.col-md-3:not(:first-child) .stat-card::after {
  content: '';
  position: absolute;
  inset-inline-start: 0; top: 15%; height: 70%;
  width: 1px; background: rgba(255,255,255,0.15);
}
.stat-card::after { display: none; }
.col-md-3:not(:first-child) .stat-card::after { display: block; }
.stat-card:hover { transform: none; box-shadow: none; }
.stat-icon {
  font-size: 1.5rem; color: var(--red); margin-bottom: 0.5rem;
  filter: none;
}
.stat-number {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900; color: var(--white);
  display: block; line-height: 1;
}
.stat-label {
  font-size: 0.88rem; color: rgba(255,255,255,0.7);
  font-weight: 600; margin-top: 0.35rem;
}
@media (max-width: 767px) {
  .stat-card::after { display: none !important; }
  .stat-card { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .col-md-3:last-child .stat-card { border-bottom: none; }
}

/* ── Apply Forms ── */
.apply-forms-section {
  background: var(--white);
  padding: var(--section-pad) 0;
}
.apply-forms-section .section-header { margin-bottom: 2.5rem; }

.section-subtitle {
  display: inline-block;
  color: var(--red); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 900; color: var(--navy);
  margin-bottom: 0.75rem; line-height: 1.25;
}
.section-description {
  font-size: 1rem; color: var(--muted); line-height: 1.8;
  max-width: 600px; margin-inline: auto;
}
.section-header { text-align: center; }

.apply-card {
  display: flex; flex-direction: column;
  padding: 0; border-radius: var(--radius-lg);
  text-decoration: none; color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  height: 100%;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
  box-shadow: var(--shadow-sm);
}
.apply-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit; text-decoration: none;
}
.apply-card-students { border-top: 4px solid var(--red); }
.apply-card-students:hover { border-color: var(--red); }
.apply-card-teachers { border-top: 4px solid var(--navy); }
.apply-card-teachers:hover { border-color: var(--navy); }

.apply-card-inner {
  display: flex; align-items: flex-start; gap: 1.25rem;
  padding: 1.75rem;
}
.apply-card-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
}
.apply-card-students .apply-card-icon { background: var(--red); }
.apply-card-teachers .apply-card-icon { background: var(--navy); }
.apply-card-body { flex: 1; text-align: start; }
.apply-card-badge {
  position: static; display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}
.apply-card-students .apply-card-badge { background: var(--red-soft); color: var(--red); border: none; }
.apply-card-teachers .apply-card-badge { background: var(--navy-soft); color: var(--navy); border: none; }
.apply-card h3 {
  font-size: 1.2rem; font-weight: 800; color: var(--navy);
  margin-bottom: 0.4rem;
}
.apply-card p {
  font-size: 0.9rem; color: var(--muted); line-height: 1.7;
  margin-bottom: 0;
}
.apply-card-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex; align-items: center; justify-content: space-between;
}
.apply-card-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 700; font-size: 0.9rem;
  padding: 0; border-radius: 0; background: none !important; color: inherit;
}
.apply-card-students .apply-card-btn { color: var(--red); }
.apply-card-teachers .apply-card-btn { color: var(--navy); }
.apply-card-arrow {
  font-size: 1.1rem; opacity: 0.5;
  transition: transform var(--ease);
}
.apply-card:hover .apply-card-arrow { transform: translateX(-4px); opacity: 1; }

/* ── Features ── */
#features {
  background: var(--bg);
  padding: var(--section-pad) 0;
  max-width: 100%;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%;
  transition: box-shadow var(--ease), border-color var(--ease);
  box-shadow: var(--shadow-sm);
  transform: none !important;
}
.feature-card::after { display: none; }
.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(196, 30, 58, 0.2);
  transform: none !important;
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
  margin: 0 0 1rem 0;
  box-shadow: none;
}
.col-lg-4:nth-child(odd) .feature-icon { background: var(--red); }
.col-lg-4:nth-child(even) .feature-icon { background: var(--navy); }
.feature-card:hover .feature-icon { transform: none; }
.feature-card h5 { font-weight: 800; font-size: 1.05rem; color: var(--navy); margin-bottom: 0.5rem; }
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.75; margin: 0; }

/* ── Sections general ── */
section { padding: var(--section-pad) 0; }

/* ── Gallery ── */
.gallery-section { background: var(--white); }
.images-slider {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0 1.5rem;
  direction: ltr;
}
.images-slider::before,
.images-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}
.images-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--white) 15%, transparent);
}
.images-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--white) 15%, transparent);
}
.images-slider-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: gallery-marquee 45s linear infinite;
}
.images-slider:hover .images-slider-track {
  animation-play-state: paused;
}
@keyframes gallery-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.gallery-item {
  flex: 0 0 auto;
  width: 320px;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--ease);
  background: var(--line);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .images-slider { overflow-x: auto; }
  .images-slider::before,
  .images-slider::after { display: none; }
  .images-slider-track { animation: none; }
}
@media (max-width: 768px) {
  .gallery-item { width: 260px; height: 180px; }
}

/* ── Video cards ── */
.video-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
  transform: none !important;
}
.video-card::before { display: none; }
.video-card:hover { box-shadow: var(--shadow); transform: none !important; }
.video-card video { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #000; }
.video-card .card-body { padding: 1rem; }
.video-card .card-text { font-weight: 700; font-size: 0.92rem; color: var(--navy); margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.video-card .card-text i { color: var(--red); font-size: 1.1rem; }

/* ── Timeline ── */
.timeline-section { background: var(--bg); }
.timeline::before { background: var(--line); box-shadow: none; width: 2px; }
.timeline-icon {
  width: 48px; height: 48px; font-size: 1.2rem;
  background: var(--red); border: 3px solid var(--white);
  box-shadow: var(--shadow);
}
.timeline-content {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transform: none !important;
}
.timeline-content:hover { box-shadow: var(--shadow); transform: none !important; border-color: var(--line); }
.timeline-content h4 { font-weight: 800; font-size: 1rem; color: var(--navy); }
.timeline-content p { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 768px) {
  .timeline::before { right: 24px; transform: none; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; padding-inline-start: 60px; }
  .timeline-icon { right: 0; transform: none; inset-inline-end: 0; inset-inline-start: auto; left: 0; }
  .timeline-content { width: 100%; }
}

/* ── Testimonials ── */
.testimonials-section {
  background: var(--navy);
  padding: var(--section-pad) 0;
}
.testimonials-section .section-title,
.testimonials-section .section-description { color: var(--white); }
.testimonials-section .section-subtitle { color: rgba(255,255,255,0.7); }
.testimonial-slide {
  background: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transform: none !important;
}
.testimonial-quote { font-size: 2rem; color: var(--red); opacity: 0.25; display: block; margin-bottom: 0.5rem; }
.testimonial-text { font-size: 0.95rem; line-height: 1.8; color: var(--muted); font-style: italic; margin-bottom: 1.25rem; }
.testimonial-author {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
}
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.testimonial-info h5 { margin: 0; font-weight: 800; font-size: 0.92rem; color: var(--navy); }
.testimonial-stars { color: #F59E0B; font-size: 0.9rem; }
.swiper-pagination-bullet { background: rgba(255,255,255,0.5); }
.swiper-pagination-bullet-active { background: var(--red); }

/* ── FAQ ── */
.faq-section { background: var(--white); }
.accordion-item {
  border: 1px solid var(--line); border-radius: var(--radius) !important;
  margin-bottom: 0.75rem; overflow: hidden;
  box-shadow: none; background: var(--white);
}
.accordion-item:hover { transform: none; box-shadow: var(--shadow-sm); }
.accordion-button {
  font-weight: 700; font-size: 0.95rem; color: var(--navy);
  padding: 1rem 1.25rem; background: var(--white);
}
.accordion-button:not(.collapsed) {
  background: var(--navy); color: var(--white);
}
.accordion-button:not(.collapsed) i { color: var(--red); }
.accordion-body { padding: 1rem 1.25rem; color: var(--muted); font-size: 0.9rem; background: var(--bg); }

/* ── CTA ── */
.cta-section {
  background: var(--red);
  padding: var(--section-pad) 0;
}
.cta-section::before { display: none; }
.cta-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 900; color: #fff; text-shadow: none; }
.cta-section .cta-btn-white { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.cta-section .cta-btn-white:hover { background: #fff; color: var(--navy); }
.cta-section .cta-btn-navy { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.cta-section .cta-btn-navy:hover { background: var(--navy-light); color: #fff; }
.cta-section .btn-outline-custom {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.55);
}
.cta-section .btn-outline-custom:hover {
  background: rgba(255,255,255,0.12); color: #fff; border-color: #fff;
}
.cta-description { color: rgba(255,255,255,0.9); font-size: 1rem; }

/* ── Newsletter ── */
.newsletter-section { background: var(--bg); padding: 3rem 0; }
.newsletter-form {
  max-width: 520px; margin: 0 auto;
  display: flex; gap: 0.5rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-full); padding: 0.35rem;
  box-shadow: var(--shadow-sm);
}
.newsletter-form input { flex: 1; border: none; background: transparent; padding: 0.75rem 1rem; outline: none; font-size: 0.9rem; }
.newsletter-form button {
  background: var(--navy); color: #fff; border: none;
  border-radius: var(--radius-full); padding: 0.75rem 1.25rem;
  font-weight: 700; font-size: 0.88rem; cursor: pointer;
  box-shadow: none;
}
.newsletter-form button:hover { background: var(--navy-light); transform: none; }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem;
}
.footer-section h4 { font-weight: 800; font-size: 1rem; color: #fff; margin-bottom: 1rem; }
.footer-section h4 i { color: var(--red); }
.footer-section ul li a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.9rem; transition: color var(--ease); }
.footer-section ul li a:hover { color: var(--red); transform: none; }
.social-link {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; text-decoration: none;
  transition: background var(--ease);
}
.social-link:hover { background: var(--red); transform: none; box-shadow: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; text-align: center; }
.footer-bottom p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin: 0; }

/* ── Floating buttons ── */
.floating-btns {
  position: fixed; z-index: 12000;
  left: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 0.6rem;
}
.floating-btn {
  width: 50px; height: 50px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; text-decoration: none;
  box-shadow: var(--shadow-lg); border: none; cursor: pointer;
  transition: transform var(--ease);
}
.floating-btn:hover { transform: translateY(-3px); }
.whatsapp-btn { background: #25D366; animation: none; }
.apply-btn { background: var(--red); box-shadow: var(--shadow-lg); }
.scroll-top-btn { background: var(--navy); display: none; }
.scroll-top-btn.show { display: flex; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; background: rgba(17,24,39,0.9);
  display: none; align-items: center; justify-content: center;
  z-index: 10000; padding: 1rem;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: var(--radius); object-fit: contain; }
.lightbox-close {
  position: absolute; top: -12px; left: -12px;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 768px) {
  section, #features, .apply-forms-section { padding: 2.5rem 0; }
  .apply-card-inner { flex-direction: column; padding: 1.25rem; }
  .apply-card-footer { padding: 0.85rem 1.25rem; }
}
