
:root {
  --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Color Palette: Royal Navy + Crisp White + Medical Blue + Cyan */
  --bg: #f5f8fc;
  --bg-subtle: #edf3fa;
  --surface: #ffffff;
  --surface-hover: #f8fbff;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-card: #ffffff;
  
  --navy-dark: #050f1f;
  --navy: #07162e;
  --navy-light: #0d264d;
  --navy-muted: #1a3a6b;
  
  --blue-primary: #0284c7;
  --blue-hover: #0369a1;
  --cyan: #06b6d4;
  --cyan-light: #67e8f9;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  
  --text: #0b192e;
  --text-muted: #576b85;
  --text-light: #8fa0b5;
  
  --border: #dbe5f0;
  --border-focus: #0284c7;
  --border-light: rgba(219, 229, 240, 0.6);
  
  --green: #10b981;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  
  --red: #ef4444;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  
  --shadow-sm: 0 4px 12px rgba(7, 22, 46, 0.04);
  --shadow-md: 0 10px 30px rgba(7, 22, 46, 0.08);
  --shadow-lg: 0 20px 50px rgba(7, 22, 46, 0.12);
  --shadow-glow: 0 12px 36px rgba(2, 132, 199, 0.28);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  --bg: #040c17;
  --bg-subtle: #071424;
  --surface: #0b1a2d;
  --surface-hover: #10243d;
  --surface-glass: rgba(11, 26, 45, 0.88);
  --surface-card: #0b1a2d;
  
  --navy-dark: #02070e;
  --navy: #061324;
  --navy-light: #0d223f;
  
  --text: #f0f6fc;
  --text-muted: #94a9c2;
  --text-light: #627b99;
  
  --border: #1a3350;
  --border-focus: #38bdf8;
  --border-light: rgba(26, 51, 80, 0.6);
  
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 12px 40px rgba(56, 189, 248, 0.2);
}

/* Base Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.68;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

/* Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes floatRev {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.85; transform: scale(1.03); }
}

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

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

/* Container */
.container {
  width: min(1200px, calc(100% - 36px));
  margin-inline: auto;
}

/* Topbar / Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 80px;
  padding: 12px clamp(16px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  white-space: nowrap;
}

.brand img {
  width: 54px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text span:first-child {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.3px;
}

.brand-text span:last-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-primary);
  margin-top: -3px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar nav a {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14.5px;
  position: relative;
}

.topbar nav a:hover,
.topbar nav a.active {
  color: var(--blue-primary);
  background: var(--bg-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.35);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.45);
  transform: translateY(-2px);
}

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  transform: translateY(-1px);
}

.btn.dark {
  background: var(--navy);
  color: #ffffff;
}

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

.btn.success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.btn.danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.btn.small {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.btn.large {
  padding: 15px 30px;
  font-size: 17px;
  border-radius: var(--radius-lg);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  transform: rotate(15deg);
}

.user-pill {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--border);
}

/* =====================================================================
   HERO SECTION — Premium Medical Landing
   ===================================================================== */
.hero {
  --hero-img-x: 0px;
  --hero-img-y: 0px;
  position: relative;
  isolation: isolate;
  width: min(1320px, calc(100% - 32px));
  min-height: 690px;
  margin: 28px auto 52px;
  border-radius: 38px;
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(53, 205, 255, 0.18), transparent 28%),
    radial-gradient(circle at 14% 86%, rgba(18, 129, 216, 0.18), transparent 34%),
    linear-gradient(122deg, #061020 0%, #071b35 47%, #0a315f 100%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 34px 100px rgba(4, 16, 34, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.9) 45%, transparent 86%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.9) 45%, transparent 86%);
  opacity: .72;
  animation: heroGridDrift 22s linear infinite;
}

.hero::after {
  content: '';
  position: absolute;
  width: 46%;
  height: 140%;
  top: -20%;
  left: 33%;
  z-index: -3;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent);
  transform: rotate(12deg);
  pointer-events: none;
}

.hero-noise {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .28;
  background-image:
    radial-gradient(rgba(255,255,255,.28) .7px, transparent .7px),
    radial-gradient(rgba(103,232,249,.18) .7px, transparent .7px);
  background-position: 0 0, 18px 18px;
  background-size: 36px 36px;
  mask-image: linear-gradient(100deg, rgba(0,0,0,.1), #000 55%, rgba(0,0,0,.4));
  -webkit-mask-image: linear-gradient(100deg, rgba(0,0,0,.1), #000 55%, rgba(0,0,0,.4));
}

.hero-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: -1;
}

.hero-light-one {
  width: 420px;
  height: 420px;
  right: -190px;
  top: -170px;
  background: radial-gradient(circle, rgba(71, 215, 255, .24), rgba(71, 215, 255, 0) 68%);
  animation: heroLightFloat 8s ease-in-out infinite;
}

.hero-light-two {
  width: 520px;
  height: 520px;
  left: -210px;
  bottom: -270px;
  background: radial-gradient(circle, rgba(0, 121, 213, .28), rgba(0, 121, 213, 0) 70%);
  animation: heroLightFloat 10s ease-in-out -3s infinite reverse;
}

.hero-copy {
  position: relative;
  z-index: 8;
  align-self: center;
  padding: clamp(44px, 5.2vw, 78px) clamp(34px, 5.2vw, 78px) clamp(44px, 5vw, 70px) 28px;
  animation: heroCopyIn .8s cubic-bezier(.2,.75,.25,1) both;
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #c9f5ff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .1px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 5px rgba(34, 211, 238, .12), 0 0 20px rgba(34, 211, 238, .65);
  animation: statusPulse 2s ease-in-out infinite;
  flex: 0 0 auto;
}

.eyebrow-separator {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,.2);
}

.hero h1 {
  max-width: 620px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 3.7vw, 56px);
  line-height: 1.34;
  letter-spacing: -0.35px;
  word-spacing: 1px;
  font-weight: 900;
  text-wrap: balance;
}

.hero h1 .highlight {
  display: inline;
  color: transparent;
  background: linear-gradient(115deg, #ffffff 0%, #76e8ff 38%, #2ab8ff 76%, #ffffff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroTextShine 7s linear infinite;
}

.hero p {
  max-width: 665px;
  margin: 0 0 30px;
  color: #c9d8ea;
  font-size: clamp(15.5px, 1.55vw, 18.5px);
  line-height: 1.95;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  min-height: 54px;
}

.hero-primary-cta {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 14px 36px rgba(2,132,199,.34);
}

.hero-primary-cta::before {
  content: '';
  position: absolute;
  top: -80%;
  left: -45%;
  width: 34%;
  height: 260%;
  transform: rotate(24deg);
  background: linear-gradient(to right, transparent, rgba(255,255,255,.45), transparent);
  animation: ctaSweep 4.8s ease-in-out 1.4s infinite;
}

.cta-arrow {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-inline-start: 2px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  transition: transform .28s ease, background-color .28s ease;
}

.hero-primary-cta:hover .cta-arrow {
  transform: translateX(-4px);
  background: rgba(255,255,255,.24);
}

.hero-actions .btn.ghost {
  color: #fff;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.17);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-actions .btn.ghost:hover {
  color: #fff;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.32);
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-width: 710px;
  margin-top: 34px;
  padding-top: 23px;
  border-top: 1px solid rgba(255,255,255,.11);
}

.hero-proof-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 14px;
  color: #ecf7ff;
  transition: transform .25s ease, background-color .25s ease;
}

.hero-proof-item:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.05);
}

.hero-proof-item > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.hero-proof-item strong {
  font-size: 12.8px;
  font-weight: 800;
  white-space: nowrap;
}

.hero-proof-item small {
  color: #91a9c2;
  font-size: 10.5px;
  line-height: 1.45;
  white-space: nowrap;
}

.proof-icon {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #75edff;
  background: rgba(34,211,238,.09);
  border: 1px solid rgba(103,232,249,.16);
  font-size: 13px;
  font-family: var(--font-en);
  font-weight: 900;
}

/* Hero visual */
.hero-visual {
  position: relative;
  z-index: 5;
  min-height: 690px;
  display: grid;
  place-items: end center;
  padding: 24px 16px 0;
  overflow: visible;
  perspective: 1100px;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: min(520px, 86%);
  aspect-ratio: 1;
  left: 50%;
  top: 49%;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(37, 180, 238, .26) 0 27%, rgba(15, 116, 187, .08) 44%, transparent 70%);
  filter: blur(2px);
  box-shadow: 0 0 110px rgba(16, 151, 220, .16);
  animation: visualBreath 6.5s ease-in-out infinite;
}

.hero-visual-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(137, 225, 255, .13);
  pointer-events: none;
}

.orbit-one {
  width: min(535px, 88%);
  aspect-ratio: 1;
  animation: orbitSpin 28s linear infinite;
}

.orbit-one::before,
.orbit-two::before {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  top: -5px;
  left: 50%;
  background: #67e8f9;
  box-shadow: 0 0 24px #22d3ee;
}

.orbit-two {
  width: min(410px, 70%);
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(125, 211, 252, .11);
  animation: orbitSpin 34s linear infinite reverse;
}

.hero-ecg {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 29%;
  z-index: 1;
  opacity: .26;
  filter: drop-shadow(0 0 5px rgba(83,220,255,.42));
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.hero-ecg svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-ecg path {
  fill: none;
  stroke: #65dff8;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: ecgDraw 5.8s ease-in-out 1.1s infinite;
}

.hero-image-stage {
  position: relative;
  z-index: 4;
  width: min(610px, 99%);
  height: 100%;
  min-height: 665px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translate3d(var(--hero-img-x), var(--hero-img-y), 0);
  transition: transform .18s ease-out;
}

.hero-image-halo {
  position: absolute;
  z-index: -1;
  width: 72%;
  aspect-ratio: 1;
  left: 50%;
  bottom: 19%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103,232,249,.19), rgba(14,165,233,.075) 45%, transparent 69%);
  filter: blur(9px);
  animation: haloPulse 5.6s ease-in-out infinite;
}

.hero-image-platform {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 8px;
  translate: -50% 0;
  width: 78%;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(38,185,238,.28) 0%, rgba(11,93,158,.13) 40%, transparent 74%);
  filter: blur(9px);
}

.hero-doctor-img {
  position: relative;
  z-index: 3;
  width: auto;
  height: min(660px, 100%);
  max-width: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 26px 24px rgba(0,0,0,.25)) drop-shadow(0 0 30px rgba(51,184,241,.06));
  transform-origin: 50% 100%;
  animation:
    heroImageIn .95s cubic-bezier(.16,.8,.25,1) .15s both,
    heroImageFloat 6.2s ease-in-out 1.15s infinite;
  will-change: transform;
}

.hero-floating-card,
.hero-success-badge {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #0d1d31;
  background: rgba(255,255,255,.93);
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: 0 18px 48px rgba(1, 13, 28, .27), inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  transition: transform .18s ease-out, box-shadow .28s ease;
}

.hero-floating-card:hover,
.hero-success-badge:hover {
  box-shadow: 0 24px 58px rgba(1, 13, 28, .35), inset 0 1px 0 rgba(255,255,255,.9);
}

.hero-floating-card {
  min-width: 218px;
  padding: 11px 14px 11px 12px;
  border-radius: 18px;
}

.hero-floating-card > span:last-child,
.hero-success-badge > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.hero-floating-card strong,
.hero-success-badge strong {
  font-family: var(--font-main);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 900;
  white-space: nowrap;
}

.hero-floating-card small,
.hero-success-badge small {
  color: #667c94;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 700;
  white-space: nowrap;
}

.floating-card-icon {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--font-en);
  font-weight: 900;
}

.medical-cross {
  color: #047cae;
  background: linear-gradient(145deg, #e6fbff, #bdefff);
  border: 1px solid #b4ebf7;
  font-size: 22px;
}

.check-ring {
  color: #07876d;
  background: linear-gradient(145deg, #e9fff8, #c8f5e7);
  border: 1px solid #b8ebdc;
  font-size: 18px;
}

.hero-card-skills {
  top: 20%;
  right: 1.5%;
  animation: cardInRight .75s cubic-bezier(.16,.8,.25,1) .65s both, cardFloatA 5.4s ease-in-out 1.4s infinite;
}

.hero-card-quiz {
  left: 0%;
  bottom: 19%;
  animation: cardInLeft .75s cubic-bezier(.16,.8,.25,1) .82s both, cardFloatB 6s ease-in-out 1.55s infinite;
}

.hero-success-badge {
  right: 6%;
  bottom: 8.5%;
  min-width: 183px;
  padding: 10px 13px;
  border-radius: 16px;
  animation: badgeIn .7s cubic-bezier(.16,.8,.25,1) 1s both, cardFloatA 6.6s ease-in-out 1.7s infinite reverse;
}

.success-pulse {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16,185,129,.11);
}

.success-pulse::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(16,185,129,.42);
  animation: badgePulse 2.1s ease-out infinite;
}

html[data-theme="dark"] .hero-floating-card,
html[data-theme="dark"] .hero-success-badge {
  color: #eef8ff;
  background: rgba(7, 24, 44, .90);
  border-color: rgba(126, 214, 255, .16);
  box-shadow: 0 18px 48px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05);
}

html[data-theme="dark"] .hero-floating-card small,
html[data-theme="dark"] .hero-success-badge small {
  color: #8faac4;
}

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

@keyframes heroImageIn {
  from { opacity: 0; transform: translateY(42px) scale(.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroImageFloat {
  0%, 100% { transform: translateY(0) rotate(.001deg); }
  50% { transform: translateY(-8px) rotate(.18deg); }
}

@keyframes cardInRight {
  from { opacity: 0; transform: translate3d(28px, 12px, 0) scale(.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes cardInLeft {
  from { opacity: 0; transform: translate3d(-28px, 14px, 0) scale(.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes badgeIn {
  from { opacity: 0; transform: translateY(16px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardFloatA {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -9px; }
}

@keyframes cardFloatB {
  0%, 100% { margin-bottom: 0; }
  50% { margin-bottom: -10px; }
}

@keyframes heroLightFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: .75; }
  50% { transform: translate3d(20px, 14px, 0) scale(1.08); opacity: 1; }
}

@keyframes visualBreath {
  0%, 100% { transform: scale(.98); opacity: .82; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes haloPulse {
  0%, 100% { transform: scale(.96); opacity: .72; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes orbitSpin {
  to { rotate: 360deg; }
}

@keyframes ecgDraw {
  0%, 13% { stroke-dashoffset: 620; opacity: 0; }
  25% { opacity: .8; }
  72% { stroke-dashoffset: 0; opacity: .9; }
  92%, 100% { stroke-dashoffset: -620; opacity: 0; }
}

@keyframes badgePulse {
  0% { transform: scale(.7); opacity: .85; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes statusPulse {
  0%, 100% { opacity: .8; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes heroGridDrift {
  to { background-position: 48px 48px, 48px 48px; }
}

@keyframes heroTextShine {
  to { background-position: -220% center; }
}

@keyframes ctaSweep {
  0%, 62% { left: -45%; opacity: 0; }
  68% { opacity: 1; }
  84% { left: 120%; opacity: .8; }
  100% { left: 120%; opacity: 0; }
}

/* =====================================================================
   STATS BAR (الأرقام والإحصائيات)
   ===================================================================== */
.stats-ribbon {
  margin: -10px auto 50px;
  position: relative;
  z-index: 10;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  box-shadow: var(--shadow-md);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.stat-item:last-child {
  border-left: 0;
  padding-left: 0;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--blue-primary);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-content strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  font-family: var(--font-en), var(--font-main);
}

.stat-content span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =====================================================================
   SECTIONS & SECTION HEADERS
   ===================================================================== */
.section {
  padding: 68px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--blue-primary);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 14px;
}

.section-header p {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-muted);
  line-height: 1.7;
}

/* Cards & Grids */
.grid {
  display: grid;
  gap: 22px;
}

.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-primary);
}

/* =====================================================================
   ACADEMIC PATHWAYS (المسارات الأكاديمية)
   ===================================================================== */
.pathway-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 4px solid var(--blue-primary);
}

.pathway-card.p-school { border-top-color: #0284c7; }
.pathway-card.p-inst { border-top-color: #06b6d4; }
.pathway-card.p-college { border-top-color: #8b5cf6; }

.pathway-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.pathway-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  font-size: 26px;
}

.duration-tag {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.pathway-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}

.pathway-card p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.pathway-subjects {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.pathway-subjects li {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pathway-subjects li span {
  color: var(--blue-primary);
  font-size: 14px;
}

/* =====================================================================
   LEARNING JOURNEY (رحلة الطالب - 5 خطوات)
   ===================================================================== */
.journey-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
  margin-top: 30px;
}

.journey-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.journey-step:hover {
  transform: translateY(-5px);
  border-color: var(--blue-primary);
  box-shadow: var(--shadow-md);
}

.step-num {
  position: absolute;
  top: -14px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.step-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--blue-primary);
  display: grid;
  place-items: center;
  font-size: 26px;
  margin: 6px auto 14px;
}

.journey-step h4 {
  font-size: 16.5px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.journey-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =====================================================================
   FEATURES & TRUST CARDS
   ===================================================================== */
.feature-card {
  display: flex;
  flex-direction: column;
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(6, 182, 212, 0.12));
  color: var(--blue-primary);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =====================================================================
   FAQ ACCORDION
   ===================================================================== */
.faq-wrap {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--blue-primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 20px 24px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.faq-question span.arrow {
  transition: transform 0.3s ease;
  font-size: 18px;
  color: var(--blue-primary);
}

.faq-item.active .faq-question span.arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* =====================================================================
   CTA BANNER
   ===================================================================== */
.cta-banner {
  background: 
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.3), transparent 40%),
    linear-gradient(135deg, #07162e 0%, #0d2850 60%, #0284c7 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  margin: 40px auto 20px;
  box-shadow: 0 25px 70px rgba(7, 22, 46, 0.25);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-banner h2 {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 900;
  margin-bottom: 14px;
}

.cta-banner p {
  font-size: 17px;
  color: #dbeafe;
  max-width: 640px;
  margin: 0 auto 30px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* =====================================================================
   AUTH PAGES (Login & Register & Student ID Modal)
   ===================================================================== */
.auth-wrap {
  width: min(1060px, calc(100% - 32px));
  margin: 40px auto 60px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-art {
  background: 
    radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.25), transparent 40%),
    linear-gradient(145deg, #051020, #0a274d);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-art h2 {
  font-size: 32px;
  font-weight: 900;
  margin: 20px 0 10px;
  line-height: 1.25;
}

.auth-art p {
  color: #93c5fd;
  font-size: 15.5px;
}

.auth-art img {
  max-width: 240px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  margin-top: 30px;
}

.auth-card {
  padding: clamp(30px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 14.5px;
  outline: none;
  transition: var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

/* Student ID Celebration Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.student-id-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.4s ease;
}

.celebration-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  margin: 0 auto 18px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.id-display-box {
  background: var(--bg-subtle);
  border: 2px dashed var(--blue-primary);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.id-display-box strong {
  font-size: 26px;
  font-family: var(--font-en), monospace;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--blue-primary);
}

/* Toast Messages */
.toast {
  width: min(900px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14.5px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success { background: var(--green-bg); color: #065f46; border: 1px solid var(--green-border); }
.toast.danger { background: var(--red-bg); color: #991b1b; border: 1px solid var(--red-border); }
.toast.warning { background: var(--amber-bg); color: #92400e; border: 1px solid #fde68a; }

/* =====================================================================
   STUDENT PLATFORM DASHBOARD & LECTURES
   ===================================================================== */
.page-shell {
  width: min(1260px, calc(100% - 32px));
  margin: 28px auto 60px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.metric span.muted {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.metric strong {
  display: block;
  font-size: 32px;
  font-weight: 900;
  color: var(--blue-primary);
  margin-top: 6px;
  font-family: var(--font-en), var(--font-main);
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.subject-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.subject-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-primary);
  box-shadow: var(--shadow-md);
}

.subject-cover {
  height: 180px;
  background: linear-gradient(135deg, #07162e 0%, #0c2d58 100%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.subject-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject-cover .placeholder {
  font-size: 48px;
  color: #38bdf8;
}

.subject-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.subject-body h3 {
  font-size: 18.5px;
  font-weight: 800;
  margin: 10px 0 14px;
  color: var(--text);
}

.progress {
  height: 9px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #06b6d4);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.badge.green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge.blue { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge.red { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }

/* Lecture view & Video */
.video-box {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.video-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Quiz & Exam System */
.quiz-shell {
  width: min(840px, calc(100% - 32px));
  margin: 36px auto;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.timer {
  font-size: 20px;
  font-weight: 900;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  font-family: var(--font-en), monospace;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 5vw, 44px);
  box-shadow: var(--shadow-md);
}

.question-card h2 {
  font-size: 22px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--text);
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 15.5px;
  font-weight: 700;
}

.option:hover {
  background: var(--bg-subtle);
  border-color: var(--blue-primary);
}

.option input {
  accent-color: var(--blue-primary);
  transform: scale(1.2);
}

/* Certificate */
.certificate {
  width: min(1000px, calc(100% - 30px));
  margin: 36px auto;
  padding: 60px 40px;
  border: 12px double var(--navy);
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: #07162e;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.certificate h1 {
  font-size: 42px;
  font-weight: 900;
  margin: 18px 0 6px;
  color: var(--navy);
}

.certificate .student-name {
  font-size: 36px;
  font-weight: 900;
  color: #0284c7;
  margin: 14px 0;
}

/* =====================================================================
   FOOTER & WHATSAPP FLOATER
   ===================================================================== */
.footer {
  margin-top: 80px;
  background: var(--navy);
  color: #cbd5e1;
  padding: 50px clamp(20px, 5vw, 70px) 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  width: 140px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-col a:hover {
  color: #38bdf8;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

.wa-float {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 999;
  background: #25d366;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: var(--radius-full);
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
}

.wa-float:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 20px 45px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

/* =====================================================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ===================================================================== */
@media (max-width: 1024px) {
  .hero {
    width: min(940px, calc(100% - 28px));
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-copy {
    padding: 52px 48px 26px;
  }
  .hero h1 {
    max-width: 760px;
  }
  .hero-proof {
    max-width: 760px;
  }
  .hero-visual {
    min-height: 570px;
    padding-top: 0;
  }
  .hero-image-stage {
    min-height: 560px;
    width: min(620px, 96%);
  }
  .hero-doctor-img {
    height: min(555px, 100%);
  }
  .hero-card-skills {
    right: 10%;
    top: 16%;
  }
  .hero-card-quiz {
    left: 9%;
    bottom: 20%;
  }
  .hero-success-badge {
    right: 14%;
    bottom: 7%;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item {
    border-left: 0;
  }
  .journey-timeline {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(2, 1fr); }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar {
    padding: 10px 16px;
    min-height: 70px;
  }
  .topbar nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 8px 12px;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }
  .topbar nav a {
    padding: 8px 10px;
    font-size: 13px;
  }
  body {
    padding-bottom: 65px;
  }
  .hero {
    width: min(calc(100% - 18px), 720px);
    margin: 12px auto 30px;
    border-radius: 26px;
  }
  .hero-copy {
    padding: 34px 22px 18px;
  }
  .eyebrow {
    gap: 7px;
    padding: 8px 11px;
    font-size: 10.7px;
  }
  .eyebrow-separator {
    height: 13px;
  }
  .hero h1 {
    margin-top: 18px;
    font-size: clamp(30px, 7.5vw, 39px);
    line-height: 1.38;
    letter-spacing: -.2px;
  }
  .hero p {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.85;
  }
  .hero-actions {
    align-items: stretch;
  }
  .hero-actions .btn {
    flex: 1 1 190px;
    justify-content: center;
  }
  .hero-proof {
    grid-template-columns: 1fr;
    gap: 3px;
    margin-top: 24px;
    padding-top: 17px;
  }
  .hero-proof-item {
    padding: 7px 4px;
  }
  .hero-proof-item small {
    white-space: normal;
  }
  .hero-visual {
    min-height: 450px;
    padding-inline: 4px;
  }
  .hero-image-stage {
    min-height: 445px;
    width: min(475px, 100%);
  }
  .hero-doctor-img {
    height: min(445px, 100%);
  }
  .hero-card-skills {
    top: 17%;
    right: 2%;
    min-width: 178px;
    padding: 9px 10px;
    transform: scale(.9);
    transform-origin: right center;
  }
  .hero-card-quiz {
    display: none;
  }
  .hero-success-badge {
    right: 4%;
    bottom: 5%;
    min-width: 166px;
    padding: 8px 10px;
  }
  .hero-ecg {
    top: 30%;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 20px;
  }
  .journey-timeline {
    grid-template-columns: 1fr;
  }
  .grid.two, .grid.three, .grid.four, .subject-grid, .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .auth-wrap {
    grid-template-columns: 1fr;
  }
  .auth-art {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .wa-float {
    bottom: 74px;
    left: 16px;
    padding: 10px 16px;
    font-size: 13.5px;
  }
}


@media (max-width: 480px) {
  .hero {
    width: calc(100% - 12px);
    border-radius: 22px;
  }
  .hero-copy {
    padding: 30px 17px 12px;
  }
  .eyebrow span:last-child,
  .eyebrow-separator {
    display: none;
  }
  .hero h1 {
    font-size: clamp(28px, 8.5vw, 34px);
    line-height: 1.4;
  }
  .hero-actions .btn {
    flex-basis: 100%;
  }
  .hero-visual {
    min-height: 390px;
  }
  .hero-image-stage {
    min-height: 390px;
  }
  .hero-doctor-img {
    height: min(390px, 100%);
  }
  .hero-card-skills {
    top: 11%;
    right: -10px;
    scale: .82;
  }
  .hero-success-badge {
    right: 2px;
    bottom: 3%;
    scale: .86;
    transform-origin: right bottom;
  }
  .hero-visual-orbit.orbit-one {
    width: 88%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .hero *,
  .hero *::before,
  .hero *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-image-stage {
    transform: none !important;
  }
}

/* =====================================================================
   CHAPTERS, ACCORDION & LECTURE ITEMS
   ===================================================================== */
.subject-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.subject-hero-card h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 900;
  color: var(--text);
  margin: 10px 0 6px;
}

.chapter-card,
.accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.chapter-card:hover {
  border-color: var(--blue-primary);
}

.chapter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.chapter-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.lecture-list {
  display: grid;
  gap: 12px;
}

.lecture-item {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.lecture-item:hover {
  background: var(--surface);
  border-color: var(--blue-primary);
  transform: translateX(-4px);
  box-shadow: var(--shadow-sm);
}

.lecture-left-col {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lecture-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--blue-primary);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.lecture-item-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
}

.lecture-item-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.lecture-right-col {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* =====================================================================
   DATA TABLES (Results, Students, Payments)
   ===================================================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  text-align: right;
  font-size: 14.5px;
}

.table thead {
  background: var(--bg-subtle);
  border-bottom: 2px solid var(--border);
}

.table th {
  padding: 16px 18px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background: var(--bg-subtle);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 13px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-family: var(--font-en), var(--font-main);
  direction: ltr;
  unicode-bidi: isolate;
}


/* =====================================================================
   V3.0 — PWA INSTALL EXPERIENCE
   ===================================================================== */
html.pwa-modal-open,
html.pwa-modal-open body {
  overflow: hidden;
}

.pwa-install-modal[hidden] { display: none !important; }
.pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 10, 20, .64);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.pwa-install-card {
  position: relative;
  width: min(520px, 100%);
  background:
    radial-gradient(circle at 100% 0%, rgba(56,189,248,.16), transparent 31%),
    var(--surface);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 30px;
  padding: 28px 30px 24px;
  box-shadow: 0 32px 90px rgba(0,0,0,.34);
  animation: pwaPop .36s cubic-bezier(.2,.8,.2,1) both;
  overflow: hidden;
}
.pwa-install-card::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  left: -65px;
  bottom: -92px;
  background: rgba(2,132,199,.09);
  pointer-events: none;
}
@keyframes pwaPop {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.pwa-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.pwa-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 42px;
  margin-bottom: 18px;
}
.pwa-brand-row img {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  box-shadow: var(--shadow-md);
}
.pwa-brand-row div { display: grid; gap: 1px; }
.pwa-brand-row span {
  font-family: var(--font-en), var(--font-main);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .5px;
  color: var(--blue-primary);
}
.pwa-brand-row small { color: var(--text-muted); font-weight: 700; }
.pwa-install-card h2 {
  font-size: clamp(25px, 4vw, 32px);
  line-height: 1.35;
  margin-bottom: 10px;
  font-weight: 900;
}
.pwa-install-card > p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.9;
}
.pwa-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}
.pwa-benefits span {
  padding: 8px 11px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
}
.pwa-ios-help {
  margin: -4px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #e0f2fe;
  color: #075985;
  font-size: 13px;
  line-height: 1.8;
  border: 1px solid #bae6fd;
}
.pwa-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.pwa-install-btn { min-height: 51px; }
.pwa-privacy-note {
  display: block;
  margin-top: 12px;
  text-align: center;
  color: var(--text-light);
  font-size: 10.5px;
}

/* =====================================================================
   V3.0 — PROTECTED LESSON / YOUTUBE PLAYER SHELL
   ===================================================================== */
body.protected-lesson {
  -webkit-user-select: none;
  user-select: none;
}
.lesson-shell { max-width: 1380px; }
.lesson-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}
.lesson-back {
  display: inline-flex;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.lesson-back:hover { color: var(--blue-primary); }
.lesson-heading-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lesson-heading-row h1 {
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.35;
  font-weight: 900;
}
.lesson-kicker {
  display: inline-block;
  color: var(--blue-primary);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .2px;
  margin-bottom: 3px;
}
.lesson-progress-chip {
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
}
.lesson-progress-chip strong { color: var(--blue-primary); font-size: 18px; }
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 22px;
}
.lesson-main { min-width: 0; }
.lesson-player-card,
.lesson-parts-panel,
.lesson-extra-card,
.lesson-locked-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}
.lesson-player-card { padding: 14px; }
.lesson-player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 4px 4px 14px;
}
.lesson-player-head span:first-child {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 800;
}
.lesson-player-head h2 {
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 900;
  margin-top: 2px;
}
.lesson-protected-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  font-size: 11px;
  font-weight: 900;
}
.protected-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #02070e;
  border-radius: 19px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
}
.protected-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  z-index: 1;
}
.lesson-video-topmask {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  padding: 14px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  color: #fff;
  background: linear-gradient(180deg, rgba(1,8,17,.91), rgba(1,8,17,.48) 62%, transparent);
  pointer-events: none;
}
.lesson-video-topmask > span {
  font-family: var(--font-en), var(--font-main);
  font-size: 10px;
  color: rgba(255,255,255,.58);
  padding-top: 4px;
}
.lesson-video-brandmark {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 68%;
}
.lesson-video-brandmark img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.2);
}
.lesson-video-brandmark div { min-width: 0; display: grid; }
.lesson-video-brandmark strong {
  font-family: var(--font-en), var(--font-main);
  font-size: 11px;
  letter-spacing: .5px;
}
.lesson-video-brandmark small {
  font-size: 11px;
  color: rgba(255,255,255,.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-video-watermark[hidden] { display: none !important; }
.student-video-watermark {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  min-width: 145px;
  max-width: 230px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  color: rgba(255,255,255,.48);
  background: rgba(2,10,20,.22);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: none;
  opacity: 0;
  transition: transform 1.15s cubic-bezier(.2,.75,.2,1), opacity .2s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.student-video-watermark.is-visible { opacity: 1; }
.student-video-watermark strong,
.student-video-watermark span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.student-video-watermark strong { font-size: 11px; font-weight: 900; }
.student-video-watermark span {
  direction: ltr;
  text-align: left;
  font-family: var(--font-en), monospace;
  font-size: 10px;
  letter-spacing: .6px;
  margin-top: 1px;
}
.capture-shield-layer {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 5px;
  padding: 30px;
  color: #fff;
  background: #020b16;
  opacity: 0;
  visibility: hidden;
  transition: .12s ease;
  pointer-events: none;
}
.capture-shield-layer div { font-size: 34px; }
.capture-shield-layer strong { font-size: 19px; }
.capture-shield-layer small { color: #9db2ca; }
.protected-player.capture-shield .capture-shield-layer {
  opacity: 1;
  visibility: visible;
}
.protected-player.capture-shield iframe,
.protected-player.capture-shield .student-video-watermark { visibility: hidden; }
.lesson-player-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 5px 2px;
  color: var(--text-muted);
  font-size: 11.5px;
}
.lesson-player-note p { margin: 0; }
.lesson-primary-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 14px 4px 4px;
  border-top: 1px solid var(--border-light);
}
.lesson-primary-actions form { flex: 1 1 240px; }
.lesson-primary-actions .btn { min-height: 48px; }
.lesson-complete-btn { width: 100%; }
.lesson-quiz-btn { flex: 1 1 220px; }
.btn.disabled {
  opacity: .5;
  pointer-events: none;
  filter: grayscale(.15);
}
.lesson-no-quiz {
  flex: 1 1 220px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.lesson-nav-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding: 0 4px 4px;
}
.lesson-nav-btn {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-subtle);
}
.lesson-nav-btn:hover { border-color: var(--blue-primary); background: var(--surface-hover); }
.lesson-nav-btn.next { justify-content: flex-end; text-align: left; }
.lesson-nav-btn div { min-width: 0; display: grid; }
.lesson-nav-btn small { font-size: 9.5px; color: var(--text-muted); }
.lesson-nav-btn b { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-nav-btn > span { color: var(--blue-primary); font-weight: 900; }
.lesson-nav-btn.locked { opacity: .55; cursor: not-allowed; }
.lesson-parts-panel {
  position: sticky;
  top: 100px;
  padding: 18px;
}
.lesson-parts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.lesson-parts-head span { color: var(--text-muted); font-size: 10.5px; font-weight: 800; }
.lesson-parts-head h3 { font-size: 19px; font-weight: 900; }
.lesson-parts-head strong { color: var(--blue-primary); font-size: 20px; }
.lesson-progress { height: 7px; margin-bottom: 15px; }
.lesson-parts-list { display: grid; gap: 7px; }
.lesson-part-row {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--bg-subtle);
  transition: var(--transition);
}
.lesson-part-row:hover { border-color: var(--border); transform: translateX(-2px); }
.lesson-part-row.active {
  background: rgba(2,132,199,.08);
  border-color: rgba(2,132,199,.32);
  box-shadow: inset -3px 0 0 var(--blue-primary);
}
.lesson-part-row.done .lesson-part-index {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}
.lesson-part-row.locked { opacity: .48; cursor: not-allowed; }
.lesson-part-index {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--blue-primary);
  font-size: 12px;
  font-weight: 900;
}
.lesson-part-row div { min-width: 0; display: grid; }
.lesson-part-row b {
  font-size: 12.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lesson-part-row small { color: var(--text-muted); font-size: 9.5px; margin-top: 1px; }
.lesson-part-state { color: var(--blue-primary); font-size: 11px; }
.lesson-subject-link {
  display: block;
  text-align: center;
  margin-top: 13px;
  padding: 10px;
  color: var(--blue-primary);
  font-size: 11.5px;
  font-weight: 900;
  border-top: 1px solid var(--border-light);
}
.lesson-extra-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 15px;
  padding: 18px;
}
.lesson-extra-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 20px;
}
.lesson-extra-content h3 { font-size: 17px; margin-bottom: 4px; }
.lesson-extra-content p { color: var(--text-muted); font-size: 12.5px; margin-bottom: 10px; }
.lesson-locked-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 220px;
  padding: 32px;
}
.lesson-lock-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 27px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.lesson-locked-card h2 { font-size: 22px; }
.lesson-locked-card p { color: var(--text-muted); margin-top: 5px; }
.lesson-empty { text-align: center; padding: 50px 20px; }
.lesson-empty-icon { font-size: 46px; margin-bottom: 8px; }

@media (max-width: 1050px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-parts-panel { position: static; }
  .lesson-sidebar { order: -1; }
  .lesson-parts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .pwa-install-card { border-radius: 24px; padding: 24px 20px 20px; }
  .pwa-actions { grid-template-columns: 1fr; }
  .pwa-actions .btn { width: 100%; }
  .lesson-topbar { align-items: flex-start; flex-direction: column; }
  .lesson-progress-chip { width: 100%; }
  .lesson-player-card { padding: 8px; border-radius: 18px; }
  .lesson-player-head { padding: 4px 4px 10px; }
  .lesson-protected-badge { display: none; }
  .protected-player { border-radius: 14px; }
  .lesson-video-topmask { height: 60px; padding: 9px 10px; }
  .lesson-video-brandmark img { width: 32px; height: 32px; border-radius: 9px; }
  .lesson-video-brandmark strong { font-size: 9.5px; }
  .lesson-video-brandmark small { font-size: 9px; }
  .student-video-watermark { min-width: 118px; max-width: 165px; padding: 6px 8px; }
  .student-video-watermark strong { font-size: 9px; }
  .student-video-watermark span { font-size: 8.5px; }
  .lesson-primary-actions { display: grid; grid-template-columns: 1fr; }
  .lesson-nav-actions { grid-template-columns: 1fr; }
  .lesson-parts-list { grid-template-columns: 1fr; }
  .lesson-sidebar { order: 0; }
}

@media print {
  body.protected-lesson * { visibility: hidden !important; }
  body.protected-lesson::before {
    content: 'المحتوى التعليمي محمي وغير متاح للطباعة.';
    visibility: visible !important;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    font: 700 22px Cairo, sans-serif;
  }
}

/* =====================================================================
   V3.0 — STUDENT DASHBOARD
   ===================================================================== */
.student-dashboard { max-width: 1320px; }
.student-dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 10%, rgba(56,189,248,.15), transparent 24%),
    linear-gradient(135deg, #07162e 0%, #0b2850 62%, #0b3967 100%);
  color: #fff;
  box-shadow: 0 22px 58px rgba(3, 22, 45, .18);
  margin-bottom: 20px;
}
.student-dashboard-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent, #000 35%, #000);
  pointer-events: none;
}
.student-dashboard-welcome { position: relative; z-index: 1; max-width: 760px; }
.student-dashboard-kicker {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(56,189,248,.13);
  border: 1px solid rgba(125,211,252,.24);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 10px;
}
.student-dashboard-welcome h1 {
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.32;
  font-weight: 900;
  margin-bottom: 7px;
}
.student-dashboard-welcome > p { color: #bfd1e7; font-size: 14.5px; }
.student-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.student-meta-pills span,
.student-meta-pills button {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  color: #d8e8f8;
  padding: 8px 11px;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}
.student-meta-pills button { cursor: pointer; }
.student-meta-pills button:hover { background: rgba(255,255,255,.12); }
.student-overall-progress {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 16px;
  border-radius: 21px;
  background: rgba(4,17,33,.45);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}
.student-progress-ring {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#38bdf8 var(--progress), rgba(255,255,255,.12) 0);
  padding: 7px;
}
.student-progress-ring > div {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #091b33;
  display: grid;
  place-content: center;
  text-align: center;
}
.student-progress-ring strong { font: 900 22px var(--font-en), var(--font-main); }
.student-progress-ring small { color: #9fb8d2; font-size: 9px; }
.student-overall-progress > div:last-child { display: grid; }
.student-overall-progress > div:last-child b { font-size: 16px; }
.student-overall-progress > div:last-child span { color: #9fb8d2; font-size: 10px; }

.dashboard-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr);
  gap: 16px;
  margin-bottom: 16px;
}
.continue-learning-card {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.continue-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  box-shadow: 0 10px 28px rgba(2,132,199,.25);
  font-size: 18px;
}
.continue-copy { min-width: 0; }
.continue-copy > span { color: var(--blue-primary); font-size: 10.5px; font-weight: 900; }
.continue-copy h2 {
  font-size: clamp(17px, 2vw, 22px);
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-copy p { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-quick-links {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 8px;
  box-shadow: var(--shadow-sm);
}
.dashboard-quick-links a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 13px;
}
.dashboard-quick-links a:hover { background: var(--bg-subtle); }
.dashboard-quick-links a > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-subtle);
}
.dashboard-quick-links div { display: grid; }
.dashboard-quick-links b { font-size: 12.5px; }
.dashboard-quick-links small { font-size: 9.5px; color: var(--text-muted); }
.dashboard-quick-links i { font-style: normal; color: var(--blue-primary); }
.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.dashboard-mini-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.dashboard-mini-stats span { color: var(--text-muted); font-size: 11px; font-weight: 800; }
.dashboard-mini-stats strong { color: var(--blue-primary); font-size: 17px; font-weight: 900; }
.student-lessons-section { margin-top: 6px; }
.student-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.student-section-head span { color: var(--blue-primary); font-size: 10px; font-weight: 900; }
.student-section-head h2 { font-size: 24px; font-weight: 900; }
.student-section-head > a { color: var(--blue-primary); font-size: 11.5px; font-weight: 900; }
.student-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.student-subject-card {
  overflow: hidden;
  border-radius: 21px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.student-subject-card:hover { transform: translateY(-3px); border-color: rgba(2,132,199,.45); box-shadow: var(--shadow-md); }
.student-subject-cover {
  position: relative;
  height: 152px;
  background: linear-gradient(135deg, #07162e, #0a3667);
  overflow: hidden;
}
.student-subject-cover img { width: 100%; height: 100%; object-fit: cover; }
.student-subject-cover::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(2,8,18,.55));
}
.student-subject-cover > span {
  position: absolute;
  z-index: 2;
  left: 10px;
  bottom: 10px;
  min-width: 44px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(3,14,28,.7);
  border: 1px solid rgba(255,255,255,.18);
  font: 800 10px var(--font-en), var(--font-main);
}
.student-subject-placeholder { height: 100%; display: grid; place-items: center; font-size: 44px; }
.student-subject-body { padding: 15px; }
.student-subject-body small { color: var(--green); font-size: 9.5px; font-weight: 900; }
.student-subject-body h3 { font-size: 16px; margin: 2px 0 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-subject-body .progress { height: 6px; margin-bottom: 7px; }
.student-subject-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.student-subject-meta span { color: var(--text-muted); font-size: 9.5px; }
.student-subject-meta b { color: var(--blue-primary); font-size: 10.5px; }
.student-empty-state { text-align: center; padding: 50px 20px; }
.student-empty-state > div { font-size: 44px; }
.student-empty-state p { color: var(--text-muted); margin: 6px auto 18px; }

@media (max-width: 1050px) {
  .dashboard-focus-grid { grid-template-columns: 1fr; }
  .student-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .student-dashboard-hero { align-items: flex-start; flex-direction: column; }
  .student-overall-progress { width: 100%; justify-content: space-between; }
  .continue-learning-card { grid-template-columns: 48px 1fr; }
  .continue-learning-card > .btn { grid-column: 1 / -1; width: 100%; }
  .dashboard-mini-stats { grid-template-columns: 1fr; }
  .student-subject-grid { grid-template-columns: 1fr; }
  .student-section-head { align-items: center; }
}

/* ===== Student support + certificates V2 ===== */
.nav-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ff5a66;color:#fff;font-size:10px;font-weight:900;margin-inline-start:5px}
.support-page-head{align-items:center}.support-head-badge{min-width:105px;padding:13px 16px;border:1px solid var(--border);border-radius:16px;background:var(--surface);text-align:center}.support-head-badge strong{display:block;font-size:24px;color:var(--blue-primary)}.support-head-badge span{font-size:11px;color:var(--text-muted)}.support-workspace{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(0,1.25fr);gap:16px;align-items:stretch}.support-inbox,.support-chat{padding:0;overflow:hidden;min-height:590px}.support-inbox-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px;border-bottom:1px solid var(--border)}.support-inbox-head h3{margin:0}.support-inbox-head small{display:block;color:var(--text-muted);margin-top:3px}.support-new-box{padding:14px 16px;border-bottom:1px solid var(--border);background:var(--bg-subtle)}.support-ticket-list{max-height:520px;overflow:auto}.support-ticket{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px 14px;border-bottom:1px solid var(--border);text-decoration:none;color:var(--text);transition:.18s ease}.support-ticket:hover,.support-ticket.active{background:var(--bg-subtle)}.support-ticket.active{box-shadow:inset -3px 0 var(--blue-primary)}.support-ticket-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:rgba(8,127,195,.09)}.support-ticket-copy{min-width:0}.support-ticket-copy>div{display:flex;align-items:center;gap:6px}.support-ticket-copy b{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.support-ticket-copy p{margin:4px 0;color:var(--text-muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.support-ticket-copy small{font-size:9px;color:var(--text-muted)}.support-unread{min-width:19px;height:19px;padding:0 5px;display:inline-grid;place-items:center;border-radius:999px;background:var(--blue-primary);color:#fff;font-size:9px;font-weight:900}.support-chat{display:flex;flex-direction:column}.support-chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--border)}.support-chat-head span:first-child{color:var(--text-muted);font-size:10px}.support-chat-head h2{margin:3px 0 0;font-size:18px}.support-messages{height:440px;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:10px;background:linear-gradient(180deg,var(--bg-subtle),transparent)}.support-bubble-wrap{display:flex}.support-bubble-wrap.mine{justify-content:flex-start}.support-bubble-wrap.theirs{justify-content:flex-end}.support-bubble{max-width:78%;padding:11px 13px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--shadow-sm)}.support-bubble-wrap.mine .support-bubble{background:linear-gradient(135deg,rgba(8,127,195,.14),rgba(0,188,212,.06));border-color:rgba(8,127,195,.2)}.support-bubble-name{font-size:10px;font-weight:900;color:var(--blue-primary)}.support-bubble p{margin:5px 0;line-height:1.85;font-size:13px}.support-bubble small{color:var(--text-muted);font-size:9px}.support-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:13px;border-top:1px solid var(--border);margin-top:auto}.support-composer textarea{resize:none;min-height:50px}.support-closed-note{margin:14px;padding:13px;border-radius:12px;background:var(--bg-subtle);color:var(--text-muted);text-align:center;font-size:12px}.support-chat-empty{min-height:500px;display:grid;place-items:center;align-content:center;text-align:center;padding:28px}.support-chat-empty>div{font-size:44px}.support-chat-empty h2{margin:10px 0 6px}.support-chat-empty p{margin:0;color:var(--text-muted);max-width:430px;line-height:1.8}
.student-certificates-section,.student-results-section{margin-top:28px}.student-certificate-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.student-certificate-card{display:flex;gap:13px;align-items:flex-start;padding:16px;border:1px solid var(--border);background:var(--surface);border-radius:17px;text-decoration:none;color:var(--text);box-shadow:var(--shadow-sm);transition:.18s ease}.student-certificate-card:hover{transform:translateY(-2px);border-color:rgba(8,127,195,.28);box-shadow:var(--shadow)}.student-cert-icon{width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto;border-radius:14px;background:rgba(247,181,0,.12);font-size:23px}.student-certificate-card small{color:var(--text-muted);font-size:10px}.student-certificate-card h3{margin:3px 0 5px;font-size:15px}.student-certificate-card p{margin:0 0 8px;color:var(--text-muted);font-size:11px;line-height:1.6}.student-certificate-card span{color:var(--blue-primary);font-size:11px;font-weight:900}.certificate-toolbar{display:flex;justify-content:center;gap:8px;margin:18px auto}.manual-certificate h2{max-width:760px;margin:14px auto;font-size:20px;line-height:1.7}.certificate-revoked{margin:20px auto 0;max-width:560px;padding:12px;border:2px solid #d94a54;color:#d94a54;font-weight:900;border-radius:10px}.manual-certificate.revoked{filter:grayscale(.35);opacity:.75}
@media(max-width:900px){.support-workspace{grid-template-columns:1fr}.support-inbox,.support-chat{min-height:auto}.support-ticket-list{max-height:360px}.support-messages{height:430px}.support-composer{grid-template-columns:1fr}.student-certificate-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.student-certificate-grid{grid-template-columns:1fr}.support-ticket{grid-template-columns:34px minmax(0,1fr)}.support-ticket>.badge{grid-column:2;justify-self:start}.support-bubble{max-width:90%}}
@media print{
  .print-hide,.topbar,.admin-topbar,.footer,.wa-float,.pwa-install-modal{display:none!important}
  body{background:#fff!important}
  .certificate{box-shadow:none!important;margin:0 auto!important;max-width:100%!important;min-height:0!important}
}
