/* =========================================================
   Robotics Hub — Design tokens
   Concept: engineering blueprint + PCB circuit trace motif
   ========================================================= */

:root {
  /* Color — sampled directly from the Robotics Hub brand lockup */
  --bg: #070c22;
  --bg-elevated: #0a1230;
  --surface: #0e1838;
  --surface-2: #142050;
  --grid-line: rgba(80, 140, 255, 0.07);
  --border: rgba(80, 140, 255, 0.16);
  --border-strong: rgba(80, 140, 255, 0.34);

  --text: #f2f6ff;
  --text-muted: #9fb0de;
  --text-faint: #57689e;

  --blue: #2f5bff;
  --blue-dim: #1230a8;
  --cyan: #05b8ff;
  --cyan-dim: #076e99;
  /* لمسة تمييز إضافية ضمن عائلة الأزرق نفسها (بدل اللون البرتقالي الدافئ سابقاً) */
  --spark: #5b82ff;
  --spark-dim: #2c4bb0;

  --success: #35e7b0;
  --danger: #ff5c77;

  /* Type */
  --font-display-en: "Space Grotesk", "Cairo", sans-serif;
  --font-display-ar: "Cairo", "Space Grotesk", sans-serif;
  --font-body-en: "Inter", "Cairo", sans-serif;
  --font-body-ar: "Cairo", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --max-width: 1160px;
  --radius: 14px;
  --radius-sm: 8px;
}

html[lang="ar"] {
  --font-display: var(--font-display-ar);
  --font-body: var(--font-body-ar);
}
html[lang="en"] {
  --font-display: var(--font-display-en);
  --font-body: var(--font-body-en);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(5, 184, 255, 0.06), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* تمت إزالة نمط الشبكة (كان مشتتاً بصرياً) — القسم يبقى بخلفية بسيطة الآن */
.grid-paper {
  background-image: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(5, 184, 255, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 6px 18px -8px rgba(5, 184, 255, 0.45);
}
.btn-primary:hover { box-shadow: 0 8px 22px -8px rgba(5, 184, 255, 0.6); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 18, 32, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-faint);
  padding: 7px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}
.lang-toggle button.active { background: var(--surface-2); color: var(--cyan); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 8px 10px;
    cursor: pointer;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: 90px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-top { text-align: center; margin-bottom: 22px; }

.achievement-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(5, 184, 255, 0.1);
  border: 1px solid rgba(5, 184, 255, 0.3);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  text-align: start;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-block: 18px 20px;
  line-height: 1.15;
}
.hero h1 .accent { color: var(--spark); }
.hero p.lead {
  font-size: 17px;
  max-width: 52ch;
  margin-bottom: 26px;
}
@media (max-width: 900px) { .hero p.lead { margin-inline: auto; } }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-actions { justify-content: center; } }

.trust-checks {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 900px) { .trust-checks { justify-content: center; } }
.trust-checks li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-faint);
}
.trust-check-icon {
  color: var(--success);
  font-weight: 700;
}

/* Hero feature card (photo + metrics) */
.hero-art { position: relative; width: 100%; max-width: 420px; margin-inline: auto; }

.hero-feature-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 20px;
  box-shadow: 0 30px 60px -30px rgba(5, 184, 255, 0.25);
}
.hero-feature-head { margin-bottom: 14px; }
.hero-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(91, 130, 255, 0.14);
  border: 1px solid var(--border-strong);
  color: var(--spark);
  font-size: 12px;
  font-weight: 700;
}
.hero-feature-photo {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.hero-feature-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-feature-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(5, 184, 255, 0.16), var(--bg-elevated) 70%);
}
.hero-feature-graphic-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(91, 130, 255, 0.35), transparent 60%);
  filter: blur(6px);
}
.hero-feature-graphic-icon {
  position: relative;
  font-size: 72px;
  filter: drop-shadow(0 10px 24px rgba(5, 184, 255, 0.5));
}
.hero-feature-photo-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(0deg, rgba(3, 7, 20, 0.9), transparent);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}
.hero-feature-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.hero-metric {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.hero-metric-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--cyan);
}
.hero-metric p { margin: 2px 0 0; font-size: 11px; color: var(--text-faint); }

.hero-floating-badge {
  position: absolute;
  bottom: -18px;
  inset-inline-start: -18px;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
@media (min-width: 640px) { .hero-floating-badge { display: flex; } }
.hero-floating-icon { font-size: 20px; }
.hero-floating-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.hero-floating-sub { font-size: 11px; color: var(--success); }

/* Bottom hero stats bar */
.hero-stats-bar {
  margin-top: 60px;
  padding-block: 26px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
@media (max-width: 720px) { .hero-stats-bar { grid-template-columns: repeat(2, 1fr); } }
.hero-stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--cyan);
  letter-spacing: -0.01em;
}
.hero-stat-num-amber { color: var(--spark); font-size: clamp(15px, 1.8vw, 19px); }
.hero-stat p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-faint); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------- Build Award showcase ---------- */
.award-showcase { padding-top: 70px; }
.section-head-center { text-align: center; margin-inline: auto; }
.eyebrow-amber {
  background: rgba(91, 130, 255, 0.1);
  border-color: rgba(91, 130, 255, 0.3);
  color: var(--spark);
}

.award-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 32px;
}
@media (max-width: 900px) { .award-card { grid-template-columns: 1fr; } }

.award-card-photo {
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--surface-2), var(--bg-elevated));
  border: 1px solid var(--border-strong);
  padding: 18px;
  text-align: center;
}
.award-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.award-tags span {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.award-photo-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  position: relative;
}
.award-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.award-graphic-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(5, 184, 255, 0.16), var(--bg-elevated) 70%);
}
.award-graphic-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(91, 130, 255, 0.35), transparent 60%);
  filter: blur(6px);
}
.award-graphic-icon {
  position: relative;
  font-size: 80px;
  filter: drop-shadow(0 10px 24px rgba(5, 184, 255, 0.5));
}

.award-inscription { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.award-inscription-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--spark);
  font-weight: 700;
  text-transform: uppercase;
}
.award-inscription-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}
.award-inscription-year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--spark);
  margin-top: 2px;
}
.award-inscription-team {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 8px;
}

.award-content-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.award-card-content h3 {
  font-size: clamp(20px, 2.6vw, 27px);
  margin-bottom: 10px;
}
.award-card-content > p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 22px;
}

.award-criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 560px) { .award-criteria-grid { grid-template-columns: 1fr; } }
.award-criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.award-criteria-icon { font-size: 20px; line-height: 1; flex: 0 0 auto; }
.award-criteria-item h4 { font-size: 13.5px; margin-bottom: 4px; color: var(--text); }
.award-criteria-item p { font-size: 12px; color: var(--text-faint); margin: 0; line-height: 1.5; }

.award-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.target-comps {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.target-comps-label {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.target-comps-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.target-comp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-strong);
}
.target-comp-badge img {
  height: 100%;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
}

/* ---------- Inside-the-club photo gallery ---------- */
.gallery-section { padding-top: 0; }
.club-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .club-gallery { grid-template-columns: 1fr; } }

.club-gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.club-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.club-gallery-item figcaption {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Section heading ---------- */
.section { padding-block: 84px; }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }

/* ---------- How it works (circuit steps) ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.step-num {
  font-family: var(--font-mono);
  color: var(--spark);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.step-num::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--spark);
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14.5px; margin: 0; }

/* ---------- Course cards ---------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .courses-grid { grid-template-columns: 1fr; } }

.track-block { margin-bottom: 56px; }
.track-block:last-child { margin-bottom: 0; }
.track-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.track-head h3 {
  font-size: 20px;
  margin: 0;
  white-space: nowrap;
}
.track-head p {
  margin: 0;
  font-size: 14px;
  color: var(--text-faint);
}

/* ---------- Per-subject course section with horizontal carousel ---------- */
.course-section { margin-bottom: 40px; }
.course-section:last-child { margin-bottom: 0; }

.course-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.course-section-head h4 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0;
  color: var(--text);
}
.course-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.level-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.level-filter-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.level-filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.level-filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.course-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.course-carousel::-webkit-scrollbar { display: none; }

.course-card-sm {
  flex: 0 0 auto;
  width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.course-card-sm:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}
.course-code-sm {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.course-card-sm h5 {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: var(--text);
}
.price-num-sm {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  color: var(--spark);
  margin-top: auto;
}

.course-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.course-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -18px rgba(47, 91, 255, 0.4);
}
.course-card::before, .course-card::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}
.course-card::before { inset-inline-start: 14px; }
.course-card::after { inset-inline-end: 14px; }

.course-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.course-card h3 { font-size: 19px; margin: 0; }
.course-card .subtitle { font-size: 14px; color: var(--text-muted); margin: 0; }
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.badge {
  font-size: 12.5px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.course-price {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.price-num { font-family: var(--font-body); font-weight: 700; font-size: 20px; color: var(--spark); }
.price-caption {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint);
}
.course-card .cta { color: var(--cyan); font-size: 14px; font-weight: 600; }
.vat-note-sm {
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 6px 0 0;
}
.badge-full {
  border-color: var(--danger);
  color: var(--danger);
}
.course-card-full {
  opacity: 0.72;
}
.family-info {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.family-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.family-total-btn { align-self: flex-start; }

/* ---------- CTA band ---------- */
.cta-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding-block: 70px;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 12px; }
.cta-band p { max-width: 50ch; margin-inline: auto; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.footer {
  padding-block: 40px;
  color: var(--text-faint);
  font-size: 13.5px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { margin-bottom: 26px; font-size: 14.5px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus { border-color: var(--cyan); }
.field input[type="file"] {
  padding: 10px 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 13.5px;
}
.form-hint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 6px 0 0;
}

.form-note { font-size: 13.5px; color: var(--text-muted); margin-top: 18px; text-align: center; }
.form-note a { color: var(--cyan); text-decoration: none; font-weight: 600; }

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  margin-bottom: 18px;
  display: none;
}
.alert.show { display: block; }
.alert-error { background: rgba(251, 113, 133, 0.1); border: 1px solid rgba(251, 113, 133, 0.35); color: var(--danger); }
.alert-success { background: rgba(110, 231, 183, 0.1); border: 1px solid rgba(110, 231, 183, 0.35); color: var(--success); }

/* ---------- Course detail page ---------- */
.course-hero {
  padding-block: 60px 40px;
  border-bottom: 1px solid var(--border);
}
.course-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) { .course-detail-grid { grid-template-columns: 1fr; } }

.detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 92px;
}
.detail-panel .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.detail-panel .price-num { font-size: 30px; }
.vat-note {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 16px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding-block: 12px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
}
.info-row span:first-child { color: var(--text-faint); }

.content-block h2 { font-size: 22px; margin-top: 34px; }
.content-block ul { padding-inline-start: 20px; color: var(--text-muted); }
.content-block li { margin-bottom: 8px; }

.levels-label {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 10px;
}
.level-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.level-pill:hover { border-color: var(--cyan); color: var(--cyan); }
.level-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.course-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 10px;
}
.course-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.course-gallery img:hover { border-color: var(--cyan); transform: translateY(-2px); }
.course-gallery .video-embed {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.course-gallery .video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Dashboard / success ---------- */
.simple-page { padding-block: 70px; min-height: 50vh; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 14px 18px; text-align: start; }
thead { background: var(--surface-2); color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); }
tbody tr { border-top: 1px solid var(--border); }
.status-pill { font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.status-paid { background: rgba(53,231,176,0.12); color: var(--success); }
.status-pending { background: rgba(91,130,255,0.14); color: var(--spark); }
.status-refunded { background: rgba(255,92,119,0.12); color: var(--danger); }

.success-box {
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 46px 30px;
}
.success-icon {
  width: 56px; height: 56px;
  margin-inline: auto 18px;
  border-radius: 50%;
  background: rgba(53,231,176,0.12);
  color: var(--success);
  display: grid;
  place-items: center;
}

/* Utility */
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.hidden { display: none !important; }

/* ---------- Admin dashboard ---------- */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.admin-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 10px 6px;
  cursor: pointer;
}
.admin-tab.active { color: var(--cyan); border-color: var(--cyan); }

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}
.admin-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 780px) { .admin-form-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .admin-form-grid { grid-template-columns: 1fr; } }

.admin-form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-block: 10px 20px;
}
@media (max-width: 780px) { .admin-form-cols { grid-template-columns: 1fr; } }

.admin-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.admin-fieldset legend {
  padding: 0 8px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-fieldset .field:last-child { margin-bottom: 0; }

.admin-form-panel select,
.admin-form-panel textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  outline: none;
  resize: vertical;
}
.admin-form-panel select:focus,
.admin-form-panel textarea:focus { border-color: var(--cyan); }

.status-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  padding: 6px 10px;
  font-family: var(--font-body);
}

/* ---------- Admin course media panel ---------- */
.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.admin-media-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
}
.admin-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-media-item.video-item {
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}
.admin-media-remove {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(3, 7, 20, 0.75);
  color: var(--danger);
  border: none;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.admin-media-add-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-media-add-row .field { margin-bottom: 0; }
.admin-media-note {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Receipt lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 30px;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 20, 0.85);
  backdrop-filter: blur(4px);
}
.lightbox-content {
  position: relative;
  max-width: min(90vw, 700px);
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 50px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
  display: block;
}

/* ---------- Interactive Robot Arena Simulator ---------- */
.sim-widget {
  background: rgba(14, 24, 56, 0.9);
  border: 1px solid rgba(5, 184, 255, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 30px 70px -40px rgba(5, 184, 255, 0.3);
}
@media (min-width: 768px) { .sim-widget { padding: 26px; } }

.sim-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.sim-header-left { display: flex; align-items: center; gap: 12px; }
.sim-radio-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(5, 184, 255, 0.1);
  border: 1px solid rgba(5, 184, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex: 0 0 auto;
}
.sim-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-title-row h3 { font-size: 17px; margin: 0; color: var(--text); }
.sim-live-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(5, 184, 255, 0.16);
  color: var(--cyan);
  border: 1px solid rgba(5, 184, 255, 0.3);
}
.sim-widget-sub { font-size: 12px; color: var(--text-faint); margin: 2px 0 0; }

.sim-mode-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.sim-mode-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.sim-mode-btn:hover { color: var(--text-muted); }
.sim-mode-btn.active {
  background: var(--cyan);
  color: #04101f;
  font-weight: 700;
}

.sim-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .sim-grid { grid-template-columns: 1fr; } }

.sim-canvas-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #090d16;
}
.sim-canvas-wrap canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  display: block;
  cursor: crosshair;
}
.sim-hud {
  position: absolute;
  top: 10px;
  inset-inline: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.sim-hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(4px);
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.sim-hud-chip strong { color: var(--text); }

.sim-dpad {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(9, 13, 22, 0.92);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.7);
}
.sim-dpad-row { display: flex; align-items: center; gap: 4px; }
.sim-dpad-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}
.sim-dpad-btn:active { background: var(--cyan); color: #04101f; }

.sim-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: #090d16;
  border: 1px solid var(--border);
}
.sim-panel-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}
.sim-tel-box {
  padding: 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.sim-tel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 7px;
}
.sim-ir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim-ir-chip {
  text-align: center;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid transparent;
}
.sim-ir-chip.on {
  background: rgba(53, 231, 176, 0.14);
  color: var(--success);
  border-color: rgba(53, 231, 176, 0.35);
}
.sim-mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); }
.sim-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.sim-bar-fill {
  height: 100%;
  width: 66%;
  background: var(--cyan);
  transition: width 0.15s linear;
}
.sim-bar-fill.danger { background: var(--danger); }

.sim-tel-box input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
  height: 5px;
  cursor: pointer;
}

.sim-actions { padding-top: 12px; border-top: 1px solid var(--border); }
.sim-actions-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sim-btn-toggle {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(53, 231, 176, 0.3);
  background: rgba(53, 231, 176, 0.14);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}
.sim-btn-toggle.running {
  border-color: rgba(91, 130, 255, 0.3);
  background: rgba(91, 130, 255, 0.14);
  color: var(--spark);
}
.sim-btn-reset {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}
.sim-btn-reset:hover { color: var(--text); border-color: var(--border-strong); }

.sim-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(5, 184, 255, 0.06);
  border: 1px solid rgba(5, 184, 255, 0.2);
}
.sim-hint p { margin: 0; font-size: 11px; color: var(--text-muted); line-height: 1.6; }
