/* ============================================================
   MOSTAKBAL WATAN COURSES - MODERN CYBER LANDING PAGE
   Theme: Cyber Dark (#090d16) | Sky Blue / Cyan / Indigo Accents
   File: src/styles/landing.css
   Responsive: Mobile (320px+) -> Tablet -> Desktop -> 2K/4K (2560px+)
   ============================================================ */

/* CSS Variables for Cyber Dark Aesthetics */
:root {
  --cyber-bg: #090d16;
  --cyber-surface: #0d1322;
  --cyber-surface-card: #131c31;
  --cyber-surface-high: #1b2742;
  --cyber-surface-low: #0b0f1a;
  --cyber-primary: #38bdf8;
  --cyber-primary-hover: #0284c7;
  --cyber-secondary: #818cf8;
  --cyber-accent: #06b6d4;
  --cyber-text: #f1f5f9;
  --cyber-text-muted: #94a3b8;
  --cyber-border: #1e293b;
  --cyber-border-highlight: rgba(56, 189, 248, 0.3);
}

/* Base Resets & Responsive Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 #090d16;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background-color: var(--cyber-bg);
  color: var(--cyber-text);
  font-family: 'Cairo', sans-serif;
  overflow-x: clip;
  overflow-y: visible;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Leaders Mobile Horizontal Scroll Carousel & Responsive Grid */
#leadership-section {
  scroll-margin-top: 5.5rem;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.leaders-carousel {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  cursor: grab;
  touch-action: pan-x pan-y !important;
}

.leaders-carousel.is-dragging {
  cursor: grabbing !important;
  user-select: none;
  scroll-snap-type: none !important;
}

@media (max-width: 639px) {
  #leadership-section {
    scroll-margin-top: 4.75rem;
    overflow-x: hidden !important;
  }

  .leaders-carousel {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-padding: 0 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.6);
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y !important;
  }

  .leaders-carousel::-webkit-scrollbar {
    height: 5px;
    display: block;
  }

  .leaders-carousel::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 9999px;
  }

  .leaders-carousel::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 9999px;
  }
}

@media (min-width: 640px) {
  .leaders-carousel {
    display: grid !important;
    overflow: visible !important;
    cursor: default !important;
    scroll-snap-type: none !important;
  }
}

@media (max-width: 768px) {
  #leadership-section .reveal-on-scroll,
  .leaders-carousel .leader-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

.leader-dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.leader-dot.active {
  width: 1.5rem !important;
  background-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Custom Scrollbar - High Visibility & Ergonomic Touch Target */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #090d16;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
  border: 2px solid #090d16;
}

::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

/* Ambient Global Glowing Orbs with Responsive Sizing */
.ambient-orb {
  position: fixed;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

.ambient-orb-1 {
  top: 0;
  right: 25%;
  width: min(600px, 80vw);
  height: min(600px, 80vw);
  background: rgba(56, 189, 248, 0.08);
  filter: blur(140px);
  animation: ambientOrbDrift 16s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  top: 33%;
  left: 0;
  width: min(500px, 70vw);
  height: min(500px, 70vw);
  background: rgba(99, 102, 241, 0.08);
  filter: blur(140px);
  animation: ambientOrbDriftAlt 20s ease-in-out infinite alternate;
}

.ambient-orb-3 {
  bottom: 40px;
  right: 40px;
  width: min(550px, 75vw);
  height: min(550px, 75vw);
  background: rgba(6, 182, 212, 0.08);
  filter: blur(160px);
  animation: ambientOrbDrift 18s ease-in-out infinite alternate-reverse;
}

@keyframes ambientOrbDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(25px, -20px) scale(1.06);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes ambientOrbDriftAlt {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-30px, 15px) scale(0.96);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Glass & Glow utilities */
.glass-panel {
  background: rgba(13, 19, 34, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.glow-sky {
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
}

.glow-cyan {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.glow-indigo {
  box-shadow: 0 0 25px rgba(129, 140, 248, 0.2);
}

/* Hero Section Gradient Title */
.hero-gradient-title {
  background: linear-gradient(135deg, #38bdf8 0%, #67e8f9 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 35px rgba(56, 189, 248, 0.3));
}

/* Cyber HUD Code Frame */
.cyber-hud-card {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(13, 21, 39, 0.95) 60%, rgba(9, 13, 22, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.16);
  border-radius: 1.5rem;
}

.cyber-hud-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

/* Mobile Menu Drawer Animation */
#mobile-menu {
  animation: slideDownMenu 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top;
}

@keyframes slideDownMenu {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* ============================================================
   HERO ENTRANCE & PRESENTATION ANIMATION SYSTEM
   ============================================================ */
@keyframes heroFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.anim-fade-in-down {
  animation: heroFadeInDown 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-fade-in-up {
  animation: heroFadeInUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-scale-in {
  animation: heroScaleIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anim-delay-100 {
  animation-delay: 100ms;
}

.anim-delay-200 {
  animation-delay: 200ms;
}

.anim-delay-300 {
  animation-delay: 300ms;
}

.anim-delay-400 {
  animation-delay: 400ms;
}

.anim-delay-500 {
  animation-delay: 500ms;
}

/* Interactive Hover Elevation (Zero Layout Shift) */
.interactive-hover-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  will-change: transform;
}

.interactive-hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px -10px rgba(56, 189, 248, 0.18),
    0 0 20px rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4) !important;
}

/* Primary Button Dynamic Shimmer Streak */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -100%;
  width: 50%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.28),
      transparent);
  transform: rotate(25deg);
  animation: btnShimmerSweep 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes btnShimmerSweep {

  0%,
  70% {
    left: -100%;
  }

  100% {
    left: 200%;
  }
}

/* Terminal Monospace Blinking Cursor */
.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background-color: #38bdf8;
  vertical-align: middle;
  margin-right: 3px;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  animation: terminalCursorBlink 1s step-end infinite;
}

@keyframes terminalCursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Scroll-Driven Reveal (Safe Progressive Enhancement) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays for Grid Cards */
.stagger-1 {
  transition-delay: 50ms;
}

.stagger-2 {
  transition-delay: 110ms;
}

.stagger-3 {
  transition-delay: 170ms;
}

.stagger-4 {
  transition-delay: 230ms;
}

.stagger-5 {
  transition-delay: 290ms;
}

.stagger-6 {
  transition-delay: 350ms;
}

.stagger-7 {
  transition-delay: 410ms;
}

.stagger-8 {
  transition-delay: 470ms;
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .btn-shimmer::after {
    display: none !important;
  }
}

/* Modals Overlay & Responsive Containment */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-content-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 92vh;
  overflow-y: auto;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.15);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-content-card {
    padding: 1.75rem;
  }
}

@keyframes modalPop {
  from {
    transform: scale(0.94);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================
   SPLASH LOADING SCREEN (Ultra-Modern Cyber Edition)
   ============================================================ */
.splash-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.12) 0%, rgba(9, 13, 22, 0.98) 65%, #05070c 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-loading-screen.show {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.splash-loading-screen.loading-hide {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.splash-loading-screen::before {
  content: "";
  position: absolute;
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  animation: splashAuraPulse 4s ease-in-out infinite alternate;
}

.splash-loading-content {
  text-align: center;
  max-width: 380px;
  width: 100%;
  padding: 2.25rem 1.5rem;
  background: rgba(13, 21, 39, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 1.75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(56, 189, 248, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.splash-loading-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

.splash-loading-emblem {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-orbital-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #38bdf8;
  border-right-color: #06b6d4;
  animation: splashOrbit 2s linear infinite;
  will-change: transform;
}

.splash-inner-ring {
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  animation: splashReverseOrbit 12s linear infinite;
  will-change: transform;
}

.splash-loading-logo {
  width: 66px;
  height: 66px;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  background: #090d16;
  border: 2px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-loading-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.splash-loading-content h2 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 0.25rem;
}

.splash-loading-content p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0 0 1.25rem;
}

.splash-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.splash-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 1.4s ease-in-out infinite;
}

.splash-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #06b6d4);
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  will-change: width;
}

@keyframes splashOrbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes splashReverseOrbit {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes splashAuraPulse {
  from {
    transform: scale(0.9);
    opacity: 0.6;
  }

  to {
    transform: scale(1.1);
    opacity: 1;
  }
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* ============================================================
   RESPONSIVE SCALING ENGINE (Mobile 320px -> 4K Displays 3840px+)
   Proportional Root Font Sizing for Tailwind REM-based layouts
   ============================================================ */
@media (max-width: 360px) {
  :root {
    font-size: 14px;
  }
}

@media (min-width: 1920px) {
  :root {
    font-size: 17px;
  }

  .ambient-orb-1 {
    width: min(850px, 45vw);
    height: min(850px, 45vw);
    filter: blur(180px);
  }

  .ambient-orb-2 {
    width: min(750px, 40vw);
    height: min(750px, 40vw);
    filter: blur(180px);
  }

  .ambient-orb-3 {
    width: min(800px, 42vw);
    height: min(800px, 42vw);
    filter: blur(200px);
  }

  .hero-gradient-title {
    filter: drop-shadow(0 0 50px rgba(56, 189, 248, 0.45));
  }

  .cyber-hud-card {
    border-radius: 2.25rem;
    box-shadow: 0 0 70px rgba(56, 189, 248, 0.22);
  }
}

@media (min-width: 2560px) {
  :root {
    font-size: 19px;
  }

  .ambient-orb-1 {
    width: min(1000px, 40vw);
    height: min(1000px, 40vw);
    filter: blur(220px);
  }

  .ambient-orb-2 {
    width: min(900px, 38vw);
    height: min(900px, 38vw);
    filter: blur(220px);
  }

  .ambient-orb-3 {
    width: min(950px, 40vw);
    height: min(950px, 40vw);
    filter: blur(240px);
  }

  .hero-gradient-title {
    filter: drop-shadow(0 0 65px rgba(56, 189, 248, 0.5));
  }

  .cyber-hud-card {
    border-radius: 2.5rem;
    box-shadow: 0 0 90px rgba(56, 189, 248, 0.28);
  }
}

@media (min-width: 3200px) {
  :root {
    font-size: 21px;
  }
}

/* Touch Ergonomics & Mobile Tap Target Resiliency */
button,
a,
input,
select {
  touch-action: manipulation;
}

@media (max-width: 640px) {

  .landing-login-btn,
  .mobile-menu-btn,
  #gameChallengeBtn {
    min-height: 44px;
  }
}