/* ===============================================
   Monia Sabah Academy — Arabic E-Learning Platform
   Design System: "Aubergine & Rose Gold"
   RTL-First | Custom CSS | IBM Plex Sans Arabic

   Full token reference: /docs/DESIGN_SYSTEM.md
   =============================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* ---------------------------------------------
     PRIMITIVE SCALES (raw ramps — do not use directly
     in components; reference the semantic tokens below)
     --------------------------------------------- */

  /* Plum / Aubergine — brand primary */
  --plum-950: #1E0E1B;
  --plum-900: #2E1629;
  --plum-800: #4A2545;
  --plum-700: #5C2F55;
  --plum-600: #733C6A;
  --plum-500: #8C4E82;
  --plum-400: #A96BA0;
  --plum-300: #C495BC;
  --plum-200: #DEC1D9;
  --plum-100: #EFE0EC;
  --plum-50:  #F8F0F6;

  /* Rose gold — brand accent */
  --rose-900: #6E4223;
  --rose-800: #82502A;
  --rose-700: #9A6236;
  --rose-600: #AC7243;
  --rose-500: #C08552;
  --rose-400: #CE9A6E;
  --rose-300: #DDB392;
  --rose-200: #EBCEB6;
  --rose-100: #F5E5D6;
  --rose-50:  #FBF3EC;

  /* Ivory / Ink — warm neutrals (plum-tinted, not grey) */
  --ivory-50:  #FBF8F6;
  --ivory-100: #F3EDEE;
  --ivory-200: #E8DFE2;
  --ivory-300: #D6C9CD;
  --ink-900: #2A1F28;
  --ink-800: #3B2E38;
  --ink-700: #4E3F4A;
  --ink-600: #63525E;
  --ink-500: #766472;
  --ink-400: #948394;
  --ink-300: #B0A2AF;
  --ink-200: #CDC3CB;

  /* ---------------------------------------------
     SEMANTIC TOKENS (light mode)
     --------------------------------------------- */

  /* Primary */
  --color-primary: var(--plum-800);
  --color-primary-hover: var(--plum-900);
  --color-primary-dark: var(--plum-900);
  --color-primary-darker: var(--plum-950);
  --color-primary-light: var(--plum-600);
  --color-primary-lighter: var(--plum-400);
  --color-primary-bg: var(--plum-50);
  --color-primary-bg-hover: var(--plum-100);
  --color-primary-border: var(--plum-200);
  /* On-primary contrast: #fff on --plum-800 = 12.7:1 (AAA) */
  --color-on-primary: #ffffff;

  /* Accent — rose gold. `accent` is the decorative brand tone;
     `accent-strong` is the AA-safe fill for white text (5.0:1). */
  --color-accent: var(--rose-500);
  --color-accent-strong: var(--rose-700);
  --color-accent-hover: var(--rose-800);
  --color-accent-light: var(--rose-400);
  --color-accent-text: var(--rose-700);
  --color-accent-bg: var(--rose-50);
  --color-accent-bg-hover: var(--rose-100);
  --color-accent-border: var(--rose-200);
  --color-on-accent: #ffffff;

  /* Success */
  --color-success: #2D7B59;
  --color-success-hover: #276B4E;
  --color-success-bg: #E8F4EE;
  --color-success-border: #BFE0CE;

  /* Semantic */
  --color-error: #B93A3F;
  --color-error-hover: #9C2E33;
  --color-error-bg: #FBECED;
  --color-error-border: #F0C9CB;
  --color-warning: #926519;
  --color-warning-strong: #7A5310;
  --color-warning-bg: #FAF2E2;
  --color-warning-border: #EBD9B4;
  --color-info: var(--plum-700);
  --color-info-bg: var(--plum-50);
  --color-danger: #B93A3F;

  /* Surfaces & text */
  --color-surface: #ffffff;
  --color-surface-hover: var(--ivory-50);
  --color-surface-sunken: var(--ivory-100);
  --color-background: var(--ivory-50);
  --color-background-alt: var(--ivory-100);
  --color-text: var(--ink-900);
  --color-text-secondary: var(--ink-500);
  --color-text-muted: var(--ink-500);
  --color-text-light: var(--ink-400);
  --color-text-lighter: var(--ink-300);
  --color-text-inverse: #ffffff;
  --color-border: var(--ivory-300);
  --color-border-light: var(--ivory-200);
  --color-border-strong: var(--ink-200);

  /* Dark canvas (final CTA band, footer, hero overlays) */
  --color-canvas-dark: var(--plum-950);
  --color-canvas-dark-2: var(--plum-900);

  /* Social */
  --color-whatsapp: #25d366;
  --color-instagram: #e1306c;

  /* ---------------------------------------------
     GRADIENTS — subtle, never more than ~2 stops apart
     --------------------------------------------- */
  --gradient-primary: linear-gradient(135deg, var(--plum-700) 0%, var(--plum-800) 100%);
  --gradient-primary-hover: linear-gradient(135deg, var(--plum-800) 0%, var(--plum-900) 100%);
  --gradient-accent: linear-gradient(135deg, var(--rose-700) 0%, var(--rose-800) 100%);
  --gradient-accent-hover: linear-gradient(135deg, var(--rose-800) 0%, var(--rose-900) 100%);
  --gradient-hero: linear-gradient(160deg, var(--ivory-50) 0%, var(--plum-50) 55%, #F0E4EE 100%);
  --gradient-dark: linear-gradient(140deg, var(--plum-950) 0%, var(--plum-900) 55%, #3B1D35 100%);
  --gradient-blob: linear-gradient(135deg, var(--plum-500) 0%, var(--plum-700) 60%, var(--rose-500) 160%);
  --gradient-auth: linear-gradient(160deg, var(--plum-50) 0%, var(--ivory-50) 45%, var(--rose-50) 100%);

  /* ---------------------------------------------
     TYPOGRAPHY
     --------------------------------------------- */
  --font-primary: 'IBM Plex Sans Arabic', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-headings: 'IBM Plex Sans Arabic', 'IBM Plex Sans Arabic', 'Cairo', sans-serif;

  /* Font Weights (IBM Plex Sans Arabic tops out at 700) */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 700;

  /* Type scale — fluid */
  --fs-display: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);   /* 36 → 64px  hero */
  --fs-h1: clamp(1.875rem, 1.3rem + 2.4vw, 3rem);       /* 30 → 48px  */
  --fs-h2: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);     /* 24 → 36px  section */
  --fs-h3: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);    /* 20 → 28px  */
  --fs-h4: 1.25rem;
  --fs-lg: 1.125rem;    /* 18px body-large */
  --fs-base: 1rem;      /* 16px body */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-xs: 0.8125rem;   /* 13px */
  --fs-2xs: 0.75rem;    /* 12px */

  /* Line heights */
  --lh-tight: 1.2;
  --lh-heading: 1.32;
  --lh-body: 1.75;
  --lh-relaxed: 1.85;

  /* ---------------------------------------------
     SPACING (8px grid)
     --------------------------------------------- */
  --sp-1: 0.25rem;   /* 4px */
  --sp-2: 0.5rem;    /* 8px */
  --sp-3: 0.75rem;   /* 12px */
  --sp-4: 1rem;      /* 16px */
  --sp-5: 1.25rem;   /* 20px */
  --sp-6: 1.5rem;    /* 24px */
  --sp-8: 2rem;      /* 32px */
  --sp-10: 2.5rem;   /* 40px */
  --sp-12: 3rem;     /* 48px */
  --sp-16: 4rem;     /* 64px */
  --sp-20: 5rem;     /* 80px */
  --sp-24: 6rem;     /* 96px */
  --sp-32: 8rem;     /* 128px */

  /* ---------------------------------------------
     RADIUS — soft, generous
     --------------------------------------------- */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;   /* default card */
  --radius-xl: 20px;
  --radius-2xl: 24px;  /* large / feature card */
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* ---------------------------------------------
     SHADOWS — soft and plum-tinted, never black
     --------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(74, 37, 69, 0.05);
  --shadow-sm: 0 2px 8px rgba(74, 37, 69, 0.06);
  --shadow-md: 0 6px 20px rgba(74, 37, 69, 0.08);
  --shadow-lg: 0 14px 40px rgba(74, 37, 69, 0.10);
  --shadow-xl: 0 24px 60px rgba(74, 37, 69, 0.14);
  --shadow-card: 0 1px 3px rgba(74, 37, 69, 0.05), 0 6px 18px rgba(74, 37, 69, 0.05);
  --shadow-card-hover: 0 4px 10px rgba(74, 37, 69, 0.07), 0 16px 36px rgba(74, 37, 69, 0.10);
  --shadow-accent: 0 10px 26px rgba(154, 98, 54, 0.26);
  --shadow-primary: 0 10px 26px rgba(74, 37, 69, 0.24);
  --ring-primary: 0 0 0 3px rgba(115, 60, 106, 0.28);
  --ring-accent: 0 0 0 3px rgba(192, 133, 82, 0.30);
  --ring-error: 0 0 0 3px rgba(185, 58, 63, 0.22);

  /* ---------------------------------------------
     MOTION
     --------------------------------------------- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);

  /* ---------------------------------------------
     LAYOUT
     --------------------------------------------- */
  --container-max: 1240px;
  --container-narrow: 820px;
  --container-padding: 1.5rem;
  --navbar-height: 72px;

  /* ---------------------------------------------
     LEGACY ALIASES
     Older templates (course_content, dashboard,
     forgot_password, courses) reference these names with
     no fallback, which made the declaration invalid and
     silently dropped the style. Mapped onto the real
     tokens so they inherit the identity and dark mode.
     Prefer the semantic names above in new code.
     --------------------------------------------- */
  --accent: var(--color-accent);
  --primary-dark: var(--color-primary-dark);
  --primary-light: var(--color-primary-light);
  --success-dark: var(--color-success-hover);
  --gray-900: var(--color-text);
  --gray-600: var(--color-text-secondary);
  --gray-200: var(--color-border-light);
  --font-medium: var(--fw-medium);
  --font-semibold: var(--fw-semibold);
  --font-bold: var(--fw-bold);
  --font-extrabold: var(--fw-bold);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-overlay: 1040;
  --z-modal: 1050;
  --z-toast: 1060;
}

/* ===============================================
   DARK MODE
   Opt-in by system preference, overridable with
   <html data-theme="dark"> / <html data-theme="light">.
   =============================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-primary: var(--plum-400);
    --color-primary-hover: var(--plum-300);
    --color-primary-dark: var(--plum-300);
    --color-primary-darker: var(--plum-200);
    --color-primary-light: var(--plum-500);
    --color-primary-lighter: var(--plum-300);
    --color-primary-bg: #2E1F2B;
    --color-primary-bg-hover: #3A2836;
    --color-primary-border: #4A3446;
    --color-on-primary: #1E0E1B;

    --color-accent: var(--rose-400);
    --color-accent-strong: var(--rose-500);
    --color-accent-hover: var(--rose-400);
    --color-accent-light: var(--rose-300);
    --color-accent-text: var(--rose-300);
    --color-accent-bg: #33241B;
    --color-accent-bg-hover: #3F2C21;
    --color-accent-border: #55392B;
    --color-on-accent: #241408;

    --color-success: #63C79E;
    --color-success-hover: #82D6B4;
    --color-success-bg: #16302A;
    --color-success-border: #274C42;

    --color-error: #F0918F;
    --color-error-hover: #F5AFAD;
    --color-error-bg: #3A1E22;
    --color-error-border: #58323A;
    --color-warning: #DDB878;
    --color-warning-strong: #EACB96;
    --color-warning-bg: #342A1B;
    --color-warning-border: #4C3D26;
    --color-info: var(--plum-400);
    --color-info-bg: #2E1F2B;
    --color-danger: #F0918F;

    --color-surface: #1F1620;
    --color-surface-hover: #291D29;
    --color-surface-sunken: #180F16;
    --color-background: #150E13;
    --color-background-alt: #251A24;
    --color-text: #F0E8EE;
    --color-text-secondary: #C0B0BD;
    --color-text-muted: #C0B0BD;
    --color-text-light: #A08FA0;
    --color-text-lighter: #7E6E7C;
    --color-text-inverse: #1E0E1B;
    --color-border: #453745;
    --color-border-light: #392C38;
    --color-border-strong: #574557;

    --color-canvas-dark: #120B10;
    --color-canvas-dark-2: #1E1119;

    --gradient-primary: linear-gradient(135deg, var(--plum-500) 0%, var(--plum-600) 100%);
    --gradient-primary-hover: linear-gradient(135deg, var(--plum-400) 0%, var(--plum-500) 100%);
    --gradient-accent: linear-gradient(135deg, var(--rose-500) 0%, var(--rose-600) 100%);
    --gradient-accent-hover: linear-gradient(135deg, var(--rose-400) 0%, var(--rose-500) 100%);
    --gradient-hero: linear-gradient(160deg, #150E13 0%, #22161F 55%, #2C1A28 100%);
    --gradient-dark: linear-gradient(140deg, #100A0E 0%, #1D1119 55%, #281624 100%);
    --gradient-auth: linear-gradient(160deg, #1F1420 0%, #150E13 45%, #2A1D18 100%);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.55);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 4px 10px rgba(0, 0, 0, 0.4), 0 16px 36px rgba(0, 0, 0, 0.42);
    --shadow-accent: 0 10px 26px rgba(192, 133, 82, 0.22);
    --shadow-primary: 0 10px 26px rgba(140, 78, 130, 0.22);
    --ring-primary: 0 0 0 3px rgba(169, 107, 160, 0.35);
    --ring-accent: 0 0 0 3px rgba(206, 154, 110, 0.35);
    --ring-error: 0 0 0 3px rgba(240, 145, 143, 0.3);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --color-primary: var(--plum-400);
  --color-primary-hover: var(--plum-300);
  --color-primary-dark: var(--plum-300);
  --color-primary-darker: var(--plum-200);
  --color-primary-light: var(--plum-500);
  --color-primary-lighter: var(--plum-300);
  --color-primary-bg: #2E1F2B;
  --color-primary-bg-hover: #3A2836;
  --color-primary-border: #4A3446;
  --color-on-primary: #1E0E1B;

  --color-accent: var(--rose-400);
  --color-accent-strong: var(--rose-500);
  --color-accent-hover: var(--rose-400);
  --color-accent-light: var(--rose-300);
  --color-accent-text: var(--rose-300);
  --color-accent-bg: #33241B;
  --color-accent-bg-hover: #3F2C21;
  --color-accent-border: #55392B;
  --color-on-accent: #241408;

  --color-success: #63C79E;
  --color-success-hover: #82D6B4;
  --color-success-bg: #16302A;
  --color-success-border: #274C42;

  --color-error: #F0918F;
  --color-error-hover: #F5AFAD;
  --color-error-bg: #3A1E22;
  --color-error-border: #58323A;
  --color-warning: #DDB878;
  --color-warning-strong: #EACB96;
  --color-warning-bg: #342A1B;
  --color-warning-border: #4C3D26;
  --color-info: var(--plum-400);
  --color-info-bg: #2E1F2B;
  --color-danger: #F0918F;

  --color-surface: #1F1620;
  --color-surface-hover: #291D29;
  --color-surface-sunken: #180F16;
  --color-background: #150E13;
  --color-background-alt: #251A24;
  --color-text: #F0E8EE;
  --color-text-secondary: #C0B0BD;
  --color-text-muted: #C0B0BD;
  --color-text-light: #A08FA0;
  --color-text-lighter: #7E6E7C;
  --color-text-inverse: #1E0E1B;
  --color-border: #453745;
  --color-border-light: #392C38;
  --color-border-strong: #574557;

  --color-canvas-dark: #120B10;
  --color-canvas-dark-2: #1E1119;

  --gradient-primary: linear-gradient(135deg, var(--plum-500) 0%, var(--plum-600) 100%);
  --gradient-primary-hover: linear-gradient(135deg, var(--plum-400) 0%, var(--plum-500) 100%);
  --gradient-accent: linear-gradient(135deg, var(--rose-500) 0%, var(--rose-600) 100%);
  --gradient-accent-hover: linear-gradient(135deg, var(--rose-400) 0%, var(--rose-500) 100%);
  --gradient-hero: linear-gradient(160deg, #150E13 0%, #22161F 55%, #2C1A28 100%);
  --gradient-dark: linear-gradient(140deg, #100A0E 0%, #1D1119 55%, #281624 100%);
  --gradient-auth: linear-gradient(160deg, #1F1420 0%, #150E13 45%, #2A1D18 100%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 4px 10px rgba(0, 0, 0, 0.4), 0 16px 36px rgba(0, 0, 0, 0.42);
  --shadow-accent: 0 10px 26px rgba(192, 133, 82, 0.22);
  --shadow-primary: 0 10px 26px rgba(140, 78, 130, 0.22);
  --ring-primary: 0 0 0 3px rgba(169, 107, 160, 0.35);
  --ring-accent: 0 0 0 3px rgba(206, 154, 110, 0.35);
  --ring-error: 0 0 0 3px rgba(240, 145, 143, 0.3);

  color-scheme: dark;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  padding-top: var(--navbar-height);
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--color-text);
  margin-bottom: var(--sp-4);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
}

h6 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-body);
}

/* Eyebrow / kicker above section headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  color: var(--color-accent-text);
  background: var(--color-accent-bg);
  border: 1px solid var(--color-accent-border);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
}

.eyebrow--primary {
  color: var(--color-primary);
  background: var(--color-primary-bg);
  border-color: var(--color-primary-border);
}

.eyebrow svg { width: 15px; height: 15px; }

/* Emphasised word inside a heading — coral underline stroke */
.text-accent { color: var(--color-accent-text); }
.text-primary { color: var(--color-primary); }

.text-underline-accent {
  position: relative;
  white-space: nowrap;
}

.text-underline-accent::after {
  content: '';
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0.06em;
  height: 0.28em;
  background: var(--color-accent);
  opacity: 0.28;
  border-radius: var(--radius-full);
  z-index: -1;
}

.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-center { text-align: center; }
.font-medium { font-weight: var(--fw-medium); }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.section {
  padding: var(--sp-16) 0;
}

.section-sm {
  padding: var(--sp-12) 0;
}

.section-lg {
  padding: var(--sp-20) 0;
}

.section-alt {
  background-color: var(--color-surface);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--sp-6);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.reviews-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-md-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-md-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start { display: flex; align-items: center; justify-content: flex-start; }
.flex-end { display: flex; align-items: center; justify-content: flex-end; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }

/* Gap */
.gap-xs { gap: var(--sp-1); }
.gap-sm { gap: var(--sp-2); }
.gap-md { gap: var(--sp-4); }
.gap-lg { gap: var(--sp-6); }
.gap-xl { gap: var(--sp-8); }

/* ===== NAVIGATION ===== */
/* Sticky nav: translucent while at the top of the page, solid once the
   user scrolls (`.scrolled` is toggled from base.html). */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-fixed);
  height: var(--navbar-height);
  background-color: color-mix(in srgb, var(--color-surface) 72%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
  overflow: visible;
}

/* Fallback for engines without color-mix() */
@supports not (background-color: color-mix(in srgb, red 50%, transparent)) {
  .navbar { background-color: rgba(255, 255, 255, 0.78); }
}

.navbar.scrolled {
  background-color: var(--color-surface);
  border-bottom-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

/* Immersive variant — hero content runs underneath the bar (home page). */
body.has-immersive-hero { padding-top: 0; }

body.has-immersive-hero .navbar:not(.scrolled) {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-4);
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.15;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand span:first-child {
  font-size: 1.4rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.navbar-brand:hover span:first-child {
  color: var(--color-primary-light);
}

.navbar-subtitle {
  font-size: 0.7rem;
  color: var(--color-text-light);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  overflow: visible;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-bg);
}

/* Active page: filled pill + coral marker underneath */
.nav-link.active {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  background-color: var(--color-primary-bg);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 50%;
  transform: translateX(50%);
  width: 18px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
}

/* Nav User Display */
.nav-user {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-background);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-light);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  padding: var(--sp-1) var(--sp-2);
  background: var(--color-background);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-fast);
  text-decoration: none;
  margin-inline-start: var(--sp-2);
}

.lang-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.lang-toggle svg {
  flex-shrink: 0;
}

/* RTL/LTR Support */
html[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .navbar-brand {
  flex-direction: column;
  align-items: flex-start;
}

html[dir="ltr"] .nav-link.active::after {
  right: auto;
  left: var(--sp-3);
}

html[dir="ltr"] .footer-content {
  text-align: left;
}

html[dir="ltr"] .footer-section h3::after {
  right: auto;
  left: 0;
  background: linear-gradient(90deg, #9A6236, transparent);
}

html[dir="ltr"] .footer-link::before {
  content: '→';
  transform: translateX(-5px);
}

html[dir="ltr"] .footer-link:hover {
  transform: translateX(4px);
}

html[dir="ltr"] .footer-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-dropdown-toggle:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-bg);
}

.nav-dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.nav-dropdown-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-text-light);
}

.nav-dropdown-item:hover svg {
  color: var(--color-primary);
}

/* Message badge */
.nav-item-with-badge {
  position: relative;
}

.msg-badge {
  width: 8px;
  height: 8px;
  background-color: var(--color-error);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-right: auto;
}

/* Mobile Toggle */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  cursor: pointer;
  z-index: calc(var(--z-fixed) + 10);
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--navbar-height) + var(--sp-4)) var(--sp-6) var(--sp-6);
    gap: var(--sp-1);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    overflow-y: auto;
    z-index: var(--z-fixed);
  }

  .navbar-nav.active {
    right: 0;
  }

  .nav-link {
    padding: var(--sp-3) var(--sp-4);
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link.active {
    background-color: var(--color-primary-bg);
  }

  .nav-dropdown {
    padding-bottom: 0;
  }

  .nav-dropdown-toggle {
    padding: var(--sp-3) var(--sp-4);
    font-size: 0.95rem;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 var(--sp-4);
    display: none;
    background: transparent;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-item {
    padding: var(--sp-2) var(--sp-3);
    font-size: 0.85rem;
  }

  .nav-user {
    text-align: center;
    margin-top: var(--sp-2);
  }

  .lang-toggle {
    justify-content: center;
    margin: var(--sp-3) 0;
    margin-inline-start: 0;
  }
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: calc(var(--z-fixed) - 1);
}

.nav-overlay.active {
  display: block;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-primary);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-base),
              background var(--transition-base),
              background-color var(--transition-base),
              color var(--transition-fast),
              border-color var(--transition-fast);
  white-space: nowrap;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-primary);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Primary — subtle teal gradient. #fff on --plum-700 = 5.6:1 (AA) */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-primary);
}

.btn-primary:active,
.btn-primary:focus {
  color: var(--color-on-primary);
}

/* Secondary — outlined */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-primary);
}

/* Soft — tinted fill, no border. Quiet third-tier action. */
.btn-soft {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}

.btn-soft:hover {
  background-color: var(--color-primary-bg-hover);
  color: var(--color-primary);
}

/* Accent — coral gradient. #fff on --rose-700 = 4.9:1 (AA) */
.btn-accent {
  background: var(--gradient-accent);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-sm);
}

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

.btn-accent:active,
.btn-accent:focus {
  color: var(--color-on-accent);
}

.btn-accent:focus-visible { box-shadow: var(--ring-accent); }

/* Success */
.btn-success {
  background-color: var(--color-success);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  background-color: var(--color-success-hover);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Danger */
.btn-danger {
  background-color: var(--color-error);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: var(--color-error-hover);
  color: #ffffff;
}

.btn-danger:focus-visible { box-shadow: var(--ring-error); }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

.btn-ghost:active,
.btn-ghost:focus {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

/* Light */
.btn-light {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

.btn-light:hover {
  background-color: var(--color-border-light);
  color: var(--color-text);
}

/* White — for use on dark/gradient bands */
.btn-white {
  background-color: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* Sizes */
.btn-sm {
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-4);
}

.btn-sm svg { width: 15px; height: 15px; }

.btn-lg {
  font-size: var(--fs-base);
  padding: var(--sp-4) var(--sp-8);
}

.btn-lg svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active { transform: none; }
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-icon {
  padding: var(--sp-2);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* ===== CARDS ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

/* Feature card — icon + title + copy, used in "What you'll learn" */
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-base), transform var(--transition-base),
              border-color var(--transition-base);
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary-border);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  margin-bottom: var(--sp-5);
  transition: background var(--transition-base), color var(--transition-base);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
}

.feature-card:hover .feature-icon {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.feature-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-3);
}

.feature-card p {
  font-size: var(--fs-sm);
  margin-bottom: 0;
}

.card-body {
  padding: var(--sp-6);
}

.card-header {
  padding: var(--sp-6) var(--sp-6) 0;
}

.card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-hover);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
  line-height: 1.4;
}

.card-text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}

/* Course Card - Udemy style */
.course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.course-card .card-img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}

.course-card .card-body {
  padding: var(--sp-4) var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card .card-title {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-card .course-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: var(--sp-3);
}

.course-card .course-meta svg {
  width: 14px;
  height: 14px;
}

.course-card .course-price {
  font-size: 1.125rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin-top: auto;
}

.course-card .course-price.free {
  color: var(--color-success);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.badge-primary {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.badge-accent {
  background-color: var(--color-accent-bg);
  color: var(--color-accent);
}

.badge-info {
  background-color: rgba(115, 60, 106, 0.1);
  color: #733C6A;
}

.badge-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.badge-warning {
  background-color: var(--color-warning-bg);
  color: #7A5310;
}

.badge-error {
  background-color: var(--color-error-bg);
  color: var(--color-error);
}

.badge-promotion {
  background-color: rgba(140, 78, 130, 0.1);
  color: #8C4E82;
}

.badge-light {
  background-color: var(--color-background-alt);
  color: var(--color-text-secondary);
}

.badge-dark {
  background-color: var(--color-text);
  color: #ffffff;
}

.badge-secondary {
  background-color: var(--color-background-alt);
  color: var(--color-text-secondary);
}

/* Pill shape */
.badge-pill {
  border-radius: var(--radius-full);
  padding: var(--sp-1) var(--sp-4);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--sp-5);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.form-label .required {
  color: var(--color-error);
  margin-right: var(--sp-1);
}

.form-input,
.form-textarea,
.form-select {
  display: block;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
              background-color var(--transition-fast);
  line-height: 1.6;
}

/* Focus state uses the coral accent so it reads as "active", not "error" */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--ring-accent);
}

.form-input:hover:not(:focus),
.form-textarea:hover:not(:focus),
.form-select:hover:not(:focus) {
  border-color: var(--color-border-strong);
}

/* Inline validation */
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
  border-color: var(--color-error);
}

.form-input.is-invalid:focus,
.form-textarea.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: var(--ring-error);
}

.form-input.is-valid,
.form-textarea.is-valid {
  border-color: var(--color-success);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-lighter);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235F7370' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: var(--sp-1);
}

/* Phone / WhatsApp field: country code selector + local number on one row */
.phone-field {
  display: flex;
  gap: var(--sp-2);
  align-items: stretch;
}

.phone-field .phone-country {
  flex: 0 0 auto;
  width: 42%;
  max-width: 14rem;
  /* Force LTR: an RTL document would otherwise render the dial code as "970+" */
  direction: ltr;
  text-align: start;
}

.phone-field .phone-number {
  flex: 1 1 auto;
  min-width: 0;
  direction: ltr;
  text-align: start;
}

@media (max-width: 480px) {
  .phone-field {
    flex-wrap: wrap;
  }

  .phone-field .phone-country {
    width: 100%;
    max-width: none;
  }
}

/* Star Rating Input */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  cursor: pointer;
  width: 32px;
  height: 32px;
  color: #D6C9CD;
  transition: color 0.15s ease;
}

.rating-input label svg {
  width: 100%;
  height: 100%;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
  color: #C08552;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: var(--sp-1);
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: 0.9375rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Radio group */
.form-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
}

.radio-option:hover {
  border-color: var(--color-primary-light);
}

.radio-option.selected,
.radio-option:has(input:checked) {
  border-color: var(--color-primary);
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

/* File input */
.form-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-8);
  background: var(--color-background);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

.form-file-label:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.form-file-label svg {
  width: 24px;
  height: 24px;
}

/* ===== TABLES ===== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  background: var(--color-background);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border);
  text-align: right;
  white-space: nowrap;
}

.table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: var(--color-surface-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== ALERTS / FLASH MESSAGES ===== */
.flash-messages {
  position: fixed;
  top: calc(var(--navbar-height) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  width: 90%;
  max-width: 500px;
}

.flash-message,
.alert {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  animation: slideDown 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.flash-message svg,
.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert-success {
  background-color: var(--color-success-bg);
  color: #276B4E;
  border: 1px solid #BFE0CE;
}

.alert-success svg { color: var(--color-success); }

.alert-warning {
  background-color: var(--color-warning-bg);
  color: #7A5310;
  border: 1px solid #EBD9B4;
}

.alert-warning svg { color: var(--color-warning); }

.alert-danger,
.alert-error {
  background-color: var(--color-error-bg);
  color: #6E4223;
  border: 1px solid #F0C9CB;
}

.alert-danger svg,
.alert-error svg { color: var(--color-error); }

.alert-info {
  background-color: var(--color-info-bg);
  color: #2E1629;
  border: 1px solid #DEC1D9;
}

.alert-info svg { color: var(--color-info); }

/* Static alerts (in-page) */
.alert-static {
  position: static;
  box-shadow: none;
  margin-bottom: var(--sp-4);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-8px); }
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: var(--sp-10) 0 var(--sp-8);
}

.page-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin-bottom: 0;
}

.page-description {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-top: var(--sp-2);
  margin-bottom: 0;
}

.page-actions {
  display: flex;
  gap: var(--sp-3);
}

/* ===== HERO SECTION =====
   Light, airy hero on a warm-cream → teal gradient with organic blobs.
   `.hero--dark` keeps the old inverted treatment for interior pages. */
.hero {
  background: var(--gradient-hero);
  color: var(--color-text);
  padding: var(--sp-16) 0 var(--sp-20);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* When the nav floats over the hero, reserve its height here instead of on body */
body.has-immersive-hero .hero {
  padding-top: calc(var(--navbar-height) + var(--sp-16));
}

/* Organic blob field behind the hero */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  filter: blur(2px);
}

.hero::before {
  top: -18%;
  inset-inline-start: -12%;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle at 35% 35%, rgba(140, 78, 130, 0.20), transparent 68%);
  border-radius: 58% 42% 47% 53% / 46% 51% 49% 54%;
}

.hero::after {
  bottom: -28%;
  inset-inline-end: -10%;
  width: 40vw;
  height: 40vw;
  max-width: 540px;
  max-height: 540px;
  background: radial-gradient(circle at 60% 40%, rgba(192, 133, 82, 0.18), transparent 66%);
  border-radius: 44% 56% 62% 38% / 55% 43% 57% 45%;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--color-text);
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-5);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--color-text-secondary);
  font-size: var(--fs-lg);
  max-width: 560px;
  line-height: var(--lh-relaxed);
}

.hero-content {
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  flex-wrap: wrap;
}

/* Two-column hero: copy + media */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-12);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
  .hero { padding: var(--sp-10) 0 var(--sp-12); }
  body.has-immersive-hero .hero {
    padding-top: calc(var(--navbar-height) + var(--sp-8));
  }
}

/* Organic blob frame around the hero media */
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-media::before {
  content: '';
  position: absolute;
  inset: -6% -4%;
  background: var(--gradient-blob);
  opacity: 0.16;
  border-radius: 62% 38% 44% 56% / 48% 58% 42% 52%;
  animation: blobMorph 18s ease-in-out infinite;
}

.hero-media > * {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

@keyframes blobMorph {
  0%, 100% { border-radius: 62% 38% 44% 56% / 48% 58% 42% 52%; }
  33%      { border-radius: 42% 58% 62% 38% / 58% 44% 56% 42%; }
  66%      { border-radius: 55% 45% 38% 62% / 42% 62% 38% 58%; }
}

/* Dark hero variant — interior pages that still want an inverted band */
.hero--dark {
  background: var(--gradient-dark);
  color: #ffffff;
}

.hero--dark::before {
  background: radial-gradient(circle at 35% 35%, rgba(140, 78, 130, 0.30), transparent 68%);
}

.hero--dark::after {
  background: radial-gradient(circle at 60% 40%, rgba(192, 133, 82, 0.22), transparent 66%);
}

.hero--dark h1 { color: #ffffff; }
.hero--dark p { color: rgba(255, 255, 255, 0.82); }

.hero--dark .btn-primary {
  background: #ffffff;
  color: var(--plum-800);
}

.hero--dark .btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--plum-900);
}

.hero--dark .btn-outline {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero--dark .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
  color: #ffffff;
}

.hero--dark .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Hero stats row */
.hero-stats {
  display: flex;
  gap: var(--sp-10);
  margin-top: var(--sp-10);
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }

.hero-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  line-height: var(--lh-tight);
}

.hero-stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
}

.hero--dark .hero-stat-number { color: #ffffff; }
.hero--dark .hero-stat-label { color: rgba(255, 255, 255, 0.7); }

@media (prefers-reduced-motion: reduce) {
  .hero-media::before { animation: none; }
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
  max-width: 680px;
  margin-inline: auto;
}

.section-header h2 {
  margin-bottom: var(--sp-3);
}

.section-header p {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-header-line {
  width: 56px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin: var(--sp-5) auto 0;
}

/* Alternating section backgrounds create visual separation */
.section-cream { background-color: var(--color-background-alt); }
.section-tint  { background-color: var(--color-primary-bg); }

/* ===== SCROLL REVEAL =====
   Elements marked `.reveal` fade+slide in when they enter the viewport;
   base.html adds `.is-visible` via IntersectionObserver. Content is fully
   visible if JS never runs (`.no-js` fallback below). */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms var(--ease-out-soft),
              transform 620ms var(--ease-out-soft);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 90ms; }
.reveal-delay-2 { transition-delay: 180ms; }
.reveal-delay-3 { transition-delay: 270ms; }
.reveal-delay-4 { transition-delay: 360ms; }

html.no-js .reveal,
.no-reveal .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--color-background-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.progress-fill.success {
  background: var(--color-success);
}

.progress-text {
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  margin-top: var(--sp-1);
}

/* ===== ACCORDION ===== */
.accordion {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.accordion-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.accordion-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-border);
}

.accordion-item.open {
  border-color: var(--color-primary-border);
  box-shadow: var(--shadow-md);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  text-align: start;
  line-height: 1.6;
  transition: color var(--transition-fast);
}

.accordion-trigger:hover { color: var(--color-primary); }

.accordion-trigger:focus-visible {
  outline: none;
  box-shadow: inset var(--ring-primary);
}

.accordion-item.open .accordion-trigger { color: var(--color-primary); }

/* Animated +/− control (built from two bars, no icon font needed) */
.accordion-icon {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  transition: background var(--transition-base), transform var(--transition-base);
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transform: translate(-50%, -50%);
  transition: transform var(--transition-base), background var(--transition-base);
}

/* vertical bar of the "+" — rotates away to leave a "−" */
.accordion-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.accordion-trigger:hover .accordion-icon { background: var(--color-primary-bg-hover); }

.accordion-item.open .accordion-icon {
  background: var(--color-accent);
  transform: rotate(180deg);
}

.accordion-item.open .accordion-icon::before,
.accordion-item.open .accordion-icon::after {
  background: #ffffff;
}

.accordion-item.open .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Legacy chevron markup still works inside the trigger */
.accordion-trigger > svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-light);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.accordion-item.open .accordion-trigger > svg {
  transform: rotate(180deg);
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-base);
}

.accordion-content > * { overflow: hidden; }

.accordion-item.open .accordion-content {
  grid-template-rows: 1fr;
}

/* Fallback for browsers without grid-row animation (Safari < 16) */
@supports not (grid-template-rows: 0fr) {
  .accordion-content {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }
  .accordion-item.open .accordion-content { max-height: 1200px; }
}

.accordion-body {
  padding: 0 var(--sp-6) var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
}

@media (prefers-reduced-motion: reduce) {
  .accordion-icon,
  .accordion-content { transition: none; }
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border-light);
  margin-bottom: var(--sp-8);
}

.tab-btn {
  padding: var(--sp-3) var(--sp-6);
  font-size: 0.9375rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.active {
  color: var(--color-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  color: var(--color-text-light);
}

.modal-close:hover {
  background-color: var(--color-background-alt);
  color: var(--color-text);
}

.modal-body {
  padding: var(--sp-6);
}

.modal-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-start;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--color-text-lighter);
  margin: 0 auto var(--sp-6);
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-2);
}

.empty-state p {
  color: var(--color-text-light);
  margin-bottom: var(--sp-6);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gradient-dark);
  color: rgba(255,255,255,0.9);
  padding: var(--sp-16) 0 var(--sp-8);
  margin-top: 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer-section h3 {
  color: #ffffff;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-5);
  position: relative;
  padding-bottom: var(--sp-3);
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--rose-500), transparent);
  border-radius: var(--radius-full);
}

.footer-section p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link::before {
  content: '←';
  opacity: 0;
  transform: translateX(5px);
  transition: all var(--transition-fast);
}

.footer-link:hover {
  color: #ffffff;
  transform: translateX(-4px);
}

.footer-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--sp-8);
  text-align: center;
}

/* Social icons in the footer — unified circular outline style */
.footer-social {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.82);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-social svg { width: 18px; height: 18px; }

.footer-bottom p {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin-bottom: var(--sp-2);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

/* ===== SOCIAL FLOAT ===== */
.social-float {
  position: fixed;
  bottom: var(--sp-6);
  left: var(--sp-6);
  z-index: var(--z-sticky);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.social-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  color: #ffffff;
}

.social-btn svg {
  width: 24px;
  height: 24px;
}

.social-btn.whatsapp {
  background: var(--color-whatsapp);
}

.social-btn.instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

/* ===== STATS SECTION =====
   Horizontal card blocks: icon + counted number + label. */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  text-align: start;
  padding: var(--sp-5);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.stat-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.stat-icon svg { width: 22px; height: 22px; stroke-width: 1.6; }

/* Every other tile picks up the coral accent so the row has rhythm */
.stat-card:nth-child(even) .stat-icon {
  background: var(--color-accent-bg);
  color: var(--color-accent-text);
}

.stat-body { min-width: 0; }

.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

/* ===== TESTIMONIAL CARDS =====
   Quote card: oversized coral quote mark + circular portrait. */
.testimonial-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.testimonial-card::before {
  content: '\201D';           /* ” — decorative, hidden from AT below */
  position: absolute;
  top: -0.28em;
  inset-inline-start: var(--sp-6);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.22;
  pointer-events: none;
  user-select: none;
}

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

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--sp-4);
  position: relative;
}

.testimonial-stars svg {
  width: 17px;
  height: 17px;
  color: var(--color-warning);
  fill: var(--color-warning);
}

.testimonial-text {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  margin-bottom: var(--sp-5);
  position: relative;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border-light);
}

.testimonial-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-primary-border);
}

.testimonial-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.testimonial-role {
  font-size: var(--fs-2xs);
  color: var(--color-text-light);
}

/* ===== SESSION CARDS ===== */
.session-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.session-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.session-card-header {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.session-card-header h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1.0625rem;
}

.session-card-body {
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.session-info-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.session-info-row svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.session-card-footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== CHECKOUT LAYOUT ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-8);
  align-items: start;
}

.checkout-summary {
  position: sticky;
  top: calc(var(--navbar-height) + var(--sp-6));
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
    order: -1;
  }
}

/* ===== COURSE DETAIL LAYOUT ===== */
.course-detail-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2E1629 100%);
  color: #ffffff;
  padding: var(--sp-12) 0;
}

.course-detail-hero h1 {
  color: #ffffff;
  margin-bottom: var(--sp-3);
}

.course-detail-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.0625rem;
  max-width: 700px;
}

.course-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-8);
  align-items: start;
  margin-top: calc(-1 * var(--sp-10));
  position: relative;
  z-index: 1;
}

.course-sidebar {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--navbar-height) + var(--sp-6));
}

.course-sidebar-price {
  padding: var(--sp-6);
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
}

.course-sidebar-price .price {
  font-size: 2rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
}

.course-sidebar-price .price.free {
  color: var(--color-success);
}

.course-sidebar-body {
  padding: var(--sp-5) var(--sp-6);
}

.course-sidebar-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.course-sidebar-info-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.course-sidebar-info-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
}

@media (max-width: 900px) {
  .course-detail-layout {
    grid-template-columns: 1fr;
    margin-top: var(--sp-6);
  }

  .course-sidebar {
    position: static;
    order: -1;
  }
}

/* Course content sections */
.course-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.outcome-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ===== DASHBOARD ===== */
.dashboard-welcome {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2E1629 100%);
  color: #ffffff;
  padding: var(--sp-10) 0;
  border-radius: 0;
}

.dashboard-welcome h1 {
  color: #ffffff;
  margin-bottom: var(--sp-2);
}

.dashboard-welcome p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-8);
}

.dashboard-stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
}

.dashboard-stat .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
}

.dashboard-stat .stat-icon svg {
  width: 24px;
  height: 24px;
}

.dashboard-stat .stat-icon.primary {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.dashboard-stat .stat-icon.success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.dashboard-stat .stat-icon.accent {
  background: var(--color-accent-bg);
  color: var(--color-accent);
}

/* ===== COURSE CONTENT VIEWER ===== */
.content-viewer-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - var(--navbar-height));
}

.content-sidebar {
  background: var(--color-surface);
  border-left: 1px solid var(--color-border-light);
  overflow-y: auto;
  height: calc(100vh - var(--navbar-height));
  position: sticky;
  top: var(--navbar-height);
}

.content-sidebar-header {
  padding: var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--color-border-light);
}

.content-sidebar-header h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

.chapter-item {
  border-bottom: 1px solid var(--color-border-light);
}

.chapter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  font-weight: var(--fw-semibold);
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  background: var(--color-background);
}

.chapter-title:hover {
  background: var(--color-background-alt);
}

.chapter-title svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  transition: transform var(--transition-fast);
}

.chapter-item.open .chapter-title svg {
  transform: rotate(180deg);
}

.lesson-list {
  display: none;
}

.chapter-item.open .lesson-list {
  display: block;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-8);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lesson-item:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.lesson-item.active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.lesson-item.completed {
  color: var(--color-success);
}

.lesson-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.content-main {
  padding: var(--sp-8);
}

@media (max-width: 768px) {
  .content-viewer-layout {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-bottom: 1px solid var(--color-border-light);
  }
}

/* ===== VIDEO PLAYER ===== */
.video-player-wrapper {
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--sp-6);
}

.video-player-wrapper video,
.video-player-wrapper iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12) var(--sp-4);
  background: var(--gradient-auth);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Soft blobs behind the card */
.auth-page::before,
.auth-page::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.auth-page::before {
  top: -20%;
  inset-inline-start: -8%;
  width: 40vw;
  height: 40vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(140, 78, 130, 0.18), transparent 68%);
  border-radius: 58% 42% 47% 53% / 46% 51% 49% 54%;
}

.auth-page::after {
  bottom: -22%;
  inset-inline-end: -8%;
  width: 36vw;
  height: 36vw;
  max-width: 460px;
  max-height: 460px;
  background: radial-gradient(circle, rgba(192, 133, 82, 0.16), transparent 66%);
  border-radius: 44% 56% 62% 38% / 55% 43% 57% 45%;
}

/* Logo/wordmark above the card */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  margin-bottom: var(--sp-6);
  text-decoration: none;
}

.auth-brand-mark {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: #ffffff;
  font-weight: var(--fw-bold);
  font-size: 1.4rem;
  box-shadow: var(--shadow-primary);
  margin-bottom: var(--sp-2);
}

.auth-brand-name {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.auth-brand-tagline {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
}

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  padding: var(--sp-10) var(--sp-8);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: var(--sp-2);
}

.auth-header p {
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
  color: var(--color-text-light);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-footer {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.auth-footer a {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  background: var(--color-background);
  border-radius: var(--radius-lg);
  padding: var(--sp-1);
  margin-bottom: var(--sp-8);
}

.auth-tab {
  flex: 1;
  padding: var(--sp-3);
  text-align: center;
  font-weight: var(--fw-semibold);
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== ADMIN PAGES ===== */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: 1.5rem;
}

.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card-header h3 {
  margin-bottom: 0;
  font-size: 1.0625rem;
}

.admin-card-body {
  padding: var(--sp-6);
}

/* Action buttons in tables */
.action-buttons {
  display: flex;
  gap: var(--sp-2);
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  background: var(--color-primary-bg);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-edit:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-error);
  background: var(--color-error-bg);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-delete:hover {
  background: var(--color-error);
  color: #ffffff;
}

/* ===== MESSAGING ===== */
.message-list {
  display: flex;
  flex-direction: column;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
  transition: background-color var(--transition-fast);
}

.message-item:hover {
  background-color: var(--color-surface-hover);
}

.message-item.unread {
  background-color: var(--color-primary-bg);
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-subject {
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--sp-1);
  font-size: 0.9375rem;
}

.message-preview {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* Message detail */
.message-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

.message-detail-header {
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--color-border-light);
}

.message-detail-body {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* ===== EVENT PAGES ===== */
.event-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2E1629 50%, var(--color-accent) 100%);
  color: #ffffff;
  padding: var(--sp-16) 0;
  text-align: center;
}

.event-hero h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3rem);
}

.event-hero p {
  color: rgba(255,255,255,0.85);
  margin: 0 auto;
  max-width: 600px;
}

.event-badge {
  display: inline-flex;
  padding: var(--sp-2) var(--sp-5);
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: #ffffff;
  margin-bottom: var(--sp-6);
  backdrop-filter: blur(4px);
}

/* Event ticket cards */
.ticket-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.ticket-card:hover {
  box-shadow: var(--shadow-lg);
}

.ticket-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.ticket-card-header {
  padding: var(--sp-6);
  text-align: center;
}

.ticket-card.featured .ticket-card-header {
  background: var(--color-primary);
  color: #ffffff;
}

.ticket-card.featured .ticket-card-header h3 {
  color: #ffffff;
}

.ticket-card .ticket-price {
  font-size: 2rem;
  font-weight: var(--fw-extrabold);
  color: var(--color-text);
  margin: var(--sp-3) 0;
}

.ticket-card.featured .ticket-price {
  color: #ffffff;
}

.ticket-card-body {
  padding: var(--sp-6);
}

.ticket-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.ticket-feature svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
}

/* ===== INBOX & MESSAGES ===== */
.messages-container {
  max-width: 1000px;
  margin: 0 auto;
}

.message-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 0;
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.message-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.message-card.unread {
  border-right: 4px solid var(--color-primary);
  background: linear-gradient(to left, var(--color-primary-bg), var(--color-surface) 8%);
}

.message-card-inner {
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.message-header-content {
  flex: 1;
  min-width: 280px;
}

.message-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-primary);
  color: white;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}

.message-badge-read {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.message-subject {
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 var(--sp-2) 0;
  line-height: 1.4;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.message-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.message-meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.message-preview {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: var(--sp-2) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.message-attachment-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-background);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
}

.message-attachment-badge svg {
  width: 16px;
  height: 16px;
}

.message-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}

/* Message View Page */
.message-view-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.message-view-header {
  padding: var(--sp-6);
  border-bottom: 2px solid var(--color-border-light);
  background: linear-gradient(135deg, var(--color-primary-bg) 0%, var(--color-surface) 100%);
}

.message-view-subject {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: var(--sp-3);
}

.message-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.message-view-body {
  padding: var(--sp-6);
  line-height: 1.8;
  font-size: 1.05rem;
  white-space: pre-wrap;
  color: var(--color-text);
}

.message-attachments {
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 2px solid var(--color-border-light);
}

.message-attachments-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
}

.attachment-card {
  background: var(--color-background);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  border: 1px solid var(--color-border-light);
  transition: var(--transition-fast);
}

.attachment-card:hover {
  background: var(--color-background-alt);
  border-color: var(--color-primary-light);
}

.attachment-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.attachment-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.attachment-info {
  flex: 1;
}

.attachment-name {
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  color: var(--color-text);
}

.attachment-type {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.attachment-preview {
  margin-top: var(--sp-3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.attachment-preview img,
.attachment-preview video {
  max-width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

/* Send Message Form Enhancements */
.compose-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.compose-header {
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
}

.compose-title {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  margin: 0;
}

.compose-body {
  padding: var(--sp-6);
}

/* Inbox Header Tabs */
.inbox-tabs {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  background: var(--color-background);
  padding: var(--sp-2);
  border-radius: var(--radius-lg);
  width: fit-content;
}

.inbox-tab {
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.inbox-tab:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.inbox-tab.active {
  background: var(--color-primary);
  color: white;
}

.inbox-tab-count {
  background: rgba(255,255,255,0.2);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.inbox-tab.active .inbox-tab-count {
  background: rgba(255,255,255,0.3);
}

/* Message Status Indicators */
.status-unread {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.status-read {
  color: var(--color-success);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .message-header {
    flex-direction: column;
    gap: var(--sp-3);
  }
  
  .message-actions {
    width: 100%;
    justify-content: stretch;
  }
  
  .message-actions .btn {
    flex: 1;
    justify-content: center;
  }
  
  .message-meta {
    flex-direction: column;
    gap: var(--sp-2);
  }
  
  .message-view-meta {
    flex-direction: column;
    gap: var(--sp-2);
  }
}

.ticket-card-footer {
  padding: 0 var(--sp-6) var(--sp-6);
}

/* ===== STEPPER ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: var(--fw-bold);
  background: var(--color-background-alt);
  color: var(--color-text-light);
  border: 2px solid var(--color-border);
  transition: all var(--transition-fast);
}

.stepper-step.active .stepper-circle {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.stepper-step.completed .stepper-circle {
  background: var(--color-success);
  color: #ffffff;
  border-color: var(--color-success);
}

.stepper-label {
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-light);
}

.stepper-step.active .stepper-label {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.stepper-step.completed .stepper-label {
  color: var(--color-success);
}

.stepper-line {
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--sp-1);
}

.stepper-step.completed + .stepper-line,
.stepper-line.completed {
  background: var(--color-success);
}

/* ===== MISC UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w-full { width: 100%; }
.h-full { height: 100%; }

.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }

.p-4 { padding: var(--sp-4); }
.p-6 { padding: var(--sp-6); }
.p-8 { padding: var(--sp-8); }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.bg-surface { background: var(--color-surface); }
.bg-background { background: var(--color-background); }

.border { border: 1px solid var(--color-border-light); }
.border-bottom { border-bottom: 1px solid var(--color-border-light); }

.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Confirmation / success page styles */
.confirmation-page {
  text-align: center;
  padding: var(--sp-16) 0;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-6);
  background: var(--color-success-bg);
}

.confirmation-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-success);
}

/* Announcement bar */
.announcement-bar {
  background: var(--color-primary);
  color: #ffffff;
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
}

.announcement-bar a {
  color: #ffffff;
  text-decoration: underline;
}

/* ===== PRINT ===== */
@media print {
  .navbar, .footer, .social-float, .flash-messages {
    display: none !important;
  }

  body {
    padding-top: 0;
    background: #ffffff;
  }
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  .section {
    padding: var(--sp-10) 0;
  }

  .hero {
    padding: var(--sp-12) 0;
  }

  .hero-stats {
    gap: var(--sp-6);
  }

  .hero-stat-number {
    font-size: 1.5rem;
  }

  .auth-card {
    padding: var(--sp-6) var(--sp-5);
  }
}

@media (max-width: 768px) {
  .page-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* Enrolled courses card with progress */
.enrolled-course-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.enrolled-course-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.enrolled-course-card .card-body {
  padding: var(--sp-5) var(--sp-6);
}

.enrolled-course-card .card-title {
  font-size: 1rem;
  margin-bottom: var(--sp-3);
}

.enrolled-course-card .progress-bar {
  margin-bottom: var(--sp-2);
}

.enrolled-course-card .card-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* ===== FAQ PAGE ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

/* ===== OPINIONS PAGE ===== */
.opinions-header {
  text-align: center;
  margin-bottom: var(--sp-10);
}

/* Review/testimonial card for opinions page */
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: box-shadow var(--transition-base);
}

.review-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.review-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--sp-3);
}

.review-stars svg {
  width: 16px;
  height: 16px;
  fill: var(--color-warning);
  color: var(--color-warning);
}

.review-text {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-4);
}

.review-author {
  font-weight: var(--fw-semibold);
  font-size: 0.875rem;
  color: var(--color-text);
}

.review-role {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

/* ===== ANNOUNCEMENT CARDS ===== */
.announcement-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-4);
  transition: box-shadow var(--transition-fast);
}

.announcement-card:hover {
  box-shadow: var(--shadow-sm);
}

.announcement-card h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--sp-2);
}

.announcement-card .announcement-date {
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: var(--sp-3);
}

.announcement-card .announcement-body {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* Announcement Preview (Admin) */
.announcement-preview {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.announcement-preview.announcement-info {
  background: linear-gradient(135deg, rgba(115, 60, 106, 0.1), rgba(115, 60, 106, 0.05));
  border-right: 4px solid #733C6A;
}

.announcement-preview.announcement-success {
  background: linear-gradient(135deg, rgba(46, 125, 91, 0.1), rgba(46, 125, 91, 0.05));
  border-right: 4px solid #2D7B59;
}

.announcement-preview.announcement-warning {
  background: linear-gradient(135deg, rgba(150, 104, 26, 0.1), rgba(150, 104, 26, 0.05));
  border-right: 4px solid #926519;
}

.announcement-preview.announcement-promo {
  background: linear-gradient(135deg, rgba(140, 78, 130, 0.1), rgba(140, 78, 130, 0.05));
  border-right: 4px solid #8C4E82;
}

.announcement-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.announcement-info .announcement-icon { color: #733C6A; }
.announcement-success .announcement-icon { color: #2D7B59; }
.announcement-warning .announcement-icon { color: #926519; }
.announcement-promo .announcement-icon { color: #8C4E82; }

.announcement-content {
  flex: 1;
  min-width: 0;
}

.announcement-title {
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: var(--sp-1);
}

.announcement-message {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.card-actions {
  display: flex;
  gap: var(--sp-2);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--color-surface-hover);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-icon-danger:hover {
  background: rgba(185, 58, 63, 0.1);
  color: #B93A3F;
  border-color: #B93A3F;
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-12);
  color: var(--color-text-secondary);
}

/* ===== INLINE STYLES OVERRIDE HELPERS ===== */
/* For templates that use inline style="color: var(--color-text-muted)" etc */
/* These ensure backwards-compatibility */
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-error) !important; }
.text-warning { color: var(--color-warning) !important; }
.bg-primary-light { background: var(--color-primary-bg) !important; }
.bg-success-light { background: var(--color-success-bg) !important; }

/* ===============================================
   MONIA COMPONENT LAYER
   New components introduced with the "Aubergine & Rose Gold"
   identity. Everything above this line is the inherited
   base; everything below is identity-specific.
   =============================================== */

/* ===== DARK CTA BAND =====
   Full-bleed dark band placed just before the footer for
   maximum contrast against the cream page background. */
.cta-band {
  position: relative;
  background: var(--gradient-dark);
  color: #ffffff;
  padding: var(--sp-20) 0;
  overflow: hidden;
  isolation: isolate;
}

.cta-band::before,
.cta-band::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.cta-band::before {
  top: -40%;
  inset-inline-start: -6%;
  width: 38vw;
  height: 38vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(140, 78, 130, 0.28), transparent 68%);
  border-radius: 58% 42% 47% 53% / 46% 51% 49% 54%;
}

.cta-band::after {
  bottom: -45%;
  inset-inline-end: -6%;
  width: 34vw;
  height: 34vw;
  max-width: 460px;
  max-height: 460px;
  background: radial-gradient(circle, rgba(192, 133, 82, 0.24), transparent 66%);
  border-radius: 44% 56% 62% 38% / 55% 43% 57% 45%;
}

.cta-band .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}

.cta-band h2 {
  color: #ffffff;
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-4);
}

.cta-band p {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-8);
}

.cta-band .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.cta-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* On the dark band the "primary" action inverts to white */
.cta-band .btn-primary {
  background: #ffffff;
  color: var(--plum-800);
  box-shadow: var(--shadow-lg);
}

.cta-band .btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--plum-900);
}

.cta-band .btn-outline {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.cta-band .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
  color: #ffffff;
}

/* ===== ABOUT / SPLIT SECTION ===== */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--sp-12);
  align-items: center;
}

.split--reverse { grid-template-columns: 1.1fr 0.9fr; }

@media (max-width: 900px) {
  .split,
  .split--reverse { grid-template-columns: 1fr; gap: var(--sp-8); }
}

.split-media {
  position: relative;
  isolation: isolate;
}

.split-media img {
  width: 100%;
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Offset coral outline behind the image */
.split-media::before {
  content: '';
  position: absolute;
  inset: var(--sp-5) calc(var(--sp-5) * -1) calc(var(--sp-5) * -1) var(--sp-5);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-3xl);
  opacity: 0.4;
  z-index: -1;
}

@media (max-width: 600px) {
  .split-media::before { display: none; }
}

/* Checklist used inside split copy */
.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

.check-list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--color-success);
}

/* ===== COURSE CARD (unified across courses + sessions) ===== */
.crs-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              border-color var(--transition-base);
  height: 100%;
}

.crs-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary-border);
}

.crs-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-primary-bg);
}

.crs-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.crs-card:hover .crs-card__media img { transform: scale(1.05); }

.crs-card__badges {
  position: absolute;
  top: var(--sp-3);
  inset-inline-start: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  z-index: 1;
}

.crs-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--sp-6);
  gap: var(--sp-3);
}

.crs-card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crs-card__desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crs-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--color-text-light);
}

.crs-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.crs-card__meta svg { width: 15px; height: 15px; stroke-width: 1.7; }

.crs-card__footer {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.crs-card__price {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--color-accent-text);
  letter-spacing: -0.02em;
}

.crs-card__price--free { color: var(--color-success); }

.crs-card__price del {
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: var(--color-text-lighter);
  margin-inline-start: var(--sp-2);
}

/* ===== FILTER TABS (pill style) ===== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-10);
}

.filter-tab {
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: var(--font-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
}

.filter-tab:focus-visible {
  outline: none;
  box-shadow: var(--ring-primary);
}

/* ===== COUNTDOWN (next session) ===== */
.countdown {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.countdown-unit {
  min-width: 58px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--color-primary-bg);
  border: 1px solid var(--color-primary-border);
  text-align: center;
}

.countdown-value {
  display: block;
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.6875rem;
  color: var(--color-text-light);
  font-weight: var(--fw-medium);
}

.countdown--live .countdown-unit {
  background: var(--color-accent-bg);
  border-color: var(--color-accent-border);
}

.countdown--live .countdown-value { color: var(--color-accent-text); }

/* Date/time badge shown prominently on session cards */
.session-date-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  color: var(--color-on-accent);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
}

.session-date-badge svg { width: 15px; height: 15px; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-light);
  background: var(--color-background);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-inline-start: var(--sp-2);
}

.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring-primary);
}

.theme-toggle svg { width: 17px; height: 17px; }

/* Show sun in dark mode, moon in light mode */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 1024px) {
  .theme-toggle {
    width: auto;
    margin: var(--sp-2) 0;
    margin-inline-start: 0;
    padding: var(--sp-3);
    border-radius: var(--radius-lg);
    gap: var(--sp-2);
  }
}

/* ===== COUNTER (animated stat numbers) ===== */
[data-count-to] { font-variant-numeric: tabular-nums; }

/* ===== INTERIOR PAGE HERO ===== */
.page-hero {
  background: var(--gradient-hero);
  padding: var(--sp-16) 0 var(--sp-12);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -35%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 60vw;
  max-width: 900px;
  max-height: 620px;
  background: radial-gradient(ellipse at center, rgba(140, 78, 130, 0.16), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--sp-4);
}

.page-hero p {
  font-size: var(--fs-lg);
  color: var(--color-text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* The immersive (transparent-nav) variant needs room for the fixed bar */
body.has-immersive-hero .page-hero {
  padding-top: calc(var(--navbar-height) + var(--sp-12));
}

/* Divider with a soft gradient rule */
.soft-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: var(--sp-16) 0;
}
