/*
 * Page-level layouts. One block per page type; each relies on tokens and
 * components rather than redefining them.
 */

/* =====================================================================
   HOME — hero
   ===================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 1rem + 5vw, 5.5rem) 0 clamp(3.5rem, 2rem + 5vw, 6rem);
  background: var(--color-surface-subtle);
  overflow: clip;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 55% at 82% 30%, rgba(var(--glow-primary-rgb), 0.22), transparent 70%),
    radial-gradient(35% 50% at 8% 90%, rgba(var(--accent-2-rgb), 0.12), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--color-surface-subtle) 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 25%, transparent 80%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}

.hero-title {
  margin: 0;
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  word-spacing: 0.08em;
  color: var(--ink-900);
}

.text-gradient {
  background: linear-gradient(100deg, var(--rose-600) 10%, var(--rose-500) 45%, var(--accent-2) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Descenders (g) would clip without a little room */
  padding-bottom: 0.08em;
}

.hero-lead {
  margin: var(--space-6) 0 0;
  max-width: 34ch;
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-10);
}

.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 560px;
}

/* ---------------------------------------------------------------------
   Service orbit: training hub + course-family icons on two rings.
   Sizes use container units (cqw) of .orbit-stage so it scales as one piece.
   --------------------------------------------------------------------- */
.hero-orbit { max-width: 540px; }

.orbit-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  container-type: inline-size;
}

.orbit-glow {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow-primary-rgb), 0.32), rgba(var(--accent-2-rgb), 0.16) 45%, transparent 70%);
  filter: blur(28px);
}

.orbit {
  position: absolute;
  border-radius: 50%;
}

.orbit-outer {
  inset: 6%;
  border: 1px dashed rgba(var(--accent-2-rgb), 0.35);
}

.orbit-inner {
  inset: 26%;
  border: 1px solid rgba(var(--glow-primary-rgb), 0.28);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 70%);
}

/* Faint middle guide ring */
.orbit-stage::before {
  content: '';
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  border: 1px solid rgba(17, 20, 27, 0.05);
}

/* Icon chips, placed around their ring by angle --a */
.orbit-chip {
  --size: clamp(48px, 12.5cqw, 68px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}

.orbit-outer .orbit-chip { --r: 44cqw; }
.orbit-inner .orbit-chip { --r: 24cqw; }
.orbit-chip-sm { --size: clamp(40px, 9.5cqw, 54px); }

.orbit-chip-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 30%;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  color: var(--rose-600);
  font-size: calc(var(--size) * 0.44);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) ease;
}

.orbit-chip:nth-child(odd) .orbit-chip-inner { color: var(--accent-2); }

.orbit-chip-inner .bi { line-height: 1; }

/* Comets: a bright dot with a fading tail running along each ring */
.orbit-comet {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(var(--glow-primary-rgb), 0.55) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
}

.orbit-comet-alt { background: conic-gradient(from 0deg, transparent 0 72%, rgba(var(--accent-2-rgb), 0.6) 100%); }

/* Hub */
.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 26cqw;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 30%;
  color: #fff;
  font-size: 11cqw;
  background: linear-gradient(140deg, var(--rose-500) 0%, var(--rose-600) 45%, var(--accent-2) 110%);
  box-shadow:
    0 30px 60px -20px rgba(var(--glow-primary-rgb), 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -12px 24px rgba(0, 0, 0, 0.12);
}

.orbit-core .bi { position: relative; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)); }

.orbit-core-pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(var(--glow-primary-rgb), 0.5);
  opacity: 0;
}

/* Twinkling sparks around the stage */
.orbit-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rose-400);
  box-shadow: 0 0 10px 2px rgba(var(--glow-primary-rgb), 0.5);
  opacity: 0.5;
}

.orbit-spark:nth-of-type(even) { background: var(--accent-2); box-shadow: 0 0 10px 2px rgba(var(--accent-2-rgb), 0.5); }

@media (prefers-reduced-motion: no-preference) {
  .orbit-outer { animation: pm-orbit 60s linear infinite; }
  .orbit-outer .orbit-chip-inner {
    animation:
      pm-orbit 60s linear infinite reverse,
      pm-chip-glow 4.5s var(--ease-in-out) infinite;
    animation-delay: 0s, calc(var(--d) * 0.75s);
  }

  .orbit-inner { animation: pm-orbit 40s linear infinite reverse; }
  .orbit-inner .orbit-chip-inner {
    animation:
      pm-orbit 40s linear infinite,
      pm-chip-glow 4.5s var(--ease-in-out) infinite;
    animation-delay: 0s, calc(var(--d) * 1.1s + 0.4s);
  }

  .orbit-comet { animation: pm-orbit 9s linear infinite; }
  .orbit-comet-alt { animation: pm-orbit 7s linear infinite reverse; }

  .orbit-core { animation: pm-core-breathe 5s var(--ease-in-out) infinite; }
  .orbit-core-pulse { animation: pm-core-pulse 3.2s var(--ease-out) infinite; }
  .orbit-core-pulse-late { animation-delay: 1.6s; }

  .orbit-spark { animation: pm-twinkle 3.6s var(--ease-in-out) infinite; animation-delay: calc(var(--d) * 0.9s); }

  /* Hovering the graphic pauses it, so a chip can be inspected */
  .orbit-stage:hover .orbit,
  .orbit-stage:hover .orbit-chip-inner,
  .orbit-stage:hover .orbit-comet { animation-play-state: paused; }
}

.orbit-chip-inner:hover { transform: scale(1.12); box-shadow: var(--shadow-lg); }

@keyframes pm-orbit { to { rotate: 360deg; } }

@keyframes pm-chip-glow {
  0%, 100% { box-shadow: var(--shadow-md); border-color: var(--color-border); }
  50% { box-shadow: 0 0 0 6px rgba(var(--glow-primary-rgb), 0.1), 0 12px 28px -8px rgba(var(--glow-primary-rgb), 0.45); border-color: var(--rose-200); }
}

@keyframes pm-core-breathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.04; }
}

@keyframes pm-core-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0; }
}

@keyframes pm-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 991.98px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { justify-self: center; max-width: 440px; }
}

@media (max-width: 575.98px) {
  .hero-actions .btn-pm { flex: 1 1 100%; }
}

/* =====================================================================
   HOME — trust band ("features")
   ===================================================================== */
.features.section { padding: clamp(2rem, 1rem + 3vw, 3.5rem) 0; background: #fff; border-bottom: 1px solid var(--color-border); }
.features .section-title { padding: 0; }

.features .section-title p {
  word-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  color: var(--ink-700);
}

.features .section-title p::before,
.features .section-title p::after {
  content: '';
  flex: 0 1 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose-300));
}

.features .section-title p::after { background: linear-gradient(90deg, var(--rose-300), transparent); }

@media (max-width: 575.98px) {
  .features .section-title p::before,
  .features .section-title p::after { display: none; }
}

/* =====================================================================
   HOME — about
   ===================================================================== */
.about .about-media {
  position: relative;
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 60% at 70% 30%, rgba(var(--glow-primary-rgb), 0.12), transparent 70%),
    var(--color-surface-subtle);
  border: 1px solid var(--color-border);
}

.about .about-media img { width: 100%; height: auto; }

.about .content2 h3 {
  font-size: var(--text-3xl);
  font-weight: 750;
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
  margin-bottom: var(--space-5);
}

.about .content2 .lead-text {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.feature-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: background-color var(--duration-base) ease, border-color var(--duration-base) ease;
}

.feature-list li:hover { background: #fff; border-color: var(--color-border); box-shadow: var(--shadow-sm); }

.feature-list li > .bi {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--rose-50);
  color: var(--rose-600);
  font-size: 1.1rem;
  border: 1px solid var(--rose-100);
}

@media (max-width: 575.98px) {
  .feature-list li { grid-template-columns: 36px 1fr; gap: 14px; padding: 12px 0; }
  .feature-list li > .bi { width: 36px; height: 36px; }
}

.feature-list li span { font-size: 0.96875rem; line-height: 1.65; }
.feature-list li b { display: block; margin-bottom: 2px; font-family: var(--font-display); font-size: var(--text-md); color: var(--color-text-primary); font-weight: 700; }

/* =====================================================================
   HOME — trending course cards
   ===================================================================== */
.courses.section { background: var(--color-surface-subtle); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.course-card { overflow: hidden; }

.course-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #141a46;
}

/* Square artwork in a square frame: shown whole and centred, never cropped
   (the course title is part of the image). */
.course-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 700ms var(--ease-out);
}

.course-card:hover .course-card-media img { transform: scale(1.045); }

.course-card .course-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-5);
  padding: var(--space-6);
}

.course-card .description {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.course-card .link-arrow { margin-top: auto; }

/* Make the whole card the click target, keeping one link for AT */
.course-card .stretched-link::after { border-radius: var(--radius-lg); }
.course-card:focus-within { box-shadow: var(--focus-ring), var(--shadow-lg); }
.course-card .stretched-link:focus-visible { outline: none; }

/* =====================================================================
   HOME — counts
   ===================================================================== */
.counts.section {
  padding: clamp(3rem, 2rem + 4vw, 5rem) 0;
  color: var(--color-text-inverse-muted);
  background:
    radial-gradient(50% 120% at 90% 0%, rgba(var(--glow-primary-rgb), 0.3), transparent 60%),
    radial-gradient(40% 100% at 0% 100%, rgba(var(--accent-2-rgb), 0.2), transparent 60%),
    var(--surface-inverse);
}

.counts .stats-item {
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-inverse);
  background: rgba(255, 255, 255, 0.03);
}

.counts .stats-item span {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-height: 1.05em; /* reserved before PureCounter fills it (no CLS) */
}

.counts .stats-item p {
  margin: 8px 0 0;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--rose-300);
}

/* =====================================================================
   COURSE PAGES — hero
   ===================================================================== */
.page-title .row:has(.course-hero-media) {
  align-items: center;
  justify-content: space-between !important;
  text-align: left !important;
  row-gap: var(--space-10);
}

.page-title .row:has(.course-hero-media) .heading p,
.page-title .row:has(.course-hero-media) p { margin-left: 0; }

.page-title .rating {
  display: inline-flex;
  vertical-align: middle;
  margin: var(--space-6) 8px 0 0;
}

.page-title .rating h4,
.page-title .rating h5 {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
}

.page-title .rating strong { color: #fff; font-weight: 700; }
.page-title .rating .bi-star-fill { color: #fbbf24; }
.page-title .rating .bi-people-fill { color: var(--rose-300); }

/* CTA pair under the course intro (markup: .animated-button > a, a) */
.animated-button {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-6);
}

.animated-button a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    box-shadow var(--duration-base) ease,
    transform var(--duration-base) var(--ease-out);
}

/* The old neon effect used four empty spans per link */
.animated-button a > span { display: none; }

.animated-button a:nth-child(1) {
  background: var(--rose-600);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(var(--glow-primary-rgb), 0.8);
}

.animated-button a:nth-child(1)::after {
  content: '\f138';
  font-family: 'bootstrap-icons';
  transition: transform var(--duration-base) var(--ease-out);
}

.animated-button a:nth-child(1):hover { background: var(--rose-500); color: #fff; transform: translateY(-1px); }
.animated-button a:nth-child(1):hover::after { transform: translateX(3px); }

.animated-button a:nth-child(2) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.animated-button a:nth-child(2)::before {
  content: '\f30a';
  font-family: 'bootstrap-icons';
  transition: transform var(--duration-base) var(--ease-out);
}

.animated-button a:nth-child(2):hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); color: #fff; transform: translateY(-1px); }
.animated-button a:nth-child(2):hover::before { transform: translateY(2px); }
.animated-button a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (max-width: 575.98px) {
  .animated-button a { flex: 1 1 100%; }
}

/* Course artwork card in the hero, with a gentle 3D tilt */
.page-title .course-hero-media {
  padding: 8px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 60px -10px rgba(var(--glow-primary-rgb), 0.35);
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform 700ms var(--ease-out);
}

.page-title .course-hero-media:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }

.page-title .course-hero-media img,
.page-title .course-hero-media svg { border-radius: var(--radius-md) !important; }

@media (max-width: 991.98px) {
  .page-title .course-hero-media { transform: none; max-width: 560px; }
}

/* =====================================================================
   COURSE PAGES — body
   ===================================================================== */
.courses-course-details.section { padding-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }

.courses-course-details .tab-content {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}

.courses-course-details .tab-content p { color: var(--color-text-secondary); }
.courses-course-details .tab-content p b,
.courses-course-details .tab-content p strong { color: var(--color-text-primary); }

.courses-course-details h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: var(--space-12) 0 var(--space-4);
  font-size: var(--text-xl);
  font-weight: 700;
}

.courses-course-details h3::before {
  content: '';
  flex-shrink: 0;
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--rose-500), var(--accent-2));
}

/* "In short" summary box at the top of the About tab */
.courses-course-details .tab-pane > .border.p-3 {
  padding: var(--space-5) var(--space-6) !important;
  border: 1px solid var(--rose-100) !important;
  border-radius: var(--radius-lg) !important;
  background: linear-gradient(135deg, var(--rose-50), #fff 70%) !important;
  box-shadow: var(--shadow-xs);
}

/* Paired lists (two .col-md-6 columns) read better as subtle cards */
.courses-course-details .tab-pane .row > .col-md-6 > .list-group,
.courses-course-details .tab-pane .row > .col-md-6 > .border {
  height: 100%;
}

/* Generic bordered boxes inside course tabs */
.courses-course-details .tab-pane .border:not(.p-3):not(.badge) { border-radius: var(--radius-md) !important; border-color: var(--color-border) !important; }
.courses-course-details .tab-pane .border.p-3:not(:first-child) { border-radius: var(--radius-md) !important; border-color: var(--color-border) !important; }

/* Curriculum tab sub-headings and accordions */
.courses-course-details .accordion { margin-bottom: var(--space-8); }
.courses-course-details .accordion-body ul { padding-left: 1.1rem; margin-bottom: 0; }
.courses-course-details .accordion-body li { margin-bottom: 6px; }
.courses-course-details .accordion-body li::marker { color: var(--rose-400); }

/* Sidebar */
.courses-course-details .row > .col-lg-4 > h2:first-child { display: none; }

@media (min-width: 992px) {
  .courses-course-details .row > .col-lg-4 { padding-left: clamp(1rem, 2vw, 2.5rem); }
}

@media (min-width: 992px) and (min-height: 900px) {
  .courses-course-details .row > .col-lg-4 {
    position: sticky;
    top: calc(var(--header-h-compact) + 24px);
    align-self: flex-start;
  }
}

@media (max-width: 991.98px) {
  .courses-course-details .row > .col-lg-4 { margin-top: var(--space-12); }
}

/* Sidebar CTA card (templates/book-demo-cta.html) */
.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  color: var(--color-text-inverse-muted);
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(var(--glow-primary-rgb), 0.45), transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(var(--accent-2-rgb), 0.3), transparent 60%),
    var(--surface-inverse);
  box-shadow: var(--shadow-lg);
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line-inverse) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-inverse) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.cta-card-title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xl);
  font-weight: 750;
  color: #fff;
}

.cta-card p { margin-bottom: var(--space-6); font-size: 0.9375rem; line-height: 1.6; }

/* Sidebar link list (templates/popular-courses.html) */
.sidebar-block { margin-top: var(--space-8); }

.sidebar-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.link-list {
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-700);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.link-list a .bi {
  color: var(--ink-400);
  font-size: 0.85rem;
  transition: transform var(--duration-base) var(--ease-out), color var(--duration-fast) ease;
}

.link-list a:hover { background: var(--rose-50); color: var(--rose-700); }
.link-list a:hover .bi { color: var(--rose-600); transform: translate(2px, -2px); }

/* =====================================================================
   COURSES index
   ===================================================================== */
.course-group + .course-group { margin-top: var(--space-16) !important; }

.course-group-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--space-6) !important;
  font-size: var(--text-2xl);
  font-weight: 750;
}

.course-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border-strong), transparent);
}

.course-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink-800);
  font-weight: 550;
  line-height: 1.4;
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-base) var(--ease-out), border-color var(--duration-base) ease, box-shadow var(--duration-base) ease, color var(--duration-fast) ease;
}

.course-tile .bi {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--rose-50);
  color: var(--rose-600);
  transition: background-color var(--duration-base) ease, color var(--duration-base) ease, transform var(--duration-base) var(--ease-out);
}

.course-tile:hover { color: var(--ink-900); border-color: var(--rose-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.course-tile:hover .bi { background: var(--rose-600); color: #fff; transform: rotate(-45deg); }

/* =====================================================================
   ABOUT
   ===================================================================== */
.about-us h2 { margin-bottom: var(--space-5); }

.about-us h3 {
  font-size: var(--text-3xl);
  font-weight: 750;
  letter-spacing: var(--tracking-display);
  margin-bottom: var(--space-5);
}

.about-us p { font-size: var(--text-md); line-height: var(--leading-relaxed); }
.about-us .lead-text { font-size: var(--text-lg); color: var(--color-text-secondary); }

.numbered-list {
  counter-reset: pm-step;
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.numbered-list > li {
  counter-increment: pm-step;
  position: relative;
  padding: var(--space-5) var(--space-5) var(--space-5) 68px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 0.96875rem;
  line-height: 1.65;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-base) ease, box-shadow var(--duration-base) ease, transform var(--duration-base) var(--ease-out);
}

.numbered-list > li:hover { border-color: var(--rose-200); box-shadow: var(--shadow-md); transform: translateX(3px); }

.numbered-list > li::before {
  content: counter(pm-step, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--rose-600);
  letter-spacing: 0.02em;
}

.numbered-list > li b { display: block; margin-bottom: 2px; color: var(--color-text-primary); font-family: var(--font-display); font-size: var(--text-md); }

.about-us .media-frame {
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  background: radial-gradient(60% 60% at 30% 30%, rgba(var(--glow-primary-rgb), 0.12), transparent 70%), var(--color-surface-subtle);
  border: 1px solid var(--color-border);
}

@media (min-width: 992px) {
  .about-us .media-frame { position: sticky; top: calc(var(--header-h-compact) + 32px); }
}

section#who-we-are.about-us { background: var(--color-surface-subtle); border-bottom: 1px solid var(--color-border); }

/* Testimonials */
.testimonials.section { background: var(--color-surface-subtle); border-top: 1px solid var(--color-border); }
.testimonials .swiper { padding-bottom: 48px; }
.testimonials .swiper-slide { height: auto; }
.testimonials .testimonial-wrap { height: 100%; }

.testimonials .testimonial-item {
  position: relative;
  height: 100%;
  padding: var(--space-8);
  padding-left: calc(var(--space-8) + 76px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.testimonials .testimonial-img {
  position: absolute;
  left: var(--space-8);
  top: var(--space-8);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--rose-200);
}

.testimonials .testimonial-item h3 { margin: 4px 0 4px; font-size: var(--text-lg); }
.testimonials .stars { display: flex; gap: 2px; margin-bottom: var(--space-4); color: #f5a524; font-size: 0.85rem; }
.testimonials .testimonial-item p { margin: 0; font-size: 0.96875rem; line-height: 1.7; color: var(--color-text-secondary); }
.testimonials .quote-icon-left { display: none; }
.testimonials .quote-icon-right { display: none; }

.testimonials .testimonial-item::after {
  content: '\f6b0';
  position: absolute;
  right: var(--space-6);
  top: var(--space-5);
  font-family: 'bootstrap-icons';
  font-size: 2.5rem;
  line-height: 1;
  color: var(--rose-100);
}

.testimonials .swiper-pagination-bullet { width: 8px; height: 8px; background: var(--ink-300); opacity: 1; transition: width var(--duration-base) var(--ease-out), background-color var(--duration-base) ease; }
.testimonials .swiper-pagination-bullet-active { width: 24px; border-radius: 8px; background: var(--rose-600); }

@media (max-width: 575.98px) {
  .testimonials .testimonial-item { padding: var(--space-6); padding-top: calc(var(--space-6) + 76px); }
  .testimonials .testimonial-img { left: var(--space-6); top: var(--space-6); }
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact.section { padding-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }

.map-frame {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: var(--ink-100);
}

.map-frame iframe { display: block; width: 100%; height: clamp(240px, 32vw, 360px); border: 0; }

.contact .info-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--duration-base) ease, box-shadow var(--duration-base) ease;
}

.contact .info-item + .info-item { margin-top: var(--space-3); }
.contact .info-item:hover { border-color: var(--rose-200); box-shadow: var(--shadow-md); }

.contact .info-item > .bi {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--rose-50);
  border: 1px solid var(--rose-100);
  color: var(--rose-600);
  font-size: 1.15rem;
}

.contact .info-item h3 { margin: 0 0 4px; font-size: var(--text-md); }
.contact .info-item p { margin: 0; font-size: 0.9375rem; overflow-wrap: anywhere; }
.contact .info-item a { color: var(--color-text-secondary); }
.contact .info-item a:hover { color: var(--color-primary-strong); }

.form-card {
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.25rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.contact .sent-message { justify-content: center; margin: 0; padding: var(--space-6); font-size: var(--text-md); }

/* =====================================================================
   BLOG — listing
   ===================================================================== */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: var(--space-10) !important;
}

.blog-filter a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-600);
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.blog-filter a:hover { border-color: var(--color-border-strong); color: var(--ink-900); background: var(--ink-50); }
.blog-filter a.active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }

.blog-card { overflow: hidden; }

.blog-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-100);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}

.blog-card:hover .blog-card-media img { transform: scale(1.04); }

.blog-card-placeholder {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(var(--glow-primary-rgb), 0.4), transparent 60%),
    var(--surface-inverse);
}

.blog-card-placeholder span {
  padding-left: 14px;
  border-left: 3px solid var(--rose-500);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
}

.blog-card .card-body { display: flex; flex-direction: column; flex: 1; padding: var(--space-6); }

.blog-card h2 {
  margin: 10px 0;
  font-size: var(--text-lg);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.blog-card h2 a { color: var(--ink-900); }
.blog-card h2 a:hover { color: var(--rose-700); }

.blog-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.blog-card .card-body > .blog-meta:first-child { color: var(--rose-600); }
.blog-card .card-body > .blog-meta:last-child { margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--color-border); font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 0.8125rem; }

.blog-excerpt { color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.65; }

/* First post on an unfiltered first page gets a wide "featured" layout */
@media (min-width: 992px) {
  .blog-grid > .blog-featured { flex: 0 0 100%; width: 100%; max-width: 100%; }
  .blog-featured .blog-card { flex-direction: row; }
  .blog-featured .blog-card > a { flex: 0 0 56%; }
  .blog-featured .blog-card { align-items: center; }
  /* Covers carry their title in the artwork, so never crop: keep 16:9. */
  .blog-featured .blog-card-media { aspect-ratio: 16 / 9; }
  .blog-featured .card-body { justify-content: center; padding: var(--space-10); }
  .blog-featured .blog-card h2 { font-size: var(--text-3xl); letter-spacing: var(--tracking-display); line-height: 1.15; }
  .blog-featured .blog-excerpt { font-size: var(--text-md); }
  .blog-featured .card-body > .blog-meta:last-child { margin-top: var(--space-4); }
}

/* =====================================================================
   BLOG — article
   ===================================================================== */
.page-title .heading .post-meta { color: rgba(255, 255, 255, 0.7); font-size: var(--text-md); }
.page-title .post-meta strong { color: #fff; }
.page-title nav.post-meta a { color: rgba(255, 255, 255, 0.85); }
.page-title nav.post-meta a:hover { color: #fff; }

.post-meta { font-size: var(--text-sm); color: var(--color-text-muted); }

.post-hero { margin: 0 0 var(--space-8); }
.post-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.post-body {
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-700);
}

.post-body > :first-child { margin-top: 0; }
.post-body h2 { margin: 2.75rem 0 1rem; font-size: var(--text-2xl); line-height: 1.25; scroll-margin-top: calc(var(--header-h) + 16px); }
.post-body h3 { margin: 2rem 0 0.75rem; font-size: var(--text-xl); }
.post-body h4 { margin: 1.75rem 0 0.5rem; font-size: var(--text-lg); }
.post-body p { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.55rem; padding-left: 4px; }
.post-body li::marker { color: var(--rose-500); font-weight: 600; }
.post-body img { border-radius: var(--radius-lg); margin: var(--space-6) 0; }
.post-body hr { margin: var(--space-10) 0; }

.post-body blockquote {
  position: relative;
  margin: 2rem 0;
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--rose-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-surface-subtle);
  color: var(--ink-800);
  font-size: var(--text-lg);
  font-style: normal;
  line-height: 1.6;
}

.post-body blockquote > :last-child { margin-bottom: 0; }

.post-body code {
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--ink-100);
  color: var(--rose-700);
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.post-body pre {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  background: var(--surface-inverse-deep);
  color: #e6e8ee;
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}

.post-body pre code { padding: 0; background: none; color: inherit; font-size: inherit; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 520px; }

.tldr {
  margin-bottom: var(--space-10);
  padding: var(--space-6);
  border: 1px solid var(--rose-100);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--rose-50), #fff 75%);
}

.tldr h2 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--rose-600);
}

.tldr p { font-size: var(--text-md); line-height: 1.7; color: var(--ink-800); }

.faq-block { margin-top: var(--space-12); max-width: var(--measure); }
.faq-block > h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.faq-block h3 { font-size: var(--text-md); margin-bottom: 6px; }
.faq-item { padding: var(--space-5) 0; border-bottom: 1px solid var(--color-border); }
.faq-item p { color: var(--color-text-secondary); line-height: 1.7; }

.author-box {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: var(--measure);
  margin-top: var(--space-12);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-subtle);
}

.author-box img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--rose-200); }
.author-box-title { margin-bottom: 0.3rem; font-size: var(--text-md); }

.related-card {
  height: 100%;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color var(--duration-base) ease, box-shadow var(--duration-base) ease, transform var(--duration-base) var(--ease-out);
}

.related-card:hover { border-color: var(--rose-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card h3 { font-size: var(--text-base); line-height: 1.45; }
.related-card a { color: var(--ink-900); }
.related-card a:hover { color: var(--rose-700); }

.post-sidebar-sticky { position: sticky; top: calc(var(--header-h-compact) + 24px); }
@media (max-width: 991.98px) {
  .post-sidebar { margin-top: var(--space-12); }
  .post-sidebar-sticky { position: static; }
}

/* =====================================================================
   LEGAL (privacy policy, terms)
   ===================================================================== */
.legal { max-width: 820px; margin: 0 auto; }
.legal h2 { margin: 3rem 0 1rem; font-size: var(--text-2xl); line-height: 1.3; scroll-margin-top: calc(var(--header-h) + 16px); }
.legal h3 { margin: 2rem 0 0.6rem; font-size: var(--text-lg); }
.legal p, .legal li { line-height: 1.8; color: var(--ink-700); }
.legal ul, .legal ol { margin: 0 0 1.25rem; padding-left: 1.3rem; }
.legal li { margin-bottom: 0.5rem; }
.legal li::marker { color: var(--rose-500); }
.legal .updated { display: inline-flex; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--ink-50); border: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--text-sm); }
.legal .updated strong { color: var(--ink-800); margin-right: 4px; }

.legal .toc {
  margin: var(--space-8) 0 var(--space-12);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-subtle);
}

.legal .toc > strong {
  display: block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-800);
}

.legal .toc ol { margin: 0; padding-left: 1.4rem; columns: 2 260px; column-gap: var(--space-8); }
.legal .toc li { margin-bottom: 0.35rem; break-inside: avoid; line-height: 1.55; }
.legal .toc a { text-decoration: none; color: var(--ink-700); }
.legal .toc a:hover { color: var(--rose-700); text-decoration: underline; }

/* =====================================================================
   ENROLLMENT funnel (overrides the template's own inline block)
   ===================================================================== */
.funnel .funnel-card {
  padding: clamp(1.25rem, 0.75rem + 2.5vw, 2.5rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.funnel .funnel-card h1 { font-size: var(--text-3xl); letter-spacing: var(--tracking-display); }
.funnel .funnel-steps li::before { box-shadow: 0 0 0 4px #fff; }
.funnel .course-chip { background: var(--rose-50); border: 1px solid var(--rose-100); color: var(--rose-700); }
.funnel .error-summary { border-radius: var(--radius-md); }

/* =====================================================================
   404
   ===================================================================== */
.error-page { max-width: 720px; margin: 0 auto; text-align: center; padding: clamp(2rem, 1rem + 4vw, 4rem) 0; }

.error-code {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  background: linear-gradient(120deg, var(--rose-600), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.error-page p { color: var(--color-text-muted); }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: var(--space-8); }

/* =====================================================================
   PROMO — "15 Hours Free Foundation Course" modal (homepage)
   Markup: home/templates/promo/free_foundation_modal.html
   Desktop: centred two-column card. Tablet: stacked card.
   Phones: bottom sheet with the CTA pinned in view.
   ===================================================================== */
.ff-modal { --bs-modal-width: 920px; }

/* Soften the page behind this modal only */
body:has(#freeFoundationModal.show) .modal-backdrop.show {
  --bs-backdrop-opacity: 0.5;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Entrance: fade + gentle scale (reduced-motion users get no transition) */
.ff-modal.fade .ff-dialog {
  transform: translateY(10px) scale(0.94);
  transition: transform 450ms var(--ease-out), opacity 300ms ease;
}
.ff-modal.show .ff-dialog { transform: none; }

.ff-content {
  display: grid;
  grid-template-columns: 42% 1fr;
  border: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 40px 100px -30px rgba(12, 10, 36, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* the global brand hairline sits over the image here — drop it */
.ff-content::before { display: none; }

.ff-visual {
  position: relative;
  min-height: 100%;
  background: var(--surface-inverse);
}

.ff-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ff-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-800);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--duration-fast) ease, transform var(--duration-base) var(--ease-out);
}

.ff-close:hover { background: #fff; transform: rotate(90deg); }
.ff-close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.ff-body {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 1rem + 3vw, 2.75rem);
  padding-top: clamp(1.75rem, 1rem + 3vw, 2.5rem);
}

.ff-logo { align-self: flex-start; width: auto; height: 32px; margin-bottom: var(--space-6); }

.ff-title { margin: 0 0 var(--space-4); }

.ff-headline {
  display: block;
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  background: linear-gradient(100deg, var(--rose-600) 10%, var(--rose-500) 50%, var(--accent-2) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}

.ff-subhead {
  display: block;
  margin-top: 4px;
  font-size: var(--text-2xl);
  font-weight: 750;
  letter-spacing: var(--tracking-display);
  color: var(--ink-900);
}

.ff-subtitle {
  margin: 0 0 var(--space-5);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.ff-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-800);
}

.ff-highlights li { display: inline-flex; align-items: center; gap: 6px; }
.ff-highlights .bi { color: var(--color-success); font-size: 1rem; }

.ff-courses {
  margin-bottom: var(--space-8);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
}

.ff-courses-label {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-primary-strong);
}

.ff-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.ff-chip {
  padding: 5px 11px;
  border: 1px solid var(--rose-100);
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-800);
  white-space: nowrap;
}

.ff-chip-more {
  border-color: transparent;
  background: var(--ink-900);
  color: #fff;
  cursor: help;
}

.ff-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: auto;
}

.ff-cta { flex: 1 1 auto; }

.ff-later {
  padding: 10px 6px;
  border: 0;
  background: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) ease, text-decoration-color var(--duration-fast) ease;
}

.ff-later:hover { color: var(--ink-900); text-decoration-color: currentColor; }

/* Tablet: stack, banner visual on top */
@media (max-width: 991.98px) {
  .ff-modal { --bs-modal-width: 560px; }
  .ff-content { grid-template-columns: 1fr; }
  .ff-visual { min-height: 0; aspect-ratio: 5 / 2; }
  .ff-logo { display: none; }
}

/* Phones: bottom sheet, never taller than the screen, CTA always reachable */
@media (max-width: 575.98px) {
  .ff-modal .ff-dialog {
    align-items: flex-end;
    min-height: 100%;
    margin: 0;
    max-width: none;
  }

  .ff-modal.fade .ff-dialog { transform: translateY(40px); }
  .ff-modal.show .ff-dialog { transform: none; }

  /* A scrolling grid can lay its rows over each other when content exceeds
     max-height; a flex column always stacks banner above text. */
  .ff-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .ff-visual { flex: 0 0 auto; aspect-ratio: 12 / 5; }
  .ff-body { flex: 0 0 auto; }
  .ff-body { padding: var(--space-6) var(--gutter) 0; }
  .ff-headline { font-size: 2.1rem; }
  .ff-subhead { font-size: 1.35rem; }
  .ff-subtitle { font-size: 0.96875rem; }
  .ff-courses { margin-bottom: var(--space-5); }

  .ff-actions {
    position: sticky;
    bottom: 0;
    margin: 0 calc(var(--gutter) * -1);
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--color-border);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .ff-cta { width: 100%; }
  .ff-later { width: 100%; padding: 6px; }
}
