/* ==========================================================================
   TR Institute of Technology — Design System & Global Styles
   --------------------------------------------------------------------------
   Palette: navy/teal brand, amber calls to action, pale-blue surfaces.
   Motion: no hover lift, no entrance/reveal animation. Hover changes only
   background/border/text colour and an extremely subtle shadow, 120–160ms,
   and is gated behind @media (hover: hover) and (pointer: fine).
   ========================================================================== */

/* ---------------------------------- Tokens ------------------------------- */
:root {
  /* Brand */
  --brand:        #055271;
  --brand-hover:  #043f57;
  --brand-light:  #0b6eb0;   /* links on light surfaces */
  --brand-tint:   #e9f3f9;   /* pale brand surface tint */

  --accent:       #f5a623;
  --accent-hover: #e99816;
  --accent-ink:   #142033;   /* text on amber surfaces */

  /* Button surfaces (separate from text accents so contrast holds) */
  --btn-primary-bg:    #055271;
  --btn-primary-hover: #043f57;
  --btn-light-fg:      #055271;
  --brand-fill:        #055271;   /* solid fills behind white text */

  /* Text */
  --ink:          #0b1836;   /* headings */
  --text:         #334155;
  --muted:        #526174;

  /* Surfaces */
  --canvas:       #ffffff;
  --surface:      #f4f8fb;
  --surface-alt:  #eef4f9;
  --surface-hover:#e7eff6;

  /* Lines & effects */
  --border:        #dce5ec;
  --border-strong: #c3d2de;
  --success:       #16845b;
  --danger:        #c0392b;
  --shadow-sm:     0 2px 8px rgb(11 24 54 / 4%);
  --shadow-md:     0 3px 10px rgb(11 24 54 / 6%);
  --shadow-lg:     0 10px 28px rgb(11 24 54 / 10%);

  /* Shapes */
  --radius-sm:    6px;
  --radius-card:  10px;
  --radius-lg:    14px;

  /* Layout */
  --container:    1200px;
  --header-h:     66px;
  --gutter:       clamp(16px, 2.5vw, 28px);
  --section-space: clamp(28px, 3vw, 44px);

  /* Motion (colour/shadow only, short) */
  --dur: 140ms;
  --ease: ease-out;

  /* Typography */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.15rem;
  --fs-2xl: clamp(1.35rem, 2.2vw, 1.65rem);
  --fs-3xl: clamp(1.6rem, 2.8vw, 2.1rem);
  --fs-hero: clamp(2rem, 3.5vw, 3rem);

  /* Footer (deep brand navy in light theme) */
  --footer-bg:     #0a1830;
  --footer-heading: #ffffff;
  --footer-text:   #c7d5e4;
  --footer-muted:  #8fa2b8;
  --footer-border: rgb(255 255 255 / 12%);
  --footer-hover:  #f5a623;

  /* Media frames stay pale in both themes so illustrations read clearly */
  --media-frame:  #f2f6fa;
}

[data-theme="dark"] {
  --brand:        #2f8fc0;
  --brand-hover:  #3fa3d4;
  --brand-light:  #6cc3e8;   /* links on dark surfaces */
  --brand-tint:   #12293c;

  --accent:       #f5a623;
  --accent-hover: #ffb63e;
  --accent-ink:   #142033;

  /* Button surfaces — deeper teal than the text accent keeps white
     button text above 4.5:1 in dark theme */
  --btn-primary-bg:    #0a78a8;
  --btn-primary-hover: #0a6590;
  --btn-light-fg:      #0a5b86;
  --brand-fill:        #0b6fa8;

  --ink:          #eef3f9;
  --text:         #d7e2ee;
  --muted:        #93a7bd;

  --canvas:       #0b1424;
  --surface:      #101c30;
  --surface-alt:  #0d1a2b;
  --surface-hover:#17263d;

  --border:        #1d2c42;
  --border-strong: #2c4058;
  --success:       #3fae7e;
  --danger:        #e2604f;
  --shadow-sm:     0 2px 8px rgb(0 0 0 / 25%);
  --shadow-md:     0 3px 10px rgb(0 0 0 / 30%);
  --shadow-lg:     0 10px 28px rgb(0 0 0 / 38%);

  --footer-bg:     #060d1a;
  --footer-text:   #b9c9da;
  --footer-muted:  #7f93a9;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.012em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

p { margin: 0 0 .9rem; }
img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-light); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand); }

strong { color: var(--ink); font-weight: 700; }
ul, ol { padding-left: 1.25rem; }

::selection { background: rgb(5 82 113 / 14%); }
[data-theme="dark"] ::selection { background: rgb(108 195 232 / 26%); }

:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 3px;
  border-radius: 3px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  background: var(--brand-fill);
  color: #fff;
  padding: .65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

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

.section { padding-block: var(--section-space); }
.section-alt { background: var(--surface-alt); }
.section-tight { padding-block: 20px; }

.section-head { max-width: 720px; margin: 0 auto 20px; text-align: center; }
.section-head h2 { font-size: var(--fs-2xl); margin-bottom: .35rem; }
.section-head p { color: var(--muted); font-size: var(--fs-md); margin: 0; }
.section-head-left { text-align: left; margin-inline: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .7rem;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---------------------------------- Buttons ------------------------------ */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .65rem 1.3rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { color: var(--btn-fg); }
.btn .fa-solid, .btn .fa-brands { font-size: .92em; }

.btn-primary { background: var(--btn-primary-bg); }
.btn-primary:hover { background: var(--btn-primary-hover); box-shadow: var(--shadow-sm); }

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-ink); box-shadow: var(--shadow-sm); }

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--brand);
  border-color: var(--border-strong);
  background: transparent;
}
.btn-outline:hover { border-color: var(--brand-light); background: var(--surface); color: var(--brand); box-shadow: none; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--ink); box-shadow: none; }

.btn-light {
  --btn-bg: #ffffff;
  --btn-fg: var(--btn-light-fg);
  background: #fff;
  color: var(--btn-light-fg);
}
.btn-light:hover { background: #eef4f9; color: var(--btn-light-fg); box-shadow: none; }

.btn-sm { min-height: 44px; padding: .5rem 1rem; font-size: var(--fs-sm); }
.btn-lg { min-height: 52px; padding: .8rem 1.6rem; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--brand-light); }
.link-arrow:hover { color: var(--brand); }

/* ---------------------------------- Header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--canvas) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; }
.brand-name {
  font-weight: 800;
  font-size: .95rem;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
}
.brand-name span { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

.main-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.main-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .75rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text);
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.main-nav .nav-link[aria-current="page"] { color: var(--brand); font-weight: 700; }
.main-nav .nav-caret { font-size: .65rem; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.theme-toggle .fa-moon { display: none; }
.theme-toggle .fa-sun { display: block; }
[data-theme="dark"] .theme-toggle .fa-moon { display: block; }
[data-theme="dark"] .theme-toggle .fa-sun { display: none; }

/* Courses dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 92vw);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.nav-item.is-open .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; }
.nav-dropdown-grid { display: grid; gap: 2px; }
.nav-drop-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background-color var(--dur) var(--ease);
}
.nav-drop-item strong { display: block; font-size: var(--fs-sm); }
.nav-drop-item small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.ndi-icon {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--brand);
  background: var(--brand-tint);
}
.nav-dropdown-foot {
  margin-top: 4px;
  padding: .55rem .7rem .3rem;
  border-top: 1px solid var(--border);
}
.nav-dropdown-foot a { font-size: var(--fs-sm); font-weight: 700; }

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(-50%);
}
.nav-toggle .bars { top: 50%; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1500;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.is-open { visibility: visible; pointer-events: auto; }
.mobile-menu-backdrop { position: absolute; inset: 0; background: rgb(5 14 30 / 55%); opacity: 0; transition: opacity var(--dur) var(--ease); }
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 92vw);
  background: var(--canvas);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  padding: 12px 16px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.mobile-menu-close {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  flex: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.mobile-programs-title {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px 8px;
}
.mobile-programs { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.mobile-programs a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .6rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background-color var(--dur) var(--ease);
}
.mobile-programs a:hover { background: var(--surface-hover); }
.mobile-programs a.is-all { font-weight: 800; color: var(--brand); }
.mobile-programs i {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: .85rem;
  color: var(--brand);
  background: var(--brand-tint);
}
.mobile-menu-links { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--border); }
.mobile-menu-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem .4rem;
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mobile-menu-links a[aria-current="page"] { color: var(--brand); }
.mobile-menu-links a i { font-size: .75rem; color: var(--muted); }
.mobile-menu-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.mobile-menu-foot .btn { width: 100%; }

/* ---------------------------------- Home hero ---------------------------- */
.hero {
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 42%),
    radial-gradient(circle at 4% 100%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 36%);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding-block: clamp(24px, 3vw, 40px);
}
.hero h1 { font-size: var(--fs-hero); margin-bottom: .6rem; }
.hero-sub { color: var(--muted); font-size: var(--fs-lg); max-width: 36rem; margin: 0 0 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note {
  margin-top: 18px;
  font-size: var(--fs-sm);
  color: var(--muted);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-note span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-note i { color: var(--accent); }

.hero-visual { min-width: 0; }
.media-frame {
  background: var(--media-frame);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.media-frame img { width: 100%; height: 100%; object-fit: contain; }

/* Trust strip */
.trust-strip { border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 20px;
  padding: 18px 0;
}
.trust-item { display: flex; gap: 12px; align-items: center; }
.trust-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: .95rem;
  color: var(--brand);
  background: var(--brand-tint);
}
.trust-item strong { display: block; font-size: var(--fs-sm); }
.trust-item span { font-size: var(--fs-xs); color: var(--muted); display: block; line-height: 1.45; }

/* ---------------------------------- Course cards ------------------------- */
.course-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.course-card-media { position: relative; aspect-ratio: 3 / 2; background: var(--media-frame); }
.course-card-media img { width: 100%; height: 100%; object-fit: contain; }
.course-card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--brand);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.course-card-body { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; gap: 10px; }
.course-card h3 { font-size: 1.125rem; margin: 0; }
.course-card h3 a { color: var(--ink); }
.course-card-desc { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.course-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.course-tags li {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}
.course-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}
.meta-chip i { color: var(--brand-light); font-size: .8em; }
.course-card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.course-card-actions .btn { flex: 1; min-width: 110px; }

/* Compact card (paid advertising row on Home) */
.course-card-compact {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-width: 0;
}
.course-card-compact .ccc-media {
  flex: none;
  width: 128px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--media-frame);
  border: 1px solid var(--border);
}
.course-card-compact .ccc-media img { width: 100%; height: 100%; object-fit: contain; }
.course-card-compact .ccc-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.course-card-compact h3 { font-size: 1.05rem; margin: 0; }
.course-card-compact h3 a { color: var(--ink); }
.course-card-compact .ccc-desc { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.course-card-compact .ccc-links { display: flex; gap: 14px; margin-top: auto; flex-wrap: wrap; }
.course-card-compact .ccc-links a { font-size: var(--fs-sm); font-weight: 700; }

/* Feature (benefit) cards */
.benefits-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: .95rem;
  color: var(--brand);
  background: var(--brand-tint);
  margin-bottom: 12px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.feature-card p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

/* Approach steps */
.approach-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.approach-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.approach-num {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
  line-height: 1;
}
.approach-step h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.approach-step p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

/* ---------------------------------- Founder teaser ----------------------- */
.founder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.founder-card-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
.founder-media { padding: 16px; background: var(--media-frame); border-right: 1px solid var(--border); }
.founder-media .media-frame { border: 0; border-radius: var(--radius-sm); }
.founder-content { padding: 24px; }
.founder-role {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--brand);
  margin-bottom: 14px;
}
.founder-role::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.founder-bio {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--canvas);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-size: var(--fs-md);
  line-height: 1.65;
  font-weight: 500;
}
.founder-note { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 18px; }

/* ---------------------------------- FAQ ----------------------------------- */
.faq-list { max-width: 760px; margin-inline: auto; display: grid; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.faq-item.is-open { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  min-height: 50px;
}
.faq-question .faq-icon {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .75rem;
  color: var(--brand);
  background: var(--brand-tint);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.faq-item.is-open .faq-icon { background: var(--brand-fill); color: #fff; }
.faq-answer { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--dur) var(--ease), visibility var(--dur) var(--ease); }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; visibility: visible; }
.faq-answer-inner { overflow: hidden; }
.faq-answer-inner p { padding: 0 16px 14px; margin: 0; color: var(--muted); font-size: var(--fs-sm); }

/* ---------------------------------- CTA band ----------------------------- */
.cta-band {
  background: var(--brand-fill);
  color: #fff;
  border-radius: var(--radius-card);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin: 0 0 .25rem; font-size: var(--fs-2xl); }
.cta-band p { color: rgb(255 255 255 / 82%); margin: 0; max-width: 42rem; }
.cta-band-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------- Centre cards ------------------------- */
.centre-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.centre-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.centre-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.centre-card .cc-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 12px; }
.centre-card ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.centre-card ul li { display: flex; gap: .6rem; align-items: flex-start; }
.centre-card ul li i { color: var(--accent); margin-top: .25rem; width: 15px; text-align: center; flex: none; }
.centre-card ul a { color: var(--text); }
.centre-card ul a:hover { color: var(--brand); }

/* ---------------------------------- Page hero (interior) ----------------- */
.page-hero {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--canvas)), var(--canvas));
}
.page-hero-inner { padding-block: 24px 28px; }
.page-hero h1 { font-size: clamp(1.75rem, 2.6vw, 2.15rem); margin-bottom: .4rem; }
.page-hero .lead { color: var(--muted); font-size: var(--fs-lg); max-width: 46rem; margin: 0; }

.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------------------------------- Courses page ------------------------- */
.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}
.search-box { position: relative; }
.search-box .fa-magnifying-glass { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.search-box .input { padding-left: 42px; }
.search-box .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--muted);
  cursor: pointer;
  font-size: .75rem;
  display: none;
}
.search-box.has-value .search-clear { display: grid; place-items: center; }

.filter-results-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-results-meta p { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.filter-results-meta p strong { color: var(--ink); }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.courses-grid .course-card[hidden] { display: none; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-card);
}
.empty-state[hidden] { display: none; }
.empty-state .es-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: var(--brand);
  background: var(--brand-tint);
}
.empty-state h3 { margin-bottom: .35rem; }
.empty-state p { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 16px; }

/* ---------------------------------- Course detail ------------------------ */
.course-hero { border-bottom: 1px solid var(--border); }
.course-hero-inner { padding-block: 22px 28px; }
.course-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px; align-items: center; }
.course-hero h1 { font-size: clamp(1.75rem, 2.6vw, 2.15rem); margin-bottom: .4rem; }
.course-hero .lead { color: var(--muted); font-size: var(--fs-lg); max-width: 40rem; margin-bottom: 14px; }
.course-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.course-facts .facts-note { width: 100%; font-size: var(--fs-sm); color: var(--muted); margin: 0; }

.onpage-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.onpage-nav a {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: 40px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.onpage-nav a:hover { border-color: var(--brand-light); color: var(--brand); background: var(--surface-hover); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr); gap: 24px; align-items: start; }
.course-body { min-width: 0; display: grid; gap: 28px; }

.prose h2 { font-size: var(--fs-2xl); margin-bottom: .5rem; }
.prose h3 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; }
.prose p, .prose li { font-size: var(--fs-md); }
.prose p { max-width: 72ch; }

.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  transition: border-color var(--dur) var(--ease);
}
.topic-item i {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: .95rem;
  color: #fff;
  background: var(--brand-fill);
}
.topic-item strong { display: block; font-size: var(--fs-sm); }
.topic-item span { font-size: var(--fs-xs); color: var(--muted); display: block; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); }
.check-list li i { color: var(--success); margin-top: .25rem; }
.check-list li.is-muted i { color: var(--accent); }

.who-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.who-chips span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}
.who-chips i { color: var(--brand-light); }

/* Curriculum accordion */
.curriculum { display: grid; gap: 10px; }
.curriculum-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; transition: border-color var(--dur) var(--ease); }
.curriculum-item.is-open { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.curriculum-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  min-height: 52px;
  font-family: var(--font);
}
.curriculum-module {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  flex: none;
}
.curriculum-title { font-weight: 700; color: var(--ink); flex: 1; font-size: var(--fs-md); }
.curriculum-count { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.curriculum-icon {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .7rem;
  color: var(--brand);
  background: var(--brand-tint);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.curriculum-item.is-open .curriculum-icon { background: var(--brand-fill); color: #fff; }
.curriculum-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--dur) var(--ease), visibility var(--dur) var(--ease); }
.curriculum-item.is-open .curriculum-body { grid-template-rows: 1fr; visibility: visible; }
.curriculum-body-inner { overflow: hidden; }
.curriculum-body-inner ul { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; gap: 6px; }
.curriculum-body-inner li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); }
.curriculum-body-inner li::before { content: "\f058"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8rem; color: var(--brand); margin-top: .2rem; }

/* Sidebar */
.course-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 12px; min-width: 0; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.side-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.side-card p { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 14px; }
.side-card .btn { width: 100%; margin-bottom: 8px; }
.side-card .side-contact { font-size: var(--fs-sm); text-align: center; color: var(--muted); margin: 0; }
.side-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.side-skills span {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

/* Related courses */
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.related-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-width: 0;
}
.related-card .rc-media {
  flex: none;
  width: 116px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--media-frame);
  border: 1px solid var(--border);
}
.related-card .rc-media img { width: 100%; height: 100%; object-fit: contain; }
.related-card .rc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.related-card h3 { font-size: 1rem; margin: 0; }
.related-card h3 a { color: var(--ink); }
.related-card p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.related-card .rc-links { display: flex; gap: 14px; margin-top: auto; flex-wrap: wrap; }
.related-card .rc-links a { font-size: var(--fs-sm); font-weight: 700; }

/* ---------------------------------- Gallery ------------------------------ */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  display: block;
  background: var(--media-frame);
  padding: 0;
  text-align: left;
  width: 100%;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gallery-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.gallery-caption { display: block; padding: 10px 12px; background: var(--canvas); border-top: 1px solid var(--border); }
.gallery-caption strong { display: block; font-size: var(--fs-sm); color: var(--ink); }
.gallery-caption small { font-size: var(--fs-xs); color: var(--muted); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  pointer-events: none;
}
.lightbox.is-open { visibility: visible; pointer-events: auto; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgb(4 10 22 / 92%); opacity: 0; transition: opacity var(--dur) var(--ease); }
.lightbox.is-open .lightbox-backdrop { opacity: 1; }
.lightbox-dialog {
  position: relative;
  width: min(880px, 100%);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.lightbox.is-open .lightbox-dialog { opacity: 1; }
.lightbox-dialog img { width: 100%; max-height: 74vh; object-fit: contain; background: var(--media-frame); }
.lightbox-caption { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lightbox-caption strong { display: block; font-size: var(--fs-sm); color: var(--ink); }
.lightbox-caption small { color: var(--muted); font-size: var(--fs-xs); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 25%);
  background: rgb(10 20 40 / 65%);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.lightbox-nav.is-prev { left: 12px; }
.lightbox-nav.is-next { right: 12px; }
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 25%);
  background: rgb(10 20 40 / 65%);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  transition: background-color var(--dur) var(--ease);
}
.lightbox-nav:hover, .lightbox-close:hover { background: var(--brand-fill); }

/* ---------------------------------- Forms -------------------------------- */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field > label, .field-label-row label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.field-optional { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }

.input, textarea.input, select.input {
  width: 100%;
  min-height: 48px;
  padding: .7rem 14px;
  font-family: var(--font);
  font-size: var(--fs-md);
  color: var(--text);
  background: var(--canvas);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.input::placeholder { color: var(--muted); opacity: .8; }
.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.55; }

.field.is-invalid .input { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.field.is-valid .input { border-color: var(--success); }
.field-error { display: none; font-size: var(--fs-xs); font-weight: 600; color: var(--danger); align-items: center; gap: .4rem; }
.field.is-invalid .field-error { display: inline-flex; }
.field-hint { font-size: var(--fs-xs); color: var(--muted); }
.form-note { font-size: var(--fs-sm); color: var(--muted); display: flex; gap: .5rem; align-items: flex-start; }
.form-note i { color: var(--brand); margin-top: .2rem; }
.form-actions { display: grid; gap: 8px; }

.error-summary {
  display: none;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  background: color-mix(in srgb, var(--danger) 7%, var(--canvas));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: var(--fs-sm);
  color: var(--danger);
}
.error-summary.is-visible { display: block; }

/* Message preview + copy fallback */
.msg-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: var(--fs-sm);
  color: var(--text);
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}

/* ---------------------------------- Maps ---------------------------------- */
.map-block { margin-top: 24px; }
.map-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.map-tab {
  border: none;
  background: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--muted);
  cursor: pointer;
  min-height: 40px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.map-tab.is-active { background: var(--brand-fill); color: #fff; }
.map-frame { width: 100%; height: 340px; border: 0; border-radius: var(--radius-card); box-shadow: var(--shadow-sm); display: block; }
.map-bar { margin-top: 10px; }

/* ---------------------------------- Footer ------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr 1.4fr;
  gap: 32px;
  padding-block: 40px 28px;
}
.footer-brand img { width: 44px; height: 44px; margin-bottom: 12px; }
.footer-brand p { font-size: var(--fs-sm); color: var(--footer-muted); margin: 0; max-width: 24rem; line-height: 1.65; }
.footer-col h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
  color: var(--footer-heading);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--footer-text); font-size: var(--fs-sm); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--footer-hover); }
.footer-contact li { display: flex; gap: 10px; font-size: var(--fs-sm); align-items: flex-start; }
.footer-contact li i { color: var(--footer-hover); margin-top: .25rem; width: 15px; text-align: center; flex: none; }
.footer-contact li span, .footer-contact li a { color: var(--footer-text); word-break: break-word; }
.footer-contact li a:hover { color: var(--footer-hover); }
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-block: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
  color: var(--footer-muted);
}
.footer-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom a { color: var(--footer-muted); transition: color var(--dur) var(--ease); }
.footer-bottom a:hover { color: var(--footer-hover); }

/* ---------------------------------- Floating action ---------------------- */
.floating-actions { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 900; }
.float-action {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #fff;
  background: #25d366;
  box-shadow: var(--shadow-md);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.float-action:hover { background: #1eb257; color: #fff; box-shadow: var(--shadow-lg); }

/* ---------------------------------- Modal --------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  pointer-events: none;
}
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(5 14 30 / 62%); opacity: 0; transition: opacity var(--dur) var(--ease); }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: min(85vh, 660px);
  overflow-y: auto;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.modal.is-open .modal-dialog { opacity: 1; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.modal-close:hover { color: var(--ink); border-color: var(--border-strong); }
.modal h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.modal p { color: var(--muted); font-size: var(--fs-sm); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* Toast */
.toast-region {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  font-size: var(--fs-sm);
  color: var(--text);
  opacity: 0;
  pointer-events: auto;
  transition: opacity var(--dur) var(--ease);
}
.toast.is-visible { opacity: 1; }
.toast.is-success { border-left-color: var(--success); }
.toast.is-error { border-left-color: var(--danger); }
.toast i { margin-top: .2rem; color: var(--brand); }
.toast.is-success i { color: var(--success); }
.toast.is-error i { color: var(--danger); }
.toast a { font-weight: 700; white-space: nowrap; }

/* ---------------------------------- Legal pages -------------------------- */
.legal-layout { max-width: 780px; margin-inline: auto; }
.legal-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.legal-toc h2 { font-size: 1rem; margin-bottom: .5rem; }
.legal-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: var(--fs-sm); }
.legal-section { padding-block: 4px 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-section:last-child { border-bottom: 0; margin-bottom: 0; }
.legal-section h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.legal-section p, .legal-section li { color: var(--text); font-size: var(--fs-sm); max-width: 75ch; }

/* ---------------------------------- Utilities ---------------------------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

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

/* ---------------------------------- Hover gating ------------------------- */
@media (hover: hover) and (pointer: fine) {
  .course-card:hover, .course-card-compact:hover, .feature-card:hover, .approach-step:hover,
  .related-card:hover, .centre-card:hover, .side-card:hover, .gallery-item:hover {
    border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
    box-shadow: var(--shadow-md);
  }
  .course-card h3 a:hover, .course-card-compact h3 a:hover, .related-card h3 a:hover { color: var(--brand); }
  .main-nav .nav-link:hover { color: var(--brand); background: var(--surface); }
  .theme-toggle:hover, .nav-toggle:hover, .mobile-menu-close:hover { border-color: var(--brand-light); background: var(--surface-hover); }
  .nav-drop-item:hover { background: var(--surface-hover); }
  .curriculum-head:hover, .faq-question:hover { color: var(--brand); }
}

/* ---------------------------------- Responsive --------------------------- */
@media (max-width: 1100px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-cta-desktop { display: none; }
  .courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .course-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .hero h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
  .hero-visual .media-frame { aspect-ratio: 3 / 2; max-height: 260px; }
  .founder-card-grid { grid-template-columns: 1fr; }
  .founder-media { border-right: 0; border-bottom: 1px solid var(--border); }
  .course-hero-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approach-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .centre-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom nav { justify-content: center; }
}

@media (max-width: 560px) {
  :root { --header-h: 58px; }
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: .88rem; }
  .brand-name span { font-size: .62rem; }
  .courses-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .approach-steps { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .course-card-compact { flex-direction: column; }
  .course-card-compact .ccc-media { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
  .page-hero .lead { font-size: var(--fs-md); }
  .mobile-menu-panel { width: 100%; }
  .onpage-nav a { font-size: var(--fs-xs); }
}

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