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

:root {
  /* Brand colours */
  --primary:       #0f91e3;
  --primary-hover: #0a73b5;
  --primary-dark:  #0b6fb3;
  --primary-glow:  rgba(15, 145, 227, 0.12);
  --secondary:     #1796e5;
  --accent:        #fcb900;
  --success:       #00d084;
  --danger:        #cf2e2e;

  /* Backgrounds */
  --bg-app:  #f7fafd;
  --bg-main: #f7fafd;   /* alias used by 404, verify_email etc. */
  --bg-card: #ffffff;

  /* Borders — two levels */
  --border-color:  rgba(15, 145, 227, 0.1);   /* subtle UI dividers */
  --input-border:  #ccd8e8;                   /* visible form inputs */

  /* Text */
  --text-main:  #1e2d3d;
  --text-muted: #64748b;

  /* Radii */
  --radius-lg: 14px;
  --radius-md: 9px;
  --radius-sm: 5px;

  /* Shadows & motion */
  --card-shadow: 0 2px 12px rgba(15, 145, 227, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  --transition:  all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg-app:       #0a1118;
  --bg-main:      #0a1118;
  --bg-card:      #111a24;
  --border-color: rgba(255, 255, 255, 0.1);
  --input-border: rgba(255, 255, 255, 0.18);
  --text-main:    #e8edf3;
  --text-muted:   #8fa3b8;
  --card-shadow:  0 4px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}


/* A13 (2026-09-23 plan) — skip-to-content link. Off-screen until it
   receives keyboard focus (Tab from the top of the page), then jumps
   above the header so keyboard/screen-reader users don't have to tab
   through the full nav menu on every single page. */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 1000;
  /* Not var(--primary) (#0f91e3) — that's 3.39:1 against white text, below
     WCAG AA's 4.5:1. #0a6ca8 (5.64:1) is a one-off darker shade used only
     here; the brand blue itself is used across dozens of components site-
     wide and changing it needs the client's sign-off, out of scope for a
     single link (see docs/test-reports/a11y.md). */
  background: #0a6ca8;
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 0;
}

/* A14 (2026-09-23 plan) — cookie consent banner. Fixed to the bottom so it
   never covers the header's skip-link target, high z-index so it sits
   above the sticky header, Accept/Reject sized identically (client
   requirement: no dark-pattern emphasis on Accept). */
.ahc-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: var(--bg-card);
  border-top: 2px solid var(--border-color);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.12);
}
.ahc-cookie-banner-text {
  margin: 0;
  font-size: .88rem;
  color: var(--text-main);
  flex: 1 1 320px;
}
.ahc-cookie-banner-text a {
  color: var(--primary);
  font-weight: 600;
}
.ahc-cookie-banner-actions {
  display: flex;
  gap: .75rem;
  flex-shrink: 0;
}
.ahc-cookie-banner-actions .btn,
.ahc-cookie-banner-actions .btn-secondary {
  padding: .6rem 1.4rem;
  font-size: .88rem;
}
@media (max-width: 600px) {
  .ahc-cookie-banner { flex-direction: column; align-items: stretch; }
  .ahc-cookie-banner-actions { justify-content: stretch; }
  .ahc-cookie-banner-actions button { flex: 1; }
}

/* Navigation Header */
header {
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.nav-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo img {
  max-height: 48px;
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.logo-text span {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::before, .nav-link.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-link-admin { color: var(--accent) !important; }
.nav-link-admin:hover { color: var(--accent); opacity: .8; }

.nav-btn-sm { padding: .4rem .9rem; font-size: .75rem; }

.logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(15,145,227,.3));
  line-height: 1;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background-color: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    padding: 1rem 2rem 1.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.open {
    max-height: 70vh;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }

  .nav-link {
    text-align: center;
  }

  .nav-menu .btn,
  .nav-menu .btn-theme {
    align-self: center;
  }
}

/* Hero Section */
.hero-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 145, 227, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(207, 46, 46, 0.35);
}

/* Course Grid and Cards */
.courses-section {
  max-width: 1200px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

.course-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--primary);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.course-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--primary-glow);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.6);
  pointer-events: none;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(15, 145, 227, 0.15), 0 4px 12px rgba(0, 0, 0, 0.07);
}

.course-card:hover::after {
  opacity: 1;
  transform: scale(1);
}

.course-card-body {
  position: relative;
  z-index: 1;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.course-card-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  border-radius: var(--radius-md);
  background-color: var(--primary-glow);
  margin-bottom: 1.2rem;
  transition: transform 0.4s ease, rotate 0.4s ease;
}

.course-card:hover .course-card-icon {
  transform: rotate(8deg) scale(1.08);
}

.course-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  background-color: var(--primary-glow);
  color: var(--primary);
  margin-bottom: 1rem;
  align-self: flex-start;
}

.course-card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.course-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.card-cta-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.course-card:hover .card-cta-arrow {
  transform: translateX(4px);
}

/* Slide Viewer System */
.viewer-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
}

.sidebar-nav {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  height: fit-content;
  box-shadow: var(--card-shadow);
}

.sidebar-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.module-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.module-item {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  color: var(--text-main);
  border: 1px solid transparent;
}

.module-item:hover, .module-item.active {
  background-color: var(--primary-glow);
  color: var(--primary);
  border-color: var(--border-color);
}

.module-item.locked {
  cursor: not-allowed;
  color: var(--text-muted);
  opacity: 0.6;
}

.module-item.locked:hover {
  background-color: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.locked-notice {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  /* BUG-02: the previous light-tint (8% var(--danger)) background with
     var(--danger) text measured ~4.36:1 (light) / ~3.54:1 (dark) — both
     below WCAG AA's 4.5:1 for this text size. Solid background + white
     text measures ~5.14:1 in both themes (--danger is unthemed). */
  background-color: var(--danger);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.slide-content-area {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--primary);
  padding: 3rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.slide-header h2 {
  font-size: 1.8rem;
}

.slide-bullets {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
  flex-grow: 1;
}

.bullet-item {
  display: flex;
  gap: 1rem;
  font-size: 1.1rem;
}

.bullet-icon {
  color: var(--primary);
  font-size: 1.2rem;
}

.viewer-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Quiz Interface */
/* Quiz / module-quiz page wrapper */
.page-section {
  padding: 2rem 1.5rem 4rem;
}

.quiz-card {
  max-width: 740px;
  margin: 2.5rem auto;
  background: var(--bg-card);
  border-radius: 18px;
  border-top: 4px solid var(--primary);
  box-shadow: 0 8px 40px rgba(15,145,227,.1), 0 2px 8px rgba(0,0,0,.05);
  padding: 3rem;
}

/* Step progress bar */
.quiz-step-track {
  height: 5px;
  background: var(--primary-glow);
  border-radius: 99px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.quiz-step-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #22c55e);
  border-radius: 99px;
  transition: width .45s cubic-bezier(.22,1,.36,1);
}

/* Quiz header */
.quiz-header { margin-bottom: 1.5rem; }
.quiz-header .course-badge { margin-bottom: .75rem; }
.quiz-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: .4rem 0 .3rem;
  color: var(--text-main);
}
.quiz-progress-text {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 600;
}
.quiz-pass-threshold {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

/* Question text */
.quiz-question {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.55;
  margin: 1.75rem 0;
}

/* Options */
.options-container {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 0 0 1.75rem;
}

.option-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--input-border);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font-size: .95rem;
  font-weight: 500;
  font-family: inherit;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.option-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--text-main);
}

.opt-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 800;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.option-btn:hover .opt-letter        { background: var(--primary); color: #fff; }
.option-btn.selected                 { background: var(--primary); color: #fff; border-color: var(--primary); }
.option-btn.selected .opt-letter     { background: rgba(255,255,255,.25); color: #fff; }
.option-btn.correct                  { background: var(--success); color: #fff; border-color: var(--success); }
.option-btn.correct .opt-letter      { background: rgba(255,255,255,.25); color: #fff; }
.option-btn.wrong                    { background: var(--danger); color: #fff; border-color: var(--danger); }
.option-btn.wrong .opt-letter        { background: rgba(255,255,255,.25); color: #fff; }

/* Result screens */
.quiz-result {
  text-align: center;
  padding: 1rem 0;
}
.quiz-result-icon {
  font-size: 4rem;
  margin-bottom: 1.25rem;
  display: block;
  line-height: 1;
}
.quiz-result-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.quiz-result-title.success { color: var(--success); }
.quiz-result-title.fail    { color: var(--danger); }
.quiz-result-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.quiz-result-actions {
  display: flex;
  gap: .85rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

/* Verification */
.verification-card {
  max-width: 600px;
  margin: 4rem auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 3rem;
  text-align: center;
}

.verify-input-group {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}

.verify-input {
  flex-grow: 1;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--input-border);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.verify-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.verify-result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: left;
}

.verify-success {
  border-color: var(--success);
  background: rgba(0, 208, 132, 0.05);
}

.verify-fail {
  border-color: var(--danger);
  background: rgba(207, 46, 46, 0.05);
}

/* Certificate Preview Box */
.cert-preview-canvas {
  /* Constrained by width + explicit aspect-ratio (A4 landscape, matching the
     1000x707 canvas the JS draws at) instead of width:100% + max-height —
     that combination left the box's actual rendered size to each browser's
     own replaced-element sizing quirks, which on some browsers/viewports
     squished the portrait certificate into a wider, shorter box instead of
     scaling it down proportionally. */
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  aspect-ratio: 297 / 210;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-md);
  margin: 2rem auto;
  background: white;
}

/* ============================================================
   Decorative Geometric Shapes (Hero)
   ============================================================ */
.hero-section {
  position: relative;
}

.hero-content,
.hero-graphic {
  position: relative;
  z-index: 1;
}

.hero-shapes {
  position: absolute;
  inset: -2rem;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-shapes .shape {
  position: absolute;
  opacity: 0.22;
}

.shape-circle-outline {
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.shape-square {
  background: var(--accent);
  border-radius: var(--radius-md);
  opacity: 0.2;
}

.shape-ring {
  border-radius: 50%;
  border: 3px dashed var(--primary);
  opacity: 0.25;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 34px 58px 34px;
  border-color: transparent transparent var(--success) transparent;
  opacity: 0.22;
}

.hs-1 { width: 150px; height: 150px; top: -30px; right: 6%; animation: float-shape 6s ease-in-out infinite; }
.hs-2 { width: 56px; height: 56px; top: 58%; left: 2%; transform: rotate(18deg); animation: float-shape-rev 5s ease-in-out infinite; }
.hs-3 { width: 240px; height: 240px; bottom: -90px; right: -50px; animation: spin-slow 22s linear infinite; }
.hs-4 { top: 22%; left: 20%; animation: float-shape 7s ease-in-out infinite; }

/* Pulsing glow + zoom in/out for the hero orb */
.hero-orb {
  animation: pulse-glow 3.5s ease-in-out infinite;
}

.hero-orb > div:first-child {
  animation: orb-zoom 3.5s ease-in-out infinite;
}

@keyframes orb-zoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 40px var(--primary-glow); }
  50% { box-shadow: 0 0 75px 14px var(--primary-glow); }
}

@keyframes float-shape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(0, -34px) rotate(14deg); }
}

@keyframes float-shape-rev {
  0%, 100% { transform: translate(0, 0) rotate(18deg); }
  50% { transform: translate(0, 28px) rotate(-12deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================================
   Pulsing / Blinking status indicators
   ============================================================ */
.status-dot {
  --dot-color: var(--success);
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot-color);
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot-color) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.badge-pulse {
  animation: badge-glow 2.2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(0, 208, 132, 0); }
}

/* ============================================================
   Wave Divider
   ============================================================ */
.wave-divider {
  position: relative;
  width: 100%;
  height: 90px;
  margin-top: 4rem;
  margin-bottom: -1px;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 200%;
  height: 100%;
}

.wave-back {
  fill: var(--primary-glow);
  animation: wave-move 22s linear infinite;
}

.wave-front {
  fill: #0b1118;
  animation: wave-move-rev 16s linear infinite;
}

@keyframes wave-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes wave-move-rev {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* ============================================================
   Site Footer
   ============================================================ */
.site-footer {
  position: relative;
  background: #0b1118;
  color: #a0aec0;
  padding: 0 2rem;
  overflow: hidden;
}

.footer-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.footer-shapes .f-shape {
  position: absolute;
  opacity: 0.06;
}

.f-shape-1 {
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  top: -120px; left: -60px;
  animation: spin-slow 70s linear infinite;
}

.f-shape-2 {
  width: 140px; height: 140px;
  background: var(--primary);
  border-radius: var(--radius-lg);
  top: 30px; right: 8%;
  transform: rotate(20deg);
  animation: float-shape 13s ease-in-out infinite;
}

.f-shape-3 {
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 50px 90px 50px;
  border-color: transparent transparent var(--accent) transparent;
  bottom: -10px; right: 22%;
  animation: float-shape-rev 15s ease-in-out infinite;
}

.f-shape-4 {
  width: 180px; height: 180px;
  border: 2px dashed var(--success);
  border-radius: 50%;
  bottom: -90px; left: 18%;
  animation: spin-slow 55s linear infinite reverse;
}

.footer-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-col h2 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.3rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-col a {
  color: #a0aec0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-contact li {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.footer-logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(15, 145, 227, 0.4));
}

.footer-logo-img {
  max-height: 40px;
}

.footer-logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
}

.footer-logo-text span {
  color: var(--primary);
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.7rem;
}

.footer-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  font-size: 1.1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-align: left;
}

.footer-credit a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

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

.footer-credit-sm {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Public build number, shown next to the build credit so the client can tell
   at a glance which release is live (they check this after each deploy).
   Source is ASSET_VERSION in includes/config.php — one number, no second
   constant to keep in sync. */
.footer-version {
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  white-space: nowrap;
}

.footer-company-info {
  font-size: 0.75rem;
  opacity: 0.55;
  margin-top: 0.4rem;
}

.footer-accreditation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-accreditation img {
  height: 46px;
  width: auto;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .footer-accreditation { justify-content: center; }
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .viewer-container {
    grid-template-columns: 1fr;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   Auth pages (login / register / forgot / reset password)
   ============================================================ */
.auth-wrapper {
  max-width: 980px;
  margin: 3rem auto 5rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--bg-card);
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(15,145,227,.1), 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.auth-panel {
  position: relative;
  background: linear-gradient(145deg, #0f91e3 0%, #0859a0 100%);
  color: #fff;
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.auth-panel-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-panel-shapes .shape {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.ap-1 { width: 150px; height: 150px; top: -50px; right: -40px; animation: float-shape 9s ease-in-out infinite; }
.ap-2 { width: 90px; height: 90px; bottom: 8%; left: -25px; border-style: dashed; animation: float-shape-rev 7s ease-in-out infinite; }
.ap-3 { width: 46px; height: 46px; bottom: 22%; right: 18%; background: rgba(255, 255, 255, 0.12); border: none; border-radius: var(--radius-md); transform: rotate(20deg); animation: spin-slow 30s linear infinite; }

.auth-panel-content {
  position: relative;
  z-index: 1;
}

.auth-panel-icon {
  font-size: 2.2rem;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  animation: pulse-glow 3.5s ease-in-out infinite;
}

.auth-panel h2 {
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.auth-panel p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.8rem;
  font-size: 0.95rem;
}

.auth-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.9rem;
}

.auth-feature-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.95);
}

.feature-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 700;
}

.auth-form-side {
  padding: 3.5rem 3.25rem;
}

.auth-form-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: .35rem;
  letter-spacing: -.02em;
}

.auth-form-sub {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}
.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-group {
  margin-bottom: 1.4rem;
  text-align: left;
}
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

/* Shared error message class (replaces inline styles) */
.form-error {
  background: rgba(207,46,46,.07);
  color: var(--danger);
  border: 1px solid rgba(207,46,46,.18);
  border-left: 3px solid var(--danger);
  padding: .85rem 1rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Full-width button utility */
.btn-block {
  width: 100%;
  justify-content: center;
  padding-top: .9rem;
  padding-bottom: .9rem;
  font-size: .875rem;
  margin-top: .5rem;
}
/* ── Course detail "For Me / For Team" purchase box ─────── */
.cd-purchase-box {
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin: 1.75rem 0 2.5rem;
}

.cd-purchase-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.cd-tab {
  background: none;
  border: none;
  padding: 0 0 .75rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.cd-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.cd-purchase-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: .85rem;
  color: var(--text-main);
}

.cd-purchase-features li { margin-bottom: .5rem; }

.cd-purchase-price {
  font-size: 1.75rem;
  font-weight: 900;
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  margin-bottom: .75rem;
}

.cd-purchase-note {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.input-icon-group {
  position: relative;
}
.input-icon-group .field-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.45;
  font-size: 1rem;
  pointer-events: none;
}
.form-group input {
  width: 100%;
  padding: 0.85rem 1.2rem 0.85rem 2.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--input-border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-group input::placeholder { color: var(--text-muted); opacity: .6; }
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,145,227,.15);
}

.demo-accounts-box {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.demo-accounts-box strong {
  color: var(--text-main);
}

.auth-success-box {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background-color: rgba(0, 208, 132, 0.1);
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 600;
}

.reset-link-box {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-all;
}
.reset-link-box a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 860px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 2rem auto 4rem;
    border-radius: 14px;
  }
  .auth-panel { display: none; }
  .auth-form-side { padding: 2.5rem 2rem; }
  .form-row { flex-direction: column; gap: 0; }
}

@media (max-width: 500px) {
  .auth-wrapper { margin: 1rem; border-radius: 12px; }
  .auth-form-side { padding: 2rem 1.5rem; }
}

/* ============================================================
   Student Dashboard
   ============================================================ */
.dashboard-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary), #0b6fb3 130%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2.8rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  overflow: hidden;
}

.dashboard-hero-info {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.dashboard-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

.dashboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-hero h2 {
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 0.3rem;
}

.dashboard-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.dashboard-hero-badge {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.14);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.dashboard-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  padding: 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: var(--transition);
}

.dashboard-stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(15, 145, 227, 0.15), 0 4px 12px rgba(0, 0, 0, 0.07);
}

.dashboard-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.4s ease, rotate 0.4s ease;
}

.dashboard-stat-card:hover .dashboard-stat-icon {
  transform: rotate(8deg) scale(1.08);
}

.dashboard-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-section-title {
  margin-bottom: 1.5rem;
}

.dashboard-section-title h3 {
  font-size: 1.4rem;
}

@media (max-width: 640px) {
  .dashboard-hero {
    padding: 2rem 1.5rem;
  }
  .dashboard-hero-badge {
    display: none;
  }
}

.certificate-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--accent);
  box-shadow: var(--card-shadow);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(252, 185, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.07);
}

.certificate-seal {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ffd95e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 14px rgba(252, 185, 0, 0.35);
}

.certificate-code {
  align-self: flex-start;
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--bg-app);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
}

/* Profile page */
.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 3px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  padding: 2rem;
}

.profile-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.profile-card--danger {
  border-color: rgba(207, 46, 46, 0.35);
}

.profile-card--danger h3 {
  color: var(--danger);
}

.profile-avatar-edit {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-avatar-edit .dashboard-avatar,
.profile-avatar-edit .profile-avatar-large {
  background: var(--primary-glow);
  color: var(--primary);
  border: 3px solid var(--border-color);
}

/* ── Profile Info Form (Personal Information card) ── */
.pf-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.pf-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.pf-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

.pf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.pf-grid .pf-field--full {
  grid-column: 1 / -1;
}

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pf-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pf-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.pf-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

.pf-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.pf-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* Profile utility classes */
.pf-hint    { font-size: .85rem; color: var(--text-muted); margin-top: .5rem; }
.pf-danger-desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; line-height: 1.6; }
.pf-status-ok       { color: var(--success); font-weight: 700; }
.pf-status-progress { color: var(--primary); font-weight: 700; }
.pf-remove-form { margin-top: .75rem; }

/* Profile file input */
.pf-file-input { padding: .6rem; width: 100%; }

@media (max-width: 520px) {
  .pf-grid {
    grid-template-columns: 1fr;
  }
  .pf-grid .pf-field--full {
    grid-column: 1;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.data-table th, .data-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--primary-glow);
  font-weight: 700;
  color: var(--primary);
}

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

.data-table tr:hover {
  background: rgba(15, 145, 227, 0.02);
}

/* ─── Rich Lesson Content ─────────────────────────────────────── */
.slide-body-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0 1.5rem;
}

.slide-lesson,
.slide-scenario {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-main);
}

.slide-lesson p,
.slide-scenario p {
  margin: 0 0 1.1rem;
}

.slide-lesson h3,
.slide-scenario h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.75rem 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-color);
}

.slide-lesson ul,
.slide-scenario ul {
  padding-left: 1.4rem;
  margin: 0 0 1.1rem;
}

.slide-lesson li,
.slide-scenario li {
  margin-bottom: 0.5rem;
}

.slide-lesson strong,
.slide-scenario strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Supporting real-world photo, inserted every few slides so lessons aren't
   wall-to-wall text (client feedback: competitor courses break up text with
   real kitchen/hygiene photography). */
.slide-photo {
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.slide-photo img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.slide-photo-caption {
  padding: .6rem 1rem;
  font-size: .78rem;
  color: var(--text-muted);
  background: var(--bg-card);
}

/* Callout boxes */
.highlight-box {
  background: var(--primary-glow);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.warning-box {
  background: rgba(207, 46, 46, 0.07);
  border-left: 4px solid var(--danger);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.example-box {
  background: rgba(34, 197, 94, 0.07);
  border-left: 4px solid var(--success);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Slide image topic tag — small solid label overlaid on the slide
   illustration (course.php), colour follows the slide-type accent so it
   reads as one system with .cv-lesson-body's background tint below. ── */
.cv-image-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: .5rem 1rem;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  line-height: 1.3;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cv-image-tag[hidden] { display: none; }
.cv-lesson-body[data-slide-type="scenario"] .cv-image-tag { background: var(--success); }
.cv-lesson-body[data-slide-type="quiz_inline"] .cv-image-tag { background: #d97706; }

/* ── Slide-type background tint — a faint wash over .cv-lesson-body so a
   Knowledge Check or scenario reads as a different kind of moment before
   the learner even reads the heading (rest of the layout is untouched). ── */
.cv-lesson-body[data-slide-type="scenario"] { background: rgba(34, 197, 94, .04); }
.cv-lesson-body[data-slide-type="quiz_inline"] { background: rgba(217, 119, 6, .05); }
[data-theme="dark"] .cv-lesson-body[data-slide-type="scenario"] { background: rgba(34, 197, 94, .07); }
[data-theme="dark"] .cv-lesson-body[data-slide-type="quiz_inline"] { background: rgba(217, 119, 6, .08); }

/* ── Bullet icons for plain <ul> lists inside slide.body — decorated by
   js/app.js's decorateBulletIcons(), cycling a small emoji set instead of
   a plain dot marker. ── */
/* Not flexbox: the <li>'s content is a loose mix of text nodes, inline
   elements (<strong>) and (in immersive mode) per-word <span class="cv-word">
   wrappers from the sentence-sync feature — as flex children with the
   default nowrap, that forced everything onto a single line that
   overflowed straight through the slide image instead of wrapping.
   Floating the icon and indenting the <li> lets the text wrap normally
   at any width, regardless of how many inline spans it's broken into. */
#slide-content li.cv-li-iconed {
  list-style: none;
  position: relative;
  padding-left: 1.7rem;
}
#slide-content li.cv-li-iconed .cv-li-icon {
  position: absolute;
  left: 0;
  top: .1em;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── Category grid — reusable component for "N types/categories" content
   inside a slide's body HTML (icon/emoji + caption strip per card). ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
}
.category-card-icon {
  font-size: 2.4rem;
  padding: 1.5rem 1rem 1rem;
}
.category-card-caption {
  padding: .75rem 1rem 1rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--text-main);
}
.category-card-caption strong { color: var(--primary); }

.stat-callout {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.5rem;
  margin: 1.25rem 0;
}

.stat-callout .stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  white-space: nowrap;
}

.stat-callout .stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Scenario slide */
.slide-scenario .scenario-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.slide-scenario .scenario-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
}

.slide-scenario .scenario-question {
  background: var(--bg-app);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-weight: 600;
  font-style: italic;
  color: var(--text-main);
}

.slide-scenario .scenario-reveal {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-color);
}

.slide-scenario .scenario-reveal-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #22c55e;
  margin-bottom: 0.75rem;
}

/* Inline Knowledge Check */
.inline-quiz {
  padding: 0.5rem 0;
}

.inline-quiz-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-glow);
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.1rem;
}

.inline-quiz-question {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.inline-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.inline-option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.inline-option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateX(4px);
}

.inline-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-app);
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.inline-option-btn.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.inline-option-btn.correct .inline-option-letter {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

.inline-option-btn.wrong {
  border-color: var(--danger);
  background: rgba(207, 46, 46, 0.07);
}

.inline-option-btn.wrong .inline-option-letter {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.inline-quiz-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.6;
}

.feedback-correct {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--text-main);
}

.feedback-wrong {
  background: rgba(207, 46, 46, 0.07);
  border: 1px solid rgba(207, 46, 46, 0.3);
  color: var(--text-main);
}

/* ══════════════════════════════════════════════════
   SLIDE INLINE QUIZ  (sqz- prefix — course.php)
   ══════════════════════════════════════════════════ */

.sqz-wrap {
  border-top: 2px solid var(--border-color);
  margin: 1.75rem 2rem 0;
  padding-top: 1.5rem;
}

.sqz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sqz-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
}

.sqz-progress {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-glow);
  padding: .2rem .65rem;
  border-radius: 50px;
}

.sqz-question {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.55;
  margin-bottom: .85rem;
}

.sqz-options { display:flex; flex-direction:column; gap:.45rem; margin-bottom:.85rem; }
.sqz-options .option-btn { padding:.7rem 1rem; font-size:.875rem; }
.sqz-options .opt-letter { width:26px; height:26px; font-size:.72rem; flex-shrink:0; }

.sqz-feedback {
  font-size: .83rem;
  padding: .65rem .9rem;
  border-radius: var(--radius-md);
  margin-bottom: .65rem;
  line-height: 1.55;
  display: none;
}
.sqz-feedback.correct { background:rgba(0,208,132,.08); border:1px solid rgba(0,208,132,.22); }
.sqz-feedback.wrong   { background:rgba(207,46,46,.06);  border:1px solid rgba(207,46,46,.18); }

.sqz-nav { display:flex; align-items:center; justify-content:space-between; min-height:2rem; }

.sqz-status { font-size:.78rem; color:var(--success); font-weight:700; }

.sqz-advance-btn {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: .4rem .9rem;
  border-radius: var(--radius-md);
  font-size: .78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: none;
}
.sqz-advance-btn:hover { border-color:var(--primary); color:var(--primary); }

@media (max-width: 900px) {
  .sqz-wrap { margin: 1.25rem 1.1rem 0; }
}

/* ══════════════════════════════════════════════════
   DASHBOARD  (db- prefix — dashboard.php only)
   ══════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────── */
.db-hero {
  background: linear-gradient(135deg, #0f91e3 0%, #0b6fb3 100%);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.db-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  pointer-events: none;
}

.db-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 30%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  pointer-events: none;
}

.db-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.db-hero-left { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }

/* Client-reported (2026-08-23): a flex item defaults to min-width:auto,
   so it never shrinks below its content's natural width — a long email
   address (no spaces to wrap on) pushed this wider than the card, and
   .db-hero's own overflow:hidden (needed for the decorative circles
   above) silently clipped it instead of wrapping. min-width:0 lets it
   shrink to the available space so overflow-wrap below can actually wrap
   the email onto a second line instead of running off the edge. */
.db-hero-text { min-width: 0; }

.db-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.db-avatar img { width: 100%; height: 100%; object-fit: cover; }

.db-hero-greeting {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  margin-bottom: .2rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.db-hero-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .25rem;
}

.db-hero-meta {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  overflow-wrap: break-word;
  word-break: break-word;
}

.db-hero-right {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.db-hero-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: .6rem 1.1rem;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}

.db-hero-action:hover { background: rgba(255,255,255,.28); color: #fff; }
.db-hero-action.primary { background: #fff; color: var(--primary); border-color: #fff; }
.db-hero-action.primary:hover { background: #f0f8ff; }

/* ── Overall progress (big, prominent) ──────────── */
.db-overall-progress {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.db-overall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.db-overall-label {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text-main);
}

.db-overall-pct {
  font-size: 1.75rem;
  font-weight: 900;
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
}

.db-overall-track {
  height: 16px;
  background: var(--primary-glow);
  border-radius: 99px;
  overflow: hidden;
}

.db-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #22c55e);
  border-radius: 99px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}

.db-overall-fill.complete { background: linear-gradient(90deg, #22c55e, #16a34a); }

.db-overall-sub {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .6rem;
}

/* ── Quick Links ──────────────────────────────── */
.db-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2rem;
}

.db-quick-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: .55rem 1.1rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.db-quick-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ── Recommended renewal banner ─────────────────── */
.db-renewal-banner {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: rgba(252,185,0,.1);
  border: 1px solid rgba(252,185,0,.35);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: .85rem;
  color: var(--text-main);
}

.db-renewal-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ── Course card facts ───────────────────────────── */
.db-course-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .74rem;
  color: var(--text-muted);
  margin: .75rem 0;
}

/* ── Stats ─────────────────────────────────────── */
.db-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.db-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
  transition: var(--transition);
}

.db-stat > div:not(.db-stat-icon-wrap) { min-width: 0; }

.db-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,145,227,.1); }

.db-stat-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.db-stat-num {
  font-size: 2rem;
  font-weight: 900;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  margin-bottom: .15rem;
}

.db-stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Section title ─────────────────────────────── */
.db-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.db-section-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.db-section-head a {
  font-size: .82rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* ── Course progress cards ─────────────────────── */
.db-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.db-course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.db-course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,145,227,.12);
  border-color: rgba(15,145,227,.2);
}

.db-course-card-top {
  padding: 1.5rem 1.5rem 1.25rem;
  flex: 1;
}

.db-course-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.db-course-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--primary-glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}

.db-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 50px;
  padding: .25rem .75rem;
  font-size: .72rem;
  font-weight: 700;
}

.db-status-pill.completed {
  background: rgba(0,208,132,.12);
  color: var(--success);
}

.db-status-pill.active {
  background: rgba(15,145,227,.1);
  color: var(--primary);
}

.db-status-pill.locked {
  background: rgba(0,0,0,.05);
  color: var(--text-muted);
}

.db-status-pill.pending {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.db-course-level {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .3rem;
}

.db-course-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: .5rem;
  line-height: 1.4;
}

.db-course-desc {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

/* Progress bar */
.db-progress-wrap { margin-bottom: .5rem; }

.db-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.db-progress-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.db-progress-pct   { font-size: 1rem; font-weight: 800; color: var(--primary); }

.db-progress-track {
  height: 12px;
  background: var(--primary-glow);
  border-radius: 99px;
  overflow: hidden;
}

.db-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #22c55e);
  border-radius: 99px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}

.db-progress-fill.complete { background: linear-gradient(90deg, #22c55e, #16a34a); }

.db-module-count {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .4rem;
}

/* Card footer */
.db-course-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,.01);
}

/* ── Certificate cards ─────────────────────────── */
.db-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.db-cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.db-cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #22c55e);
}

.db-cert-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,145,227,.12); }

.db-cert-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.db-cert-seal {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #22c55e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(15,145,227,.3);
}

.db-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(0,208,132,.1);
  color: var(--success);
  border-radius: 50px;
  padding: .25rem .7rem;
  font-size: .72rem;
  font-weight: 700;
}

.db-cert-course { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: .3rem; }
.db-cert-date   { font-size: .8rem; color: var(--text-muted); margin-bottom: .9rem; }

.db-cert-code {
  font-family: 'Courier New', monospace;
  font-size: .75rem;
  font-weight: 700;
  background: var(--primary-glow);
  color: var(--primary);
  padding: .3rem .65rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1.25rem;
}

.db-cert-actions { display: flex; gap: .75rem; }
.db-cert-actions .btn { flex: 1; justify-content: center; font-size: .8rem; padding: .6rem 1rem; }

/* ── Empty state ───────────────────────────────── */
.db-empty {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
}

.db-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.db-empty h4   { font-size: 1rem; font-weight: 700; color: var(--text-main); margin-bottom: .4rem; }
.db-empty p    { font-size: .88rem; margin-bottom: 1.5rem; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .db-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .db-hero-inner { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════
   LANDING PAGE  (lp- prefix — index.php only)
   ══════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────── */
.lp-hero {
  background: linear-gradient(160deg, #f0f8ff 0%, var(--bg-app) 55%);
  border-bottom: 1px solid var(--border-color);
  padding: 5rem 2rem 4rem;
}
[data-theme="dark"] .lp-hero {
  background: linear-gradient(160deg, #0d1f30 0%, var(--bg-app) 55%);
}

.lp-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.lp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(15,145,227,.2);
  border-radius: 50px;
  padding: .35rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.lp-hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.lp-hero-title mark {
  background: none;
  color: var(--primary);
  position: relative;
  white-space: nowrap;
}

.lp-hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 520px;
}

.lp-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.lp-hero-actions .btn {
  font-size: .9rem;
  padding: .85rem 1.75rem;
}

.lp-trust-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.lp-trust-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.lp-trust-item::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
  font-size: .9rem;
}

/* ── Certificate sample carousel (hero visual) ──── */
.lp-cert-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lp-cert-photo-card {
  position: relative;
  width: 100%;
  /* Landscape certificate (297x210) since the 2026-09 redesign - the old
     260px suited the portrait sample and left this looking like a stamp. */
  max-width: 440px;
  transform: rotate(1.5deg);
  transition: transform .4s ease;
}

.lp-cert-photo-card:hover { transform: rotate(0deg) scale(1.02); }

.lp-cert-photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15,145,227,.18), 0 4px 16px rgba(0,0,0,.08);
  transition: opacity .2s ease;
  background: #fff;
}

.lp-cert-dots {
  display: flex;
  gap: .6rem;
}

.lp-cert-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border-color);
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}

.lp-cert-dot.active {
  background: var(--primary);
  transform: scale(1.25);
}

.lp-cert-dots-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Floating badges on cert card */
.lp-float-badge {
  position: absolute;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: .5rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  animation: lp-float 3s ease-in-out infinite;
}
[data-theme="dark"] .lp-float-badge { background: var(--bg-card); color: var(--text-main); }

.lp-float-badge-1 { top: -14px; right: -20px; animation-delay: 0s; }
.lp-float-badge-2 { bottom: 10px; left: -24px; animation-delay: 1.2s; }

@keyframes lp-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* ── Stats strip ───────────────────────────────── */
.lp-stats {
  background: #0f1923;
  padding: 2.5rem 2rem;
}
[data-theme="dark"] .lp-stats { background: #0d1520; }

.lp-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

/* ── Google reviews marquee ───────────────────────── */
.lp-reviews {
  padding: 2.75rem 1.5rem 3rem;
  background: var(--bg-main);
}

.lp-reviews-head {
  max-width: 1200px;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.lp-reviews-rating {
  display: inline-flex;
  align-items: baseline;
  gap: .55rem;
}

.lp-reviews-score {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-main);
}

.lp-reviews-stars {
  color: #f5a623;
  font-size: 1.3rem;
  letter-spacing: .1em;
}

.lp-reviews-sub {
  margin: .35rem 0 0;
  font-size: .92rem;
  color: var(--text-muted);
}

.lp-reviews-link {
  display: inline-block;
  margin-top: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.lp-reviews-link:hover { text-decoration: underline; }

.lp-reviews-viewport {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  padding: 1.5rem 0;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.lp-reviews-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: lp-reviews-scroll 32s linear infinite;
}

.lp-reviews-viewport:hover .lp-reviews-track,
.lp-reviews-track:focus-within {
  animation-play-state: paused;
}

@keyframes lp-reviews-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.lp-review-card {
  flex: 0 0 300px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 2px 10px rgba(15,23,42,.05);
}

.lp-review-card-top {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .6rem;
}

.lp-review-avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lp-review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lp-review-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lp-review-name {
  font-weight: 700;
  font-size: .92rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-review-meta {
  font-size: .76rem;
  color: var(--text-muted);
}

.lp-review-stars {
  color: #f5a623;
  font-size: .95rem;
  letter-spacing: .08em;
  margin-bottom: .5rem;
}

.lp-review-text {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text-main);
  margin: 0 0 .6rem;
}

.lp-review-when {
  font-size: .74rem;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .lp-reviews-track { animation: none; }
}

/* ── CPD accreditation strip ─────────────────────── */
.lp-accreditation {
  text-align: center;
  padding: 2.25rem 1.5rem;
}

.lp-accreditation-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.lp-accreditation-badges {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.lp-accreditation-badges img {
  height: 56px;
  width: auto;
  border-radius: 8px;
  transition: transform .2s;
}

.lp-accreditation-badges:hover img { transform: translateY(-2px); }

.lp-stat-num {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: .3rem;
  font-family: 'Poppins', sans-serif;
}

.lp-stat-label {
  font-size: .82rem;
  color: #8fa0b0;
  font-weight: 500;
  letter-spacing: .04em;
}

/* ── How it works ──────────────────────────────── */
.lp-how {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.lp-section-eyebrow {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}

.lp-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}

.lp-section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 3.5rem;
  line-height: 1.7;
}

.lp-steps {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1fr;
  gap: 0;
  align-items: start;
}

.lp-step {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: var(--transition);
}

.lp-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15,145,227,.12);
}

.lp-step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 12px rgba(15,145,227,.35);
}

.lp-step-icon { font-size: 1.75rem; margin-bottom: .75rem; }

.lp-step h3 {
  font-size: 1.05rem;
  margin-bottom: .5rem;
  color: var(--text-main);
}

.lp-step p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.lp-step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 2.5rem;
  color: var(--primary);
  font-size: 1.4rem;
  opacity: .4;
}

/* ── Course cards (landing-specific overrides) ── */
.lp-courses {
  background: #f7fafd;
  padding: 5rem 2rem;
}
[data-theme="dark"] .lp-courses { background: #0c1520; }

.lp-courses-inner { max-width: 1200px; margin: 0 auto; }

.lp-course-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15,145,227,.08), 0 1px 4px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.lp-course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(15,145,227,.16);
  border-color: rgba(15,145,227,.25);
}

.lp-course-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0b6fb3 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.lp-course-card-header::after {
  content: '';
  position: absolute;
  right: -30px; bottom: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}

.lp-course-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
  display: block;
}

.lp-course-level {
  display: inline-block;
  background: rgba(255,255,255,.2);
  color: #fff;
  border-radius: 50px;
  padding: .25rem .8rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.lp-course-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.lp-course-card-body { padding: 1.75rem; flex: 1; }

.lp-course-desc {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.lp-course-facts {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.lp-course-fact {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  color: var(--text-muted);
  font-weight: 500;
}

.lp-course-fact::before { content: '✓'; color: var(--success); font-weight: 800; }

.lp-course-card-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lp-course-price {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  line-height: 1;
}

.lp-course-price-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: .15rem;
}

.lp-enrolled-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(0,208,132,.1);
  color: var(--success);
  border-radius: 50px;
  padding: .35rem .9rem;
  font-size: .78rem;
  font-weight: 700;
}

/* ── Features ──────────────────────────────────── */
.lp-features {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3.5rem;
}

.lp-feature {
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.lp-feature:hover {
  border-color: rgba(15,145,227,.25);
  transform: translateY(-3px);
}

.lp-feature-icon {
  width: 52px; height: 52px;
  background: var(--primary-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.lp-feature h3 {
  font-size: 1rem;
  margin-bottom: .5rem;
  color: var(--text-main);
}

.lp-feature p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Bottom CTA ────────────────────────────────── */
.lp-cta {
  background: linear-gradient(135deg, #0f91e3 0%, #0b6fb3 100%);
  padding: 4.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lp-cta::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}

.lp-cta::after {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}

.lp-cta-inner { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }

.lp-cta h2 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: .75rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.lp-cta p {
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.lp-cta .btn {
  background: #fff;
  color: var(--primary);
  font-size: .95rem;
  padding: .9rem 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.lp-cta .btn:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}

.lp-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

.lp-cta .btn-secondary:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .lp-cert-wrap { max-width: 360px; margin: 0 auto; }
  .lp-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: 1fr; gap: 1rem; }
  .lp-step-arrow { display: none; }
  .lp-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .lp-hero { padding: 3rem 1.25rem; }
  .lp-stats-inner { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .lp-hero-title { font-size: 2rem; }
}

/* Screen-reader-only. Used where a page's visible main heading is styled by
   a container (dashboard hero, profile header) rather than a heading class,
   so promoting the tag itself would change its rendering. The page still
   needs exactly one <h1> for assistive tech and search engines — this
   supplies it without touching the visual design. Not `display:none`, which
   would hide it from screen readers too. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Mobile length control (client feedback 2026-09-08) ───────────────
   The landing page ran to 21 phone screens and buyers had to scroll past
   4+ screens of preamble before reaching a course; testers reported
   forgetting what they were looking for. Courses now come first, and the
   longer marketing sections below them collapse to a preview with a
   "Show more" toggle so the page can still be skimmed end to end.
   Desktop is untouched — the complaint was mobile-only. ── */
@media (max-width: 900px) {
  .lp-mobile-collapse {
    position: relative;
    max-height: 36vh;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .lp-mobile-collapse.is-open {
    max-height: none;
  }
  /* A table sliced across the middle reads as a broken card rather than as
     a preview, so hide whole tables while collapsed and let the heading and
     summary do the previewing. */
  .lp-mobile-collapse:not(.is-open) table {
    display: none;
  }
  /* Fade the cut edge so it reads as "more below", not as broken layout. */
  .lp-mobile-collapse:not(.is-open)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0), var(--bg-main) 78%);
    pointer-events: none;
  }
  .lp-collapse-toggle {
    display: block;
    margin: .5rem auto 0;
    padding: .6rem 1.4rem;
    border: 1px solid var(--primary);
    border-radius: 999px;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
  }
  /* Trim the generous desktop rhythm; it multiplies across ~12 sections. */
  .lp-features, .lp-courses, .lp-cta { padding-top: 2.2rem; padding-bottom: 2.2rem; }

  /* 2rem headings wrapped to three lines on a phone and ate the whole
     collapsed preview, so the reader saw a title and nothing to judge it by. */
  .lp-section-title { font-size: 1.4rem; margin-bottom: .5rem; }
  .lp-section-sub { font-size: .92rem; }
  .lp-section-eyebrow { font-size: .72rem; }

  /* Footer: 2.3 screens of stacked link columns on a phone. Collapse each
     column behind its own heading. */
  .site-footer .footer-col h2 { cursor: pointer; position: relative; }
  .site-footer .footer-col h2::after {
    content: '+';
    position: absolute;
    right: .25rem;
    font-weight: 400;
  }
  .site-footer .footer-col.is-open h2::after { content: '–'; }
  .site-footer .footer-col ul { display: none; }
  .site-footer .footer-col.is-open ul { display: block; }
}

@media (min-width: 901px) {
  .lp-collapse-toggle { display: none; }
}

/* A13 (2026-09-23 plan, B20) — global reduced-motion safety net. The
   review-carousel rule above (`.lp-reviews-track { animation: none; }`)
   only covered that one animation; this catches every other CSS
   transition/keyframe animation on the site (theme toggle, hover states,
   card lifts, wave dividers, etc.) for anyone with the OS-level
   "reduce motion" preference set, without having to hunt down and disable
   each one individually. `!important` is deliberate here — the whole
   point of this block is to override every other rule's own duration. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
