/* =========================================================================
   main.css — layout primitives + global chrome (header, nav, footer)
   Section-specific styles (hero, stats, courses…) are added as we build them.
   ========================================================================= */

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--margin-inline);
}

.section { padding-block: var(--space-section); }

/* Eyebrow label — the small uppercase kicker above headings */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;       /* 15px */
  font-weight: 600;
  line-height: 1.2;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: transform var(--transition), background-color var(--transition),
              color var(--transition), box-shadow var(--transition);
}
.btn--primary {
  background: var(--color-primary-bright);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-lg); }
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover { background: rgba(159, 0, 18, 0.05); color: var(--color-primary); }
.btn--lg { padding: 1rem 2rem; font-size: 1.0625rem; }

/* =========================================================================
   Site header / navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 72px;
}

.site-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  text-transform: uppercase;
}
.site-brand:hover { color: var(--color-primary); }
.site-brand img { max-height: 44px; width: auto; }

/* WordPress custom-logo (Appearance -> Customize -> Site Identity) */
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 38px; width: auto; }

/* Primary menu */
.primary-nav { display: none; }
.primary-nav ul { display: flex; align-items: center; gap: 2rem; }
.primary-nav a {
  font-weight: 500;
  color: var(--color-muted);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { color: var(--color-primary); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom-color: var(--color-primary);
}

.site-header__actions { display: flex; align-items: center; gap: var(--space-sm); }

/* Mobile menu toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-ink);
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile menu panel */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-line);
  background: var(--color-surface);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; padding-block: var(--space-sm); }
.mobile-nav a {
  display: block;
  padding: 0.75rem var(--margin-inline);
  font-weight: 500;
  color: var(--color-ink);
}
.mobile-nav a:hover { color: var(--color-primary); background: var(--color-surface-gray); }

@media (min-width: 900px) {
  .primary-nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* =========================================================================
   Site footer
   ========================================================================= */
.site-footer {
  background: var(--color-dark);
  color: var(--color-on-dark-muted);
}
.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding-block: var(--space-section);
}
.site-footer__brand { display: inline-block; margin-bottom: var(--space-sm); }
.site-footer__logo { display: block; width: 175px; max-width: 100%; height: auto; }
.site-footer__blurb { max-width: 32ch; color: var(--color-on-dark-muted); }

.footer-col__title {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-md);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.875rem; }
.footer-col a { color: var(--color-on-dark-muted); }
.footer-col a:hover { color: var(--color-primary); }

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin: 0 0 0.875rem;
  color: var(--color-on-dark-muted);
}
.footer-contact svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-primary); margin-top: 2px; }
.footer-contact a { color: var(--color-on-dark-muted); }
.footer-contact a:hover { color: #fff; }

.social-links { display: flex; gap: 0.75rem; margin-top: var(--space-md); }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: background-color var(--transition);
}
.social-links a:hover { background: var(--color-primary); color: #fff; }
.social-links svg { width: 20px; height: 20px; }

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-block: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-small);
}
.site-footer__meta { display: flex; flex-direction: column; gap: 0.25rem; }
.site-footer__meta p { margin: 0; }
.site-footer__credit a { color: #fff; }
.site-footer__credit a:hover { color: var(--color-primary); }

.site-footer__legal { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-footer__legal a { color: var(--color-on-dark-muted); }
.site-footer__legal a:hover { color: #fff; }

@media (min-width: 768px) {
  .site-footer__top { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
  .site-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* =========================================================================
   Home: Hero
   ========================================================================= */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); overflow: hidden; }

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero__badge {
  display: inline-block;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(159, 0, 18, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
}

.hero__title { margin-block: var(--space-md) var(--space-sm); max-width: 14ch; }
.hero__lead { font-size: var(--fs-body-lg); color: var(--color-muted); max-width: 46ch; margin-bottom: var(--space-md); }

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); }

.hero__ticks { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.hero__tick { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--color-muted); font-weight: 500; }
.hero__tick svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

.hero__media { position: relative; }
.hero__figure {
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero__figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

/* soft brand accent behind the image */
.hero__media::before {
  content: "";
  position: absolute;
  inset: auto -8% -10% auto;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(159, 0, 18, 0.08), transparent 70%);
  z-index: -1;
}

@media (min-width: 900px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 72px);
    min-height: calc(100svh - 72px); /* fills the viewport so the stats bar starts below the fold */
  }
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; }
}

/* Hero trust card (frosted glass) */
.hero__trust {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  max-width: 16rem;
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero__trust-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}
.hero__trust-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(159, 0, 18, 0.12);
  color: var(--color-primary);
}
.hero__trust-icon svg { width: 22px; height: 22px; }
.hero__trust-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--color-ink);
}
.hero__trust p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #41454d;
}
@media (min-width: 900px) {
  .hero__trust { left: -1.25rem; bottom: -1.25rem; }
}

/* =========================================================================
   Home: Stats bar
   ========================================================================= */
.stats {
  background: var(--color-dark);
  color: var(--color-on-dark);
  padding-block: 3rem;
}
/* Count-driven layout. The template puts data-count="N" (1–5) on the grid;
   the bar sizes itself to however many stats MacLav has filled in. */
.stats__grid {
  display: grid;
  grid-template-columns: 1fr;      /* mobile base, and the count=1 case */
  gap: var(--space-md);
  text-align: center;
}
/* Mobile (<768px): 2-up once there's more than one stat. A lone trailing item
   on an odd count spans both columns so it stays centred. */
@media (max-width: 767px) {
  .stats__grid:not([data-count="1"]) { grid-template-columns: repeat(2, 1fr); }
  .stats__grid[data-count="3"] .stats__item:last-child,
  .stats__grid[data-count="5"] .stats__item:last-child { grid-column: 1 / -1; }
}
.stats__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.5rem);
  line-height: 1.1;
  color: #fff;
}
.stats__label {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-dark-muted);
}
/* Desktop (>=768px): one row that fills the width evenly whatever the count —
   flex:1 gives 1 = full-width/centred, 2 = half each, up to 5 = fifths.
   nowrap + min-width:0 keeps five short figures on a single line; the thin
   divider then only ever sits between items on that one row. */
@media (min-width: 768px) {
  .stats__grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
  }
  .stats__item {
    flex: 1 1 0;
    min-width: 0;
  }
  .stats__item + .stats__item { border-left: 1px solid rgba(255, 255, 255, 0.1); }
}

/* =========================================================================
   Home: Courses
   ========================================================================= */
.courses__head {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto var(--space-lg);
}
.courses__head h2 { margin-block: 0.5rem; }
.courses__head p { color: var(--color-muted); font-size: var(--fs-body-lg); margin: 0; }

.courses__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
@media (min-width: 768px) {
  .courses__grid { grid-template-columns: repeat(2, 1fr); }
}

.course-card {
  position: relative;               /* anchor for the stretched card link */
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.course-card--linked:hover,
.course-card--linked:focus-within { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.course-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(159, 0, 18, 0.1);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}
.course-card__icon svg { width: 28px; height: 28px; }
.course-card__title { margin: 0 0 var(--space-xs); }
.course-card__desc { color: var(--color-muted); margin: 0 0 var(--space-md); flex-grow: 1; }
.course-card__points { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: var(--space-lg); }
.course-card__points li { display: flex; align-items: center; gap: 0.625rem; color: var(--color-ink); font-weight: 500; }
.course-card__points svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }
.course-card__cta { width: 100%; }
/* Stretched link: the button's hit area covers the whole card, so the card is
   clickable wherever the hover lift suggests. Still one link in the markup. */
.course-card__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Live Zoom feature card */
.course-zoom {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  background: var(--color-soft-blue);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.course-zoom__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: var(--space-xs); }
.course-zoom__head h3 { margin: 0; }
.course-zoom__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-primary);
}
.course-zoom__icon svg { width: 24px; height: 24px; }
.course-zoom__body p { margin: 0; color: var(--color-ink); max-width: 60ch; }
@media (min-width: 768px) {
  .course-zoom { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-lg); }
  .course-zoom .btn { flex-shrink: 0; }
}

/* =========================================================================
   Home: Why MacLav
   ========================================================================= */
.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.why__intro h2 { margin-block: 0.5rem 0.75rem; max-width: 18ch; }
.why__intro > p { color: var(--color-muted); font-size: var(--fs-body-lg); margin-bottom: var(--space-lg); max-width: 48ch; }

.why__features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
.why__feature svg { width: 30px; height: 30px; color: var(--color-primary); }
.why__feature h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.5rem 0 0.25rem;
}
.why__feature p { font-size: var(--fs-small); color: var(--color-muted); margin: 0; }

/* Below 1024px the collage follows the features as a compact two-photo strip
   (no tilted panel, smaller offset), so real learner photos are seen on phones
   without breaking the reading flow. */
.why__media {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.why__collage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.why__collage img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.why__collage img:first-child { margin-top: 1.5rem; }

@media (min-width: 640px) {
  .why__features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .why__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .why__media { position: relative; max-width: none; margin-inline: 0; }
  .why__collage img:first-child { margin-top: 3rem; }
  .why__media::before {
    content: "";
    position: absolute;
    inset: -2.5rem;
    background: var(--color-primary-wash); /* same as the guide warning callout */
    border-radius: 4rem;
    transform: rotate(-6deg);
    z-index: 0;
  }
}

/* =========================================================================
   Home: Testimonial carousel
   ========================================================================= */
.testimonial {
  background: var(--color-dark);
  color: var(--color-on-dark);
  text-align: center;
}
.testimonial .eyebrow { color: var(--color-primary-bright); }

.testimonial__carousel {
  position: relative;
  max-width: 52rem;
  margin: var(--space-md) auto 0;
}
.testimonial__carousel:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

/* Viewport clips; track slides one full width per step (JS sets the transform). */
.testimonial__viewport { overflow: hidden; }
.testimonial__track {
  display: flex;
  transition: transform 0.45s ease;
}
.testimonial__item {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  position: relative;
}

.testimonial__quote {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  font-style: italic;             /* 21 Sep: reads as quoted speech, not site copy */
  line-height: 1.45;
  color: #fff;
  margin: 0 0 var(--space-lg);
  padding-block: 3.5rem;          /* room for the marks above and below */
  padding-inline: 2.5rem;         /* keeps text clear of the corner marks */
}

/* Automatic decorative quote marks — applied to every testimonial */
.testimonial__quote::before,
.testimonial__quote::after {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 9vw, 6rem);
  line-height: 1;
  color: rgba(198, 29, 35, 0.55);
}
.testimonial__quote::before { content: "\201C"; top: 0; left: 0; }
.testimonial__quote::after  { content: "\201D"; bottom: 0; right: 0; }

.testimonial__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}
.testimonial__role {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-dark-muted);
}

/* Controls sit below the quote rather than floating over it: the decorative
   quote marks occupy all four corners of the text block, so side-overlaid
   arrows would collide with them at narrow widths. Rendered by PHP only when
   there is more than one testimonial. */
.testimonial__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.testimonial__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}
.testimonial__nav:hover {
  background: var(--color-primary-bright);
  border-color: var(--color-primary-bright);
}
.testimonial__nav:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}
.testimonial__nav svg { width: 20px; height: 20px; display: block; }

.testimonial__dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.testimonial__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}
.testimonial__dot:hover { background: rgba(255, 255, 255, 0.6); }
.testimonial__dot.is-active {
  background: var(--color-primary-bright);
  transform: scale(1.35);
}
.testimonial__dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial__track { transition: none; }
  .testimonial__dot.is-active { transform: none; }
}

/* =========================================================================
   Home: CTA
   ========================================================================= */
.cta__panel {
  position: relative;
  overflow: hidden;
  background: var(--color-primary-bright);
  color: #fff;
  text-align: center;
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 1.5rem + 5vw, 4.5rem) clamp(1.5rem, 1rem + 3vw, 3rem);
  box-shadow: var(--shadow-lg);
}
.cta__panel::before,
.cta__panel::after {
  content: "";
  position: absolute;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.cta__panel::before { top: -8rem; right: -6rem; background: rgba(255, 255, 255, 0.15); }
.cta__panel::after  { bottom: -8rem; left: -6rem; background: rgba(0, 0, 0, 0.15); }
.cta__panel > * { position: relative; z-index: 1; }

.cta__title { color: #fff; margin: 0 0 var(--space-sm); }
.cta__lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-body-lg);
  max-width: 38rem;
  margin: 0 auto var(--space-lg);
}

/* Buttons on the red panel: primary = solid white with red text; secondary =
   white outline that fills white on hover. Both keep the base .btn 2px border
   so their heights match. */
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}
.cta__action {
  min-width: 12rem;
  background: #fff;
  color: var(--color-primary-bright);
  border-color: #fff;
}
.cta__action:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary-bright);
  border-color: rgba(255, 255, 255, 0.9);
}
.cta__action--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}
.cta__action--ghost:hover {
  background: #fff;
  color: var(--color-primary-bright);
  border-color: #fff;
}

.cta__note { margin: var(--space-md) 0 0; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.65); }

/* =========================================================================
   Courses (CPT) — archive & single
   ========================================================================= */
.archive-head { text-align: center; max-width: 42rem; margin: 0 auto var(--space-lg); min-height: 11rem; }
.archive-head h1 { font-size: var(--fs-title); margin-block: 0.5rem; text-wrap: balance; }
.archive-head p { color: var(--color-muted); font-size: var(--fs-body-lg); margin: 0; }

.course-archive {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 600px) { .course-archive { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .course-archive { grid-template-columns: repeat(3, 1fr); } }

.course-archive__card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.course-archive__card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.course-archive__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.course-archive__link:hover { color: inherit; }
.course-archive__media { aspect-ratio: 16 / 10; background: var(--color-surface-gray); overflow: hidden; }
.course-archive__media img { width: 100%; height: 100%; object-fit: cover; }
.course-archive__body { display: flex; flex-direction: column; flex-grow: 1; padding: var(--space-md); }
.course-archive__title { font-size: var(--fs-h3); margin: 0 0 var(--space-xs); }
.course-archive__excerpt { color: var(--color-muted); font-size: var(--fs-small); margin: 0 0 var(--space-md); flex-grow: 1; }
.course-archive__more { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--color-primary); font-weight: 600; font-size: var(--fs-small); }
.course-archive__more svg { width: 18px; height: 18px; }

/* "More guides" at the foot of a single guide (20 Sep). Reuses the archive
   cards; three across on wide screens, one on phones. */
.related-guides { margin: var(--space-xl) 0 0; }
.related-guides__title { font-size: var(--fs-h2); margin: 0 0 var(--space-md); }
@media (min-width: 600px) { .course-archive--related { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .course-archive--related { grid-template-columns: repeat(3, 1fr); } }

/* Single course */
/* Full container width, like the homepage (14 Nov). Text inside is held to
   a reading measure by the "Page width" section at the end of this file. */
.course-single { max-width: none; }
.course-single__back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--color-muted); font-weight: 500; font-size: var(--fs-small); margin-bottom: var(--space-md); }
.course-single__back:hover { color: var(--color-primary); }
.course-single__back svg { width: 18px; height: 18px; transform: rotate(180deg); }
.course-single__title { font-size: var(--fs-title); margin: 0 0 var(--space-md); text-wrap: balance; }
.course-single__media { margin: 0 0 var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; }
.course-single__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.course-single__content { font-size: var(--fs-body-lg); }
.course-single__content h2 { margin-top: var(--space-lg); }
.course-single__content ul, .course-single__content ol { padding-left: 1.5rem; margin: 0 0 var(--space-md); }
.course-single__content ul li { list-style: disc; margin-bottom: 0.4rem; }
.course-single__content ol li { list-style: decimal; margin-bottom: 0.4rem; }
/* Inline images inside a Text section of a guide.
   Scoped to .mlv-text rather than the whole content area: guide bodies are
   now built from sections, and a blanket rule here also hit the video
   thumbnail (whose height:100% it overrode, so it could not fill its 16:9
   frame) and the Step screenshots (capping them at 480px). Step and Image
   sections carry their own sizing in blocks.css. */
.mlv-text img {
  max-width: min(480px, 100%);
  height: auto;
  margin: var(--space-sm) 0 var(--space-md);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.mlv-text figure {
  margin: var(--space-sm) 0 var(--space-md);
  max-width: min(480px, 100%);
}
.mlv-text figure img { margin: 0; }
.course-single__cta {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-surface-gray);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  text-align: center;
}
.course-single__cta h2 { margin: 0 0 var(--space-xs); }
.course-single__cta p { color: var(--color-muted); margin: 0 0 var(--space-md); }

/* Pagination (shared) */
.pagination { margin-top: var(--space-lg); display: flex; justify-content: center; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding: 0 0.75rem;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  color: var(--color-ink); font-weight: 500;
}
.pagination .page-numbers.current { background: var(--color-primary-bright); color: #fff; border-color: transparent; }
.pagination a.page-numbers:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* =========================================================================
   News (Posts) — listing & single
   ========================================================================= */
.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 600px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .post-list { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.post-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.post-card__link:hover { color: inherit; }
.post-card__media { aspect-ratio: 16 / 10; background: var(--color-surface-gray); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; flex-grow: 1; padding: var(--space-md); }
.post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: var(--space-xs); font-size: var(--fs-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); }
.post-card__cat { color: var(--color-primary); font-weight: 700; }
.post-card__title { font-size: var(--fs-h3); margin: 0 0 var(--space-xs); }
.post-card__excerpt { color: var(--color-muted); font-size: var(--fs-small); margin: 0 0 var(--space-md); flex-grow: 1; }
.post-card__more { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--color-primary); font-weight: 600; font-size: var(--fs-small); }
.post-card__more svg { width: 18px; height: 18px; }

/* Single post */
.post-single { max-width: none; }
.post-single__back { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: var(--space-md); color: var(--color-muted); font-weight: 500; font-size: var(--fs-small); }
.post-single__back:hover { color: var(--color-primary); }
.post-single__back svg { width: 18px; height: 18px; transform: rotate(180deg); }
.post-single__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: var(--space-xs); font-size: var(--fs-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); }
.post-single__cat { color: var(--color-primary); font-weight: 700; }
.post-single__title { font-size: var(--fs-title); margin: 0 0 var(--space-md); text-wrap: balance; }
.post-single__media { margin: 0 0 var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; }
.post-single__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-single__content { font-size: var(--fs-body-lg); }
.post-single__content h2 { margin-top: var(--space-lg); }
.post-single__content ul, .post-single__content ol { padding-left: 1.5rem; margin: 0 0 var(--space-md); }
.post-single__content ul li { list-style: disc; margin-bottom: 0.4rem; }
.post-single__content ol li { list-style: decimal; margin-bottom: 0.4rem; }

/* =========================================================================
   Static pages (About, Partnership, Contact, etc.)
   ========================================================================= */
.page-single { max-width: none; }
.page-single__title { font-size: var(--fs-title); margin: 0 0 var(--space-lg); text-wrap: balance; }

/* -------------------------------------------------------------------------
   Title accent (21 Sep)

   A short red rule under the page title on every template EXCEPT the homepage
   hero, which uses --fs-display and carries its own badge and lead. The
   selector list is the same set of headings that use --fs-title, so a new
   template gets the accent by adding its title class here.
   ------------------------------------------------------------------------- */
.page-single__title::after,
.course-single__title::after,
.post-single__title::after,
.vacancy-single__title::after,
.enrol-intro__title::after,
.archive-head h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin-top: var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-primary);
}
/* The three archive headers (Guides, Articles, Vacancies) are centred blocks
   above a card grid, so the accent centres with them rather than sitting out
   on the left. */
.archive-head h1::after { margin-inline: auto; }
.page-single__media { margin: 0 0 var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; }
.page-single__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page-single__content { font-size: var(--fs-body-lg); }
.page-single__content h2 { margin-top: var(--space-lg); }
.page-single__content h3 { margin-top: var(--space-md); }
.page-single__content p { margin-bottom: var(--space-md); }
.page-single__content ul, .page-single__content ol { padding-left: 1.5rem; margin: 0 0 var(--space-md); }
.page-single__content ul li { list-style: disc; margin-bottom: 0.4rem; }
.page-single__content ol li { list-style: decimal; margin-bottom: 0.4rem; }
.page-single__content img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.page-single__content a { color: var(--color-primary); text-decoration: underline; }

/* =========================================================================
   Gutenberg block tweaks inside page/post content
   ========================================================================= */
.page-single__content .wp-block-media-text,
.post-single__content .wp-block-media-text { margin-block: var(--space-lg); align-items: center; }
.page-single__content .wp-block-media-text img,
.post-single__content .wp-block-media-text img { border-radius: var(--radius-lg); }
.page-single__content .wp-block-media-text__content > :first-child,
.post-single__content .wp-block-media-text__content > :first-child { margin-top: 0; }

/* Reusable CTA band — button on the red panel (mirrors .cta__submit) */
.cta__btn { background: var(--color-dark); color: #fff; border: 0; }
.cta__btn:hover { background: #1f2121; color: #fff; }

/* =========================================================================
   Contact form (Contact Form 7)
   ========================================================================= */
.page-single__content .wpcf7 .cf-field { display: block; margin-bottom: var(--space-md); }
.page-single__content .wpcf7 .cf-label { display: block; margin-bottom: var(--space-xs); font-weight: 600; font-size: var(--fs-small); color: var(--color-ink); }
.page-single__content .wpcf7 .cf-req { color: var(--color-primary); }
.page-single__content .wpcf7 .cf-optional { color: var(--color-muted); font-weight: 400; }

.page-single__content .wpcf7 input[type="text"],
.page-single__content .wpcf7 input[type="email"],
.page-single__content .wpcf7 input[type="tel"],
.page-single__content .wpcf7 select,
.page-single__content .wpcf7 textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: inherit;
  font-size: var(--fs-body);
}
.page-single__content .wpcf7 textarea { min-height: 8rem; resize: vertical; }
.page-single__content .wpcf7 input:focus,
.page-single__content .wpcf7 select:focus,
.page-single__content .wpcf7 textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(159, 0, 18, 0.12);
}

.page-single__content .wpcf7 .cf-consent { margin-bottom: var(--space-md); font-size: var(--fs-small); color: var(--color-muted); }
.page-single__content .wpcf7 .cf-consent label { display: flex; gap: 0.5rem; align-items: flex-start; }
.page-single__content .wpcf7 .cf-consent input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; }
.page-single__content .wpcf7 .cf-consent a { color: var(--color-primary); text-decoration: underline; }
.page-single__content .wpcf7 .cf-submit { margin: 0; }

.page-single__content .wpcf7-not-valid-tip { margin-top: var(--space-xs); color: var(--color-primary); font-size: var(--fs-small); }
.page-single__content .wpcf7-response-output { margin: var(--space-md) 0 0; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); font-size: var(--fs-small); }

/* Contact details column */
.contact-details { font-size: var(--fs-small); }
.contact-details h2 { font-size: var(--fs-h3); margin: 0 0 var(--space-md); }
.contact-details p { margin: 0 0 var(--space-sm); }
.contact-details a { color: var(--color-primary); text-decoration: underline; }

/* Two-up rows for short contact fields */
.page-single__content .wpcf7 .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-bottom: var(--space-md); align-items: end; }
.page-single__content .wpcf7 .cf-row .cf-field { margin-bottom: 0; }
@media (max-width: 559px) {
  .page-single__content .wpcf7 .cf-row { grid-template-columns: 1fr; align-items: stretch; }
}

/* -------------------------------------------------------------------------
   Language switcher — mobile collapse

   Eight chips wrap to three rows on a phone, which pushed the heading most
   of the way down the first screen. Below 700px they collapse behind a globe
   button showing the current language. The globe reads without English,
   which the chips do not.

   The button carries `hidden` in the markup and is revealed by JavaScript,
   so with JS unavailable the list simply renders as it always did.
   ------------------------------------------------------------------------- */
.lang-switcher__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.45rem 0.8rem;
	font-family: var(--font-body);
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: var(--lh-tight);
	color: var(--color-ink);
	background: var(--color-surface);
	border: 1px solid var(--color-line);
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.lang-switcher__toggle[hidden] { display: none; }

.lang-switcher__globe {
	width: 1.05rem;
	height: 1.05rem;
	flex: 0 0 auto;
	fill: none;
	stroke: var(--color-primary);
	stroke-width: 1.8;
}
.lang-switcher__caret {
	width: 0.7rem;
	height: 0.7rem;
	flex: 0 0 auto;
	fill: var(--color-muted);
	transition: transform 0.18s ease;
}
.lang-switcher__toggle[aria-expanded="true"] .lang-switcher__caret {
	transform: rotate(180deg);
}

@media (max-width: 699px) {
	.lang-switcher__list[hidden] { display: none; }

	/* Expanded: full-width rows rather than chips. Far easier to tap than a
	   30px pill, which matters for older learners on phones. */
	.lang-switcher.is-open .lang-switcher__list {
		display: block;
		margin-top: 0.5rem;
		background: var(--color-surface);
		border: 1px solid var(--color-line);
		border-radius: var(--radius-md);
		box-shadow: var(--shadow-sm);
		overflow: hidden;
	}
	.lang-switcher.is-open .lang-switcher__item + .lang-switcher__item {
		border-top: 1px solid var(--color-line-subtle);
	}
	.lang-switcher.is-open .lang-switcher__btn {
		display: block;
		width: 100%;
		padding: 0.7rem 0.9rem;
		border: 0;
		border-radius: 0;
		text-align: left;
		background: transparent;
		color: var(--color-ink);
	}
	.lang-switcher.is-open .lang-switcher__btn--current {
		color: var(--color-primary);
		background: #fdf5f5;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lang-switcher__caret { transition: none; }
}

/* Keep the select's chosen text tidy if it ever runs long */
.page-single__content .wpcf7 select { text-overflow: ellipsis; }

/* =========================================================================
   Vacancies (CPT) — listing strips & single detail
   ========================================================================= */
.vacancy-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.vacancy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.vacancy-row:hover { color: inherit; box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--color-primary); }
.vacancy-row__body { display: flex; flex-direction: column; gap: 0.25rem; }
.vacancy-row__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h3); color: var(--color-ink); }
.vacancy-row__summary { color: var(--color-muted); font-size: var(--fs-small); }
.vacancy-row__meta { font-size: var(--fs-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-primary); font-weight: 700; }
.vacancy-row__aside { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; color: var(--color-muted); font-size: var(--fs-small); }
.vacancy-row__aside svg { width: 20px; height: 20px; color: var(--color-primary); }
@media (max-width: 559px) {
  .vacancy-row { flex-direction: column; align-items: flex-start; }
  .vacancy-row__aside { width: 100%; justify-content: space-between; }
}

/* Empty state */
.vacancy-empty { max-width: 42rem; margin-inline: auto; text-align: center; padding: var(--space-lg); background: var(--color-surface-gray); border: 1px solid var(--color-line); border-radius: var(--radius-lg); }
.vacancy-empty p { color: var(--color-muted); margin: 0 0 var(--space-md); }
.vacancy-empty p:first-child { color: var(--color-ink); font-size: var(--fs-body-lg); font-weight: 600; }

/* Single vacancy */
.vacancy-single { max-width: none; }
.vacancy-single__back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--color-muted); font-weight: 500; font-size: var(--fs-small); margin-bottom: var(--space-md); }
.vacancy-single__back:hover { color: var(--color-primary); }
.vacancy-single__back svg { width: 18px; height: 18px; transform: rotate(180deg); }
.vacancy-single__title { font-size: var(--fs-title); margin: 0 0 var(--space-xs); text-wrap: balance; }
.vacancy-single__meta { margin: 0 0 var(--space-lg); font-size: var(--fs-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); }
.vacancy-single__media { margin: 0 0 var(--space-lg); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; }
.vacancy-single__media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.vacancy-single__content { font-size: var(--fs-body-lg); }
.vacancy-single__content h2, .vacancy-single__content h3 { margin-top: var(--space-lg); margin-bottom: var(--space-xs); }
.vacancy-single__content p { margin-bottom: var(--space-md); }
.vacancy-single__content ul, .vacancy-single__content ol { padding-left: 1.5rem; margin: 0 0 var(--space-md); }
.vacancy-single__content ul li { list-style: disc; margin-bottom: 0.4rem; }
.vacancy-single__content ol li { list-style: decimal; margin-bottom: 0.4rem; }
.vacancy-single__content a { color: var(--color-primary); text-decoration: underline; }

/* Job details box */
.vacancy-facts { margin: var(--space-lg) 0; padding: var(--space-lg); background: var(--color-surface-gray); border: 1px solid var(--color-line); border-radius: var(--radius-lg); }
.vacancy-facts__title { margin: 0 0 var(--space-md); font-size: var(--fs-h3); }
.vacancy-facts__list { display: flex; flex-direction: column; gap: 0.5rem; }
.vacancy-facts__list li { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.vacancy-facts__list strong { flex-shrink: 0; }

/* How to apply */
.vacancy-apply { margin-top: var(--space-lg); }
.vacancy-apply h2 { margin: 0 0 var(--space-xs); }
.vacancy-apply a { color: var(--color-primary); text-decoration: underline; }

/* =========================================================================
   Back-to-top button
   ========================================================================= */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary-bright);
  color: #fff;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition),
              visibility var(--transition), background-color var(--transition);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary); color: #fff; }
.back-to-top:focus-visible { outline: 3px solid rgba(159, 0, 18, 0.4); outline-offset: 2px; }
.back-to-top svg { width: 22px; height: 22px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .back-to-top, .back-to-top.is-visible { transform: none; transition: opacity 0.01ms; }
}

/* =========================================================================
   Mobile header — Contact CTA moves into the menu (below 900px)
   ========================================================================= */
@media (max-width: 899px) {
  .site-header__actions .btn { display: none; }
}

/* Higher specificity than `.mobile-nav a` so the button look survives */
.mobile-nav a.mobile-nav__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-sm) var(--margin-inline) calc(var(--space-sm) + 0.25rem);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary-bright);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.mobile-nav a.mobile-nav__cta:hover {
  color: #fff;
  background: var(--color-primary);
}

/* Outline variant for the second mobile CTA (Contact Us, below Enrol Now) */
.mobile-nav a.mobile-nav__cta--outline {
  margin-top: 0;
  color: var(--color-primary);
  background: transparent;
  border: 2px solid var(--color-primary);
  box-shadow: none;
}
.mobile-nav a.mobile-nav__cta--outline:hover {
  color: var(--color-primary);
  background: rgba(159, 0, 18, 0.05);
}

/* =========================================================================
   Navigation polish — mobile menu, hamburger toggle, desktop underline
   ========================================================================= */

/* Mobile panel: soft shadow + breathing room under the Contact CTA. */
.mobile-nav {
  box-shadow: 0 16px 24px -12px rgba(26, 28, 28, 0.18);
  padding-bottom: var(--space-md);
}

/* Centre the menu items so the hover underline matches the label width. */
.mobile-nav ul { align-items: center; }
.mobile-nav ul a { position: relative; text-align: center; }
.mobile-nav ul a:hover { background: transparent; }

/* Slide-out underline on hover/focus — mobile. */
.mobile-nav ul a::after {
  content: "";
  position: absolute;
  left: var(--margin-inline);
  right: var(--margin-inline);
  bottom: 0.45rem;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition);
  will-change: transform;
}
.mobile-nav ul a:hover::after,
.mobile-nav ul a:focus-visible::after { transform: scaleX(1); }

/* Hamburger <-> close: cross-fade + quarter-turn instead of an instant swap. */
.nav-toggle { position: relative; }
.nav-toggle .icon-menu,
.nav-toggle .icon-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition), transform var(--transition);
}
.nav-toggle .icon-close {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
.nav-toggle[aria-expanded="true"] .icon-menu {
  display: inline-flex;
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
.nav-toggle[aria-expanded="true"] .icon-close {
  display: inline-flex;
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Desktop nav — same scaleX slide-out underline as mobile. */
.primary-nav a { position: relative; border-bottom: none; transition: color var(--transition); }
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition);
  will-change: transform;
}
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after { transform: scaleX(1); }
.primary-nav .current-menu-item > a::after,
.primary-nav .current_page_item > a::after { transform: scaleX(1); }

/* Disable all nav transitions for users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav ul a::after,
  .primary-nav a::after,
  .nav-toggle .icon-menu,
  .nav-toggle .icon-close { transition: none; }
}

/* =========================================================================
   Scroll & load animations (progressive enhancement)
   ========================================================================= */

/* Reveal-on-scroll. The .reveal / .reveal-img classes are added by JS only,
   and only to below-the-fold elements — so without JS nothing hides, and
   there's never a flash of hidden content above the fold. */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-img { opacity: 0; transform: scale(0.96); }
.reveal-img.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* Hero media pop-in on load — pure CSS, so it applies before first paint
   (no flash) and needs no JS. */
@keyframes maclav-pop-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.hero__figure,
.hero__trust { animation: maclav-pop-in 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) both; }
.hero__trust { animation-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-img { opacity: 1; transform: none; }
  .reveal.is-visible,
  .reveal-img.is-visible { transition: none; }
  .hero__figure,
  .hero__trust { animation: none; }
}

/* ==========================================================================
   Enrol page (page-enrol.php)
   Buttons reuse the global .btn component; this block only adds the
   enrol-specific layout. Status colours are semantic and local to this
   component (success token for "available"; amber/blue have no brand token).
   ========================================================================== */

/* ---- Intro (two-column when a featured image is set) ---- */

.enrol-intro { padding-bottom: var(--space-md); }   /* tighten gap to availability */

.enrol-intro__inner {
	display: grid;
	gap: var(--space-lg);
}

@media (min-width: 900px) {
	.enrol-intro.has-media .enrol-intro__inner {
		grid-template-columns: 1.1fr 0.9fr;
		align-items: center;
	}
}

.enrol-intro__media {
	margin: 0;
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}

.enrol-intro__media img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.enrol-intro__title {
	/* Was flex, to sit an intake badge beside the heading; that badge is
	   now a facts widget, so this is plain block again. Uses --fs-title
	   like every other page heading — only the homepage hero keeps
	   --fs-display. */
	font-size: var(--fs-title);
	text-wrap: balance;
	margin-block: var(--space-sm) var(--space-md);
}


.enrol-intro__lead {
	max-width: 62ch;
	color: var(--color-muted);
	font-size: var(--fs-body-lg);
}

/* Booking button + postcode note share a row on wide screens, stack when narrow */
.enrol-intro__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-md);
	margin-block: var(--space-md);
}



/* Optional postcode-checker link inside the "Before you book" note.
   Shown only when the Postcode checker URL field is filled. */



/* ---- Availability ---- */

   /* tighter than full section padding */

.enrol-next__heading,
.enrol-help__heading {
	margin-bottom: var(--space-md);
}








/* Status colours */





/* ---- Before you enrol ---- */

.enrol-next {
	background: var(--color-surface-gray);
	padding-top: var(--space-lg);   /* tighten gap above the band */
}

.enrol-next__links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--space-md);
}

.enrol-next__link {
	display: block;
	padding: var(--space-md);
	color: var(--color-ink);
	background: var(--color-surface);
	border: 1px solid var(--color-line);
	border-radius: var(--radius-lg);
	transition: border-color var(--transition), box-shadow var(--transition);
}

.enrol-next__link:hover,
.enrol-next__link:focus-visible {
	border-color: var(--color-primary);
	box-shadow: var(--shadow-md);
}

.enrol-next__link-title {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--color-primary);
}

.enrol-next__link-text {
	display: block;
	font-size: var(--fs-small);
	color: var(--color-muted);
}

/* ---- Need help ---- */

.enrol-help__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 0 0 var(--space-sm);
  padding: 0;
  list-style: none;
  font-size: var(--fs-body-lg);
}
.enrol-help__contact {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.enrol-help__label {
  font-weight: 700;
  color: var(--color-ink);
}
.enrol-help__value {
  color: var(--color-primary);
}
.enrol-help__value:hover,
.enrol-help__value:focus-visible {
  text-decoration: underline;
}
.enrol-help__sms {
  font-size: var(--fs-small);
  color: var(--color-muted);
}

/* ============================================================
   Language switcher (Polylang)
   Compact button row. Reuses .btn / .btn--primary / .btn--outline;
   .lang-switcher__btn tightens them to compact chips so up to 8
   languages sit on a row and wrap cleanly on narrow screens.
   Colours/border come from .btn--*; this only overrides sizing.
   ============================================================ */
.lang-switcher { margin-block: 0 var(--switcher-gap, var(--space-md)); }

.lang-switcher {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	flex-wrap: wrap;
}
.lang-switcher__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
}

/* Desktop globe: sits before the chips and lines up with the first row of
   them. Hidden below 700px, where the toggle button has its own. */
.lang-switcher__globe--inline {
	display: none;
	width: 1.15rem;
	height: 1.15rem;
	flex: 0 0 auto;
	margin-top: 0.5rem;
	fill: none;
	stroke: var(--color-primary);
	stroke-width: 1.8;
}
@media (min-width: 700px) {
	.lang-switcher__globe--inline { display: block; }
}

.lang-switcher__item {
	margin: 0;
}

/* Compact size modifier — appended after .btn so it wins on shared props. */
.lang-switcher__btn {
	padding: 0.375rem 0.875rem;
	font-size: var(--fs-small);
	font-weight: 600;
	line-height: var(--lh-tight);
	/* Matches .btn's radius so the chips read as the same family as
	   every other button on the site. Sizing is unchanged. */
	border-radius: var(--radius-sm);
	white-space: nowrap;
}

/* The current language is a non-interactive marker, not a link:
   no pointer, no hover lift. */
.lang-switcher__btn--current {
	cursor: default;
	pointer-events: none;
	box-shadow: none;
}

/* ============================================================
   Language switcher — spacing and the desktop row (14 Nov)
   ============================================================ */

/* When the switcher opens a page it sat a full section's padding
   (56–80px) below the header but only 24px above the content. This
   pulls it up so the gap above matches the gap below. Only applies
   when the switcher is actually there: pages with one language keep
   the normal section padding. */
.lang-switcher:first-child {
	margin-top: calc(var(--switcher-gap, var(--space-md)) - var(--space-section));
}

/* 20 Nov: a little more air around the switcher now the pages carry
   less — 24px above and below on phones, 32px from 700px. Still equal
   above and below. Used only by the switcher (guides and enrol pages). */
:root { --switcher-gap: var(--space-md); }
@media (min-width: 700px) {
	:root { --switcher-gap: 2rem; }
}

/* Desktop: the globe stays beside the chips. Without this the list,
   as a whole flex item, dropped onto its own line under the globe
   whenever the chips needed a second row. Phones are left alone: there
   the open list must sit below the toggle. */
@media (min-width: 700px) {
	.lang-switcher { flex-wrap: nowrap; }
	.lang-switcher__list { flex: 1 1 auto; min-width: 0; }
}

/* ============================================================
   Page width (14 Nov)

   Guides, pages, articles and vacancies now use the full container,
   so titles, the language switcher, header images, image + text
   sections and cards line up with the logo and menu exactly as on
   the homepage. Running text is held to a comfortable reading width
   (about 75 characters) and stays left-aligned, so it starts on the
   same edge as everything else. Nothing changes on phones, where the
   screen is already narrower than the measure.
   ============================================================ */
:root { --measure: 44rem; }

.page-single__title,
.post-single__title,
.vacancy-single__title,
.course-single__title {
	max-width: var(--measure);
}

/* Featured images keep the size they had before, rather than becoming
   a 1200px-wide banner. */
.page-single__media,
.post-single__media,
.vacancy-single__media {
	max-width: 52rem;
}

/* Text and text-like blocks. Image + text sections, card grids,
   Gutenberg columns and media-text blocks are deliberately not listed:
   they use the full width. */
:is(.course-single__content, .page-single__content, .post-single__content, .vacancy-single__content)
	> :is(p, ul, ol, dl, h2, h3, h4, h5, h6, blockquote, pre, table, .mlv-text, .mlv-callout, .mlv-embed, .mlv-table, .wpcf7) {
	max-width: var(--measure);
}

/* Steps: the number column (3rem) and its gap (1.5rem) sit outside the
   measure, so the step text itself is the same width as the paragraphs. */
:is(.course-single__content, .page-single__content, .post-single__content)
	> .mlv-steps {
	max-width: calc(var(--measure) + 4.5rem);
}

/* Gutenberg images placed straight into the content keep their old cap. */
:is(.page-single__content, .post-single__content)
	> :is(.wp-block-image, .wp-block-gallery) {
	max-width: 52rem;
}

/* Inside full-width sections: the card intro, and a text section with no
   image, read as paragraphs. */
.mlv-cards__intro,
.mlv-split--noimage .mlv-split__text {
	max-width: var(--measure);
}

/* Vacancy details and how-to-apply sit after the description. */
.vacancy-facts,
.vacancy-apply {
	max-width: var(--measure);
}

/* ============================================================
   Contact page — form level with the page title (14 Nov)

   The page content is a two-column block (details | form). On wide
   screens the title and the details now stack on the left and the
   form sits on the right from the very top, instead of starting below
   the title. Only applies to a page whose content contains the
   .contact-details column. Phones and narrow screens are unchanged
   (details, then form), and browsers without :has() keep the old
   layout. 782px is where WordPress's own columns go side by side.
   ============================================================ */
@media (min-width: 782px) {
	.page-single:has(.contact-details) {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		grid-template-rows: auto auto 1fr;
		column-gap: var(--space-lg);
	}
	/* Let the details and form columns take part in the page grid. */
	.page-single:has(.contact-details) > .page-single__content,
	.page-single:has(.contact-details) > .page-single__content > .wp-block-columns {
		display: contents;
	}
	.page-single:has(.contact-details) > .page-single__head  { grid-column: 1; grid-row: 1; }
	.page-single:has(.contact-details) > .page-single__media { grid-column: 1; grid-row: 2; }
	.page-single:has(.contact-details) .contact-details      { grid-column: 1; grid-row: 3; }
	.page-single:has(.contact-details) .contact-details ~ .wp-block-column {
		grid-column: 2;
		grid-row: 1 / span 3;
	}
	.page-single:has(.contact-details) .contact-details ~ .wp-block-column .wpcf7 {
		margin-top: 0;
	}
}
