/* ============================================================
   Fargo Driving Academy: homepage styles
   ------------------------------------------------------------
   Replicated from the reference site (elitesteering.com):
     · Bebas Neue condensed uppercase headings + Jost body type
     · navy / blue palette with red "Register" buttons
     · dark top contact bar, logo header with dropdown menus,
       video-backed hero, mission band, service cards,
       "Any questions?" strip, multi-column footer
   The gallery carousel, hero car slideshow and flowing marquee
   are implemented below.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy-950: #0b1526;
  --navy-900: #0e1c33;
  --navy-800: #14284a;
  --blue-600: #0054a5;
  --blue-500: #1f69a9;
  --blue-400: #5891be;
  --blue-100: #d7e9f7;
  --red-600: #c4002a;
  --red-500: #e0002d;
  --ink: #10213c;
  --slate-600: #4a5b74;
  --slate-500: #64748b;
  --line: #e2e8f2;
  --paper: #ffffff;
  --bg-soft: #f2f6fb;
  --bg-tint: #e7f0fa;
  --success: #1a9e5f;
  --danger: #d64545;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 28, 51, 0.06), 0 4px 14px rgba(14, 28, 51, 0.06);
  --shadow-md: 0 6px 24px rgba(14, 28, 51, 0.1);
  --shadow-lg: 0 20px 50px rgba(14, 28, 51, 0.16);
  --font-head: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Jost", "Segoe UI", system-ui, sans-serif;
  --container: 1140px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.35rem; letter-spacing: 1px; }

p { margin: 0 0 1em; }
a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 24px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none !important;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--red {
  background: var(--red-500);
  color: #fff;
  box-shadow: 0 6px 18px rgba(224, 0, 45, 0.35);
}
.btn--red:hover { background: var(--red-600); box-shadow: 0 8px 24px rgba(224, 0, 45, 0.45); color: #fff; }

.btn--dark {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--navy-900);
}
.btn--dark:hover { background: var(--navy-900); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--navy-900);
  border-color: rgba(20, 40, 74, 0.4);
}
.btn--ghost:hover { border-color: var(--navy-900); background: rgba(20, 40, 74, 0.05); }

.btn--lg { padding: 14px 34px; font-size: 1.25rem; }

/* ---------- Top bar (reference #top-header) ---------- */
.topbar { background: var(--navy-950); color: #c9d6ea; font-size: 0.98rem; }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding-block: 6px;
}
.topbar__contact, .topbar__social { display: flex; align-items: center; gap: 20px; }
.topbar a, .topbar__login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c9d6ea;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  cursor: pointer;
}
.topbar a:hover, .topbar__login:hover { color: #fff; text-decoration: none; }
.topbar__social a {
  width: 28px;
  height: 28px;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.topbar__social a:hover { background: var(--blue-500); color: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 80px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy-900);
  text-decoration: none !important;
}
.brand__logo { border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-head);
}
.brand__text strong { font-size: 1.35rem; letter-spacing: 1px; text-transform: uppercase; }
.brand__text span { font-size: 0.9rem; color: var(--blue-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__list > li { position: relative; }
.nav__list > li > a,
.nav__parent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  padding: 10px 12px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
}
.nav__list > li > a:hover, .nav__parent:hover { color: var(--red-500); text-decoration: none; }
.nav__caret { transition: transform 0.2s ease; }
.nav__list > li.has-dropdown:hover .nav__caret,
.nav__list > li.has-dropdown:focus-within .nav__caret { transform: rotate(180deg); }

/* ----- Dropdown panels -----
   Hidden by default; revealed on hover, on keyboard focus (focus-within)
   and via the click toggle in js/main.js (.is-open).  opacity+visibility
   give a smooth fade while transform adds a slight drop. */
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 50;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown::before {           /* invisible bridge so hover doesn't drop */
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.dropdown a:hover { background: var(--bg-tint); color: var(--blue-600); }

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__login { font-family: var(--font-body); font-size: 0.92rem; text-transform: none; letter-spacing: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Section scaffolding ---------- */
section { padding-block: 88px; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 8px;
}
.eyebrow--light { color: var(--blue-400); }

.main-title { max-width: 760px; margin-inline: auto; margin-bottom: 48px; }
.main-title.text-center { text-align: center; }
.section-head__sub { color: var(--slate-600); font-size: 1.05rem; margin-bottom: 0; }
.section-head__sub em { color: var(--slate-500); font-size: 0.92em; }

/* ---------- Hero (reference slider-caption look) ---------- */
.hero {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(47, 120, 220, 0.35), transparent 60%),
    linear-gradient(180deg, #12233f 0%, var(--navy-900) 100%);
  overflow: hidden;
}
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;   /* gentle, slow crossfade */
  filter: brightness(0.55) saturate(0.9);
  transform: scale(1.04);          /* hides edge fringing while fading */
}
.hero__slide.is-active { opacity: 1; }
.hero__slide.is-active { animation: hero-zoom 7s ease-out forwards; }
@keyframes hero-zoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__slide { transition: none; animation: none; }
}
.hero__inner { position: relative; z-index: 1; }

/* The caption box: same treatment as the reference: translucent
   black panel, centred text, big condensed headings. */
.slider-caption {
  background: rgba(0, 0, 0, 0.55);
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 26px 26px;
  text-align: center;
  color: #fff;
  border-radius: 8px;
}
.hero__welcome { font-size: clamp(1.5rem, 3vw, 2.2rem); color: #fff; margin-bottom: 4px; }
.hero__title { font-size: clamp(2.8rem, 7vw, 5rem); margin-bottom: 6px; color: #fff; }
.hero__tag { color: #dbe7f5; font-size: 1.05rem; max-width: 46ch; margin: 0 auto 10px; }
.hero__cta { margin: 0; }

/* ---------- Mission band (reference parallax look) ---------- */
.mission {
  background:
    radial-gradient(760px 380px at 15% 0%, rgba(47, 120, 220, 0.35), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #dbe7f5;
}
.mission__panel { max-width: 860px; margin-inline: auto; text-align: center; }
.mission__panel h2 { color: #fff; }
.mission__text { font-size: 1.1rem; margin: 0 auto; max-width: 74ch; }

/* ---------- Services ---------- */
.services { background: var(--bg-soft); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 26px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__media {
  background: linear-gradient(180deg, #eaf1fb 0%, #f7faff 100%);
  border-bottom: 1px solid var(--line);
}
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 38%; }
.card__body { display: flex; flex-direction: column; padding: 24px; flex: 1; }
.card h3 { font-size: 1.5rem; }
.card__price {
  font-family: var(--font-head);
  font-size: 1.9rem;
  letter-spacing: 1px;
  color: var(--blue-600);
  margin: 2px 0 14px;
}
.card__price span { font-size: 0.85rem; font-family: var(--font-body); color: var(--slate-500); letter-spacing: 0; }
.card ul { margin-bottom: 20px; }
.card ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--slate-600);
}
.card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue-500);
  font-weight: 700;
}
.card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin: auto 0 0; }
.card__actions .btn { padding: 9px 18px; font-size: 0.98rem; }

.services__blurb {
  max-width: 820px;
  margin: 48px auto 0;
  text-align: center;
  color: var(--slate-600);
  font-size: 1.04rem;
}

/* ============================================================
   GALLERY CAROUSEL
   ------------------------------------------------------------
   .carousel__viewport  : the "window". Overflow is hidden and it
                          is as tall as a single slide.
   .carousel__track     : flex row of every slide. The JS shifts it
                          with transform: translateX() so movement is
                          a smooth GPU-accelerated transition.
   .carousel__slide     : a media <figure>. Height is fixed by CSS
                          while width is derived from the media's
                          native aspect ratio stored in --ar. Because
                          slide aspect == photo aspect there is never
                          any cropping, so each photo is shown exactly
                          as captured at any size.
   ============================================================ */
.gallery {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  padding-bottom: 96px;
}

.carousel {
  position: relative;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 64px; /* room for the prev/next buttons */
}

.carousel__stage { position: relative; }

.carousel__viewport {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  background: var(--navy-950);
  touch-action: pan-y; /* keep vertical page scrolling on touch */
}

/* position:relative makes each slide's offsetLeft() measured from the
   track, so the JS can centre slides even with the gap between them. */
.carousel__track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  will-change: transform;        /* hint the browser to promote to its own layer */
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: translateX(0);
}

/* Each slide keeps the media's exact aspect ratio and a uniform,
   viewport-friendly height.  (--ar is set inline on every <figure>.) */
.carousel__slide {
  flex: none;
  aspect-ratio: var(--ar);
  height: min(56vh, 520px);
  margin: 0;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--navy-950);
}

.carousel__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.carousel__media img,
.carousel__media video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* safe: slide box has the SAME ratio as the media */
}

/* ----- Slide captions ----- */
.carousel__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 21, 38, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
}

/* ----- Video slides ----- */
.carousel__media--video video { background: #000; object-fit: cover; }
.video-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(224, 0, 45, 0.95);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 21, 38, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}
.video-chip:hover { transform: translate(-50%, -50%) scale(1.08); background: var(--red-600); }
.carousel__slide.is-playing .video-chip { opacity: 0; pointer-events: none; }

/* ----- Prev / next buttons (centred vertically on the media) ----- */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-900);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.carousel__btn:hover { transform: translateY(-50%) scale(1.08); background: var(--red-500); color: #fff; }
.carousel__btn--prev { left: 10px; }
.carousel__btn--next { right: 10px; }

/* ----- Footer controls: play/pause · dots · counter ----- */
.carousel__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
  padding-inline: 12px;
}
.carousel__play {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--navy-900);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.carousel__play:hover { border-color: var(--blue-400); color: var(--blue-500); }
/* The play icon is only visible while the show is paused */
.carousel__play .ico-play { display: none; }
.carousel__play.is-paused .ico-play { display: block; }
.carousel__play.is-paused .ico-pause { display: none; }

.carousel__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.carousel__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c3cddd;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.carousel__dots button:hover { background: var(--blue-400); }
.carousel__dots button[aria-selected="true"] {
  width: 26px;
  background: var(--red-500);
}

.carousel__counter {
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: var(--slate-500);
  font-variant-numeric: tabular-nums;
}

.carousel__noscript {
  max-width: 520px;
  margin: 18px auto 0;
  text-align: center;
  color: var(--slate-500);
}

/* ---------- Fleet (generated car artwork) ---------- */
.fleet { background: var(--paper); }
.fleet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.fleet__grid figure {
  margin: 0;
  background: linear-gradient(180deg, #eaf1fb 0%, #f7faff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fleet__grid figure:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fleet__grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 38%; }
.fleet__grid figcaption {
  text-align: center;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-900);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

/* ============================================================
   VIDEO LESSONS
   Short driving-lesson videos in their own section (separate from
   the student gallery). Cards mirror the fleet cards; the media
   window is portrait-friendly since most lesson clips are vertical
   shorts. Only the card the user plays gets a busy video: every
   <video> uses preload="metadata" so page weight stays light.
   ============================================================ */
.lessons { background: linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 100%); }

.lessons__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  align-items: start;
}

.lesson-card {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.lesson-card__media {
  background: var(--navy-950);
  display: flex;
  justify-content: center;
}

.lesson-card__media video {
  width: 100%;
  max-height: 480px;
  aspect-ratio: 9 / 16;
  object-fit: contain;   /* never crop the lesson steps */
  background: var(--navy-950);
}

.lesson-card figcaption {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.lesson-card h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: var(--navy-900);
}

.lesson-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--slate-600);
}

@media (max-width: 640px) {
  .lessons__grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .lesson-card__media video { max-height: 560px; }
  .lesson-card h3 { font-size: 1.25rem; }
}

/* ============================================================
   FLOWING MARQUEE STRIP
   A duplicated image strip translated forever with CSS: pure
   decoration. The two halves are identical so the loop restarts
   invisibly. Reduced-motion users get a static strip (see end).
   ============================================================ */
.marquee {
  overflow: hidden;
  background: var(--navy-950);
  padding-block: 16px;
}
.marquee__track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 55s linear infinite;
}
.marquee__track img {
  height: 96px;
  width: auto;
  border-radius: 12px;
  object-fit: cover;
  opacity: 0.9;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- About / What we do ---------- */
.about { background: var(--bg-soft); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 52px;
  align-items: start;
}
.about__intro p { color: var(--slate-600); font-size: 1.05rem; }
.about__short {
  background: var(--paper);
  border-left: 4px solid var(--red-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.about__short strong { color: var(--navy-900); }
.about__do h3 { margin-bottom: 18px; }
.tick-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--slate-600);
}
.tick-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--blue-600);
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- Register ---------- */
.register { background: var(--bg-soft); }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field--full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(31, 105, 169, 0.15);
}
.field input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.12); }
.field textarea { resize: vertical; min-height: 110px; }
.field__hint { margin: 10px 0 0; font-size: 0.85rem; color: var(--slate-500); }
.field__hint strong { color: var(--success); }

.checkout > .btn { margin-top: 22px; }
.checkout__note {
  margin: 14px 0 0;
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 1.4em;
}
.checkout__note.ok { color: var(--success); }
.checkout__note.err { color: var(--danger); }

.radio-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 560px) {
  .radio-cards { grid-template-columns: repeat(2, 1fr); }
}
.radio-card { cursor: pointer; position: relative; }
.radio-card input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.radio-card__body {
  display: block;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.radio-card:hover .radio-card__body { border-color: var(--blue-400); }
.radio-card input:checked + .radio-card__body {
  border-color: var(--blue-500);
  background: var(--bg-tint);
  box-shadow: 0 0 0 3px rgba(31, 105, 169, 0.15);
}
.radio-card input:focus-visible + .radio-card__body { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.radio-card__body strong { display: block; font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.5px; color: var(--navy-900); }
.radio-card__body small { display: block; color: var(--slate-500); font-size: 0.75rem; }
.radio-card__body b { display: block; margin-top: 6px; font-family: var(--font-head); font-size: 1.15rem; letter-spacing: 0.5px; color: var(--blue-600); }

/* ---------- Scheduling (behind-the-wheel slot picker) ---------- */
.schedule {
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.schedule > label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--navy-900);
}
.slot-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  min-height: 44px;
}
.slot-pill {
  position: relative;
  cursor: pointer;
}
.slot-pill input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.slot-pill span {
  display: block;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-900);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.slot-pill:hover span { border-color: var(--blue-400); }
.slot-pill input:checked + span {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 84, 165, 0.18);
}
.slot-pill input:focus-visible + span { outline: 3px solid var(--blue-400); outline-offset: 2px; }

/* Booked slots: shown greyed-out with a 'Booked' label instead of being
   hidden, so students can see demand and pick another day confidently. */
.slot-pill.is-booked { cursor: not-allowed; }
.slot-pill.is-booked span {
  background: var(--bg-soft);
  border-color: var(--line);
  border-style: dashed;
  color: var(--slate-500);
  opacity: 0.75;
}
.slot-pill.is-booked span em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  margin-top: 1px;
}

/* ---------- Availability calendar (shared) ----------
   A 14-day strip of day cells above the date picker.  Used in the
   register modal, the student reschedule dialog and the admin Move
   dialog.  Green = every slot open, amber = partly booked, red =
   fully booked, grey = closed (Sundays).  Clicking an available day
   jumps the date picker there. */
.avail-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 16px;
}
.avail-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 2px 6px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.avail-cell:hover:not(:disabled) { border-color: var(--blue-400); transform: translateY(-1px); }
.avail-cell:disabled { cursor: not-allowed; }
.avail-cell.is-selected { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(0, 84, 165, 0.18); }
.avail__dow { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-500); }
.avail__dom { font-size: 1.02rem; font-weight: 600; color: var(--navy-900); line-height: 1.15; }
.avail__free { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.03em; }
/* Weekly allocation label: 'of 9' under the free count, so the admin's
   Mon-Sat pattern is visible on every cell at a glance. */
.avail__alloc { font-size: 0.56rem; font-weight: 600; color: var(--slate-500); opacity: 0.85; }
.avail--open { border-color: #bfe3cf; background: #f2fbf5; }
.avail--open .avail__free { color: var(--success); }
.avail--partial { border-color: #f2d9a8; background: #fffaef; }
.avail--partial .avail__free { color: #b45309; }
.avail--full { border-color: var(--line); background: var(--bg-soft); }
.avail--full .avail__free { color: var(--danger); }
.avail--full .avail__dom { color: var(--slate-500); }
.avail--closed { opacity: 0.5; background: var(--bg-soft); }
.avail--closed .avail__free { color: var(--slate-500); }

/* ---------- Contact ---------- */
.contact { background: var(--paper); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact__list { margin-top: 26px; display: flex; flex-direction: column; gap: 6px; }
.contact__list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: background 0.15s ease;
}
.contact__list a:hover { background: var(--bg-tint); text-decoration: none; }
.contact__list svg {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  background: var(--bg-tint);
  color: var(--blue-600);
  border-radius: 12px;
}
.contact__list span { display: flex; flex-direction: column; font-size: 1.08rem; color: var(--slate-500); }
.contact__list strong { color: var(--navy-900); font-size: 1.18rem; }
.contact__hours {
  margin-top: 22px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 1.06rem;
}
.contact__hours p { margin: 4px 0 0; color: var(--slate-600); }
.contact__areas { margin-top: 18px; font-size: 1.08rem; color: var(--slate-600); }
.contact__areas strong { color: var(--navy-900); }

/* ---------- "Any questions?" strip (reference footertop) ---------- */
.askbar { background: var(--blue-600); color: #fff; padding-block: 34px; }
.askbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.askbar h2 { color: #fff; margin: 0; }
.askbar__q { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.askbar__a { font-size: clamp(2.1rem, 4.5vw, 3rem); }
.askbar__a a { color: #fff; text-decoration: none; }
.askbar__a a:hover { text-decoration: underline; }
.askbar__sep { opacity: .7; margin: 0 .15em; }
@media (max-width: 720px) {
  .askbar__a { font-size: clamp(1.4rem, 5.5vw, 2rem); }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-950);
  color: #aebdd6;
  padding-block: 60px 28px;
  font-size: 1.08rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer__brand p { max-width: 34ch; }
.footer__col h3 {
  color: #fff;
  font-size: 1.45rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.footer__col li { margin-bottom: 8px; }
.footer__col a, .footer__col button {
  color: #aebdd6;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer__col a:hover, .footer__col button:hover { color: #fff; }
.footer__col p strong { color: #fff; }
.footer__social { display: flex; gap: 10px; margin-top: 14px; }
.footer__social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #c9d6ea;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.footer__social a:hover { background: var(--blue-500); color: #fff; transform: translateY(-2px); text-decoration: none; }
.footer__badges li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  color: #aebdd6;
}
.footer__badges li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue-400);
  font-weight: 700;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.95rem;
}
.footer__bottom p { margin: 0; }

/* ---------- Login modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 21, 38, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal__dialog {
  position: relative;
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 30px 28px 24px;
  animation: modal-in 0.22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background: var(--bg-tint); color: var(--red-500); }
.modal__dialog h2 { font-size: 2rem; }
.modal__sub { color: var(--slate-600); margin-bottom: 20px; }
.modal__dialog .field { margin-bottom: 14px; }
.modal__dialog .btn { width: 100%; margin-top: 6px; }

/* ---------- Register modal (popup booking form) ---------- */
.modal--register .modal__dialog { padding-top: 34px; }
.modal__dialog--wide {
  width: min(720px, 100%);
  max-height: 92vh;
  overflow-y: auto;
}
.modal--register .eyebrow { margin: 0 0 4px; }
.modal--register h2 { margin-bottom: 4px; }
.modal--register .modal__sub { margin-bottom: 18px; }
.modal--register .panel {
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 22px 20px;
}
.modal__foot {
  margin: 18px 0 0;
  font-size: 0.8rem;
  color: var(--slate-500);
  text-align: center;
}

/* ---------- Login modal tabs (Student / Staff) ---------- */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.login-tab {
  border: 0;
  background: transparent;
  padding: 9px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.login-tab:hover { color: var(--navy-900); }
.login-tab.is-active {
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 28, 51, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__grid { grid-template-columns: 1fr; gap: 36px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .topbar__contact a:nth-child(3) { display: none; } /* long e-mail moves to footer/contact on small screens */
  .carousel { padding-inline: 44px; }
  .carousel__btn--prev { left: 4px; }
  .carousel__btn--next { right: 4px; }
}

@media (max-width: 820px) {
  section { padding-block: 64px; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0;
    top: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    background: var(--navy-950);
    padding: 96px 28px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 90;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__list > li > a,
  .nav__parent {
    color: #fff;
    font-size: 1.15rem;
    width: 100%;
    justify-content: space-between;
    padding: 12px 4px;
  }
  .nav__parent .nav__caret { transform: rotate(-90deg); }
  .nav__list > li.has-dropdown.is-open .nav__caret { transform: rotate(0deg); }
  /* Dropdowns become stacked accordion panels inside the mobile menu */
  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    padding: 4px 8px 8px;
  }
  .has-dropdown.is-open .dropdown { display: block; }
  .dropdown a { color: #c9d6ea; }
  .dropdown a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .nav__actions { flex-direction: column; gap: 12px; margin-top: 16px; }
  .nav__actions .btn { width: 100%; }
  .nav__login { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
  .carousel__slide { height: min(54vh, 460px); }
  .hero { min-height: 64vh; }
  .askbar__inner { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar__contact { gap: 12px; }
  .topbar__contact a:nth-child(2) { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .panel { padding: 20px; }
  .carousel { padding-inline: 12px; }
  .carousel__slide { height: min(46vh, 400px); }
  .carousel__btn { width: 38px; height: 38px; }
  .carousel__caption { font-size: 0.78rem; }
  .marquee__track img { height: 72px; }
  .slider-caption { padding: 18px 16px 22px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .carousel__track { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- SMS opt-in checkbox (registration form) ---------- */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy-900);
  cursor: pointer;
}
.check input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}
.check small {
  display: block;
  font-weight: 400;
  color: var(--slate-500);
  font-size: 0.8rem;
}

/* ---------- Footer: discreet staff-login link ---------- */
.footer__admin a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__admin a:hover { color: #fff; }

/* ============================================================
   STUDENT PROFILE POPUP  (index.html #studentProfileModal)
   ------------------------------------------------------------
   The popup reuses the shared .modal / .modal__dialog chrome;
   these rules style its account cards, payment badge and the
   booking list that main.js renders into #popupBookings.
   ============================================================ */
.student-popup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.student-popup-head h2 { margin: 0; color: var(--navy-900); font-family: "Bebas Neue", sans-serif; font-size: 1.65rem; letter-spacing: .04em; }
.student-popup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.student-popup-card { background: var(--bg-soft, #f8fafc); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.student-popup-card span { display: block; color: var(--slate-500); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.student-popup-card strong { color: var(--navy-900); font-size: .92rem; word-break: break-word; }
.student-popup-payment { display: inline-block; margin: 4px 0 18px; padding: 7px 12px; border-radius: 999px; background: #e7f6ee; color: var(--success); font-weight: 700; font-size: .82rem; }
.student-popup-section { border-top: 1px solid var(--line); padding-top: 16px; }
.student-popup-section h3 { margin: 0 0 10px; color: var(--navy-900); font-size: 1rem; }
.student-popup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.student-popup-actions .btn { padding: 8px 12px; font-size: .8rem; }
.student-popup-booking { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.student-popup-booking__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.student-popup-booking__title { font-weight: 700; color: var(--navy-900); }
.student-popup-booking__meta { color: var(--slate-500); font-size: .82rem; margin-top: 4px; }
.student-popup-status { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.student-popup-status.paid { color: var(--success); }
.student-popup-status.pending { color: #b45309; }

@media (max-width: 600px) {
  .student-popup-grid { grid-template-columns: 1fr; }
  .student-popup-head { align-items: stretch; flex-direction: column; }
}