/* Global Black & White Theme */
:root {
  --black: #000000;
  --white: #ffffff;
  --accent: #00A651; /* Vibrant green accent */
  --accent-dark: #008746;
  --accent-contrast: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Typography */
html, body {
  scroll-behavior: smooth;
}
body {
  font-family: 'Cairo', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--black);
  background: var(--gray-100);
}

/* Links & Buttons */
a { color: var(--black); }
a:hover { color: var(--accent); }
.btn-black {
  --bs-btn-color: var(--white);
  --bs-btn-bg: var(--black);
  --bs-btn-border-color: var(--black);
  --bs-btn-hover-color: var(--white);
  --bs-btn-hover-bg: #111;
  --bs-btn-hover-border-color: #111;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-black:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-black:active { transform: translateY(0); box-shadow: none; }
.btn-outline-black {
  --bs-btn-color: var(--black);
  --bs-btn-border-color: var(--black);
  --bs-btn-hover-color: var(--white);
  --bs-btn-hover-bg: var(--black);
  --bs-btn-hover-border-color: var(--black);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-outline-black:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-outline-black:active { transform: translateY(0); box-shadow: none; }

/* Accent buttons */
.btn-accent {
  --bs-btn-color: var(--accent-contrast);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--accent-contrast);
  --bs-btn-hover-bg: var(--accent-dark);
  --bs-btn-hover-border-color: var(--accent-dark);
  --bs-btn-active-bg: var(--accent-dark);
  --bs-btn-active-border-color: var(--accent-dark);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-accent:active { transform: translateY(0); box-shadow: none; }

.btn-outline-accent {
  --bs-btn-color: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--accent-contrast);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-outline-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-outline-accent:active { transform: translateY(0); box-shadow: none; }

/* Navbar */
.navbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.navbar.scrolled {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-color: var(--gray-300);
}
.navbar-brand img { height: 40px; width: auto; display: block; }
.navbar .navbar-toggler { border-color: rgba(0,0,0,.25); }
.navbar .navbar-toggler:focus { box-shadow: 0 0 0 .15rem rgba(0,0,0,.15); }
.navbar .navbar-nav { gap: .25rem; }
.navbar .nav-link { color: var(--black); padding: .5rem .95rem; border-radius: .6rem; font-weight: 600; }
.navbar .nav-link:focus,
.navbar .nav-link:hover { color: #111; background: rgba(0,0,0,.06); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.navbar .nav-link.active {
  background: var(--accent);
  color: var(--accent-contrast) !important;
  background-size: 0 2px; /* disable underline when active as pill */
}

/* Hero */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
}
.hero .display-5 {
  line-height: 1.2;
}
/* Dark hero variant */
.hero.hero-dark {
  background: var(--black);
  color: var(--white);
}
.hero.hero-dark .display-5 { color: var(--white); }
.hero.hero-dark .lead,
.hero.hero-dark .section-muted { color: rgba(255,255,255,.85); }
/* Hero video wrapper */
.hero-video {
  position: relative;
  border-radius: .75rem; /* ~rounded-3 */
  overflow: hidden;
}
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.0) 55%, rgba(0,0,0,.18) 100%);
}
.hero-video video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  transition: transform .6s ease;
}
.hero-video:hover video { transform: scale(1.02); }
/* Hero video audio toggle */
.video-audio-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(120%) blur(2px);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.video-audio-toggle:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.18); background: rgba(0,0,0,.7); }
.video-audio-toggle i { font-size: 1.1rem; line-height: 1; }
.video-audio-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Course and Product Images */
.card img {
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.05);
}

/* Course filtering animation */
.course-item {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  animation-fill-mode: both;
}

.course-item:nth-child(1) { animation-delay: 0.1s; }
.course-item:nth-child(2) { animation-delay: 0.2s; }
.course-item:nth-child(3) { animation-delay: 0.3s; }
.course-item:nth-child(4) { animation-delay: 0.4s; }
.course-item:nth-child(5) { animation-delay: 0.5s; }
.course-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image preview improvements */
.image-preview {
  max-width: 200px;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.hero.parallax .parallax-img {
  filter: grayscale(100%);
  will-change: transform;
  transform: translateY(0);
}

/* Parallax hero image */
.hero.parallax .parallax-img {
  filter: grayscale(100%);
  will-change: transform;
  transform: translateY(0);
}
/* Hero intro animation */
.hero-animate .display-5,
.hero-animate .lead,
.hero-animate .btn {
  opacity: 0;
  animation: fadeUp .8s ease forwards;
}
.hero-animate .display-5 { animation-delay: .05s; }
.hero-animate .lead { animation-delay: .15s; }
.hero-animate .btn:nth-child(1) { animation-delay: .25s; }
.hero-animate .btn:nth-child(2) { animation-delay: .35s; }
.hero-animate .ratio img { opacity: 0; animation: fadeIn .9s ease .25s forwards; }

/* Cards */
.card {
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}
.card .card-img-top,
.card .ratio > img {
  object-fit: cover;
}
/* Hover elevation */
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); transition: transform .25s ease, box-shadow .25s ease; }

/* Sections */
.section-title {
  font-weight: 700;
  border-inline-start: 4px solid var(--accent);
  padding-inline-start: .75rem;
  margin-bottom: 1.25rem;
}
.section-muted {
  color: var(--gray-600);
}

/* Footer */
.site-footer {
  background: var(--black);
  color: var(--white);
  border-top: 1px solid #111;
}
.site-footer h5, .site-footer h6 { color: var(--white); }
.footer-link { color: rgba(255,255,255,.85); }
.footer-link:hover { color: var(--accent); }

/* Utility */
.bg-black { background: var(--black) !important; }
.text-black { color: var(--black) !important; }
.text-white { color: var(--white) !important; }
.border-black { border-color: var(--black) !important; }
.shadow-md { box-shadow: var(--shadow-md); }
/* Accent utilities */
.bg-accent { background: var(--accent) !important; }
.text-accent { color: var(--accent) !important; }
.border-accent { border-color: var(--accent) !important; }

/* Gallery */
.gallery-card img { height: 200px; object-fit: cover; }

/* Forms */
.form-control,
.form-select { border-color: var(--black); }
.form-control:focus,
.form-select:focus { box-shadow: 0 0 0 .2rem rgba(0,0,0,.15); border-color: #111; }

/* Toast */
.toast-black {
  --bs-toast-bg: var(--black);
  --bs-toast-color: var(--white);
  --bs-toast-border-color: #111;
}

/* RTL helpers (Bootstrap 5 RTL already loaded) */
.rtl-invert {
  transform: scaleX(-1);
}

/* Spacing helpers */
.section-spacing { padding-block: 3rem; }
/* Alt background section helper */
.section-alt { background: var(--gray-100); }

/* Active link underline */
.nav-link.active {
  text-decoration: underline 2px solid var(--black);
  text-underline-offset: 6px;
}

/* Placeholder logo strip */
.logo-strip img { height: 40px; filter: grayscale(100%); opacity: .75; }
.logo-strip img:hover { opacity: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.reveal-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* Intro Cover */
.intro-cover {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
}
.intro-cover .intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.intro-cover .intro-bg video,
.intro-cover .intro-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  opacity: .6;
  display: block;
}
.intro-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.0) 0%, rgba(0,0,0,.35) 80%), linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%);
  z-index: 1;
}
.intro-cover .intro-content {
  position: relative;
  z-index: 2;
}
.intro-title { font-weight: 800; letter-spacing: .5px; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.intro-subtitle { color: rgba(255,255,255,.9); max-width: 60ch; margin-inline: auto; text-shadow: 0 1px 4px rgba(0,0,0,.2); }
.intro-actions .btn { box-shadow: var(--shadow-sm); }

/* Kicker (small pill above title) */
.intro-kicker {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--accent);
  border: 1px solid rgba(255,255,255,.15);
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: .75rem;
}

@media (min-width: 992px) {
  .intro-title { font-size: 2.5rem; }
}

.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  opacity: .9;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.scroll-cue i { animation: bounceY 1.2s infinite; }
@keyframes bounceY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* Intro cover logo variant */
.intro-logo .intro-bg { display: flex; align-items: center; justify-content: center; }
.intro-logo .intro-bg img { width: auto; height: auto; max-width: 50vw; max-height: 40vh; filter: none; opacity: 1; }
.intro-logo .intro-content { margin-top: 4vh; }
.intro-logo::after { background: none; }

/* Optional translucent panel for intro text */
.intro-panel {
  display: inline-block;
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: saturate(120%) blur(2px);
}

@media (max-width: 576px) {
  .intro-logo .intro-bg img { max-width: 70vw; max-height: 28vh; }
  .intro-title { font-size: 1.5rem; }
}
/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px; /* RTL-friendly: bottom-left */
  z-index: 1050;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366; /* WhatsApp green */
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.whatsapp-float:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.18); background: #1ebe5d; }
.whatsapp-float i { font-size: 1.6rem; line-height: 1; }

/* Keyframes */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spinning { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
