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

/* ============================================================
   FORMACIÓN ALIMENTARIA — Main Stylesheet
   Spanish Food Safety eLearning Platform
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
  /* Brand Colors */
  --primary:        #1e6b45;
  --primary-dark:   #155234;
  --primary-light:  #2d9b5e;
  --primary-xlight: #bbf7d0;
  --accent:         #f97316;
  --accent-dark:    #ea6c0a;
  --accent-light:   #fed7aa;

  /* Backgrounds */
  --light-bg:       #f0fdf4;
  --light-bg-2:     #f8fafc;
  --white:          #ffffff;

  /* Text */
  --text-dark:      #1a202c;
  --text-gray:      #4a5568;
  --text-light:     #718096;
  --text-xlight:    #a0aec0;

  /* Borders */
  --border:         #e2e8f0;
  --border-dark:    #cbd5e0;

  /* Status Colors */
  --success:        #16a34a;
  --success-bg:     #f0fdf4;
  --success-border: #86efac;
  --error:          #dc2626;
  --error-bg:       #fef2f2;
  --error-border:   #fca5a5;
  --warning:        #d97706;
  --warning-bg:     #fffbeb;
  --warning-border: #fcd34d;
  --info:           #0284c7;
  --info-bg:        #f0f9ff;
  --info-border:    #7dd3fc;

  /* Dark footer / surfaces */
  --dark-surface:   #0f2d1e;
  --dark-surface-2: #1a3d2a;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow:         0 2px 15px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.1);
  --shadow-hover:   0 8px 30px rgba(0,0,0,0.15);
  --shadow-primary: 0 4px 15px rgba(30,107,69,0.3);

  /* Radii */
  --radius-xs:      4px;
  --radius-sm:      8px;
  --radius:         12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --radius-full:    9999px;

  /* Transitions */
  --transition:     all 0.3s ease;
  --transition-fast: all 0.15s ease;

  /* Layout */
  --header-h:       70px;
  --sidebar-w:      280px;
  --max-w:          1200px;
  --max-w-sm:       800px;
  --max-w-xs:       560px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-dark);
}
ul, ol {
  list-style: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input, textarea, select {
  font-family: inherit;
}
table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.35;
}
h4 {
  font-size: 1.1rem;
  font-weight: 600;
}
h5 {
  font-size: 1rem;
  font-weight: 600;
}
h6 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
p {
  margin-bottom: 1rem;
  color: var(--text-gray);
}
p:last-child {
  margin-bottom: 0;
}
strong {
  font-weight: 600;
  color: var(--text-dark);
}
small {
  font-size: 0.85rem;
  color: var(--text-light);
}
.text-sm    { 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; }
.text-left  { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-gray    { color: var(--text-gray); }
.text-light   { color: var(--text-light); }
.text-white   { color: var(--white); }
.font-bold    { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Visually hidden (SEO / accessibility) */
.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;
}

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-sm {
  max-width: var(--max-w-sm);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-xs {
  max-width: var(--max-w-xs);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 5rem 0;
}
.section-sm {
  padding: 3rem 0;
}
.section-lg {
  padding: 7rem 0;
}
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.block { display: block; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: var(--radius-full); }
.bg-light { background: var(--light-bg); }
.bg-white { background: var(--white); }

/* ============================================================
   5. SECTION TITLES
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}
.section-tag {
  display: inline-block;
  background: var(--primary-xlight);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}
.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(249,115,22,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
}
.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--light-bg);
  color: var(--primary-dark);
}
.btn-ghost {
  background: transparent;
  color: var(--text-gray);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--light-bg);
  color: var(--text-dark);
}
.btn-danger {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: var(--white);
}
.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}
.btn-success:hover {
  background: #15803d;
  border-color: #15803d;
  color: var(--white);
  transform: translateY(-2px);
}
.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  border-radius: var(--radius);
}
.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
}
.btn-xs {
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
}
.btn-full {
  width: 100%;
  justify-content: center;
}
.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ============================================================
   7. BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.badge-primary   { background: var(--primary-xlight); color: var(--primary-dark); }
.badge-accent    { background: var(--accent-light);   color: #9a3412; }
.badge-success   { background: var(--success-bg);     color: var(--success); border: 1px solid var(--success-border); }
.badge-error     { background: var(--error-bg);       color: var(--error); border: 1px solid var(--error-border); }
.badge-warning   { background: var(--warning-bg);     color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info      { background: var(--info-bg);        color: var(--info); border: 1px solid var(--info-border); }
.badge-gray      { background: #f1f5f9;               color: var(--text-gray); }
.badge-nivel-basico    { background: #dbeafe; color: #1d4ed8; }
.badge-nivel-avanzado  { background: #fce7f3; color: #9d174d; }
.badge-nivel-experto   { background: #ede9fe; color: #6d28d9; }

/* ============================================================
   8. ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.alert-icon {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
}
.alert-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: #166534;
}
.alert-error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: #991b1b;
}
.alert-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: #92400e;
}
.alert-info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: #075985;
}
.alert p { margin: 0; color: inherit; font-size: 0.9rem; }
.alert strong { color: inherit; }
.alert-dismiss {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}
.alert-dismiss:hover { opacity: 1; }

/* ============================================================
   9. FORMS — INPUTS & LABELS
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-label .required {
  color: var(--error);
  margin-left: 0.2rem;
}
.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition-fast);
  outline: none;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,107,69,0.12);
}
.form-control::placeholder {
  color: var(--text-xlight);
}
.form-control.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.form-control.is-valid {
  border-color: var(--success);
}
textarea.form-control {
  resize: vertical;
  min-height: 110px;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}
.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.35rem;
}
.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .form-control {
  padding-left: 2.75rem;
}
.input-group-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-light);
  pointer-events: none;
  width: 1.1rem;
  height: 1.1rem;
}
.input-group-append {
  position: absolute;
  right: 0.75rem;
  cursor: pointer;
  color: var(--text-light);
  background: none;
  border: none;
  padding: 0;
}
.input-group-append:hover { color: var(--primary); }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label {
  font-size: 0.9rem;
  color: var(--text-gray);
  cursor: pointer;
}

/* ============================================================
   10. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--primary-dark); }
.site-logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-logo-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}
.site-logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.main-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-gray);
  transition: var(--transition-fast);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--light-bg);
}
.main-nav a.active {
  font-weight: 600;
}
.header-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
}
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Hamburger / Mobile menu toggle */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
.hamburger:hover { background: var(--light-bg); }
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition-fast);
  transform-origin: center;
}
.hamburger.open span:nth-child(1),
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2),
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3),
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 999;
  overflow-y: auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  flex-direction: column;
  gap: 0.25rem;
  animation: slideDown 0.2s ease;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  display: block;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--light-bg);
  color: var(--primary);
}
.mobile-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}
.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Admin bar */
.admin-bar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  text-align: center;
}
.admin-bar a {
  color: var(--primary-xlight);
  font-weight: 600;
  margin: 0 0.5rem;
}
.admin-bar a:hover { color: var(--white); }

/* ============================================================
   11. HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::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.04'%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");
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-content {
  max-width: 600px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.25);
  margin-bottom: 1.25rem;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hero h1 span {
  color: var(--accent-light);
}
.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
}
.hero-stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.25rem;
}
.hero-image {
  display: none;
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ============================================================
   12. COURSES GRID
   ============================================================ */
.courses-section {
  padding: 5rem 0;
  background: var(--light-bg-2);
}
.courses-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  align-items: center;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--border-dark);
  background: var(--white);
  color: var(--text-gray);
  cursor: pointer;
  transition: var(--transition-fast);
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

/* ============================================================
   13. COURSE CARDS
   ============================================================ */
.course-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-xlight);
}
.course-card-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.course-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.course-card:hover .course-card-image img {
  transform: scale(1.05);
}
.course-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.course-card-favorite {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  background: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  color: var(--text-light);
}
.course-card-favorite:hover { color: var(--accent); transform: scale(1.1); }
.course-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.course-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.course-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.course-card h3 a {
  color: inherit;
}
.course-card h3 a:hover { color: var(--primary); }
.course-card-desc {
  font-size: 0.88rem;
  color: var(--text-gray);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.course-card-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.course-card-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--warning);
}
.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  gap: 0.75rem;
}
.course-card-price {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.price-current {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}
.price-original {
  font-size: 0.82rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.price-free {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--success);
}

/* ============================================================
   14. COURSE DETAIL PAGE
   ============================================================ */
.course-detail-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 3.5rem 0;
}
.course-detail-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}
.course-detail-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  max-width: 640px;
}
.course-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.8);
}
.course-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.course-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0;
  align-items: start;
}
.course-detail-main {}
.course-detail-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.course-detail-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}
.what-youll-learn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.learn-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-gray);
}
.learn-item-icon {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
}
.curriculum-module {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.curriculum-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  background: var(--light-bg-2);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  gap: 0.75rem;
}
.curriculum-module-header:hover { background: var(--light-bg); }
.curriculum-module-count {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 400;
  margin-left: auto;
  margin-right: 0.5rem;
}
.curriculum-lessons { padding: 0.25rem 0; }
.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-gray);
  border-top: 1px solid var(--border);
}
.curriculum-lesson-icon {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text-light);
  flex-shrink: 0;
}
.curriculum-lesson-duration {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Course sidebar price box */
.course-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.price-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.price-box-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.price-box-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.price-box-body {
  padding: 1.5rem;
}
.price-box-main-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.price-box-original {
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-bottom: 0.25rem;
}
.price-box-discount {
  display: inline-block;
  background: var(--accent-light);
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}
.price-box-cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.price-box-includes {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.price-box-feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-gray);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.price-box-feature:last-child { border-bottom: none; }
.price-box-feature-icon {
  color: var(--primary);
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}
.guarantee-badge {
  text-align: center;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* ============================================================
   15. LESSON LAYOUT
   ============================================================ */
.lesson-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--header-h));
  background: var(--light-bg-2);
}
.lesson-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.lesson-sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}
.lesson-sidebar-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.lesson-main {
  padding: 2rem 1.5rem;
  max-width: 760px;
}
.lesson-header {
  margin-bottom: 2rem;
}
.lesson-header h1 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin-bottom: 0.5rem;
}
.lesson-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.83rem;
  color: var(--text-light);
}
.lesson-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.lesson-content p { color: var(--text-gray); }
.lesson-content h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.lesson-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.lesson-content ul, .lesson-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-gray);
}
.lesson-content ul { list-style: disc; }
.lesson-content ol { list-style: decimal; }
.lesson-content li { margin-bottom: 0.4rem; }
.lesson-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--light-bg);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--text-gray);
}
.lesson-content .info-box {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  color: #075985;
}
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.lesson-nav .btn { min-width: 140px; }

/* Lesson steps (sidebar items) */
.lesson-steps {
  padding: 0.75rem 0;
}
.lesson-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--text-gray);
  font-size: 0.87rem;
}
.lesson-step:hover {
  background: var(--light-bg);
  color: var(--primary);
}
.lesson-step.active {
  background: var(--light-bg);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.lesson-step.completed {
  color: var(--success);
}
.lesson-step.completed .step-num {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}
.lesson-step.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.step-num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--white);
  transition: var(--transition-fast);
}
.lesson-step.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.step-text { line-height: 1.35; }
.step-type {
  display: block;
  font-size: 0.7rem;
  color: var(--text-xlight);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}
.lesson-step.active .step-type { color: rgba(30,107,69,0.6); }

/* ============================================================
   16. PROGRESS BAR
   ============================================================ */
.progress-wrap {
  margin-bottom: 0.5rem;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-gray);
  margin-bottom: 0.4rem;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
.progress-bar-sm .progress-bar { height: 5px; }
.progress-bar-lg .progress-bar { height: 12px; }

/* ============================================================
   17. EXAM / QUIZ FORM
   ============================================================ */
.exam-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.exam-header {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.exam-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.exam-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.exam-info-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-gray);
}
.exam-timer {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}
.exam-question {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.question-number {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.question-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.exam-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.exam-option {
  position: relative;
}
.exam-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.exam-option label {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.92rem;
  color: var(--text-gray);
  line-height: 1.45;
}
.exam-option label:hover {
  border-color: var(--primary);
  background: var(--light-bg);
  color: var(--text-dark);
}
.exam-option input[type="radio"]:checked + label {
  border-color: var(--primary);
  background: var(--light-bg);
  color: var(--primary);
  font-weight: 600;
}
.exam-option-radio {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
  transition: var(--transition-fast);
  background: var(--white);
}
.exam-option input[type="radio"]:checked + label .exam-option-radio {
  border-color: var(--primary);
  background: var(--primary);
}
.exam-option input[type="radio"]:checked + label .exam-option-radio::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  background: var(--white);
  border-radius: var(--radius-full);
  display: block;
}
/* Exam result states */
.exam-option.correct label   { border-color: var(--success); background: var(--success-bg); color: var(--success); }
.exam-option.incorrect label { border-color: var(--error);   background: var(--error-bg);   color: var(--error); }
.exam-submit {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.exam-progress-bar {
  width: 100%;
  margin-bottom: 0.5rem;
}

/* ============================================================
   18. RESULT PAGE (PASS / FAIL)
   ============================================================ */
.result-page {
  padding: 4rem 0;
  background: var(--light-bg-2);
  min-height: calc(100vh - var(--header-h));
}
.result-card {
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  border: 2px solid var(--border);
}
.result-card-header {
  padding: 3rem 2rem;
  text-align: center;
}
.result-card.pass .result-card-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-bottom: 4px solid var(--success);
}
.result-card.fail .result-card-header {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  border-bottom: 4px solid var(--error);
}
.result-icon {
  width: 5rem;
  height: 5rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2.5rem;
}
.result-card-header h2 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.result-card-header p {
  color: rgba(255,255,255,0.85);
  margin: 0;
}
.result-score {
  font-size: 4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin: 1rem 0 0.5rem;
}
.result-score-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.result-card-body {
  background: var(--white);
  padding: 2rem;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}
.result-stat {
  background: var(--light-bg-2);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border);
}
.result-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.result-card.fail .result-stat-value { color: var(--error); }
.result-stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ============================================================
   19. REGISTRATION & LOGIN FORMS
   ============================================================ */
.auth-page {
  min-height: calc(100vh - var(--header-h));
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
}
.auth-card-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-card-logo img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  margin: 0 auto 0.75rem;
}
.auth-card h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.4rem;
}
.auth-card-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--text-xlight);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-gray);
}
.auth-footer-link a { font-weight: 600; }
.auth-social-btn {
  width: 100%;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-dark);
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
  text-decoration: none;
}
.auth-social-btn:hover {
  border-color: var(--primary);
  background: var(--light-bg);
  color: var(--primary);
}
.auth-social-btn img {
  width: 1.1rem;
  height: 1.1rem;
}
.forgot-link {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 500;
  text-align: right;
  display: block;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}
.password-strength {
  margin-top: 0.5rem;
}
.password-strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.3rem;
}
.password-strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background 0.3s ease;
}
.strength-weak   .password-strength-fill { width: 25%; background: var(--error); }
.strength-fair   .password-strength-fill { width: 50%; background: var(--warning); }
.strength-good   .password-strength-fill { width: 75%; background: var(--info); }
.strength-strong .password-strength-fill { width: 100%; background: var(--success); }
.password-strength-text {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ============================================================
   20. PAYMENT PAGE
   ============================================================ */
.payment-page {
  padding: 3rem 0;
  background: var(--light-bg-2);
  min-height: calc(100vh - var(--header-h));
}
.payment-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
.payment-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.payment-card-header {
  background: var(--light-bg);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.payment-card-header h2 {
  font-size: 1.1rem;
  color: var(--text-dark);
}
.payment-card-body {
  padding: 1.5rem;
}
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.payment-method {
  position: relative;
}
.payment-method input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.payment-method-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dark);
}
.payment-method-label:hover { border-color: var(--primary); background: var(--light-bg); }
.payment-method input[type="radio"]:checked + .payment-method-label {
  border-color: var(--primary);
  background: var(--light-bg);
}
.payment-method-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.payment-method-badge {
  margin-left: auto;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}
.stripe-form {
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.stripe-field {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.stripe-field:last-child { border-bottom: none; }
.stripe-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-gray);
  display: block;
  margin-bottom: 0.35rem;
}
.stripe-input-mock {
  height: 1.4rem;
  background: var(--light-bg-2);
  border-radius: var(--radius-xs);
  color: var(--text-xlight);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
}
.payment-security {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  justify-content: center;
}
.payment-security-icon { color: var(--success); width: 0.9rem; height: 0.9rem; }

/* Order summary */
.order-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.order-summary-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
}
.order-summary-body {
  padding: 1.5rem;
}
.order-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.order-item-image {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.order-item-info { flex: 1; }
.order-item-name { font-size: 0.88rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.25rem; }
.order-item-meta { font-size: 0.78rem; color: var(--text-light); }
.order-item-price { font-weight: 700; color: var(--primary); font-size: 0.95rem; flex-shrink: 0; }
.order-totals { padding-top: 0.25rem; }
.order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-gray);
  padding: 0.45rem 0;
}
.order-total-row.final {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
  border-top: 2px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}
.order-total-row .price { color: var(--primary); font-weight: 700; }
.coupon-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.coupon-row .form-control { flex: 1; }

/* ============================================================
   21. STUDENT AREA (DASHBOARD)
   ============================================================ */
.student-area {
  padding: 3rem 0;
  background: var(--light-bg-2);
  min-height: calc(100vh - var(--header-h));
}
.student-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.student-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  border: 3px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}
.student-hero-info h2 { color: var(--white); margin-bottom: 0.25rem; }
.student-hero-info p { color: rgba(255,255,255,0.8); margin: 0; font-size: 0.88rem; }
.student-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.student-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.student-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-primary { background: var(--primary-xlight); color: var(--primary); }
.stat-icon-accent  { background: var(--accent-light);   color: var(--accent-dark); }
.stat-icon-success { background: var(--success-bg);     color: var(--success); }
.stat-icon-info    { background: var(--info-bg);         color: var(--info); }
.student-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 0.2rem;
}
.student-stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
}
.student-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  gap: 0;
  overflow-x: auto;
}
.student-tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-gray);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  margin-bottom: -2px;
  transition: var(--transition-fast);
}
.student-tab:hover { color: var(--primary); }
.student-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.enrolled-course-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.4rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}
.enrolled-course-item:hover { box-shadow: var(--shadow); }
.enrolled-course-image {
  width: 90px;
  height: 65px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.enrolled-course-info { flex: 1; min-width: 0; }
.enrolled-course-info h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.enrolled-course-info h3 a { color: var(--text-dark); }
.enrolled-course-info h3 a:hover { color: var(--primary); }
.enrolled-course-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}
.enrolled-course-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* Certificate download button */
.certificate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(249,115,22,0.3);
}
.certificate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(249,115,22,0.4);
  color: var(--white);
}
.certificate-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.certificate-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 10px);
}
.certificate-card h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 0.5rem; position: relative; }
.certificate-card p  { color: rgba(255,255,255,0.8); margin: 0; position: relative; }
.certificate-card .certificate-btn { margin-top: 1.5rem; position: relative; }

/* ============================================================
   22. FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark-surface);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}
.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  margin-bottom: 1rem;
}
.footer-logo:hover { color: var(--primary-xlight); }
.footer-logo img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
}
.footer-tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: 0.6rem;
}
.footer-social a {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.1);
}
.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.footer-col h5 {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition-fast);
}
.footer-links a:hover { color: var(--white); padding-left: 0.25rem; }
.footer-newsletter input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 0.88rem;
}
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.35); }
.footer-newsletter input:focus { border-color: var(--primary-light); }
.footer-newsletter .btn { margin-top: 0.5rem; }

/* Footer structure aliases (footer.php classes) */
.footer-top { padding: 4rem 0 2rem; }
.footer-col-brand {}
.footer-heading {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
}
.footer-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.4rem;
}
.footer-contact-item a { color: inherit; }
.footer-contact-item a:hover { color: var(--white); }
.footer-contact-item i { color: var(--primary-light); width: 1rem; }
.footer-badges {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}
.footer-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 0.3rem 0.75rem;
}
.footer-badge i { color: var(--primary-light); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-bottom-links a { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.footer-bottom-links a:hover { color: var(--white); }
/* Aliases for footer.php */
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-legal-links a { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.footer-legal-links a:hover { color: var(--white); }
.footer-certifications {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.footer-cert-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
}

/* ============================================================
   23. COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: 1.25rem 0;
  animation: slideUp 0.3s ease;
}
.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.cookie-banner-text {
  font-size: 0.88rem;
  color: var(--text-gray);
  flex: 1;
}
.cookie-banner-text strong { color: var(--text-dark); }
.cookie-banner-text a { color: var(--primary); font-weight: 600; }
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ============================================================
   24. STATIC / INFO PAGES (ABOUT, LEGAL, ETC.)
   ============================================================ */
.static-page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 3.5rem 0;
  text-align: center;
}
.static-page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.static-page-hero p  { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto; }
.static-page-content {
  max-width: 820px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}
.static-page-content h2 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--primary-xlight);
}
.static-page-content h2:first-of-type { margin-top: 0; }
.static-page-content h3 { font-size: 1.05rem; color: var(--text-dark); margin: 1.75rem 0 0.6rem; }
.static-page-content p { color: var(--text-gray); line-height: 1.75; }
.static-page-content ul,
.static-page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-gray);
}
.static-page-content ul { list-style: disc; }
.static-page-content ol { list-style: decimal; }
.static-page-content li { margin-bottom: 0.5rem; line-height: 1.65; }
.static-page-content a { color: var(--primary); font-weight: 500; }
.static-page-content a:hover { text-decoration: underline; }
.static-page-content table {
  margin: 1.5rem 0;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.static-page-content th {
  background: var(--light-bg);
  font-weight: 600;
  padding: 0.7rem 1rem;
  text-align: left;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
}
.static-page-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-gray);
}
.static-page-content tr:last-child td { border-bottom: none; }
.about-team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}
.team-member {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  text-align: center;
}
.team-member-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--primary-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 auto 1rem;
}
.team-member h4 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.team-member p { font-size: 0.82rem; color: var(--text-light); margin: 0; }

/* ============================================================
   25. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 2rem 0;
  flex-wrap: wrap;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-gray);
  border: 1.5px solid var(--border-dark);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}
.page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 700;
}
.page-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  color: var(--text-light);
  font-size: 0.88rem;
}

/* ============================================================
   26. CARDS (GENERIC) & UTILITY COMPONENTS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-dark);
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--light-bg-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-gray);
}
.tooltip {
  position: relative;
  cursor: pointer;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: var(--white);
  font-size: 0.75rem;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-xs);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 100;
}
.tooltip:hover::after { opacity: 1; }
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--light-bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}
.rating-stars {
  display: flex;
  gap: 0.15rem;
  color: var(--warning);
  font-size: 0.9rem;
}
.star-filled  { color: var(--warning); }
.star-empty   { color: var(--border-dark); }
.star-half    { color: var(--warning); }

/* ============================================================
   27. FEATURES / BENEFITS SECTION
   ============================================================ */
.features-section {
  padding: 5rem 0;
  background: var(--white);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
.feature-card {
  background: var(--light-bg-2);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.feature-card:hover {
  background: var(--light-bg);
  border-color: var(--primary-xlight);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background: var(--primary-xlight);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   28. TESTIMONIALS
   ============================================================ */
.testimonials-section {
  padding: 5rem 0;
  background: var(--light-bg);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.testimonial-stars { margin-bottom: 1rem; }
.testimonial-text {
  font-size: 0.92rem;
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-style: italic;
}
.testimonial-text::before { content: '\201C'; color: var(--primary); font-size: 1.5rem; line-height: 0; vertical-align: -0.4rem; margin-right: 0.1rem; }
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary-xlight);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-name { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); }
.testimonial-role { font-size: 0.78rem; color: var(--text-light); }

/* ============================================================
   29. FAQ SECTION
   ============================================================ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  background: var(--white);
  transition: var(--transition-fast);
  border: none;
  width: 100%;
  text-align: left;
}
.faq-question:hover { background: var(--light-bg); color: var(--primary); }
.faq-question.open  { background: var(--light-bg); color: var(--primary); }
.faq-chevron {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.2s ease;
}
.faq-question.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.7;
  background: var(--light-bg);
  display: none;
}
.faq-answer.open { display: block; }
/* Native <details>/<summary> FAQ support */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cert-faq { margin-top: 2.5rem; }
details.faq-item { border-radius: var(--radius-sm); overflow: hidden; }
details.faq-item summary.faq-question {
  list-style: none;
  cursor: pointer;
}
details.faq-item summary.faq-question::-webkit-details-marker { display: none; }
details.faq-item[open] summary.faq-question { background: var(--light-bg); color: var(--primary); }
details.faq-item[open] .faq-answer { display: block; }

/* ============================================================
   30. ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.animate-fade-in   { animation: fadeIn 0.4s ease both; }
.animate-slide-up  { animation: slideUp 0.4s ease both; }
.animate-slide-down { animation: slideDown 0.25s ease both; }
.animate-spin      { animation: spin 1s linear infinite; }
.animate-pulse     { animation: pulse 2s ease-in-out infinite; }
.animate-bounce    { animation: bounce 1s ease-in-out infinite; }

/* Stagger helpers */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }

/* ============================================================
   31. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.15rem; }
.modal-close {
  width: 2rem;
  height: 2rem;
  border: none;
  background: var(--light-bg-2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-gray);
  font-size: 1.1rem;
  transition: var(--transition-fast);
}
.modal-close:hover { background: var(--border); color: var(--text-dark); }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ============================================================
   32. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 350px;
  width: calc(100vw - 3rem);
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
  animation: slideUp 0.3s ease;
  font-size: 0.88rem;
  color: var(--text-gray);
}
.toast-icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--error); }
.toast-info    .toast-icon { color: var(--info); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text-xlight); padding: 0; font-size: 1rem; line-height: 1; }
.toast-close:hover { color: var(--text-gray); }

/* ============================================================
   33. BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================================================
   34. BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-light);
  padding: 0.75rem 0;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-xlight); }
.breadcrumb span:last-child { color: var(--text-gray); font-weight: 500; }

/* ============================================================
   35. TABLE (DATA TABLES)
   ============================================================ */
.data-table {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table table { margin: 0; }
.data-table th {
  background: var(--light-bg-2);
  padding: 0.85rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-gray);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--light-bg-2); }

/* ============================================================
   36. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-dark);
}
.empty-state-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--radius-full);
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--text-light);
  font-size: 1.75rem;
}
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.empty-state p  { font-size: 0.9rem; color: var(--text-light); max-width: 380px; margin: 0 auto 1.5rem; }

/* ============================================================
   37. LOADER / SPINNER
   ============================================================ */
.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}
.spinner-sm {
  width: 1.25rem;
  height: 1.25rem;
  border-width: 2px;
}
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ============================================================
   38. PRINT STYLES (CERTIFICATE)
   ============================================================ */
@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .back-to-top,
  .btn,
  .lesson-sidebar,
  .admin-bar { display: none !important; }
  body { font-size: 12pt; }
  .certificate-card {
    background: none !important;
    color: #000 !important;
    border: 2px solid #000;
    print-color-adjust: exact;
  }
}

/* ============================================================
   39. TABLET BREAKPOINT — 768px
   ============================================================ */
@media (min-width: 768px) {
  .main-nav    { display: flex; }
  .header-actions { display: flex; }
  .hamburger   { display: none; }
  .mobile-nav  { display: none !important; }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
  .hero-image { display: block; }

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

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

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

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

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

  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .lesson-layout {
    grid-template-columns: var(--sidebar-w) 1fr;
  }

  .course-detail-layout {
    grid-template-columns: 1fr 340px;
  }

  .payment-layout {
    grid-template-columns: 1fr 360px;
  }

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

  .about-team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .result-actions {
    flex-direction: row;
  }

  .exam-submit { flex-direction: row; }
}

/* ============================================================
   40. DESKTOP BREAKPOINT — 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
  }

  .hero {
    padding: 7rem 0 5rem;
  }

  .hero-inner {
    gap: 5rem;
  }

  .lesson-layout {
    grid-template-columns: var(--sidebar-w) 1fr;
  }

  .lesson-main {
    padding: 2.5rem 3rem;
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-team-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .student-area .container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
  }

  .student-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }
}

/* ============================================================
   41. LARGE DESKTOP — 1280px+
   ============================================================ */
@media (min-width: 1280px) {
  .hero h1 { font-size: 3rem; }
}

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

/* ============================================================
   43. DARK MODE (system preference — optional)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable system dark mode:
  :root {
    --white:        #1a1a2e;
    --light-bg:     #16213e;
    --light-bg-2:   #0f3460;
    --text-dark:    #e2e8f0;
    --text-gray:    #a0aec0;
    --border:       #2d3748;
    --border-dark:  #4a5568;
  }
  */
}

/* ============================================================
   44. HIGH CONTRAST MODE
   ============================================================ */
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .badge { border: 1px solid ButtonText; }
}

/* ============================================================
   45. CORRECCIONES Y ALIASES
   ============================================================ */

/* --- NAV: ul nav-list como fila horizontal --- */
.main-nav .nav-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- header-auth (alias de header-actions) --- */
.header-auth {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .header-auth { display: flex; }
}

/* --- STATS BAR -------------------------------------------- */
.stats-bar {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.stats-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 0;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
}
.stat-icon {
  font-size: 1.5rem;
  color: var(--primary);
  line-height: 1;
}
.stat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.stat-text strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.stat-text span {
  font-size: 0.8rem;
  color: var(--text-light);
}
.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
  display: none;
}
@media (min-width: 600px) {
  .stat-divider { display: block; }
}

/* --- CURSOS GRID (aliases de courses-grid/course-card) ----- */
.cursos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .cursos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cursos-grid { grid-template-columns: repeat(3, 1fr); }
}

.curso-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.curso-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.curso-card-image {
  position: relative;
  height: 180px;
  background: var(--light-bg);
  overflow: hidden;
}
.curso-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.curso-card:hover .curso-card-image img {
  transform: scale(1.05);
}
.curso-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--light-bg) 0%, #d1fae5 100%);
  font-size: 3rem;
  color: var(--primary-light);
}
.curso-level-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.curso-card-body {
  padding: 1.25rem 1.25rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.curso-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.curso-card-title a {
  color: var(--text-dark);
  text-decoration: none;
}
.curso-card-title a:hover { color: var(--primary); }

.curso-card-desc {
  font-size: 0.875rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.curso-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 0.5rem;
}
.curso-card-meta i { color: var(--primary-light); }

.curso-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.curso-card-price strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}
.curso-card-price small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
}

/* --- CTA row debajo del grid --- */
.section-cta-row {
  text-align: center;
  margin-top: 2.5rem;
}

/* --- SEO TEXT SECTION ------------------------------------- */
.seo-section { background: var(--light-bg); }
.seo-text-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 2rem;
}
.seo-icon {
  font-size: 1.75rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.seo-text-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.seo-text {
  font-size: 0.93rem;
  color: var(--text-gray);
  line-height: 1.7;
  margin: 0;
}

/* --- HERO illustration adjustments ----------------------- */
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 300px;
}
.hero-icon-main {
  font-size: 8rem;
  color: rgba(255,255,255,0.15);
}
.hero-icon-badge {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(249,115,22,0.4);
}

/* --- BADGE colors ----------------------------------------- */
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-orange { background: #ffedd5; color: #9a3412; }

/* --- HERO actions spacing fix ----------------------------- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* --- Cookie banner: aliases para .cookie-text y .cookie-actions --- */
.cookie-text {
  font-size: 0.88rem;
  color: var(--text-gray);
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.cookie-text p { margin: 0; }
.cookie-text a { color: var(--primary); font-weight: 600; }
.cookie-icon { font-size: 1.2rem; color: var(--primary); flex-shrink: 0; margin-top: 0.1rem; }
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .cookie-banner-inner { flex-direction: row; align-items: center; }
}
.cookie-banner--hidden {
  animation: slideDown 0.3s ease forwards;
  opacity: 0;
  pointer-events: none;
}

/* --- Mobile overlay: JS usa clase 'is-open' --------------- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 1000;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.25rem;
  animation: slideDown 0.2s ease;
}
.mobile-nav-overlay.is-open {
  display: flex !important;
  flex-direction: column;
}
/* The <nav class="mobile-nav"> sits INSIDE the overlay — reset its own fixed positioning */
.mobile-nav-overlay .mobile-nav {
  display: flex;
  flex-direction: column;
  position: static;
  top: auto; left: auto; right: auto; bottom: auto;
  background: none;
  padding: 0;
  border: none;
  overflow: visible;
  animation: none;
  z-index: auto;
  width: 100%;
}
.mobile-nav-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav-overlay a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
}
.mobile-nav-overlay a:hover { background: var(--light-bg); color: var(--primary); }
.mobile-nav-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.btn-block { width: 100%; justify-content: center; }

/* --- Ensure nav shows properly on desktop (override) ------ */
@media (min-width: 768px) {
  .main-nav {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
  }
  .main-nav .nav-list {
    display: flex;
    flex-direction: row;
    gap: 0.1rem;
  }
  .hamburger { display: none !important; }
  .mobile-nav-overlay { display: none !important; }
}

/* ============================================================
   46. CURSO DETAIL PAGE
   ============================================================ */

/* Breadcrumb bar */
.breadcrumb-bar {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
  font-size: 0.82rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-light);
}
.breadcrumb a { color: var(--text-gray); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border-dark); margin: 0 0.2rem; }
.breadcrumb li:last-child { color: var(--text-dark); font-weight: 500; }

/* Curso hero: left content + right sidebar */
.curso-hero {
  padding: 3rem 0 0;
  background: var(--white);
}
.curso-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .curso-hero-inner {
    grid-template-columns: 1fr 360px;
    gap: 3rem;
  }
}

.curso-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.curso-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.curso-hero-desc {
  font-size: 1.05rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.curso-hero-includes-mini {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.curso-hero-includes-mini li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-gray);
}
.curso-hero-includes-mini li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Sidebar / price box */
.curso-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.curso-price-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}
.curso-sidebar-image {
  height: 200px;
  overflow: hidden;
}
.curso-sidebar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.curso-sidebar-image-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--light-bg), #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary-light);
}
.curso-price-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.curso-price-main {
  text-align: center;
}
.curso-price-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.curso-price-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.curso-price-iva {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.curso-price-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
  padding: 0.75rem;
  background: var(--light-bg);
  border-radius: var(--radius-sm);
}
.curso-price-note i { color: var(--primary); }
.curso-includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.curso-includes-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-gray);
}
.curso-includes-list i {
  color: var(--primary);
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

/* Lessons preview inside sidebar */
.lessons-preview-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.lessons-preview-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.lessons-preview-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-gray);
  line-height: 1.3;
}
.lessons-preview-list i { color: var(--text-light); margin-top: 0.1rem; flex-shrink: 0; }

/* Curso content section */
.curso-content-section {
  background: var(--white);
  padding: 3rem 0;
}
.curso-content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 900px) {
  .curso-content-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}
.section-title-sm {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-bg);
}

/* Program list (lecciones del curso) */
.program-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.program-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.program-item:last-child { border-bottom: none; }
.program-item:hover { background: var(--light-bg); }
.program-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.program-item-content {
  flex: 1;
  min-width: 0;
}
.program-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  display: block;
}
.program-item-meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* CTA row inside course */
.curso-cta-row {
  margin-top: 2.5rem;
  text-align: center;
  padding: 2rem;
  background: var(--light-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.curso-cta-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Content-html: prose typography */
.content-html h2 { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--text-dark); }
.content-html h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: var(--text-dark); }
.content-html h4 { font-size: 0.95rem; font-weight: 600; margin: 1rem 0 0.4rem; }
.content-html p  { margin-bottom: 0.9rem; color: var(--text-gray); line-height: 1.7; font-size: 0.95rem; }
.content-html ul, .content-html ol { padding-left: 1.5rem; margin-bottom: 0.9rem; }
.content-html li { margin-bottom: 0.3rem; color: var(--text-gray); line-height: 1.6; font-size: 0.95rem; }
.content-html strong { font-weight: 600; color: var(--text-dark); }
.content-html em { font-style: italic; }

/* ============================================================
   47. LECCION PAGE
   ============================================================ */

.leccion-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - var(--header-h));
}
@media (min-width: 900px) {
  .leccion-layout {
    grid-template-columns: 280px 1fr;
  }
}

/* Sidebar */
.leccion-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
@media (max-width: 899px) {
  .leccion-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}
.leccion-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--light-bg);
}
.leccion-sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.leccion-sidebar-back:hover { color: var(--primary); }
.leccion-sidebar-course-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}
.leccion-progress-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.leccion-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.leccion-progress-text {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 0;
}

/* Step navigation */
.leccion-steps {
  flex: 1;
  padding: 0.75rem 0;
}
.leccion-steps ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.step-item {
  display: block;
}
.step-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  color: var(--text-gray);
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
  line-height: 1.3;
}
.step-link:hover {
  background: var(--light-bg);
  color: var(--primary);
}
.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-gray);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.step-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Active step */
.step-item.active .step-link {
  background: #ecfdf5;
  color: var(--primary);
  font-weight: 600;
}
.step-item.active .step-number {
  background: var(--primary);
  color: var(--white);
}

/* Completed step */
.step-item.completed .step-link { color: var(--text-gray); }
.step-item.completed .step-number {
  background: var(--primary-light);
  color: var(--white);
}

/* Exam step */
.step-item.step-exam .step-link {
  color: var(--accent);
  font-weight: 600;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.step-item.step-exam .step-number {
  background: var(--accent);
  color: var(--white);
}

/* Main content */
.leccion-content {
  padding: 2rem;
  max-width: 800px;
}
@media (max-width: 899px) {
  .leccion-content { padding: 1.25rem; }
}
.leccion-header {
  margin-bottom: 1.75rem;
}
.leccion-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.leccion-num {
  background: var(--light-bg);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.78rem;
}
.leccion-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0;
}

/* Video wrapper — responsive 16:9 */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: #000;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.leccion-video { margin-bottom: 1.5rem; }

/* Leccion body prose */
.leccion-body { margin-bottom: 2rem; }

/* Prev/Next navigation */
.leccion-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.leccion-nav-prev { text-align: left; }
.leccion-nav-next { text-align: right; }
.leccion-nav-progress-info {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
}

/* ============================================================
   48. FORMS: form-input aliases & auth pages
   ============================================================ */

/* form-input is the same as form-control */
.form-input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5;
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,107,69,0.12);
}
.form-input::placeholder { color: var(--text-light); }
.form-input.is-invalid { border-color: #e53e3e; }
.form-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(229,62,62,0.12); }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.required { color: #e53e3e; margin-left: 2px; }
.form-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.3rem;
  display: block;
}
.form-error {
  font-size: 0.78rem;
  color: #e53e3e;
  margin-top: 0.3rem;
  display: block;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.form-group + .form-group { margin-top: 1.1rem; }

/* 2-col row */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 540px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* Password input with toggle */
.input-password-wrap {
  position: relative;
}
.input-password-wrap .form-input {
  padding-right: 2.8rem;
}
.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}
.toggle-password:hover { color: var(--primary); }

/* Auth page layout */
.auth-page {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex;
  align-items: flex-start;
  padding: 3rem 0;
  background: var(--light-bg);
}
.auth-page .container {
  width: 100%;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  padding: 2.5rem;
  max-width: 540px;
  margin: 0 auto;
}
.auth-card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-logo-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--light-bg);
  color: var(--primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 2px solid var(--border);
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}
.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin: 0;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.auth-form .form-group { margin-top: 1rem; }
.auth-form .form-group:first-child { margin-top: 0; }
.auth-divider {
  text-align: center;
  position: relative;
  margin: 1.25rem 0;
  color: var(--text-light);
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 1.5rem);
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-gray);
}
.auth-footer a { color: var(--primary); font-weight: 600; }

/* Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.alert i { flex-shrink: 0; margin-top: 0.1rem; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-error   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Terms checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check label {
  font-size: 0.875rem;
  color: var(--text-gray);
  line-height: 1.5;
  cursor: pointer;
}

/* check-label (registro form terms) */
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-gray);
  line-height: 1.5;
}
.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.check-label a { color: var(--primary); font-weight: 600; }

/* form-label inline link (forgot password) */
.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form-label-link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--primary);
  text-decoration: none;
}
.form-label-link:hover { text-decoration: underline; }

/* auth page footer link */
.auth-alt-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-gray);
}
.auth-alt-link a { color: var(--primary); font-weight: 600; }
.form-check a { color: var(--primary); font-weight: 600; }

/* ============================================================
   49. EXAMEN PAGE
   ============================================================ */
.examen-page {
  padding: 2.5rem 0 4rem;
  background: var(--light-bg);
  min-height: calc(100vh - var(--header-h));
}
.examen-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 2rem;
}
.examen-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0.75rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.examen-title i { color: var(--primary); }
.examen-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-gray);
}
.examen-info-bar span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.examen-info-bar i { color: var(--primary); }
.examen-instrucciones {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  color: #1e40af;
  line-height: 1.6;
}
/* Preguntas */
.preguntas-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 100px;
}
.pregunta-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.pregunta-item.pregunta-error { border-color: var(--error); }
.pregunta-enunciado {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: none;
  padding: 0;
}
.pregunta-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.respuestas-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.respuesta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.95rem;
  color: var(--text-dark);
  user-select: none;
}
.respuesta-item:hover { border-color: var(--primary); background: #f0fdf4; }
.respuesta-item.is-selected {
  border-color: var(--primary);
  background: #f0fdf4;
  font-weight: 600;
}
.respuesta-radio { flex-shrink: 0; accent-color: var(--primary); width: 18px; height: 18px; margin-top: 0.1rem; cursor: pointer; }
.respuesta-text { line-height: 1.5; }
/* Submit bar */
.examen-submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 100;
}
.examen-progress-info {
  font-size: 0.9rem;
  color: var(--text-gray);
  font-weight: 500;
}

/* ============================================================
   50. PAGO PAGE
   ============================================================ */
.pago-page {
  padding: 2rem 0 4rem;
  background: var(--light-bg);
  min-height: calc(100vh - var(--header-h));
}
.pago-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 1rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.pago-title i { color: var(--primary); }
.pago-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .pago-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}
.pago-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
/* Summary card */
.order-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.order-course-img {
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.order-course-info { flex: 1; min-width: 0; }
.order-course-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.35rem;
}
.order-course-meta {
  font-size: 0.82rem;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.order-includes {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-gray);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.order-includes li { display: flex; align-items: center; gap: 0.4rem; }
.order-includes i { color: var(--primary); font-size: 0.75rem; }
/* Price breakdown */
.order-price-breakdown {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-gray);
}
.price-row:last-child { border-bottom: none; }
.price-row-total {
  font-size: 1.05rem;
  color: var(--text-dark);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
  border-top: 2px solid var(--border);
  border-bottom: none;
}
/* Exam result preview */
.pago-exam-result-preview {
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}
.pago-exam-result-preview.is-pass { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.pago-exam-result-preview.is-fail { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }
.pago-exam-result-preview i { font-size: 1.1rem; flex-shrink: 0; }
.pago-exam-result-preview p { margin: 0.2rem 0 0; }
.text-sm { font-size: 0.8rem; opacity: 0.85; }
/* Payment methods */
.payment-methods-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.payment-method-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.85rem;
  color: var(--text-dark);
  text-align: center;
}
.payment-method-tab i { font-size: 1.5rem; color: var(--text-gray); }
.payment-method-tab small { color: var(--text-light); font-size: 0.75rem; }
.payment-method-tab:hover { border-color: var(--primary); }
.payment-method-tab.is-active {
  border-color: var(--primary);
  background: #f0fdf4;
}
.payment-method-tab.is-active i { color: var(--primary); }
.payment-panel { margin-bottom: 1rem; }
.btn-stripe {
  background: #635bff;
  color: var(--white);
  border: none;
}
.btn-stripe:hover { background: #4f46e5; color: var(--white); }
.btn-paypal {
  background: #003087;
  color: var(--white);
  border: none;
}
.btn-paypal:hover { background: #002069; color: var(--white); }
.payment-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.6rem;
  text-align: center;
  justify-content: center;
}
.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.payment-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-gray);
  background: var(--light-bg);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.payment-badge i { color: var(--primary); }

/* ============================================================
   51. RESULTADO PAGE
   ============================================================ */
.resultado-page {
  padding: 3rem 0;
  background: var(--light-bg);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-start;
}
.resultado-page .container { width: 100%; }
.resultado-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  padding: 3rem 2rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.resultado-card--pass { border-top: 4px solid var(--success); }
.resultado-card--fail { border-top: 4px solid var(--error); }
.resultado-icon {
  margin-bottom: 1.25rem;
}
.resultado-icon-main {
  font-size: 3.5rem;
}
.resultado-card--pass .resultado-icon-main { color: var(--success); }
.resultado-card--fail .resultado-icon-main { color: var(--error); }
.resultado-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}
.resultado-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.resultado-grade-value {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}
.resultado-card--pass .resultado-grade-value { color: var(--success); }
.resultado-card--fail .resultado-grade-value { color: var(--error); }
.resultado-grade-label {
  font-size: 0.9rem;
  color: var(--text-gray);
}
.resultado-curso-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-gray);
  margin: 0.5rem 0 1.5rem;
}
.resultado-curso-name i { color: var(--primary); }
.resultado-message {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.resultado-message p { margin: 0 0 0.5rem; }
.resultado-message p:last-child { margin: 0; }
.resultado-message--pass { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.resultado-message--fail { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }
.resultado-cert-num {
  font-size: 0.82rem;
  margin-top: 0.5rem;
}
.resultado-cert-num code {
  background: #dcfce7;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.82rem;
}
.resultado-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ============================================================
   52. ÁREA ALUMNO PAGE
   ============================================================ */
.area-alumno-page {
  padding: 2rem 0 4rem;
  background: var(--light-bg);
  min-height: calc(100vh - var(--header-h));
}
/* Header */
.area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.area-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.area-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.area-user-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 0.2rem;
}
.area-user-email, .area-user-since {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin: 0;
}
/* Stats row */
.area-stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.area-stat-item {
  flex: 1;
  min-width: 120px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}
.area-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.area-stat-label {
  font-size: 0.8rem;
  color: var(--text-gray);
}
/* Section */
.area-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
/* Course cards */
.area-cursos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.area-curso-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  transition: box-shadow 0.2s;
}
.area-curso-card:hover { box-shadow: var(--shadow-hover); }
@media (max-width: 767px) {
  .area-curso-card {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
  }
  .area-curso-card-status,
  .area-curso-card-actions {
    grid-column: 1 / -1;
  }
}
.area-curso-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--light-bg);
}
.area-curso-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.area-curso-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xlight);
  font-size: 1.5rem;
}
.area-curso-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.35rem;
}
.area-curso-card-name a { color: inherit; text-decoration: none; }
.area-curso-card-name a:hover { color: var(--primary); }
.area-curso-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-light);
}
.area-curso-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.area-curso-card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.area-nota {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 600;
}
.area-curso-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.area-more-courses {
  text-align: center;
  margin-top: 1.5rem;
}

/* ============================================================
   53. PAGE HERO (cursos, sobre-nosotros, certificaciones…)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 3.5rem 0 3rem;
}
.page-hero--sm { padding: 2.25rem 0 2rem; }
.page-hero-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  margin: 0.5rem 0 0.75rem;
  line-height: 1.2;
}
.page-hero--sm .page-hero-title { font-size: 1.6rem; }
.page-hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  max-width: 620px;
  line-height: 1.65;
  margin: 0;
}
/* Breadcrumb inside hero (white variant) */
.page-hero .breadcrumb {
  color: rgba(255,255,255,0.75);
  padding: 0.5rem 0 0.75rem;
  margin: 0;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,0.75); }
.page-hero .breadcrumb a:hover { color: var(--white); }
.page-hero .breadcrumb span { color: rgba(255,255,255,0.55); }
.page-hero .breadcrumb [aria-current="page"] { color: var(--white); font-weight: 600; }

/* ============================================================
   54. STATIC / CONTENT PAGES
   ============================================================ */
.pagina-estatica { padding: 3rem 0; background: var(--light-bg); }
.content-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  color: var(--text-dark);
}

/* SEO intro/closing boxes on cursos page */
.seo-intro-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: #166534;
  line-height: 1.65;
}
.seo-intro-box a { color: var(--primary-dark); font-weight: 600; }
.seo-closing-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 3rem;
}
.seo-closing-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.seo-closing-text {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.75;
}
.seo-closing-text p { margin-bottom: 0.75rem; }
.seo-closing-text p:last-child { margin-bottom: 0; }

/* Full-width cursos grid variant */
.cursos-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ============================================================
   55. FEATURES GRID (sobre-nosotros)
   ============================================================ */
.features-grid-sm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
@media (max-width: 540px) {
  .features-grid-sm { grid-template-columns: 1fr; }
}
.feature-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.feature-item:hover { box-shadow: var(--shadow-hover); }
.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}
.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.feature-desc {
  font-size: 0.875rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin: 0;
}
.sobre-features { margin-top: 2.5rem; }
.sobre-cta {
  margin-top: 2.5rem;
  text-align: center;
}

/* ============================================================
   56. CERTIFICACIONES PAGE
   ============================================================ */
.cert-intro { margin-bottom: 2rem; }
.cert-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.cert-info-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.cert-info-icon {
  width: 48px;
  height: 48px;
  background: #f0fdf4;
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 auto 0.75rem;
}
.cert-info-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}
.cert-info-item p {
  font-size: 0.82rem;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.5;
}
.cert-cursos-section { margin-top: 1rem; }
.cert-cursos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}
.cert-curso-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.cert-curso-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.cert-curso-icon {
  width: 44px;
  height: 44px;
  background: #f0fdf4;
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cert-curso-info { flex: 1; min-width: 0; }
.cert-curso-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.4rem;
}
.cert-curso-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cert-curso-desc {
  font-size: 0.875rem;
  color: var(--text-gray);
  margin: 0 0 0.85rem;
  line-height: 1.6;
}
.cert-curso-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-gray);
}
.cert-curso-details li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.text-success { color: var(--success); }
.text-error   { color: var(--error); }
.text-sm      { font-size: 0.82rem; }


/* ============================================================
   57. COOKIES MANAGEMENT PAGE
   ============================================================ */
.cookies-management {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.cookies-management h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.cookies-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}
.cookies-status-msg {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  min-height: 1.4em;
}
