/* ═══════════════════════════════════════════════════════════════════════
   کلاس فا — v2 (Polished · Pro · Animated · RTL)
   Built on top of v1 — variables, structure, and intent preserved.
   What's new: 3D card depth, gradient text shimmer, aurora hero, conic
   ring animation, staggered reveal grid, shimmer skeleton, focus-visible,
   reduced-motion, CSS view-transitions, micro-interactions on every state.
   ═══════════════════════════════════════════════════════════════════════ */

@layer reset, tokens, base, layout, components, motion, utilities;

/* ═══════════════ TOKENS ═══════════════ */
@layer tokens {
  :root {
    /* palette */
    --navy-950: #03080f;
    --navy-900: #050d1a;
    --navy-800: #0a1628;
    --navy-700: #0f2040;
    --navy-600: #172a45;
    --navy-500: #1f3460;

    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;

    --white: #ffffff;
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;

    --green-400: #34d399;
    --green-500: #10b981;
    --red-500:   #ef4444;
    --blue-500:  #3b82f6;

    /* radii */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;

    /* elevation (warm-tinted shadows for navy bg) */
    --shadow-sm: 0 2px 4px rgba(0,0,0,.25);
    --shadow-md: 0 8px 20px rgba(0,0,0,.35);
    --shadow-lg: 0 18px 40px rgba(0,0,0,.45);
    --shadow-xl: 0 30px 70px rgba(0,0,0,.55);
    --shadow-gold: 0 10px 28px rgba(245,158,11,.35);
    --shadow-glow: 0 0 0 1px rgba(245,158,11,.25), 0 12px 40px rgba(245,158,11,.18);

    /* type */
    --font-main: 'Vazirmatn', Tahoma, system-ui, -apple-system, Arial, sans-serif;
    --font-num: 'Vazirmatn', 'JetBrains Mono', ui-monospace, monospace;

    /* motion */
    --ease-out:    cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --t-fast: 180ms;
    --t-med:  320ms;
    --t-slow: 560ms;

    /* layout */
    --container: 1240px;
    --gutter: 24px;

    /* selection */
    --sel-bg: rgba(245,158,11,.35);
    --sel-fg: var(--white);
  }
}

/* ═══════════════ RESET ═══════════════ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
  body { min-height: 100dvh; text-rendering: optimizeLegibility; }
  img, svg, video { max-width: 100%; height: auto; display: block; }
  ul, ol { list-style: none; }
  button, input, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  ::selection { background: var(--sel-bg); color: var(--sel-fg); }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--navy-900); }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--navy-600), var(--navy-700));
    border-radius: var(--radius-pill);
    border: 2px solid var(--navy-900);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  }
}

/* ═══════════════ BASE ═══════════════ */
@layer base {
  body {
    font-family: var(--font-main);
    background: var(--navy-900);
    color: var(--gray-300);
    font-size: 15px;
    line-height: 1.75;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
      radial-gradient(1200px 600px at 90% -10%, rgba(245,158,11,.07), transparent 60%),
      radial-gradient(900px 500px at -10% 110%, rgba(59,130,246,.06), transparent 60%);
  }

  h1, h2, h3, h4 { color: var(--white); line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
  p { color: var(--gray-400); }
  a { color: var(--gold-500); transition: color var(--t-fast) var(--ease-out); }
  a:hover { color: var(--gold-400); }

  :focus-visible {
    outline: 2px solid var(--gold-400);
    outline-offset: 3px;
    border-radius: 4px;
  }

  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
}

/* ═══════════════ LAYOUT ═══════════════ */
@layer layout {
  .container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .section { padding: clamp(56px, 8vw, 96px) 0; }
  .section-header { margin-bottom: clamp(32px, 4vw, 56px); }
  .section-title {
    font-size: clamp(22px, 2.4vw, 30px);
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 12px;
  }
  .section-title i { color: var(--gold-500); font-size: .9em; }
  .section-desc { color: var(--gray-400); font-size: 16px; max-width: 720px; }
}

/* ═══════════════ COMPONENTS ═══════════════ */
@layer components {

  /* ── HEADER ─────────────────────────────────────────── */
  .site-header {
    background: rgba(5,13,26,.7);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 14px 0;
    position: sticky; top: 0; z-index: 1000;
    transition: padding var(--t-med) var(--ease-out),
                background-color var(--t-med) var(--ease-out),
                border-color var(--t-med) var(--ease-out);
  }
  .site-header.is-scrolled {
    padding: 8px 0;
    background: rgba(5,13,26,.92);
    border-bottom-color: rgba(245,158,11,.18);
  }
  .header-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

  /* logo with shimmer ring */
  .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
  .logo-mark {
    position: relative;
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border-radius: var(--radius-sm);
    display: grid; place-items: center;
    font-size: 20px; color: var(--navy-900);
    box-shadow: var(--shadow-gold);
    transition: transform var(--t-med) var(--ease-spring),
                box-shadow var(--t-med) var(--ease-out);
  }
  .logo-mark::after {
    content: "";
    position: absolute; inset: -3px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, var(--gold-400), transparent 30%, transparent 70%, var(--gold-400));
    opacity: 0; z-index: -1;
    filter: blur(8px);
    transition: opacity var(--t-med) var(--ease-out);
  }
  .logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); box-shadow: 0 16px 40px rgba(245,158,11,.55); }
  .logo:hover .logo-mark::after { opacity: 1; animation: spin 2.4s linear infinite; }
  .logo-text { font-size: 22px; font-weight: 900; color: var(--white); letter-spacing: -.5px; }
  .logo-text span { color: var(--gold-500); }
  .logo-sub { display: block; font-size: 10px; font-weight: 500; color: var(--gray-500); letter-spacing: 1.5px; }

  /* city dropdown */
  .city-nav { position: relative; }
  .city-nav-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-weight: 600; font-size: 14px;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease-out);
    position: relative; overflow: hidden;
  }
  .city-nav-btn::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.08), transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s var(--ease-out);
  }
  .city-nav-btn:hover { border-color: var(--gold-500); transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .city-nav-btn:hover::before { transform: translateX(100%); }
  .city-nav-btn i:last-child { transition: transform var(--t-fast) var(--ease-out); font-size: 12px; }
  .city-nav:hover .city-nav-btn i:last-child,
  .city-nav:focus-within .city-nav-btn i:last-child { transform: rotate(180deg); }

  .city-menu {
    position: absolute; top: calc(100% + 12px); left: 0; right: auto;
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    padding: 10px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-8px) scale(.96);
    transform-origin: top right;
    transition: opacity var(--t-fast) var(--ease-out),
                transform var(--t-med) var(--ease-spring),
                visibility var(--t-fast);
    z-index: 100;
  }
  .city-nav:hover .city-menu,
  .city-nav:focus-within .city-menu {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  .city-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--gray-300); font-size: 14px; font-weight: 500;
    transition: all var(--t-fast) var(--ease-out);
    position: relative;
  }
  .city-menu a::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 50%;
    width: 0; height: 2px; background: var(--gold-500);
    transform: translateY(-50%);
    transition: width var(--t-med) var(--ease-out);
  }
  .city-menu a:hover { background: rgba(245,158,11,.08); color: var(--gold-400); padding-inline-start: 22px; }
  .city-menu a:hover::before { width: 12px; }
  .city-menu a i { color: var(--gold-500); width: 16px; text-align: center; }

  /* ── HERO ───────────────────────────────────────────── */
  .hero {
    padding: clamp(72px, 10vw, 120px) 0 clamp(60px, 8vw, 96px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--navy-900);
  }
  /* aurora layer */
  .hero::before {
    content: ""; position: absolute; inset: -20%;
    z-index: -2;
    background:
      radial-gradient(45% 35% at 80% 20%, rgba(245,158,11,.18), transparent 70%),
      radial-gradient(40% 30% at 15% 80%, rgba(59,130,246,.12), transparent 70%),
      radial-gradient(35% 30% at 50% 50%, rgba(217,119,6,.08), transparent 70%);
    filter: blur(40px);
    animation: aurora 18s var(--ease-in-out) infinite alternate;
  }
  /* grid */
  .hero::after {
    content: ""; position: absolute; inset: 0;
    z-index: -1; pointer-events: none;
    background-image:
      linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
            mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
  }
  .hero-content {
    position: relative; z-index: 1;
    text-align: center; max-width: 820px; margin: 0 auto;
  }
  .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(180deg, rgba(245,158,11,.12), rgba(245,158,11,.04));
    border: 1px solid rgba(245,158,11,.3);
    color: var(--gold-300);
    padding: 7px 18px; border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 600;
    margin-bottom: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    animation: badgeFloat 4s var(--ease-in-out) infinite;
  }
  .hero-badge::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold-400);
    box-shadow: 0 0 12px var(--gold-400);
    animation: pulseDot 1.6s var(--ease-in-out) infinite;
  }
  .hero h1 {
    font-size: clamp(2rem, 5.4vw, 3.75rem);
    line-height: 1.15;
    background: linear-gradient(135deg, var(--white) 25%, var(--gold-300) 60%, var(--white) 90%);
    background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    animation: fadeInUp .8s var(--ease-out) .1s both, shimmerText 6s linear infinite;
  }
  .hero p {
    font-size: clamp(15px, 1.4vw, 18px);
    color: var(--gray-400);
    max-width: 620px; margin: 0 auto;
    animation: fadeInUp .8s var(--ease-out) .25s both;
  }

  /* hero search (new) */
  .hero-search {
    margin-top: 36px;
    display: flex; gap: 8px;
    max-width: 560px; margin-inline: auto;
    padding: 6px;
    background: rgba(15,32,64,.7);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(12px);
    animation: fadeInUp .8s var(--ease-out) .4s both;
  }
  .hero-search input {
    flex: 1; min-width: 0;
    background: transparent; border: 0; outline: 0;
    padding: 12px 18px;
    color: var(--white); font-size: 15px;
  }
  .hero-search input::placeholder { color: var(--gray-500); }
  .hero-search button {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-900); font-weight: 800;
    padding: 10px 22px; border-radius: var(--radius-pill);
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform var(--t-fast) var(--ease-spring),
                box-shadow var(--t-fast) var(--ease-out);
  }
  .hero-search button:hover { transform: translateY(-1px) scale(1.03); box-shadow: var(--shadow-gold); }
  .hero-search button:active { transform: translateY(0) scale(.98); }

  /* ── BREADCRUMBS ────────────────────────────────────── */
  .breadcrumbs {
    background: linear-gradient(180deg, var(--navy-800), transparent);
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding: 14px 0;
    font-size: 13px;
  }
  .breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .breadcrumbs li { display: flex; align-items: center; gap: 8px; color: var(--gray-500); }
  .breadcrumbs li:not(:last-child)::after {
    content: "/"; color: var(--gray-600); font-weight: 400;
  }
  .breadcrumbs a {
    color: var(--gray-400);
    position: relative;
    background-image: linear-gradient(90deg, var(--gold-500), var(--gold-500));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    background-position: 0 100%;
    transition: background-size var(--t-med) var(--ease-out), color var(--t-fast) var(--ease-out);
  }
  .breadcrumbs a:hover { color: var(--gold-500); background-size: 100% 1px; }
  .breadcrumbs li[aria-current="page"] { color: var(--gold-500); font-weight: 700; }

  /* ── GRIDS ──────────────────────────────────────────── */
  .grid { display: grid; gap: 24px; }
  .grid-cities     { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .grid-categories { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .grid-academies  { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

  /* ── CARD (3D, glow, shimmer) ───────────────────────── */
  .card {
    --card-pad: 28px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.02), transparent 50%),
      var(--navy-800);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-lg);
    padding: var(--card-pad);
    transition:
      transform var(--t-med) var(--ease-out),
      border-color var(--t-med) var(--ease-out),
      box-shadow var(--t-med) var(--ease-out),
      background-color var(--t-med) var(--ease-out);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    transform-style: preserve-3d;
    will-change: transform;
  }
  /* top accent line — slides on hover */
  .card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600), var(--gold-400));
    background-size: 200% 100%;
    transform: scaleX(0); transform-origin: right;
    transition: transform var(--t-slow) var(--ease-out);
  }
  /* moving shine on hover */
  .card::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(245,158,11,.08) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .9s var(--ease-out);
    pointer-events: none;
  }
  .card:hover {
    transform: translateY(-10px) scale(1.012);
    border-color: rgba(245,158,11,.4);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(245,158,11,.15),
                0 0 60px rgba(245,158,11,.12);
  }
  .card:hover::before { transform: scaleX(1); transform-origin: left; animation: gradientFlow 2.4s linear infinite; }
  .card:hover::after  { transform: translateX(100%); }

  .card-icon {
    width: 56px; height: 56px;
    background: linear-gradient(180deg, rgba(245,158,11,.15), rgba(245,158,11,.04));
    border: 1px solid rgba(245,158,11,.2);
    border-radius: var(--radius-md);
    display: grid; place-items: center;
    color: var(--gold-400); font-size: 24px;
    margin-bottom: 20px;
    transition: all var(--t-med) var(--ease-spring);
  }
  .card:hover .card-icon {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-900); border-color: transparent;
    transform: scale(1.1) rotate(-6deg);
    box-shadow: 0 10px 24px rgba(245,158,11,.4);
  }
  .card h3 { font-size: 20px; margin-bottom: 12px; transition: color var(--t-fast) var(--ease-out); }
  .card:hover h3 { color: var(--gold-300); }
  .card p { color: var(--gray-400); font-size: 14px; margin-bottom: 20px; flex: 1; }

  .card-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--gold-500); font-weight: 700; font-size: 14px;
    margin-top: auto;
    position: relative;
  }
  .card-link::after {
    content: ""; position: absolute; bottom: -3px; right: 0; left: auto;
    width: 0; height: 1px; background: var(--gold-500);
    transition: width var(--t-med) var(--ease-out);
  }
  .card:hover .card-link::after { width: 100%; }
  .card-link i { transition: transform var(--t-med) var(--ease-spring); }
  .card:hover .card-link i { transform: translateX(-8px); }

  .card-badge {
    position: absolute; top: 16px; left: 16px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    color: var(--navy-900);
    padding: 5px 12px; border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 800; letter-spacing: .5px;
    box-shadow: 0 4px 12px rgba(245,158,11,.4);
    animation: badgeFloat 3s var(--ease-in-out) infinite;
  }

  /* ── ACADEMY CARD ───────────────────────────────────── */
  .academy-card .academy-img {
    width: 100%; aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
    border: 1px solid rgba(255,255,255,.05);
    transition: transform var(--t-slow) var(--ease-out), filter var(--t-med) var(--ease-out);
  }
  .academy-card:hover .academy-img { transform: scale(1.04); filter: brightness(1.08); }
  .academy-meta { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--gray-400); }
  .academy-meta span { display: flex; align-items: center; gap: 8px; }
  .academy-meta i { color: var(--gold-500); width: 16px; text-align: center; }

  /* ── ACADEMY DETAIL ─────────────────────────────────── */
  .academy-detail {
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-top: 32px; margin-bottom: 60px;
    box-shadow: var(--shadow-lg);
  }
  .academy-header {
    display: flex; gap: 32px; margin-bottom: 40px; padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .academy-logo {
    width: 160px; height: 160px; flex-shrink: 0;
    object-fit: contain; background: var(--white);
    border-radius: var(--radius-lg); padding: 16px;
    box-shadow: var(--shadow-md);
    transition: transform var(--t-med) var(--ease-spring);
  }
  .academy-logo:hover { transform: scale(1.04) rotate(-2deg); }
  .academy-info h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 12px; }
  .academy-info .alias { color: var(--gray-500); font-size: 16px; margin-bottom: 16px; }
  .academy-info .desc { color: var(--gray-300); font-size: 15px; line-height: 1.85; }

  .info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-bottom: 40px;
  }
  .info-item {
    background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
    border: 1px solid rgba(255,255,255,.05);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex; gap: 16px;
    transition: all var(--t-med) var(--ease-out);
  }
  .info-item:hover {
    border-color: rgba(245,158,11,.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
  }
  .info-item i { font-size: 24px; color: var(--gold-500); margin-top: 4px; flex-shrink: 0; }
  .info-item h4 {
    font-size: 12px; color: var(--gray-500); font-weight: 600;
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: .8px;
  }
  .info-item p { font-size: 16px; font-weight: 700; color: var(--white); }

  .phone-box {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(180deg, rgba(16,185,129,.12), rgba(16,185,129,.04));
    color: var(--green-400);
    padding: 12px 22px; border-radius: var(--radius-sm);
    font-weight: 800; font-size: 18px; direction: ltr;
    border: 1px solid rgba(16,185,129,.25);
    transition: all var(--t-med) var(--ease-out);
    position: relative; overflow: hidden;
  }
  .phone-box::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18), transparent 70%);
    transform: translateX(-100%);
    transition: transform .7s var(--ease-out);
  }
  .phone-box:hover { background: var(--green-500); color: var(--white); transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 24px rgba(16,185,129,.4); }
  .phone-box:hover::before { transform: translateX(100%); }

  /* metrics */
  .metrics-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px; margin: 40px 0;
  }
  .metric-box {
    background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
    border: 1px solid rgba(255,255,255,.05);
    border-radius: var(--radius-lg);
    padding: 28px 24px; text-align: center;
    transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  }
  .metric-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
  .metric-circle {
    width: 110px; height: 110px; border-radius: 50%;
    margin: 0 auto 18px; position: relative;
    display: grid; place-items: center;
    background: conic-gradient(var(--gold-400) var(--val, 85%), rgba(255,255,255,.05) 0);
    transition: filter var(--t-med) var(--ease-out);
    animation: ringIn 1.2s var(--ease-out) both;
  }
  .metric-circle::before {
    content: ""; position: absolute; inset: -4px; border-radius: 50%;
    background: conic-gradient(var(--gold-500), transparent 60%, var(--gold-500));
    filter: blur(8px); opacity: 0; z-index: -1;
    transition: opacity var(--t-med) var(--ease-out);
  }
  .metric-circle:hover::before { opacity: .5; }
  .metric-circle span {
    width: 86px; height: 86px;
    background: radial-gradient(circle at 30% 30%, var(--navy-700), var(--navy-800));
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 24px; font-weight: 900; color: var(--gold-400);
    font-family: var(--font-num);
    box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
  }
  .metric-box h4 { font-size: 14px; color: var(--gray-300); font-weight: 600; }

  /* star rating */
  .star-rating { direction: rtl; display: inline-flex; gap: 6px; margin-top: 20px; }
  .star-rating input { position: absolute; opacity: 0; pointer-events: none; }
  .star-rating label {
    display: inline-block;
    font-size: 32px; color: var(--navy-600); cursor: pointer;
    transition: color var(--t-fast) var(--ease-out),
                transform var(--t-med) var(--ease-spring),
                text-shadow var(--t-fast) var(--ease-out);
    line-height: 1;
  }
  .star-rating label:hover,
  .star-rating label:hover ~ label,
  .star-rating input:checked ~ label {
    color: var(--gold-400);
    text-shadow: 0 0 18px rgba(245,158,11,.6);
  }
  .star-rating label:hover { transform: scale(1.18) rotate(-8deg); }
  .star-rating label:active { transform: scale(.9); }

  /* ── FORMS ──────────────────────────────────────────── */
  .form-box {
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
  }
  .form-group { margin-bottom: 20px; }
  .form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-300); margin-bottom: 8px; }
  .form-control {
    width: 100%;
    background: var(--navy-700);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--white);
    font-family: inherit; font-size: 15px;
    transition: all var(--t-fast) var(--ease-out);
  }
  .form-control::placeholder { color: var(--gray-500); }
  .form-control:hover { border-color: rgba(255,255,255,.18); }
  .form-control:focus {
    outline: none;
    border-color: var(--gold-500);
    background: var(--navy-800);
    box-shadow: 0 0 0 4px rgba(245,158,11,.15), inset 0 1px 2px rgba(0,0,0,.3);
  }
  textarea.form-control { resize: vertical; min-height: 140px; }
  .btn-submit {
    width: 100%;
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    border: 0; border-radius: var(--radius-sm);
    padding: 16px;
    color: var(--navy-900); font-weight: 800; font-size: 16px;
    cursor: pointer;
    transition: transform var(--t-fast) var(--ease-spring),
                box-shadow var(--t-med) var(--ease-out),
                filter var(--t-fast) var(--ease-out);
    box-shadow: var(--shadow-gold);
  }
  .btn-submit::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35), transparent 70%);
    transform: translateX(-100%);
    transition: transform .8s var(--ease-out);
  }
  .btn-submit:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 36px rgba(245,158,11,.5); }
  .btn-submit:hover::before { transform: translateX(100%); }
  .btn-submit:active { transform: translateY(0) scale(.99); }

  /* ── FAQ ────────────────────────────────────────────── */
  .faq-item {
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-md);
    margin-bottom: 12px; overflow: hidden;
    transition: all var(--t-med) var(--ease-out);
  }
  .faq-item[open] {
    border-color: rgba(245,158,11,.3);
    background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
    box-shadow: var(--shadow-md);
  }
  .faq-item summary {
    padding: 20px 24px; font-size: 16px; font-weight: 700; color: var(--white);
    cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    transition: color var(--t-fast) var(--ease-out);
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary:hover { color: var(--gold-300); }
  .faq-item summary::after {
    content: "↓"; font-weight: 700;
    color: var(--gold-500);
    transition: transform var(--t-med) var(--ease-spring);
    font-size: 18px; line-height: 1;
  }
  .faq-item[open] summary::after { transform: rotate(-180deg); }
  .faq-answer {
    padding: 0 24px 24px; color: var(--gray-400); font-size: 15px; line-height: 1.85;
    animation: fadeInUp .4s var(--ease-out);
  }

  /* ── POLICY / ABOUT SECTIONS ────────────────────────── */
  .policy-section {
    background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
    border: 1px solid rgba(255,255,255,.05);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    transition: border-color var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
  }
  .policy-section:hover { border-color: rgba(245,158,11,.2); transform: translateY(-2px); }
  .policy-section h3 {
    font-size: 18px; color: var(--white);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
  }
  .policy-section h3 i { color: var(--gold-500); }
  .policy-section p {
    font-size: 15px; color: var(--gray-300); line-height: 1.85; margin-bottom: 16px;
  }
  .policy-section p:last-child { margin-bottom: 0; }

  /* ── FOOTER ─────────────────────────────────────────── */
  .site-footer {
    background: linear-gradient(180deg, transparent, var(--navy-950));
    border-top: 1px solid rgba(255,255,255,.05);
    padding: 60px 0 30px;
    margin-top: 80px;
    position: relative;
  }
  .site-footer::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
    opacity: .4;
  }
  .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
  .footer-col h4 { color: var(--white); font-size: 16px; margin-bottom: 20px; }
  .footer-col p { color: var(--gray-500); font-size: 14px; line-height: 1.85; }
  .footer-col a {
    display: block; color: var(--gray-400);
    margin-bottom: 12px; font-size: 14px;
    position: relative; padding-inline-start: 0;
    transition: all var(--t-med) var(--ease-out);
  }
  .footer-col a::before {
    content: "‹"; position: absolute; right: -16px; top: 50%;
    transform: translateY(-50%) translateX(8px);
    color: var(--gold-500); opacity: 0;
    transition: all var(--t-med) var(--ease-out);
  }
  .footer-col a:hover { color: var(--gold-500); padding-inline-start: 14px; }
  .footer-col a:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.05);
    padding-top: 24px; text-align: center;
    color: var(--gray-600); font-size: 13px;
  }

  /* ── SKELETON (new) ────────────────────────────────── */
  .skeleton {
    background:
      linear-gradient(90deg, var(--navy-800) 0%, var(--navy-700) 50%, var(--navy-800) 100%);
    background-size: 200% 100%;
    border-radius: var(--radius-sm);
    animation: shimmer 1.6s linear infinite;
  }

  /* ── SCROLL PROGRESS (new) ─────────────────────────── */
  .scroll-progress {
    position: fixed; top: 0; left: 0; right: 0;
    height: 3px; z-index: 1100;
    background: transparent;
    pointer-events: none;
  }
  .scroll-progress::after {
    content: ""; display: block;
    height: 100%; width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
    box-shadow: 0 0 12px var(--gold-500);
    transition: width 80ms linear;
  }
}

/* ═══════════════ MOTION ═══════════════ */
@layer motion {
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
  }
  @keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.45); }
    50%      { box-shadow: 0 0 0 16px rgba(245,158,11,0); }
  }
  @keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(252,211,77,.7); }
    50%      { box-shadow: 0 0 0 8px rgba(252,211,77,0); }
  }
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  @keyframes aurora {
    0%   { transform: translate(0,0) rotate(0deg)   scale(1); }
    50%  { transform: translate(2%, -3%) rotate(8deg) scale(1.06); }
    100% { transform: translate(-2%, 2%) rotate(-6deg) scale(1.02); }
  }
  @keyframes shimmerText {
    0%   { background-position: 0% center; }
    100% { background-position: -200% center; }
  }
  @keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  @keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
  }
  @keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
  }
  @keyframes ringIn {
    from { transform: rotate(-90deg) scale(.6); opacity: 0; }
    to   { transform: rotate(0) scale(1); opacity: 1; }
  }

  /* scroll reveal — pair with .reveal */
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
  .reveal.in-view { opacity: 1; transform: translateY(0); }

  /* staggered delays (extended) */
  .stagger > * { animation: fadeInUp .7s var(--ease-out) both; }
  .stagger > *:nth-child(1)  { animation-delay: .05s; }
  .stagger > *:nth-child(2)  { animation-delay: .12s; }
  .stagger > *:nth-child(3)  { animation-delay: .19s; }
  .stagger > *:nth-child(4)  { animation-delay: .26s; }
  .stagger > *:nth-child(5)  { animation-delay: .33s; }
  .stagger > *:nth-child(6)  { animation-delay: .40s; }
  .stagger > *:nth-child(7)  { animation-delay: .47s; }
  .stagger > *:nth-child(8)  { animation-delay: .54s; }
  .stagger > *:nth-child(9)  { animation-delay: .61s; }
  .stagger > *:nth-child(10) { animation-delay: .68s; }
  .stagger > *:nth-child(11) { animation-delay: .75s; }
  .stagger > *:nth-child(12) { animation-delay: .82s; }

  /* compat with old API */
  .animate-in { animation: fadeInUp .7s var(--ease-out) both; }
  .delay-1 { animation-delay: .1s; }
  .delay-2 { animation-delay: .2s; }
  .delay-3 { animation-delay: .3s; }
  .delay-4 { animation-delay: .4s; }

  .pulse-gold { animation: pulseGold 1.8s var(--ease-in-out) infinite; }
  .float      { animation: float 4s var(--ease-in-out) infinite; }

  /* respect user motion preference */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .001ms !important;
      scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
  }
}

/* ═══════════════ UTILITIES ═══════════════ */
@layer utilities {
  .text-gradient {
    background: linear-gradient(135deg, var(--white), var(--gold-300));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .glass {
    background: rgba(15,32,64,.55);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255,255,255,.08);
  }
  .glow-gold { box-shadow: var(--shadow-glow); }
  .hover-lift { transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
  .hover-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .academy-header { flex-direction: column; align-items: center; text-align: center; }
  .academy-meta { align-items: center; }
}
@media (max-width: 768px) {
  .hero { padding: 64px 0 48px; }
  .grid-cities, .grid-categories, .grid-academies { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .academy-detail { padding: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .city-nav-btn span { display: none; }
  .hero-search { flex-direction: column; border-radius: var(--radius-lg); padding: 8px; }
  .hero-search button { width: 100%; justify-content: center; }
  .card:hover { transform: translateY(-4px) scale(1); }  /* tame scale on touch */
}
@media (max-width: 480px) {
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .metric-circle { width: 90px; height: 90px; }
  .metric-circle span { width: 70px; height: 70px; font-size: 20px; }
}

/* CSS View Transitions (where supported) */
@supports (view-transition-name: foo) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: .35s; }
}

/* keep your original FontAwesome breadcrumb separator working as a fallback */
.breadcrumbs li:not(:last-child)::after { content: "/"; }
