/* ==========================================================================
   Maths For Everything — Premium Design System
   Design tokens + reusable components layered on top of the existing
   Bootstrap 4 base. Loaded site-wide via includes/header.php.
   ========================================================================== */

:root {
  /* --- Brand color (existing red, exact) --- */
  --mfe-red: #e30613;
  --mfe-red-dark: #a80410;
  --mfe-red-light: #ff4b56;
  --mfe-red-050: rgba(227, 6, 19, 0.05);
  --mfe-red-100: rgba(227, 6, 19, 0.10);
  --mfe-red-200: rgba(227, 6, 19, 0.18);

  /* --- Neutrals --- */
  --mfe-ink: #16181d;
  --mfe-ink-soft: #2b2e35;
  --mfe-charcoal: #1c1e24;
  --mfe-white: #ffffff;
  --mfe-offwhite: #faf9f8;
  --mfe-grey-050: #f4f3f2;
  --mfe-grey-100: #ececec;
  --mfe-grey-300: #d6d5d3;
  --mfe-grey-500: #8b8d92;
  --mfe-grey-700: #55575c;
  --mfe-border: rgba(22, 24, 29, 0.08);
  --mfe-border-dark: rgba(255, 255, 255, 0.12);

  /* --- Typography --- */
  --mfe-font-display: 'AvenirNextLTPro-Bold', 'AvenirNextLTPro-Demi', Arial, sans-serif;
  --mfe-font-medium: 'AvenirNextLTPro-Medium', Arial, sans-serif;
  --mfe-font-body: 'AvenirNextLTPro-Regular', Arial, sans-serif;

  /* --- Spacing scale --- */
  --mfe-sp-1: 4px;
  --mfe-sp-2: 8px;
  --mfe-sp-3: 12px;
  --mfe-sp-4: 16px;
  --mfe-sp-5: 24px;
  --mfe-sp-6: 32px;
  --mfe-sp-7: 48px;
  --mfe-sp-8: 64px;
  --mfe-sp-9: 96px;

  /* --- Radius --- */
  --mfe-radius-sm: 10px;
  --mfe-radius-md: 16px;
  --mfe-radius-lg: 24px;
  --mfe-radius-full: 999px;

  /* --- Shadows (soft, layered — never pure black) --- */
  --mfe-shadow-sm: 0 2px 10px rgba(22, 24, 29, 0.05);
  --mfe-shadow-md: 0 10px 28px rgba(22, 24, 29, 0.08);
  --mfe-shadow-lg: 0 24px 56px rgba(22, 24, 29, 0.12);
  --mfe-shadow-hover: 0 16px 36px rgba(22, 24, 29, 0.14);
  --mfe-shadow-glow: 0 10px 32px rgba(227, 6, 19, 0.16);

  /* --- Glass --- */
  --mfe-glass-bg: rgba(255, 255, 255, 0.68);
  --mfe-glass-bg-strong: rgba(255, 255, 255, 0.85);
  --mfe-glass-bg-dark: rgba(22, 24, 29, 0.55);
  --mfe-glass-border: rgba(255, 255, 255, 0.5);
  --mfe-glass-blur: blur(18px);

  /* --- Motion --- */
  --mfe-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mfe-dur-fast: 180ms;
  --mfe-dur-base: 420ms;
  --mfe-dur-slow: 900ms;
}

/* ==========================================================================
   Base
   ========================================================================== */

.mfe-html-lock { overflow-x: hidden; }

body {
  font-family: var(--mfe-font-body);
  color: var(--mfe-ink);
}

.mfe-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--mfe-sp-5);
}

@media (max-width: 767px) {
  .mfe-container { padding: 0 var(--mfe-sp-4); }
}

/* Section backgrounds — used to alternate rhythm down the page */
.mfe-section { padding: var(--mfe-sp-9) 0; position: relative; }
.mfe-section--tight { padding: var(--mfe-sp-8) 0; }
.mfe-section--white { background: var(--mfe-white); }
.mfe-section--offwhite { background: var(--mfe-offwhite); }
.mfe-section--grey { background: var(--mfe-grey-050); }
.mfe-section--dark {
  background: linear-gradient(160deg, var(--mfe-charcoal), var(--mfe-ink));
  color: var(--mfe-white);
}
.mfe-section--dark .mfe-eyebrow { color: var(--mfe-red-light); }
.mfe-section--dark .mfe-h2, .mfe-section--dark .mfe-h3 { color: var(--mfe-white); }
.mfe-section--dark .mfe-lead { color: rgba(255, 255, 255, 0.7); }

@media (max-width: 767px) {
  .mfe-section { padding: var(--mfe-sp-7) 0; }
  .mfe-section--tight { padding: var(--mfe-sp-6) 0; }
}

/* ==========================================================================
   Typography
   ========================================================================== */

.mfe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--mfe-sp-2);
  font-family: var(--mfe-font-demi, var(--mfe-font-medium));
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mfe-red);
  font-weight: 600;
}

.mfe-eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--mfe-red);
  border-radius: var(--mfe-radius-full);
}

.mfe-h1 {
  font-family: var(--mfe-font-display);
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--mfe-ink);
  margin: var(--mfe-sp-3) 0 var(--mfe-sp-4);
}

.mfe-h2 {
  font-family: var(--mfe-font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15;
  color: var(--mfe-ink);
  margin: var(--mfe-sp-2) 0 var(--mfe-sp-3);
}

.mfe-h3 {
  font-family: var(--mfe-font-medium);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.3;
  color: var(--mfe-ink);
}

.mfe-lead {
  font-family: var(--mfe-font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--mfe-grey-700);
  max-width: 560px;
}

.mfe-section-head {
  max-width: 640px;
  margin: 0 auto var(--mfe-sp-7);
  text-align: center;
}
.mfe-section-head .mfe-lead { max-width: 100%; margin: 0 auto; }
.mfe-section-head.mfe-align-left { text-align: left; margin-left: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.mfe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mfe-sp-2);
  font-family: var(--mfe-font-medium);
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: var(--mfe-radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--mfe-dur-fast) var(--mfe-ease),
              box-shadow var(--mfe-dur-fast) var(--mfe-ease),
              background var(--mfe-dur-fast) var(--mfe-ease),
              border-color var(--mfe-dur-fast) var(--mfe-ease),
              color var(--mfe-dur-fast) var(--mfe-ease);
  text-decoration: none;
  white-space: nowrap;
}
.mfe-btn:focus-visible { outline: 2px solid var(--mfe-red); outline-offset: 2px; }

.mfe-btn--primary {
  background: var(--mfe-red);
  color: var(--mfe-white);
  box-shadow: var(--mfe-shadow-glow);
}
.mfe-btn--primary:hover,
.mfe-btn--primary:focus {
  background: var(--mfe-red-dark);
  color: var(--mfe-white);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(227, 6, 19, 0.24);
}

.mfe-btn--ghost {
  background: var(--mfe-white);
  color: var(--mfe-ink);
  border-color: var(--mfe-border);
  box-shadow: var(--mfe-shadow-sm);
}
.mfe-btn--ghost:hover,
.mfe-btn--ghost:focus {
  color: var(--mfe-ink);
  border-color: var(--mfe-red-200);
  transform: translateY(-2px);
  box-shadow: var(--mfe-shadow-md);
}

.mfe-btn--dark {
  background: var(--mfe-ink);
  color: var(--mfe-white);
}
.mfe-btn--dark:hover, .mfe-btn--dark:focus {
  background: #000;
  color: var(--mfe-white);
  transform: translateY(-2px);
}

.mfe-btn--sm { padding: 10px 20px; font-size: 13px; }

.mfe-btn .mfe-arrow { transition: transform var(--mfe-dur-fast) var(--mfe-ease); }
.mfe-btn:hover .mfe-arrow { transform: translateX(4px); }

/* ==========================================================================
   Cards
   ========================================================================== */

.mfe-card {
  background: var(--mfe-white);
  border: 1px solid var(--mfe-border);
  border-radius: var(--mfe-radius-md);
  box-shadow: var(--mfe-shadow-sm);
  transition: transform var(--mfe-dur-base) var(--mfe-ease),
              box-shadow var(--mfe-dur-base) var(--mfe-ease),
              border-color var(--mfe-dur-base) var(--mfe-ease);
}

.mfe-card--interactive:hover {
  transform: translateY(-4px);
  box-shadow: var(--mfe-shadow-hover);
  border-color: var(--mfe-red-200);
}

.mfe-card--elevated {
  box-shadow: var(--mfe-shadow-md);
}

/* ==========================================================================
   Glass surfaces — used selectively (navbar, hero panels, CTA blocks)
   ========================================================================== */

.mfe-glass {
  background: var(--mfe-glass-bg);
  -webkit-backdrop-filter: var(--mfe-glass-blur);
  backdrop-filter: var(--mfe-glass-blur);
  border: 1px solid var(--mfe-glass-border);
  box-shadow: var(--mfe-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-radius: var(--mfe-radius-lg);
}

.mfe-glass--dark {
  background: var(--mfe-glass-bg-dark);
  border-color: var(--mfe-border-dark);
  box-shadow: var(--mfe-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--mfe-white);
}

.mfe-glass--strong { background: var(--mfe-glass-bg-strong); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mfe-glass { background: rgba(255, 255, 255, 0.94); }
  .mfe-glass--dark { background: rgba(22, 24, 29, 0.92); }
}

/* Badge / pill (floating badges, stat chips) */
.mfe-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--mfe-sp-2);
  padding: var(--mfe-sp-2) var(--mfe-sp-4);
  border-radius: var(--mfe-radius-full);
  font-size: 13px;
  font-family: var(--mfe-font-medium);
  background: var(--mfe-white);
  border: 1px solid var(--mfe-border);
  box-shadow: var(--mfe-shadow-sm);
}
.mfe-badge .fa { color: var(--mfe-red); }

/* ==========================================================================
   Navbar (premium floating nav) — structure lives in includes/header.php
   ========================================================================== */

.mfe-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: padding var(--mfe-dur-base) var(--mfe-ease),
              background var(--mfe-dur-base) var(--mfe-ease),
              box-shadow var(--mfe-dur-base) var(--mfe-ease),
              border-color var(--mfe-dur-base) var(--mfe-ease);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid transparent;
}

.mfe-nav.mfe-nav--scrolled {
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: var(--mfe-glass-blur);
  backdrop-filter: var(--mfe-glass-blur);
  border-bottom: 1px solid var(--mfe-border);
  box-shadow: var(--mfe-shadow-md);
}

.mfe-nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--mfe-sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--mfe-sp-5);
}

.mfe-nav__logo img { height: 38px; width: auto; display: block; }

.mfe-nav__links {
  display: flex;
  align-items: center;
  gap: var(--mfe-sp-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mfe-nav__links a {
  position: relative;
  font-family: var(--mfe-font-medium);
  font-size: 14.5px;
  color: var(--mfe-ink);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--mfe-dur-fast) var(--mfe-ease);
}

.mfe-nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--mfe-red);
  border-radius: var(--mfe-radius-full);
  transition: width var(--mfe-dur-base) var(--mfe-ease);
}

.mfe-nav__links li.active a,
.mfe-nav__links a:hover { color: var(--mfe-red); }
.mfe-nav__links li.active a::after,
.mfe-nav__links a:hover::after { width: 100%; }

.mfe-nav__actions { display: flex; align-items: center; gap: var(--mfe-sp-4); }

.mfe-nav__cta {
  font-family: var(--mfe-font-medium);
  font-size: 14px;
  padding: 11px 24px;
  border-radius: var(--mfe-radius-full);
  background: var(--mfe-red);
  color: var(--mfe-white) !important;
  text-decoration: none;
  box-shadow: var(--mfe-shadow-glow);
  transition: transform var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.mfe-nav__cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(227, 6, 19, 0.26); color: var(--mfe-white) !important; }

.mfe-nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mfe-nav__burger span { width: 22px; height: 2px; background: var(--mfe-ink); border-radius: 2px; }

@media (max-width: 991px) {
  .mfe-nav__links { display: none; }
  .mfe-nav__burger { display: flex; }
  .mfe-nav.mfe-nav--scrolled { background: rgba(255,255,255,0.92); }
}

/* Body offset so fixed nav doesn't cover content */
.mfe-nav-spacer { height: 84px; }
@media (max-width: 767px) { .mfe-nav-spacer { height: 72px; } }

/* Universal search (in nav + hero variants) */
.mfe-search {
  position: relative;
  display: flex;
  align-items: center;
}
.mfe-search input {
  width: 100%;
  font-family: var(--mfe-font-body);
  font-size: 15px;
  padding: 15px 52px 15px 20px;
  border-radius: var(--mfe-radius-full);
  border: 1px solid var(--mfe-border);
  background: var(--mfe-white);
  box-shadow: var(--mfe-shadow-sm);
  transition: box-shadow var(--mfe-dur-fast) var(--mfe-ease), border-color var(--mfe-dur-fast) var(--mfe-ease);
}
.mfe-search input:focus {
  outline: none;
  border-color: var(--mfe-red-200);
  box-shadow: var(--mfe-shadow-md);
}
.mfe-search button {
  position: absolute;
  right: 6px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--mfe-red);
  color: var(--mfe-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mfe-search__suggestions {
  margin-top: var(--mfe-sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--mfe-sp-2);
  justify-content: center;
}
.mfe-search__suggestions a {
  font-size: 13px;
  color: var(--mfe-grey-700);
  background: var(--mfe-white);
  border: 1px solid var(--mfe-border);
  padding: 6px 14px;
  border-radius: var(--mfe-radius-full);
  text-decoration: none;
  transition: all var(--mfe-dur-fast) var(--mfe-ease);
}
.mfe-search__suggestions a:hover {
  color: var(--mfe-red);
  border-color: var(--mfe-red-200);
  background: var(--mfe-red-050);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.mfe-hero {
  position: relative;
  padding: calc(var(--mfe-sp-9) + 40px) 0 var(--mfe-sp-9);
  overflow: hidden;
  background: var(--mfe-offwhite);
}

.mfe-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22,24,29,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,24,29,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 30%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 30%, black 40%, transparent 90%);
  pointer-events: none;
}

.mfe-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--mfe-sp-8);
  align-items: center;
}

@media (max-width: 991px) {
  .mfe-hero__grid { grid-template-columns: 1fr; gap: var(--mfe-sp-7); }
}

.mfe-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mfe-sp-5);
  margin-top: var(--mfe-sp-6);
}
.mfe-hero__trust span {
  display: flex;
  align-items: center;
  gap: var(--mfe-sp-2);
  font-size: 13.5px;
  font-family: var(--mfe-font-medium);
  color: var(--mfe-grey-700);
}
.mfe-hero__trust i { color: var(--mfe-red); }

.mfe-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--mfe-sp-4); margin-top: var(--mfe-sp-6); }

/* Hero visual composition */
.mfe-hero__visual {
  position: relative;
  height: 460px;
}
@media (max-width: 991px) { .mfe-hero__visual { height: 340px; margin-top: var(--mfe-sp-4); } }
@media (max-width: 480px) { .mfe-hero__visual { height: 280px; } }

.mfe-hero__panel {
  position: absolute;
  padding: var(--mfe-sp-5);
}

.mfe-hero__panel--main {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  max-width: 360px;
}

.mfe-symbol {
  position: absolute;
  font-family: var(--mfe-font-display);
  color: var(--mfe-red);
  opacity: 0.16;
  user-select: none;
  animation: mfe-float 7s var(--mfe-ease) infinite;
}
.mfe-symbol--ink { color: var(--mfe-ink); opacity: 0.08; }

@keyframes mfe-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

.mfe-mini-card {
  display: flex;
  align-items: center;
  gap: var(--mfe-sp-3);
  padding: var(--mfe-sp-3) var(--mfe-sp-4);
}
.mfe-mini-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mfe-red-100);
  color: var(--mfe-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mfe-mini-card strong { display: block; font-family: var(--mfe-font-medium); font-size: 13.5px; color: var(--mfe-ink); }
.mfe-mini-card span { font-size: 12px; color: var(--mfe-grey-700); }

/* ==========================================================================
   Feature / quick-access cards
   ========================================================================== */

.mfe-grid {
  display: grid;
  gap: var(--mfe-sp-5);
}
.mfe-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mfe-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mfe-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 991px) {
  .mfe-grid--3, .mfe-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfe-grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .mfe-grid--3, .mfe-grid--4, .mfe-grid--6 { grid-template-columns: 1fr; }
}

.mfe-feature-card {
  padding: var(--mfe-sp-6) var(--mfe-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--mfe-sp-3);
  text-decoration: none;
  color: inherit;
}

.mfe-feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--mfe-radius-sm);
  background: var(--mfe-red-050);
  color: var(--mfe-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform var(--mfe-dur-base) var(--mfe-ease), background var(--mfe-dur-base) var(--mfe-ease);
}
.mfe-feature-card:hover .mfe-feature-card__icon {
  background: var(--mfe-red);
  color: var(--mfe-white);
  transform: scale(1.08) rotate(-4deg);
}

.mfe-feature-card__title { font-family: var(--mfe-font-medium); font-size: 17px; color: var(--mfe-ink); }
.mfe-feature-card__desc { font-size: 14px; line-height: 1.6; color: var(--mfe-grey-700); flex-grow: 1; }
.mfe-feature-card__meta { font-size: 12.5px; color: var(--mfe-red); font-family: var(--mfe-font-medium); }

.mfe-feature-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-family: var(--mfe-font-medium);
  color: var(--mfe-ink);
  margin-top: var(--mfe-sp-1);
}
.mfe-feature-card__cta i { transition: transform var(--mfe-dur-fast) var(--mfe-ease); color: var(--mfe-red); }
.mfe-feature-card:hover .mfe-feature-card__cta i { transform: translateX(4px); }

/* ==========================================================================
   Learning journey timeline
   ========================================================================== */

.mfe-journey {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: var(--mfe-sp-8);
}
.mfe-journey::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: var(--mfe-grey-300);
}
.mfe-journey__progress {
  position: absolute;
  top: 28px;
  left: 28px;
  height: 2px;
  width: 0;
  background: var(--mfe-red);
  transition: width 1.6s var(--mfe-ease);
}
.mfe-journey__dot {
  position: absolute;
  top: 22px;
  left: 28px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mfe-red);
  box-shadow: 0 0 0 6px var(--mfe-red-100);
  transition: left 1.6s var(--mfe-ease);
}
.mfe-journey__step {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 0 var(--mfe-sp-2);
}
.mfe-journey__num {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--mfe-sp-3);
  border-radius: 50%;
  background: var(--mfe-white);
  border: 2px solid var(--mfe-grey-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mfe-font-medium);
  color: var(--mfe-grey-700);
  position: relative;
  z-index: 1;
  transition: border-color var(--mfe-dur-base) var(--mfe-ease), color var(--mfe-dur-base) var(--mfe-ease);
}
.mfe-journey__step.is-active .mfe-journey__num {
  border-color: var(--mfe-red);
  color: var(--mfe-red);
  box-shadow: var(--mfe-shadow-glow);
}
.mfe-journey__label { font-family: var(--mfe-font-medium); font-size: 14px; color: var(--mfe-ink); }

@media (max-width: 767px) {
  .mfe-journey { flex-direction: column; gap: var(--mfe-sp-6); }
  .mfe-journey::before { top: 28px; bottom: 28px; left: 28px; right: auto; width: 2px; height: auto; }
  .mfe-journey__progress { top: 28px; left: 28px; width: 2px; height: 0; }
  .mfe-journey__dot { top: 28px; left: 22px; }
  .mfe-journey__step { text-align: left; padding-left: 72px; min-height: 56px; display: flex; flex-direction: column; justify-content: center; }
  .mfe-journey__num { position: absolute; left: 0; top: 0; margin: 0; }
}

/* ==========================================================================
   Stats / counters
   ========================================================================== */

.mfe-stat { text-align: center; }
.mfe-stat__num {
  font-family: var(--mfe-font-display);
  font-size: clamp(32px, 4vw, 48px);
  color: var(--mfe-white);
}
.mfe-stat__num .mfe-red-accent { color: var(--mfe-red-light); }
.mfe-stat__label { font-size: 13.5px; color: rgba(255,255,255,0.65); margin-top: var(--mfe-sp-1); }

/* ==========================================================================
   Scroll-reveal + stagger (hooks used by js/premium-ui.js)
   ========================================================================== */

.mfe-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--mfe-dur-slow) var(--mfe-ease), transform var(--mfe-dur-slow) var(--mfe-ease);
}
.mfe-reveal.is-visible { opacity: 1; transform: translateY(0); }

.mfe-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--mfe-dur-base) var(--mfe-ease), transform var(--mfe-dur-base) var(--mfe-ease);
}
.mfe-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.mfe-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.mfe-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.mfe-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.mfe-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.mfe-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.mfe-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }

/* Cursor spotlight (desktop only, applied via JS to .mfe-spotlight elements) */
.mfe-spotlight { position: relative; overflow: hidden; }
.mfe-spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mfe-spot-x, 50%) var(--mfe-spot-y, 50%), rgba(227,6,19,0.10), transparent 70%);
  opacity: 0;
  transition: opacity var(--mfe-dur-base) var(--mfe-ease);
  pointer-events: none;
}
.mfe-spotlight.mfe-spotlight--active::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .mfe-reveal, .mfe-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .mfe-symbol { animation: none !important; }
  .mfe-journey__progress, .mfe-journey__dot { transition: none !important; }
}

@media (hover: none) {
  .mfe-spotlight::after { display: none; }
}

/* ==========================================================================
   Auth pages (login, forget-password, reset-password) — split layout
   ========================================================================== */

.mfe-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .mfe-auth { grid-template-columns: 1fr; }
  .mfe-auth__brand { min-height: 240px; }
}

.mfe-auth__brand {
  position: relative;
  background: linear-gradient(155deg, var(--mfe-charcoal), var(--mfe-ink) 60%, var(--mfe-red-dark));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--mfe-sp-8);
  overflow: hidden;
}
.mfe-auth__brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
}
.mfe-auth__brand img { height: 42px !important; width: auto !important; max-width: 160px; align-self: flex-start; margin-bottom: var(--mfe-sp-6); position: relative; z-index: 1; flex-shrink: 0; }
.mfe-auth__brand h2 { font-family: var(--mfe-font-display); font-size: 30px; line-height: 1.2; margin-bottom: var(--mfe-sp-3); position: relative; z-index: 1; max-width: 380px; }
.mfe-auth__brand p { color: rgba(255,255,255,0.7); font-size: 15px; max-width: 360px; position: relative; z-index: 1; }

.mfe-auth__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--mfe-sp-7) var(--mfe-sp-5);
  background: var(--mfe-offwhite);
}

.mfe-auth__card {
  width: 100%;
  max-width: 380px;
  background: var(--mfe-white);
  border: 1px solid var(--mfe-border);
  border-radius: var(--mfe-radius-lg);
  box-shadow: var(--mfe-shadow-lg);
  padding: var(--mfe-sp-7) var(--mfe-sp-6);
}
.mfe-auth__card h1 { font-family: var(--mfe-font-display); font-size: 26px; margin-bottom: var(--mfe-sp-2); }
.mfe-auth__card .mfe-lead { font-size: 14.5px; margin-bottom: var(--mfe-sp-6); max-width: 100%; }

.mfe-auth__field { margin-bottom: var(--mfe-sp-4); }
.mfe-auth__field label { display: block; font-family: var(--mfe-font-medium); font-size: 13px; color: var(--mfe-grey-700); margin-bottom: var(--mfe-sp-2); }
.mfe-auth__field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--mfe-radius-sm);
  border: 1px solid var(--mfe-border);
  font-family: var(--mfe-font-body);
  font-size: 15px;
  transition: border-color var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.mfe-auth__field input:focus { outline: none; border-color: var(--mfe-red-200); box-shadow: 0 0 0 3px var(--mfe-red-050); }

.mfe-auth__submit {
  width: 100%;
  border: none;
  cursor: pointer;
}
.mfe-auth__links { text-align: center; margin-top: var(--mfe-sp-5); font-size: 13.5px; }
.mfe-auth__links a { color: var(--mfe-red); text-decoration: none; }
.mfe-auth__links a:hover { text-decoration: underline; }
.mfe-auth__error { background: var(--mfe-red-050); color: var(--mfe-red-dark); border-radius: var(--mfe-radius-sm); padding: var(--mfe-sp-3) var(--mfe-sp-4); font-size: 13.5px; margin-bottom: var(--mfe-sp-4); }
.mfe-auth__success { background: rgba(34,153,84,0.08); color: #1b7a3d; border-radius: var(--mfe-radius-sm); padding: var(--mfe-sp-3) var(--mfe-sp-4); font-size: 13.5px; margin-bottom: var(--mfe-sp-4); }

/* ==========================================================================
   Footer
   ========================================================================== */

.mfe-footer {
  background: linear-gradient(160deg, var(--mfe-charcoal), var(--mfe-ink));
  color: rgba(255, 255, 255, 0.65);
  padding: var(--mfe-sp-8) 0 var(--mfe-sp-5);
}

.mfe-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--mfe-sp-7);
  padding-bottom: var(--mfe-sp-7);
  border-bottom: 1px solid var(--mfe-border-dark);
}

@media (max-width: 991px) {
  .mfe-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  .mfe-footer__top { grid-template-columns: 1fr; text-align: left; }
}

.mfe-footer__brand img { height: 44px; width: auto; margin-bottom: var(--mfe-sp-4); }
.mfe-footer__about { font-size: 14px; line-height: 1.7; max-width: 320px; }

.mfe-footer__social { display: flex; gap: var(--mfe-sp-3); margin-top: var(--mfe-sp-4); }
.mfe-footer__social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--mfe-border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mfe-white);
  text-decoration: none;
  transition: background var(--mfe-dur-fast) var(--mfe-ease), border-color var(--mfe-dur-fast) var(--mfe-ease), transform var(--mfe-dur-fast) var(--mfe-ease);
}
.mfe-footer__social a:hover { background: var(--mfe-red); border-color: var(--mfe-red); color: var(--mfe-white); transform: translateY(-2px); }

.mfe-footer__title { font-family: var(--mfe-font-medium); color: var(--mfe-white); font-size: 15px; margin-bottom: var(--mfe-sp-4); }
.mfe-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--mfe-sp-3); }
.mfe-footer__col a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 14px; transition: color var(--mfe-dur-fast) var(--mfe-ease); }
.mfe-footer__col a:hover { color: var(--mfe-red-light); }
.mfe-footer__cta-col .mfe-btn { margin-top: var(--mfe-sp-2); }

.mfe-footer__bottom { padding-top: var(--mfe-sp-5); text-align: center; }
.mfe-footer__copy { font-size: 13px; color: rgba(255,255,255,0.45); }

/* ==========================================================================
   Site-wide overrides — elevates the EXISTING shared components (used
   across ~20 inner pages) to the premium system without rewriting each
   page's markup. Loads after each page's own CSS (this file is linked
   from includes/header.php, which renders after <head>), so it wins the
   cascade on equal-specificity rules.
   ========================================================================== */

/* Breadcrumb / page-header bar */
.home {
  position: relative;
  padding: 18px 0;
  overflow: hidden;
  background: var(--mfe-ink) !important;
}
.breadcrumbs_container { position: relative; z-index: 1; }
.breadcrumbs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.breadcrumbs ul li { font-family: var(--mfe-font-medium); font-size: 12.5px; letter-spacing: 0.01em; color: rgba(255,255,255,0.5); }
.breadcrumbs ul li a { color: rgba(255,255,255,0.85); text-decoration: none; transition: color var(--mfe-dur-fast) var(--mfe-ease); }
.breadcrumbs ul li a:hover { color: var(--mfe-red-light); }
.breadcrumbs ul li:not(:last-child)::after { content: '/'; margin-left: 6px; color: rgba(255,255,255,0.25); }

/* Generic buttons across forms/pages */
.btn-danger, .btn.btn-danger {
  background: var(--mfe-red) !important;
  border-color: var(--mfe-red) !important;
  border-radius: var(--mfe-radius-full) !important;
  font-family: var(--mfe-font-medium);
  padding: 10px 22px !important;
  box-shadow: var(--mfe-shadow-glow);
  transition: transform var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.btn-danger:hover, .btn.btn-danger:hover {
  background: var(--mfe-red-dark) !important;
  border-color: var(--mfe-red-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(227, 6, 19, 0.24);
}
.btn-default, .btn.btn-default {
  border-radius: var(--mfe-radius-full) !important;
  font-family: var(--mfe-font-medium);
  padding: 10px 22px !important;
}
.btn-primary, .btn.btn-primary,
.btn-info, .btn.btn-info {
  background: var(--mfe-ink) !important;
  border-color: var(--mfe-ink) !important;
  border-radius: var(--mfe-radius-full) !important;
  font-family: var(--mfe-font-medium);
  padding: 10px 22px !important;
  transition: transform var(--mfe-dur-fast) var(--mfe-ease), background var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.btn-primary:hover, .btn.btn-primary:hover,
.btn-info:hover, .btn.btn-info:hover {
  background: #000 !important;
  border-color: #000 !important;
  transform: translateY(-2px);
  box-shadow: var(--mfe-shadow-md);
}
.btn.btn-block { border-radius: var(--mfe-radius-sm) !important; }
.btn-success, .btn.btn-success {
  border-radius: var(--mfe-radius-full) !important;
  font-family: var(--mfe-font-medium);
  padding: 10px 22px !important;
  transition: transform var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.btn-success:hover, .btn.btn-success:hover { transform: translateY(-2px); box-shadow: var(--mfe-shadow-md); }

/* Contact/session-booking form (contact.php) */
.comment_input {
  border-radius: var(--mfe-radius-sm) !important;
  border: 1px solid var(--mfe-border) !important;
  transition: border-color var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.comment_input:focus { border-color: var(--mfe-red-200) !important; box-shadow: 0 0 0 3px var(--mfe-red-050); outline: none; }
.counter_form_button, .comment_button {
  border-radius: var(--mfe-radius-full) !important;
  transition: transform var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.counter_form_button:hover, .comment_button:hover { transform: translateY(-2px); box-shadow: var(--mfe-shadow-glow); }

/* Form controls */
.form-control {
  border-radius: var(--mfe-radius-sm) !important;
  border-color: var(--mfe-border) !important;
  padding: 12px 16px !important;
  height: auto !important;
  font-family: var(--mfe-font-body);
  transition: border-color var(--mfe-dur-fast) var(--mfe-ease), box-shadow var(--mfe-dur-fast) var(--mfe-ease);
}
.form-control:focus {
  border-color: var(--mfe-red-200) !important;
  box-shadow: 0 0 0 3px var(--mfe-red-050) !important;
}

/* Section titles used across ~20 inner pages */
.section_title {
  font-family: var(--mfe-font-display) !important;
  color: var(--mfe-ink) !important;
}
.section_subtitle, .section_subtitle p {
  font-family: var(--mfe-font-body);
  color: var(--mfe-grey-700) !important;
}

/* Blog post cards (blog.php) */
.blog_post {
  border-radius: var(--mfe-radius-md);
  overflow: hidden;
  box-shadow: var(--mfe-shadow-sm);
  background: var(--mfe-white);
  transition: transform var(--mfe-dur-base) var(--mfe-ease), box-shadow var(--mfe-dur-base) var(--mfe-ease);
}
.blog_post:hover { transform: translateY(-4px); box-shadow: var(--mfe-shadow-hover); }
.blog_post_title a { font-family: var(--mfe-font-medium) !important; }

/* Course cards (courses.php, index.php, course.php listings) */
.course {
  border-radius: var(--mfe-radius-md);
  overflow: hidden;
  box-shadow: var(--mfe-shadow-sm);
  transition: transform var(--mfe-dur-base) var(--mfe-ease), box-shadow var(--mfe-dur-base) var(--mfe-ease);
}
.course:hover { transform: translateY(-4px); box-shadow: var(--mfe-shadow-hover); }

/* Tables (resource listings) */
table.table { border-radius: var(--mfe-radius-sm); overflow: hidden; }
table.table thead th { font-family: var(--mfe-font-medium); border-bottom-width: 1px !important; }
table.table td, table.table th { vertical-align: middle !important; }

/* Modals */
.modal-content { border-radius: var(--mfe-radius-md) !important; border: none !important; box-shadow: var(--mfe-shadow-lg) !important; }
.modal-header { border-bottom-color: var(--mfe-border) !important; }
.modal-footer { border-top-color: var(--mfe-border) !important; }

/* Panels (feature/note/worksheet listing wrappers) */
.panel, .form-content {
  border-radius: var(--mfe-radius-md) !important;
  box-shadow: var(--mfe-shadow-sm);
  border-color: var(--mfe-border) !important;
}

/* Bootstrap .card (topic lists, pricing tiers on course.php/course-details.php) */
.card {
  border-radius: var(--mfe-radius-md) !important;
  border-color: var(--mfe-border) !important;
  box-shadow: var(--mfe-shadow-sm);
  transition: transform var(--mfe-dur-base) var(--mfe-ease), box-shadow var(--mfe-dur-base) var(--mfe-ease);
}
.card:hover { box-shadow: var(--mfe-shadow-md); }
.card-body { padding: var(--mfe-sp-6) var(--mfe-sp-5) !important; }
.card-price { font-family: var(--mfe-font-display) !important; }
.fa-ul { margin-left: 0; }
.fa-ul > li {
  padding: var(--mfe-sp-3) 0;
  border-bottom: 1px solid var(--mfe-border);
  transition: padding-left var(--mfe-dur-fast) var(--mfe-ease);
}
.fa-ul > li:last-child { border-bottom: none; }
.fa-ul > li:hover { padding-left: var(--mfe-sp-2); }
.fa-ul > li a:hover { color: var(--mfe-red) !important; }
.fa-ul .fa-li { color: var(--mfe-red); }
