/* ═══════════════════════════════════════════════════════════════
   ENCAMINA · Eres Educación · Sistema de Diseño
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --cream:       #F7F3ED;
  --dark:        #1A1410;
  --teal:        #1AACCF;
  --ochre:       #C8893A;
  --cream-dark:  #EDE7DC;
  --gray:        #7A6E65;
  --teal-dark:   #0F8FAD;
  --gray-light:  #A89E96;
  --cream-deep:  #E0D6C8;
  --ochre-light: #FDF3E3;
  --teal-light:  #D6F0F7;
  --white:       #FFFFFF;

  --font-display: 'Lora', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 4px rgba(26,20,16,.06), 0 2px 12px rgba(26,20,16,.04);
  --shadow-md:  0 4px 20px rgba(26,20,16,.10), 0 1px 4px rgba(26,20,16,.06);
  --shadow-lg:  0 12px 40px rgba(26,20,16,.14), 0 4px 12px rgba(26,20,16,.08);
  --transition: .22s cubic-bezier(.4,0,.2,1);
  --sidebar-w:  280px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ════════════════════════════════════════════════════════════
   PANTALLA DE ACCESO
   ════════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: 'E';
  position: absolute;
  font-family: var(--font-display);
  font-size: 60vw;
  font-weight: 700;
  color: rgba(255,255,255,.025);
  line-height: 1;
  right: -15vw;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.login-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 56px 52px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: slideUp .5s cubic-bezier(.4,0,.2,1) both;
}

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}
.login-brand .logo-mark {
  width: 52px;
  height: 52px;
  background: var(--teal);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.login-brand .logo-mark span {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.login-brand h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -.02em;
}
.login-brand p {
  font-size: .875rem;
  color: var(--gray);
  margin-top: 4px;
  font-style: italic;
}

.login-divider {
  border: none;
  border-top: 1px solid var(--cream-deep);
  margin-bottom: 28px;
}

.login-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.login-input-wrap { position: relative; }
.login-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--dark);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  letter-spacing: .05em;
}
.login-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,172,207,.14);
}
.login-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-light);
  padding: 4px;
  transition: color var(--transition);
}
.login-toggle:hover { color: var(--teal); }

.login-btn {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  background: var(--ochre);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.login-btn:hover {
  background: #b07830;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200,137,58,.35);
}
.login-btn:active { transform: translateY(0); }

.login-error {
  display: none;
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff0f0;
  border: 1px solid #fcc;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: #c0392b;
}
.login-error.show { display: block; }

.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: .8125rem;
  color: var(--gray-light);
}


/* ════════════════════════════════════════════════════════════
   LAYOUT DEL CURSO
   ════════════════════════════════════════════════════════════ */

.course-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ── Top Header ─────────────────────────────────────────────── */
.course-header {
  grid-column: 1 / -1;
  background: var(--dark);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--teal);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.header-logo-mark span {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.header-titles { display: flex; flex-direction: column; }
.header-course-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -.01em;
}
.header-brand-name {
  font-size: .7rem;
  color: var(--teal-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}

.header-progress-area {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-progress-label {
  font-size: .8125rem;
  color: var(--gray-light);
  white-space: nowrap;
}
.progress-bar-wrap {
  width: 180px;
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.header-logout {
  padding: 7px 14px;
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  color: var(--gray-light);
  transition: all var(--transition);
}
.header-logout:hover {
  border-color: var(--teal);
  color: var(--teal-light);
}

/* ── Sidebar ────────────────────────────────────────────────── */
.course-sidebar {
  background: var(--white);
  border-right: 1px solid var(--cream-deep);
  padding: 28px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cream-deep) transparent;
}
.course-sidebar::-webkit-scrollbar { width: 4px; }
.course-sidebar::-webkit-scrollbar-track { background: transparent; }
.course-sidebar::-webkit-scrollbar-thumb { background: var(--cream-deep); border-radius: 2px; }

.sidebar-section-label {
  padding: 0 24px 10px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-light);
}

.sidebar-module {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}
.sidebar-module:hover { background: var(--cream); }
.sidebar-module.active {
  background: var(--teal-light);
  border-left-color: var(--teal);
}
.sidebar-module.completed { border-left-color: var(--ochre); }
.sidebar-module.locked { opacity: .45; cursor: not-allowed; }
.sidebar-module.locked:hover { background: transparent; }

.sidebar-module-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 700;
  color: var(--gray);
  transition: all var(--transition);
}
.sidebar-module.active .sidebar-module-icon {
  background: var(--teal);
  color: var(--white);
}
.sidebar-module.completed .sidebar-module-icon {
  background: var(--ochre);
  color: var(--white);
}

.sidebar-module-text { flex: 1; min-width: 0; }
.sidebar-module-num {
  font-size: .7rem;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sidebar-module-title {
  font-size: .875rem;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.3;
  margin-top: 1px;
}
.sidebar-module.active .sidebar-module-title { color: var(--teal-dark); font-weight: 600; }
.sidebar-module-status {
  font-size: .7rem;
  margin-top: 3px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-active   { background: var(--teal-light); color: var(--teal-dark); }
.badge-done     { background: #e8f8ee; color: #2e7d5a; }
.badge-locked   { background: var(--cream-dark); color: var(--gray-light); }

.sidebar-divider {
  margin: 8px 24px;
  border: none;
  border-top: 1px solid var(--cream-deep);
}

/* ── Main Content ───────────────────────────────────────────── */
.course-main {
  padding: 40px 48px;
  max-width: 900px;
}

/* Module panels */
.module-panel { display: none; animation: fadeIn .3s ease both; }
.module-panel.visible { display: block; }

/* Module header */
.module-header {
  margin-bottom: 32px;
}
.module-num-label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-num-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
}
.module-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.module-subtitle {
  font-size: .9375rem;
  color: var(--gray);
  margin-top: 8px;
  font-style: italic;
}

/* Video + description grid */
.video-content-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
  align-items: start;
}

/* Video frame */
.video-frame-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--dark);
}
.video-aspect { aspect-ratio: 16/9; }

/* Placeholder shown before video URL is added */
.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--dark) 0%, #2a3a4a 40%, #1a2535 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.play-btn-outer {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(26,172,207,.18);
  border: 2px solid rgba(26,172,207,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  animation: pulse 2.4s ease-in-out infinite;
}
.video-placeholder:hover .play-btn-outer {
  background: rgba(26,172,207,.35);
  transform: scale(1.08);
  box-shadow: 0 0 0 12px rgba(26,172,207,.1);
  animation: none;
}
.play-btn-outer svg { margin-left: 4px; }
.video-placeholder-label {
  font-family: var(--font-display);
  font-size: .9375rem;
  color: rgba(255,255,255,.6);
  text-align: center;
  letter-spacing: .02em;
}
.video-placeholder-course {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal);
  font-weight: 600;
}

/* Actual YouTube iframe (hidden until URL provided) */
.video-iframe-wrap {
  position: absolute;
  inset: 0;
  display: none;
}
.video-iframe-wrap.has-video { display: block; }
.video-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Module description card */
.module-desc-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-deep);
  height: 100%;
}
.desc-card-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--teal);
  margin-bottom: 10px;
}
.desc-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.3;
}
.desc-card-text {
  font-size: .9rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 16px;
}
.desc-card-objectives {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.desc-obj-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .875rem;
  color: var(--dark);
  line-height: 1.4;
}
.desc-obj-item::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ochre);
  flex-shrink: 0;
  margin-top: 5px;
}

/* ── Study Materials Accordion ───────────────────────────────── */
.study-materials-section {
  margin-bottom: 36px;
}
.study-materials-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: var(--ochre-light);
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.study-materials-header:hover { background: #f5ead5; }
.study-materials-header.open {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom-color: transparent;
}
.study-mat-title-area { display: flex; align-items: center; gap: 12px; }
.study-mat-icon {
  width: 36px;
  height: 36px;
  background: var(--ochre);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.study-mat-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}
.study-mat-sub {
  font-size: .8rem;
  color: var(--gray);
  margin-top: 1px;
}
.study-mat-chevron {
  color: var(--ochre);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.study-materials-header.open .study-mat-chevron { transform: rotate(180deg); }

.study-materials-body {
  display: none;
  background: var(--white);
  border: 1.5px solid var(--cream-deep);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 28px;
}
.study-materials-body.open { display: block; }

/* Content inside study materials */
.study-section { margin-bottom: 28px; }
.study-section:last-child { margin-bottom: 0; }
.study-section-title {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teal-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.study-section-title .icon {
  width: 22px;
  height: 22px;
  background: var(--teal);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: var(--white);
  font-weight: 700;
  flex-shrink: 0;
}
.study-text {
  font-size: .9rem;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 12px;
}
.study-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  margin-bottom: 8px;
}
.study-table th {
  background: var(--dark);
  color: var(--white);
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
}
.study-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--cream-deep);
  color: var(--dark);
  line-height: 1.5;
  vertical-align: top;
}
.study-table tr:nth-child(even) td { background: var(--cream); }
.study-table tr:nth-child(odd) td { background: var(--white); }

.study-callout {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: .9rem;
  font-style: italic;
  color: var(--dark);
  line-height: 1.65;
  margin: 16px 0;
}
.study-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.study-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .875rem;
  color: var(--dark);
  line-height: 1.5;
}
.study-list-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: 5px;
}
.study-list-item .num-badge {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ochre);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Comparison block */
.study-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.compare-col {
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.compare-col-head {
  padding: 9px 14px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--white);
}
.compare-col-head.bad  { background: #b94a3a; }
.compare-col-head.good { background: var(--teal-dark); }
.compare-col-body { background: var(--cream); padding: 10px 14px; }
.compare-item {
  font-size: .825rem;
  color: var(--dark);
  padding: 4px 0;
  border-bottom: 1px solid var(--cream-deep);
  line-height: 1.4;
}
.compare-item:last-child { border-bottom: none; }

/* ── Quiz ────────────────────────────────────────────────────── */
.quiz-section {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--cream-deep);
  overflow: hidden;
  margin-bottom: 40px;
}
.quiz-header {
  background: var(--dark);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.quiz-icon {
  width: 40px; height: 40px;
  background: rgba(26,172,207,.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quiz-header-text h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--white);
}
.quiz-header-text p {
  font-size: .8125rem;
  color: var(--gray-light);
  margin-top: 2px;
}

.quiz-body { padding: 28px; }

.quiz-question {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--cream-deep);
}
.quiz-question:last-of-type { border-bottom: none; margin-bottom: 0; }

.quiz-q-num {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--teal);
  margin-bottom: 6px;
}
.quiz-q-text {
  font-family: var(--font-display);
  font-size: .9875rem;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.45;
  margin-bottom: 14px;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.quiz-option:hover { border-color: var(--teal); background: var(--teal-light); }
.quiz-option input[type="radio"] { display: none; }
.quiz-option-marker {
  width: 18px; height: 18px;
  border: 1.5px solid var(--cream-deep);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.quiz-option.selected {
  border-color: var(--teal);
  background: var(--teal-light);
}
.quiz-option.selected .quiz-option-marker {
  border-color: var(--teal);
  background: var(--teal);
}
.quiz-option.selected .quiz-option-marker::after {
  content: '';
  width: 7px; height: 7px;
  background: var(--white);
  border-radius: 50%;
}
.quiz-option.correct {
  border-color: #2e7d5a;
  background: #e8f8ee;
}
.quiz-option.correct .quiz-option-marker { border-color: #2e7d5a; background: #2e7d5a; }
.quiz-option.wrong {
  border-color: #c0392b;
  background: #fff0f0;
}
.quiz-option.wrong .quiz-option-marker { border-color: #c0392b; background: #c0392b; }
.quiz-option-text {
  font-size: .9rem;
  color: var(--dark);
  line-height: 1.45;
  flex: 1;
}

.quiz-submit-area {
  padding: 0 28px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.quiz-submit-btn {
  padding: 13px 28px;
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.quiz-submit-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.quiz-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.quiz-result {
  display: none;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
}
.quiz-result.show { display: block; }
.quiz-result.pass {
  background: #e8f8ee;
  border: 1.5px solid #2e7d5a;
  color: #1a5c3a;
}
.quiz-result.fail {
  background: #fff0f0;
  border: 1.5px solid #c0392b;
  color: #8b1a10;
}

.quiz-unlock-area {
  display: none;
  padding: 0 28px 28px;
}
.quiz-unlock-area.show { display: block; }
.unlock-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--ochre), #b07830);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.unlock-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200,137,58,.4);
}

/* Already completed state */
.quiz-completed-banner {
  padding: 20px 28px;
  background: #e8f8ee;
  border-top: 1px solid #c8e8d8;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  color: #1a5c3a;
  font-weight: 500;
}

/* ── Navigation footer ───────────────────────────────────────── */
.module-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--cream-deep);
  margin-bottom: 60px;
}
.module-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--dark);
  transition: all var(--transition);
}
.module-nav-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-light);
}
.module-nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.module-nav-btn.next-btn {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}
.module-nav-btn.next-btn:hover:not(:disabled) {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

/* ── Completion screen ───────────────────────────────────────── */
.completion-panel {
  display: none;
  text-align: center;
  padding: 80px 40px;
  animation: fadeIn .4s ease both;
}
.completion-panel.visible { display: block; }
.completion-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(26,172,207,.35);
}
.completion-panel h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--dark);
  margin-bottom: 12px;
}
.completion-panel p {
  color: var(--gray);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.completion-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  background: var(--ochre);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.completion-cert-btn:hover { background: #b07830; transform: translateY(-2px); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,172,207,.3); }
  50%       { box-shadow: 0 0 0 16px rgba(26,172,207,0); }
}

/* ── Mobile ─────────────────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  padding: 8px;
  color: var(--gray-light);
}

@media (max-width: 900px) {
  .course-layout {
    grid-template-columns: 1fr;
  }
  .course-sidebar {
    display: none;
    position: fixed;
    top: 64px; left: 0;
    width: 280px;
    height: calc(100vh - 64px);
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .course-sidebar.open { display: block; }
  .course-main { padding: 24px 20px; }
  .video-content-grid {
    grid-template-columns: 1fr;
  }
  .mobile-menu-btn { display: flex; }
  .progress-bar-wrap { width: 100px; }
  .header-progress-label { display: none; }
}
