:root {
  --ink: #010207;
  --midnight: #02050E;
  --navy: #060B1F;
  --royal: #0D1E3D;
  --deep: #15264E;
  --cobalt: #1E3A8A;
  --azure: #3B82F6;
  --electric: #60A5FA;
  --gold: #FFFFFF;
  --goldlight: #FFFFFF;
  --cream: #F5F1E8;
  --paper: #FAFAF7;
  --bone: #EDE9DF;
  --mute: #94A3B8;
  --mute2: #64748B;
  --white: #FFFFFF;
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);
  --line-white: rgba(255,255,255,0.18);
}
* { -webkit-tap-highlight-color: transparent; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
body {
  font-family: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  background: var(--midnight);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

/* ============ Persistent page video background ============ */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--midnight);
}
.page-bg video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}
.page-bg-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(2,5,14,0.30) 0%, rgba(2,5,14,0.55) 60%, rgba(2,5,14,0.70) 100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .page-bg video { display: none; }
  .page-bg { background: var(--midnight); }
}

/* ============ Mini-tiles — fully opaque, palette: white + dark blue (primary), black + fade grey (secondary) ============ */
.tile {
  position: relative;
  border-radius: 28px;
  background: #060B1F;
  box-shadow: 0 22px 60px -28px rgba(0,0,0,0.6);
  overflow: hidden;
  isolation: isolate;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  transition:
    transform .55s cubic-bezier(.2,.7,.2,1),
    box-shadow .55s cubic-bezier(.2,.7,.2,1),
    background-color .35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover {
    transform: translateY(-5px);
    box-shadow:
      0 34px 70px -28px rgba(0,0,0,0.75),
      0 0 0 1px rgba(255,255,255,0.10) inset,
      0 0 36px -10px rgba(96,165,250,0.20);
  }
  .tile.light:hover {
    transform: translateY(-5px);
    box-shadow:
      0 34px 70px -28px rgba(0,0,0,0.35),
      0 0 0 1px rgba(0,0,0,0.06) inset,
      0 0 36px -10px rgba(20,40,80,0.18);
  }
}
/* Touch tap feedback — short, snappy, no sticky-hover */
.tile:active {
  transform: translateY(-1px) scale(0.995);
  transition:
    transform .18s cubic-bezier(.2,.7,.2,1),
    box-shadow .18s ease;
  box-shadow:
    0 18px 50px -24px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.08) inset;
}
.tile.light:active {
  box-shadow:
    0 18px 50px -24px rgba(0,0,0,0.30),
    0 0 0 1px rgba(0,0,0,0.05) inset;
}
@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover, .tile:active { transform: none; }
}
/* Dark tile palette: WHITE primary, faded white/grey secondary */
.tile h1, .tile h2, .tile h3, .tile h4, .tile .stat-num, .tile strong { color: #FFFFFF; }
.tile p, .tile li, .tile span { color: rgba(255,255,255,0.85); }
.tile .text-mute, .tile [class*="text-mute"] { color: rgba(255,255,255,0.55); }

/* Light tile — fully opaque white */
.tile.light {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 0 22px 60px -30px rgba(0,0,0,0.30);
}
/* Light tile palette: DARK BLUE for primary (headings, stat numbers, key emphasis),
   BLACK for body, FADED GREY for secondary/labels */
.tile.light h1,
.tile.light h2,
.tile.light h3,
.tile.light h4,
.tile.light .stat-num,
.tile.light strong { color: var(--midnight); }

.tile.light p,
.tile.light li,
.tile.light p span,
.tile.light li span,
.tile.light .stat-num,
.tile.light .stat-num span { color: #000000; }
.tile.light .text-white,
.tile.light .text-cream { color: #000000 !important; }
.tile.light [class*="text-white/"],
.tile.light [class*="text-cream/"] { color: rgba(0,0,0,0.78) !important; }

/* Secondary / muted / labels — faded grey */
.tile.light .text-mute,
.tile.light [class*="text-mute"] { color: rgba(0,0,0,0.55) !important; }
.tile.light .section-no { color: rgba(0,0,0,0.55); }
.tile.light .section-no::before { background: rgba(0,0,0,0.55); }
.tile.light .field-label { color: rgba(0,0,0,0.55); }

/* Gold accents — flatten to dark blue on light tiles */
.tile.light .gold-mark { background: none; -webkit-text-fill-color: var(--midnight); color: var(--midnight) !important; }
.tile.light .gold-line { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.45), transparent); }
.tile.light .gold-bullet { background: var(--midnight); }

/* Form fields on light tile */
.tile.light .field { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); color: #000000; }

/* Buttons on light tile — solid dark blue */
.tile.light .btn-white { background: var(--midnight); color: #FFFFFF !important; }
.tile.light .btn-outline { color: var(--midnight) !important; border-color: rgba(0,0,0,0.22); }
.tile.light .btn-outline:hover { background: rgba(0,0,0,0.05); }

/* Pill on light tile */
.tile.light .pill { background: rgba(0,0,0,0.04); border: 0; color: rgba(0,0,0,0.7) !important; }
.tile.light .pill .dot { background: var(--midnight); }

/* Misc */
.tile.light .font-arabic { color: var(--midnight); }
.tile.light .acc-icon { color: rgba(0,0,0,0.4) !important; }
.tile.light details[open] summary .acc-icon { color: var(--midnight) !important; }
.tile.light hr,
.tile.light .border-t { border-top-color: rgba(0,0,0,0.08) !important; }

/* Light tile, "all dark blue" variant — overrides text color to navy throughout */
.tile.light.t-blue,
.tile.light.t-blue p,
.tile.light.t-blue li,
.tile.light.t-blue p span,
.tile.light.t-blue li span,
.tile.light.t-blue h1,
.tile.light.t-blue h2,
.tile.light.t-blue h3,
.tile.light.t-blue h4,
.tile.light.t-blue .stat-num,
.tile.light.t-blue strong,
.tile.light.t-blue .font-arabic,
.tile.light.t-blue .gold-mark,
.tile.light.t-blue [class*="text-ink"],
.tile.light.t-blue [class*="text-white"],
.tile.light.t-blue [class*="text-cream"] { color: #0A1530 !important; -webkit-text-fill-color: #0A1530 !important; }
.tile.light.t-blue [class*="text-ink/5"],
.tile.light.t-blue [class*="text-ink/4"],
.tile.light.t-blue [class*="text-mute"] { color: rgba(10,21,48,0.6) !important; }
.tile.light.t-blue .hairline,
.tile.light.t-blue [class*="bg-ink/"] { background: rgba(10,21,48,0.25) !important; }

/* Tile size variants */
.tile.t-h     { /* horizontal: wide, padded slightly less in vertical */ padding-top: clamp(1rem, 2vw, 1.5rem); padding-bottom: clamp(1rem, 2vw, 1.5rem); }
.tile.t-line  { /* very thin horizontal */ padding-top: .75rem; padding-bottom: .75rem; border-radius: 999px; }
.tile.t-half  { /* shorter horizontal */ }
.tile.t-stat  { /* small stat block */ padding: clamp(1rem, 2vw, 1.5rem); border-radius: 22px; }

/* Section reset for sections that are now containers of tiles, not tablets themselves */
section.no-tablet {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  margin: clamp(.75rem, 1.5vw, 1.5rem) auto !important;
  max-width: min(1280px, calc(100vw - clamp(2rem, 5vw, 4rem))) !important;
}

/* ============ Tablet sections ============
   Each tablet is sized to its content type — narrow for prose, mid for
   tables/grids, wide for cinematic blocks like the hero. Generous side
   margin so the persistent video shows on both sides and between blocks. */
section.tablet,
footer.tablet,
.zaman-footer {
  position: relative;
  margin: clamp(1rem, 2.2vw, 2.25rem) auto;
  max-width: min(1180px, calc(100vw - clamp(2.5rem, 9vw, 8rem)));
  border-radius: 32px;
  overflow: hidden;
  background: #060B1F;
  box-shadow: 0 22px 60px -28px rgba(0,0,0,0.6);
  isolation: isolate;
}
section.tablet.section-light {
  background: #FFFFFF;
  box-shadow: 0 22px 60px -30px rgba(0,0,0,0.30);
}

/* Width variants — applied per-section to match content shape */
section.tablet.t-narrow {
  max-width: min(760px, calc(100vw - clamp(2.5rem, 9vw, 8rem)));
}
section.tablet.t-mid {
  max-width: min(960px, calc(100vw - clamp(2.5rem, 9vw, 8rem)));
}
section.tablet.t-wide {
  max-width: min(1280px, calc(100vw - clamp(2rem, 6vw, 5rem)));
}
section.tablet.t-bleed {
  /* nearly full-bleed for cinematic strips like certificates marquee */
  max-width: min(1480px, calc(100vw - clamp(1.5rem, 4vw, 3rem)));
}

/* Hero tablet sits at the top with a snug margin */
section.tablet#top {
  margin-top: clamp(80px, 10vw, 110px);
  max-width: min(1480px, calc(100vw - clamp(1.5rem, 4vw, 3rem)));
}

/* Page-end footer: full-bleed, no side margins, fully opaque */
footer.page-end,
.zaman-footer {
  position: relative;
  margin: 0;
  max-width: 100%;
  border-radius: 0;
  background: #060B1F;
  border: 0;
}
.zaman-footer::before { display: none; }
footer.page-end { box-shadow: 0 -20px 50px -20px rgba(0,0,0,0.4); }

/* When a tablet is light, all its decorative aura/star overlays disappear or get muted */
section.tablet .stars { display: none; }
section.tablet .aura { opacity: 0.25; }
.font-display { font-family: 'Inter', sans-serif; letter-spacing: -0.035em; font-weight: 600; }
.font-arabic { font-family: 'Amiri', serif; direction: rtl; }
.font-mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: "tnum"; }
.font-inter { font-family: 'Inter', sans-serif; }

/* No italics anywhere */
*, .italic, em, i, blockquote { font-style: normal !important; }

.stars {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 28% 62%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 54% 32%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 73% 78%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 88% 12%, rgba(96,165,250,0.55), transparent),
    radial-gradient(1px 1px at 41% 88%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 8% 78%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 64% 9%, rgba(186,230,253,0.4), transparent);
  background-size: 100% 100%;
}

.aura {
  position: absolute;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
  border-radius: 999px;
  contain: layout paint;
}
/* Apple-style glass — light grey frosted fade (no borders on bars/tabs) */
.glass {
  background: rgba(235, 238, 243, 0.10);
  backdrop-filter: saturate(150%) blur(30px) brightness(1.1);
  -webkit-backdrop-filter: saturate(150%) blur(30px) brightness(1.1);
  border: 0;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 18px 40px -22px rgba(0,0,0,0.35);
}
.glass-strong {
  background: rgba(235, 238, 243, 0.20);
  backdrop-filter: saturate(160%) blur(34px) brightness(1.1);
  -webkit-backdrop-filter: saturate(160%) blur(34px) brightness(1.1);
  border: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset;
}

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 0;
  background: rgba(235, 238, 243, 0.10);
  backdrop-filter: saturate(150%) blur(30px) brightness(1.1);
  -webkit-backdrop-filter: saturate(150%) blur(30px) brightness(1.1);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 18px 40px -22px rgba(0,0,0,0.35);
  font-size: .78rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,0.92);
  text-transform: uppercase;
  font-weight: 500;
}
.pill .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 0 4px rgba(255,255,255,0.18), 0 0 16px rgba(255,255,255,0.6); }

.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .95rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: .92rem;
  letter-spacing: -0.005em;
  transition: transform .25s ease, background .25s, color .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #4e7dd6 0%, #2a55b8 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 12px 30px -10px rgba(30,58,138,0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 22px 50px -16px rgba(30,58,138,0.85); }
.btn-white {
  background: linear-gradient(180deg, #FFFFFF 0%, #1E3A8A 100%);
  color: #1a1208;
  box-shadow: 0 1px 0 rgba(255,255,255,0.45) inset, 0 12px 28px -10px rgba(255,255,255,0.55);
  font-weight: 600;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 22px 50px -14px rgba(255,255,255,0.75); }
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--cream);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline:hover { background: rgba(255,255,255,0.06); }

.card {
  position: relative;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #142850 0%, #0A1530 100%);
  border-radius: 22px;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease, border-color .35s, background .35s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 0% 0%, rgba(96,165,250,0.10), transparent 60%);
  pointer-events: none;
  opacity: 0; transition: opacity .45s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(96,165,250,0.4);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6), 0 0 0 1px rgba(96,165,250,0.18), 0 0 30px -8px rgba(255,255,255,0.12);
}
.card:hover::before { opacity: 1; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

.section-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.section-no::before { content: ""; display: inline-block; width: 24px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 12px; transform: translateY(-2px); }

details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
.acc-icon { transition: transform .35s, color .35s; }
details[open] summary .acc-icon { transform: rotate(45deg); color: var(--gold); }

.link-underline {
  background: linear-gradient(currentColor, currentColor) bottom left / 0 1px no-repeat;
  transition: background-size .4s cubic-bezier(.2,.7,.2,1);
}
.link-underline:hover { background-size: 100% 1px; }

.gold-mark {
  background: linear-gradient(90deg, var(--goldlight), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gold-line {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  height: 1px;
  width: 64px;
  margin: 16px 0;
}
.gold-bullet { width: 4px; height: 4px; border-radius: 999px; background: var(--gold); display: inline-block; vertical-align: middle; margin-right: 10px; box-shadow: 0 0 8px rgba(255,255,255,0.5); }

.nav-link { position: relative; color: rgba(255,255,255,0.85); transition: color .25s; font-weight: 500; }
.nav-link:hover { color: var(--white); }
.nav-link.active { color: var(--white); }

/* Header CTA — text-only, blends with the bar */
.header-cta {
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  letter-spacing: -0.005em;
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: color .2s, background .2s;
  text-decoration: none;
}
.header-cta:hover { color: #FFFFFF; background: rgba(255,255,255,0.06); }

/* ============ Header inversion when over a light section ============ */
header.on-light .hbar {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: saturate(160%) blur(34px);
  -webkit-backdrop-filter: saturate(160%) blur(34px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04) inset, 0 18px 40px -22px rgba(0,0,0,0.18);
}
header.on-light .nav-link { color: rgba(2,5,14,0.78); }
header.on-light .nav-link:hover,
header.on-light .nav-link.active { color: #02050E; }
header.on-light .font-display,
header.on-light .font-arabic { color: #02050E !important; }
header.on-light #lang-label,
header.on-light #lang-btn { color: rgba(2,5,14,0.85); }
header.on-light #lang-btn:hover { color: #02050E; }
header.on-light .header-cta { color: rgba(2,5,14,0.85); }
header.on-light .header-cta:hover { color: #02050E; background: rgba(2,5,14,0.05); }
header.on-light [aria-label="Qo'ng'iroq qilish: +998 90 041 00 42"],
header.on-light a[href^="tel:"] { color: #02050E !important; }
header.on-light a[href^="tel:"]:hover { background: rgba(2,5,14,0.05); }
header.on-light #mob-toggle { color: #02050E; }
header.on-light #mob-toggle:hover { background: rgba(2,5,14,0.05); }
/* Logo wordmark + image on light header */
header.on-light a[aria-label="Zaman Akademiyasi"] .font-display,
header.on-light a[href="index.html"] .font-display { color: #02050E !important; }
/* Logo image inversion — invert the white-bg navy mark so it sits cleanly on light bar */
header.on-light a[aria-label="Zaman Akademiyasi"] img,
header.on-light a[href="index.html"] img { filter: invert(0.05); }

/* Apple-style header fade — smooth transitions on scroll + edge mask */
header#topbar { transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .45s ease; }
.hbar {
  transition: background .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s, border-color .5s;
}
header.shrunk .hbar {
  background: rgba(235, 238, 243, 0.22);
  backdrop-filter: saturate(160%) blur(20px) brightness(1.1);
  -webkit-backdrop-filter: saturate(160%) blur(20px) brightness(1.1);
  border: 0;
  box-shadow: 0 18px 50px -16px rgba(0,0,0,0.35);
}

.lang-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 130px;
  background: rgba(10, 21, 48, 0.96);
  backdrop-filter: blur(20px);
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  transform-origin: top right;
  transform: scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s, opacity .2s;
  z-index: 60;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.55);
}
.lang-pop.open { transform: scale(1); opacity: 1; pointer-events: auto; }
.lang-pop button { width: 100%; text-align: left; padding: 10px 14px; font-size: .85rem; color: var(--cream); transition: background .2s; display: flex; align-items: center; gap: 10px; }
.lang-pop button:hover { background: rgba(255,255,255,0.06); }
.lang-pop button.active { color: var(--gold); }

.mob-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;
  width: 320px; max-width: 86vw;
  background: linear-gradient(180deg, #0F1E3A 0%, #050D1F 100%);
  border: 0;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
  z-index: 80;
  padding: 88px 28px 28px;
  overflow-y: auto;
  box-shadow: -20px 0 40px -10px rgba(0,0,0,0.6);
}
.mob-drawer.open { transform: translateX(0); }
.mob-back {
  position: fixed; inset: 0;
  background: rgba(2,6,23,0.7);
  z-index: 70;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.mob-back.open { opacity: 1; pointer-events: auto; }

.field {
  width: 100%;
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  font-size: .95rem;
  transition: border-color .25s, background .25s, box-shadow .25s;
  font-family: inherit;
}
.field::placeholder { color: rgba(148,163,184,0.7); }
.field:focus { outline: none; border-color: var(--azure); background: rgba(255,255,255,0.06); box-shadow: 0 0 0 4px rgba(59,130,246,0.15); }
.field-label { display: block; font-family: 'JetBrains Mono', monospace; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; font-weight: 500; }

select.field {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
select.field option { background: #0a1530; color: var(--cream); }

.modal-overlay {
  position: fixed; inset: 0;
  z-index: 90;
  display: none;
  align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(12px);
}
.modal-overlay.open { display: flex; }
.modal-panel {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, #0F1E3A 0%, #050D1F 100%);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.07);
  max-height: 92vh; overflow-y: auto;
}

.toast {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 200;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #142850 0%, #0a1530 100%);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  color: var(--cream);
  font-size: .9rem;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.8);
  transform: translateX(420px);
  transition: transform .45s, opacity .35s;
  opacity: 0;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.error { border-left-color: #f87171; }
.toast.success { border-left-color: #34d399; }

.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(2,6,23,0.93);
  backdrop-filter: blur(14px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lb-overlay.open { display: flex; }
.lb-img { max-width: 92vw; max-height: 82vh; border-radius: 12px; box-shadow: 0 50px 100px -20px rgba(0,0,0,0.9); }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .25s, transform .25s;
}
.lb-btn:hover { background: rgba(255,255,255,0.16); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
.lb-close { top: 24px; right: 24px; }
.lb-caption {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: var(--mute);
  font-size: .85rem;
  letter-spacing: .04em;
  text-align: center;
  padding: 8px 16px;
  background: rgba(0,0,0,0.4);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.gallery-tile {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #0a1530;
  border: 1px solid var(--line);
  transition: transform .55s, border-color .35s, box-shadow .35s;
  cursor: zoom-in;
}
.gallery-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s, filter .5s;
  filter: saturate(0.9);
}
.gallery-tile:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.4); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.gallery-tile:hover img { transform: scale(1.04); filter: saturate(1.1); }
.gallery-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(2,6,23,0.5) 100%);
  pointer-events: none;
}

::selection { background: var(--gold); color: #1a1208; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #050D1F; }
::-webkit-scrollbar-thumb { background: #1E2D5A; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #2E4D8A; }

.tabular { font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

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

/* footer */
.zaman-footer { position: relative; padding-top: 5rem; padding-bottom: 2.5rem; overflow: hidden; }
.zaman-footer::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, var(--ink) 100%); z-index: -1; }

/* ============ iOS-style zoom lens for certificates ============ */
.cert-card { cursor: none; }
.zoom-lens {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 70;
  opacity: 0;
  transition: opacity .25s ease;
  border: 1.5px solid rgba(148,163,184,0.45);
  box-shadow:
    0 14px 40px -8px rgba(0,0,0,0.65),
    0 0 0 6px rgba(148,163,184,0.08),
    inset 0 0 18px rgba(0,0,0,0.35);
  overflow: hidden;
  transform: translate(-50%, -50%) scale(0.9);
  will-change: transform, opacity, left, top;
}
.zoom-lens.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.zoom-lens::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 24px rgba(255,255,255,0.04);
  pointer-events: none;
}

/* ============ White contrast surfaces ============ */
.paper-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 24px;
  border: 1px solid var(--bone);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.15);
}
.paper-card h1, .paper-card h2, .paper-card h3 { color: var(--ink); }
.paper-card p { color: rgba(2,5,14,0.7); }
.invert-strip {
  background: var(--paper);
  color: var(--ink);
  position: relative;
}
.invert-strip h2, .invert-strip h3, .invert-strip h1 { color: var(--ink); }
.invert-strip .text-cream { color: var(--ink) !important; }
.invert-strip .text-cream\/65, .invert-strip .text-cream\/70, .invert-strip .text-cream\/75 { color: rgba(2,5,14,0.65) !important; }

/* ============ ALTERNATING SECTION COLORS ============
   Apply .section-light to flip a section to white-bg + ink-text.
   Foundation: WHITE + DARK BLUE. Secondary: BLACK + faded grey.
   Default sections stay dark-bg + cream/white text.
*/
.section-light {
  background: #FFFFFF;
  color: var(--ink);
}

/* All text under a light section — primary headings get ink */
.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4,
.section-light h5,
.section-light h6,
.section-light strong,
.section-light b { color: var(--ink) !important; }

/* Direct utility classes that were white/cream — now dark blue */
.section-light .text-white,
.section-light .text-cream { color: var(--ink) !important; }

/* Opacity-suffixed Tailwind classes (text-white/65, text-cream/70 etc.)
   Match both the escaped CSS form and the raw attribute form for robustness. */
.section-light .text-white\/30,
.section-light .text-white\/40,
.section-light .text-white\/50,
.section-light .text-white\/55,
.section-light .text-white\/60,
.section-light .text-white\/65,
.section-light .text-white\/70,
.section-light .text-white\/75,
.section-light .text-white\/80,
.section-light .text-white\/85,
.section-light .text-white\/90,
.section-light .text-cream\/12,
.section-light .text-cream\/15,
.section-light .text-cream\/20,
.section-light .text-cream\/25,
.section-light .text-cream\/30,
.section-light .text-cream\/40,
.section-light .text-cream\/50,
.section-light .text-cream\/60,
.section-light .text-cream\/65,
.section-light .text-cream\/70,
.section-light .text-cream\/75,
.section-light .text-cream\/80,
.section-light .text-cream\/85,
.section-light .text-cream\/90,
.section-light [class*="text-white/"],
.section-light [class*="text-cream/"] {
  color: rgba(0,0,0,0.65) !important;
}

/* Lower-opacity (looked like /15-/30 on dark) → softer grey on light */
.section-light .text-white\/12,
.section-light .text-white\/15,
.section-light .text-white\/20,
.section-light .text-white\/25,
.section-light .text-white\/30,
.section-light .text-cream\/12,
.section-light .text-cream\/15,
.section-light .text-cream\/20,
.section-light .text-cream\/25 {
  color: rgba(0,0,0,0.30) !important;
}

/* Mute (secondary muted) → black at 50% on light */
.section-light .text-mute,
.section-light .text-mute2,
.section-light [class*="text-mute"] {
  color: rgba(0,0,0,0.55) !important;
}
.section-light .text-mute\/50,
.section-light .text-mute\/60,
.section-light .text-mute\/70,
.section-light .text-mute\/80 { color: rgba(0,0,0,0.45) !important; }

/* Section number label & section-no underline */
.section-light .section-no { color: var(--ink); opacity: 0.7; }
.section-light .section-no::before { background: var(--ink); }

/* gold-mark gradient — flatten to ink on light */
.section-light .gold-mark {
  background: none;
  -webkit-text-fill-color: var(--ink);
  color: var(--ink) !important;
}
.section-light .gold-line {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.45), transparent);
}
.section-light .gold-bullet {
  background: var(--ink);
  box-shadow: 0 0 6px rgba(0,0,0,0.18);
}

/* Cards on light sections */
.section-light .card {
  background: #FAFAFA;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 14px 40px -28px rgba(0,0,0,0.18);
}
.section-light .card::before { background: radial-gradient(120% 80% at 0% 0%, rgba(0,0,0,0.04), transparent 60%); }
.section-light .card:hover {
  border-color: rgba(0,0,0,0.18);
  box-shadow: 0 24px 50px -30px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.08);
}
.section-light .card * { color: inherit; }
.section-light .card h1,
.section-light .card h2,
.section-light .card h3,
.section-light .card h4,
.section-light .card .font-display { color: var(--ink) !important; }
.section-light .card p { color: rgba(0,0,0,0.65); }

/* Special override for the dark-themed individual course card (the navy-bg premium) */
.section-light .card[style*="linear-gradient"] {
  /* The premium course card was navy-on-navy by inline style. Keep its dark look on light bg. */
  color: #FFFFFF;
}
.section-light .card[style*="linear-gradient"] h1,
.section-light .card[style*="linear-gradient"] h2,
.section-light .card[style*="linear-gradient"] h3,
.section-light .card[style*="linear-gradient"] h4 { color: #FFFFFF !important; }
.section-light .card[style*="linear-gradient"] p,
.section-light .card[style*="linear-gradient"] li { color: rgba(255,255,255,0.75) !important; }
.section-light .card[style*="linear-gradient"] .font-arabic { color: #FFFFFF !important; }

/* Buttons */
.section-light .btn-white {
  background: var(--ink);
  color: #FFFFFF !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 14px 30px -10px rgba(2,5,14,0.45);
}
.section-light .btn-white:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 22px 45px -10px rgba(2,5,14,0.55); }
.section-light .btn-outline {
  color: var(--ink) !important;
  border-color: rgba(0,0,0,0.22);
}
.section-light .btn-outline:hover { background: rgba(0,0,0,0.05); }
.section-light .btn-ghost {
  color: var(--ink) !important;
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
}
.section-light .btn-ghost:hover { background: rgba(0,0,0,0.08); }

/* Pill on light */
.section-light .pill {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.7) !important;
}
.section-light .pill .dot { background: var(--ink); box-shadow: 0 0 0 4px rgba(0,0,0,0.08); }

/* Form fields on light */
.section-light .field {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.12);
  color: var(--ink);
}
.section-light .field::placeholder { color: rgba(0,0,0,0.35); }
.section-light .field:focus {
  border-color: var(--ink);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.08);
}
.section-light .field-label { color: rgba(0,0,0,0.55); }

/* Stat numbers on light */
.section-light .stat-num { color: var(--ink); }

/* Borders & dividers — Tailwind opacity-suffixed border-white/N */
.section-light .border-white\/5,
.section-light .border-white\/8,
.section-light .border-white\/10,
.section-light .border-white\/12,
.section-light .border-white\/15,
.section-light .border-white\/20,
.section-light .border-white\/25,
.section-light [class*="border-white/"] {
  border-color: rgba(0,0,0,0.1) !important;
}
.section-light .divide-white\/8 > *,
.section-light .divide-white\/10 > *,
.section-light .divide-white\/15 > *,
.section-light [class*="divide-white/"] > * {
  border-color: rgba(0,0,0,0.1) !important;
}
.section-light .divide-y > * + * { border-top-color: rgba(0,0,0,0.1) !important; }

/* Accordion icon */
.section-light .acc-icon { color: rgba(0,0,0,0.4) !important; }
.section-light details[open] summary .acc-icon { color: var(--ink) !important; }
.section-light .acc-line {
  background: linear-gradient(90deg, var(--ink), transparent);
}

/* Auras tinted for light */
.section-light .aura { opacity: 0.20; mix-blend-mode: multiply; }

/* Stars decoration — hide on light to keep clean */
.section-light .stars { display: none; }

/* Hairline / decorative lines */
.section-light .hairline { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.18), transparent); }

/* Gallery / cert cards on light */
.section-light .gallery-tile { background: #f4f4f4; border-color: rgba(0,0,0,0.08); }
.section-light .gallery-tile::after { background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.25) 100%); }
.section-light .cert-card { background: #f0f0f0; border-color: rgba(0,0,0,0.08); }

/* Pricing glass on light */
.section-light .glass-strong {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04) inset;
  color: var(--ink);
}
.section-light .glass-strong .text-cream,
.section-light .glass-strong [class*="text-cream"],
.section-light .glass-strong [class*="text-white"] { color: var(--ink) !important; }
.section-light .glass {
  background: rgba(255,255,255,0.65);
  border-color: rgba(0,0,0,0.1);
}

/* Arabic mark color on light */
.section-light .font-arabic { color: var(--ink); }

/* The bright/zero opacity text accents (e.g. divider chars) */
.section-light .text-white\/30,
.section-light .text-white\/40,
.section-light .text-white\/50 { color: rgba(0,0,0,0.4) !important; }

/* Background utility classes that were dark or gold */
.section-light .bg-white\/4,
.section-light .bg-white\/5,
.section-light .bg-white\/6,
.section-light .bg-white\/8,
.section-light .bg-white\/10,
.section-light .bg-white\/15,
.section-light [class*="bg-white/"] {
  background-color: rgba(0,0,0,0.04) !important;
}

/* Nav link in active state on light */
.section-light .nav-link { color: rgba(0,0,0,0.7); }
.section-light .nav-link:hover { color: var(--ink); }
.section-light .nav-link.active { color: var(--ink); }

/* Marquee text on light */
.section-light .marquee .font-arabic { color: rgba(0,0,0,0.12) !important; }
.section-light .marquee .font-display { color: rgba(0,0,0,0.18) !important; }

/* Lead form card in light section — keep readable */
.section-light form.card { background: #FAFAFA; }

/* Anything left as plain Tailwind color name */
.section-light .text-ink { color: var(--ink) !important; }

/* ============ Floating chips ============ */
.floating-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .01em;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.25);
  z-index: 5;
  animation: floaty 6s ease-in-out infinite;
}
.floating-chip.dark {
  background: rgba(10, 21, 48, 0.85);
  color: var(--cream);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(20px);
}
.floating-chip.gold {
  background: linear-gradient(180deg, #FFFFFF 0%, #1E3A8A 100%);
  color: #1a1208;
  box-shadow: 0 14px 30px -10px rgba(255,255,255,0.55);
}
.floating-chip .fc-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: #16A34A;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.18);
}
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.floating-chip.delay-1 { animation-delay: -2s; }
.floating-chip.delay-2 { animation-delay: -4s; }

/* ============ iOS-style persistent call button ============ */
.sticky-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 55;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  /* iOS system green (light mode) with a soft top-to-bottom gradient
     mimicking the subtle highlight used by Apple's Phone app button. */
  background: radial-gradient(120% 100% at 50% 0%, #4ADE6F 0%, #34C759 55%, #2BB54E 100%);
  color: #FFFFFF;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.45) inset,
    0 -1px 0 rgba(0,0,0,0.10) inset,
    0 8px 16px -6px rgba(52, 199, 89, 0.45),
    0 4px 10px -2px rgba(0, 0, 0, 0.20);
  transition: transform .18s ease, box-shadow .25s, filter .2s;
  cursor: pointer;
  border: 0;
  opacity: 1;
  pointer-events: auto;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.sticky-chat.show { opacity: 1; }
.sticky-chat:active { transform: scale(0.94); filter: brightness(0.95); }
.sticky-chat:hover { transform: scale(1.03); }
.sticky-chat svg { width: 26px; height: 26px; }
/* Hide auxiliary text/pulse-dot — icon-only on the round button */
.sticky-chat .pulse,
.sticky-chat > span:not(.pulse) { display: none; }

/* Sound toggle — sits directly above the call button, matching size */
.sound-toggle {
  position: fixed;
  right: 22px;
  bottom: 90px; /* call button is 22px + 58px height + 10px gap */
  z-index: 56;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(10, 21, 48, 0.65);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.5);
  transition: transform .18s ease, background .25s, color .25s, border-color .25s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sound-toggle:hover { transform: scale(1.05); color: #fff; border-color: rgba(255,255,255,0.32); }
.sound-toggle:active { transform: scale(0.94); }
.sound-toggle.on { background: rgba(255,255,255,0.95); color: #0A1530; border-color: transparent; }
.sound-toggle svg { width: 26px; height: 26px; }

/* ============ Scroll-driven (godly-style) animations ============ */
.scroll-fade {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.1s cubic-bezier(.16,.84,.32,1), transform 1.1s cubic-bezier(.16,.84,.32,1);
  will-change: opacity, transform;
}
.scroll-fade.in { opacity: 1; transform: none; }

.scroll-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.2s cubic-bezier(.16,.84,.32,1), transform 1.2s cubic-bezier(.16,.84,.32,1);
}
.scroll-scale.in { opacity: 1; transform: scale(1); }

.scroll-stagger > * {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.16,.84,.32,1), transform .9s cubic-bezier(.16,.84,.32,1);
}
.scroll-stagger.in > *:nth-child(1) { transition-delay: 0s; }
.scroll-stagger.in > *:nth-child(2) { transition-delay: .07s; }
.scroll-stagger.in > *:nth-child(3) { transition-delay: .14s; }
.scroll-stagger.in > *:nth-child(4) { transition-delay: .21s; }
.scroll-stagger.in > *:nth-child(5) { transition-delay: .28s; }
.scroll-stagger.in > *:nth-child(6) { transition-delay: .35s; }
.scroll-stagger.in > *:nth-child(7) { transition-delay: .42s; }
.scroll-stagger.in > *:nth-child(8) { transition-delay: .49s; }
.scroll-stagger.in > * { opacity: 1; transform: none; }

.scroll-mask {
  --p: 0;
  background-clip: text;
  -webkit-background-clip: text;
  background-image: linear-gradient(90deg, var(--cream) 0%, var(--cream) calc(var(--p) * 1%), rgba(245,241,232,0.18) calc(var(--p) * 1%));
  color: transparent;
}

.parallax-slow { transform: translate3d(0, var(--py, 0), 0); will-change: transform; }
.parallax-fast { transform: translate3d(0, var(--py, 0), 0); will-change: transform; }

/* Magnetic CTA effect */
.magnetic {
  display: inline-block;
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

/* Curtain reveal */
.curtain {
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.curtain > * {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.7,0,.15,1);
}
.curtain.in > * { transform: translateY(0); }

/* Number scramble */
.scramble { font-variant-numeric: tabular-nums; }

/* Hero perfect viewport */
.hero-fit { min-height: 100svh; min-height: 100vh; }

/* Light progress bar at top */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--goldlight));
  width: 0%;
  z-index: 100;
  transition: width .1s linear;
  box-shadow: 0 0 12px rgba(255,255,255,0.55);
}

/* Section transitions */
.section-pad { padding-top: clamp(4rem, 8vw, 8rem); padding-bottom: clamp(4rem, 8vw, 8rem); }

/* Slim divider */
.hairline {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
