/* ==========================================================================
   TUKI — PLAN DE CAPACITACIÓN
   Hoja de estilos adaptable y fluida (styles.css)
   Diseño sin scroll innecesario en laptops/escritorios y totalmente adaptable
   ========================================================================== */

/* ── 1. VARIABLES & DESIGN TOKENS ── */
:root {
  --bg:            #0a0a0a;
  --bg-card:       #161514;
  --bg-card-hover: #1e1c19;
  --white:         #f7f6f3;
  --yellow:        #f4d904;
  --yellow-soft:   #d9c108;
  --yellow-dim:    rgba(244, 217, 4, 0.12);
  --green:         #22c55e;
  --green-dim:     rgba(34, 197, 94, 0.14);
  --gray:          #9c9890;
  --gray-dim:      #6b6862;
  --line:          rgba(247, 246, 243, 0.09);
  --radius:        18px;
  --radius-sm:     12px;
  --tr:            0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --wrap-max:      1120px;
}

/* ── 2. RESET & BASE FLUID STYLES ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 36px);
}

.accent {
  color: var(--yellow);
}

/* ── 3. TOP PROGRESS BAR ── */
.progress-bar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 3px;
  pointer-events: none;
}

.progress-bar-fill {
  height: 100%;
  background: var(--yellow);
  width: 0%;
  transition: width 0.4s var(--tr);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(244, 217, 4, 0.7);
}

/* ── 4. SHARED HEADER ── */
.site-header-wrap {
  flex-shrink: 0;
}

header {
  padding: clamp(14px, 2.2vh, 26px) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  user-select: none;
  transition: transform var(--tr);
}

.logo:hover {
  transform: scale(1.02);
}

.logo .tu {
  color: var(--white);
}

.logo .ki {
  color: var(--yellow);
}

/* Site Navigation (sólo visible en Home) */
.site-nav {
  position: relative;
  display: none;
  justify-content: flex-end;
  align-items: center;
}

body.page-home .site-nav {
  display: flex;
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: clamp(6px, 1vh, 9px) clamp(12px, 1.5vw, 16px);
  background: var(--bg-card);
  color: var(--white);
  font: 600 clamp(0.85rem, 1vw, 0.95rem) 'Inter', sans-serif;
  cursor: pointer;
  list-style: none;
  transition: border-color var(--tr), background var(--tr);
}

.nav-toggle::-webkit-details-marker {
  display: none;
}

.nav-toggle::after {
  content: "▾";
  color: var(--yellow);
  font-size: 1rem;
  line-height: 1;
}

.nav-links {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 99;
  display: none;
  min-width: 170px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.site-nav[open] .nav-links {
  display: grid;
}

.nav-links a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--gray);
  font-size: 0.9rem;
  transition: background var(--tr), color var(--tr);
}

.nav-links a:hover {
  background: var(--yellow-dim);
  color: var(--yellow);
}

/* Header derecho: Enlaces de retorno y badge */
.header-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 14px);
}

.back-link {
  color: var(--gray);
  font-weight: 600;
  font-size: clamp(0.82rem, 1vw, 0.9rem);
  display: none;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  transition: color var(--tr), border-color var(--tr);
  cursor: pointer;
}

.back-link:hover {
  color: var(--yellow);
  border-color: rgba(244, 217, 4, 0.3);
}

body.page-clases #back-home {
  display: flex;
}

body.page-module #back-clases {
  display: flex;
}

/* Badge de progreso en header */
.progress-badge {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--gray);
}

body.page-module .progress-badge {
  display: flex;
}

.progress-badge strong {
  color: var(--yellow);
}

/* ── 5. PAGE TRANSITIONS & CONTAINER ── */
.page {
  display: none;
  flex: 1;
  width: 100%;
}

.page.active {
  display: flex;
  flex-direction: column;
}

.page.entering {
  animation: fadeUp 0.25s var(--tr) forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 6. VISTA: HOME (VIEWPORT-FIT SIN SCROLL EN LAPTOPS/DESKTOP) ── */
#page-home {
  justify-content: space-between;
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(8px, 2vh, 24px) clamp(16px, 3vw, 36px);
}

.home-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  margin: auto 0;
}

.hero-mark {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(4.5rem, 10vw + 2vh, 9rem);
  line-height: 0.85;
  user-select: none;
}

.hero-mark .ki {
  color: var(--yellow);
  display: inline-block;
}

.home-right {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 22px);
}

.home-heading h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 2.5vw + 1vh, 2.85rem);
  line-height: 1.1;
}

.home-heading h1 .accent {
  color: var(--yellow);
}

.home-heading p {
  margin-top: clamp(6px, 1vh, 12px);
  color: var(--gray);
  font-size: clamp(0.88rem, 1vw, 1rem);
  max-width: 440px;
  line-height: 1.5;
}

/* Anillo de progreso en Home */
.home-progress {
  display: none;
  padding: clamp(10px, 1.5vh, 14px) clamp(14px, 2vw, 18px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  align-items: center;
  gap: 14px;
}

.home-progress-ring {
  position: relative;
  width: clamp(40px, 5vh, 46px);
  height: clamp(40px, 5vh, 46px);
  flex-shrink: 0;
}

.home-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(244, 217, 4, 0.12);
  stroke-width: 4;
}

.ring-fill {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 138.2;
  stroke-dashoffset: 138.2;
  transition: stroke-dashoffset 0.6s var(--tr);
}

.ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.78rem, 1vw, 0.88rem);
  font-weight: 600;
  color: var(--yellow);
}

.home-progress-text p {
  color: var(--gray);
  font-size: 0.82rem;
  margin-top: 1px;
}

.home-progress-text strong {
  color: var(--white);
  font-size: 0.92rem;
}

/* Card CTA de Home */
.clases-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.5vh, 28px) clamp(18px, 2.5vw, 30px);
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
}

.clases-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(244, 217, 4, 0.35);
  transform: translateY(-2px);
}

.clases-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  line-height: 1.15;
}

.clases-card p {
  margin-top: 4px;
  color: var(--gray);
  font-size: clamp(0.82rem, 0.95vw, 0.92rem);
  line-height: 1.4;
}

.clases-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: var(--yellow);
  color: #141300;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(0.88rem, 1vw, 0.98rem);
  padding: clamp(10px, 1.5vh, 13px) clamp(18px, 2vw, 26px);
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr);
  flex-shrink: 0;
}

.clases-card:hover .clases-btn {
  background: var(--yellow-soft);
}

/* Barra inferior Home */
.home-footer-bar {
  display: flex;
  align-items: center;
  padding: clamp(12px, 1.8vh, 18px) 0;
  border-top: 1px solid var(--line);
  color: var(--gray-dim);
  font-size: clamp(0.78rem, 0.9vw, 0.85rem);
}

.home-footer-bar p {
  color: var(--gray-dim);
  line-height: 1.4;
}

.home-footer-bar .logo-sm {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-right: 14px;
}

/* ── 7. VISTA: CLASES (ÍNDICE - VIEWPORT FIT) ── */
#page-clases {
  justify-content: space-between;
}

#page-clases > .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.clases-intro {
  padding: clamp(10px, 1.8vh, 22px) 0 clamp(6px, 1vh, 14px);
  max-width: 720px;
}

.eyebrow {
  color: var(--yellow);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: clamp(0.72rem, 0.85vw, 0.82rem);
}

.clases-intro h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 3.2vw + 0.5vh, 3.2rem);
  line-height: 1.08;
  margin-top: clamp(2px, 0.5vh, 6px);
}

.clases-intro p {
  color: var(--gray);
  font-size: clamp(0.86rem, 1vw, 0.98rem);
  max-width: 580px;
  margin-top: clamp(4px, 0.8vh, 8px);
  line-height: 1.45;
}

.index-heading {
  margin-bottom: clamp(6px, 1.2vh, 12px);
}

.index-heading h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  line-height: 1.1;
}

.index-heading p {
  color: var(--gray-dim);
  margin-top: 2px;
  font-size: clamp(0.78rem, 0.9vw, 0.85rem);
}

/* Grid de módulos 2x2 fluido */
.modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 1.4vh, 16px);
  flex: 1;
  align-content: stretch;
}

.module {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 1.8vh, 20px) clamp(16px, 2vw, 22px);
  min-height: 0;
  position: relative;
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
}

.module:hover {
  background: var(--bg-card-hover);
  border-color: rgba(244, 217, 4, 0.35);
  transform: translateY(-2px);
}

.module.done {
  border-color: rgba(34, 197, 94, 0.3);
}

.module-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(32px, 4vh, 38px);
  height: clamp(32px, 4vh, 38px);
  border-radius: 50%;
  background: var(--yellow);
  color: #141300;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  transition: background var(--tr);
  flex-shrink: 0;
}

.module.done .module-number {
  background: var(--green);
}

.module-body {
  flex: 1;
  margin-top: clamp(8px, 1.2vh, 14px);
}

.module-body h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.2;
}

.module-body p {
  color: var(--gray);
  margin-top: 4px;
  font-size: clamp(0.82rem, 0.95vw, 0.9rem);
  line-height: 1.4;
}

.module-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(10px, 1.5vh, 16px);
  padding-top: clamp(6px, 1vh, 10px);
}

.module-link {
  color: var(--yellow);
  font-weight: 600;
  font-size: clamp(0.82rem, 0.95vw, 0.9rem);
}

.module-mini {
  font-size: clamp(0.72rem, 0.85vw, 0.8rem);
  color: var(--gray-dim);
}

.module.done .module-mini {
  color: var(--green);
}

/* Footer global */
footer {
  border-top: 1px solid var(--line);
  padding: clamp(12px, 1.8vh, 22px) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-dim);
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
  flex-shrink: 0;
  margin-top: clamp(8px, 1.5vh, 16px);
}

.reset-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--gray-dim);
  font-size: clamp(0.72rem, 0.85vw, 0.8rem);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--tr), color var(--tr);
  white-space: nowrap;
}

.reset-btn:hover {
  border-color: rgba(220, 50, 50, 0.4);
  color: #e05555;
}

/* ── 8. VISTA: MÓDULO DINÁMICO ── */
.mod-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(12px, 2vh, 24px) 0 clamp(10px, 1.5vh, 18px);
  gap: clamp(12px, 2vw, 24px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(16px, 2.5vh, 28px);
}

.mod-header-left {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
}

.mod-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mod-badge-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 4.5vh, 40px);
  height: clamp(34px, 4.5vh, 40px);
  border-radius: 50%;
  background: var(--yellow);
  color: #141300;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}

.mod-badge-label {
  color: var(--gray);
  font-size: clamp(0.8rem, 0.95vw, 0.88rem);
  font-weight: 500;
}

.mod-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw + 0.5vh, 2.75rem);
  line-height: 1.08;
}

.mod-subtitle {
  color: var(--gray);
  font-size: clamp(0.85rem, 1vw, 0.98rem);
  max-width: 580px;
  line-height: 1.4;
}

/* Module progress bar */
.mod-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.mod-progress-label {
  font-size: 0.78rem;
  color: var(--gray-dim);
  text-align: right;
}

.mod-progress-track {
  width: clamp(110px, 12vw, 140px);
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.mod-progress-bar {
  height: 100%;
  background: var(--yellow);
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s var(--tr);
}

.mod-progress-done-badge {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--green);
  font-weight: 600;
}

.mod-progress-done-badge.visible {
  display: flex;
}

/* Lesson layout */
.lesson {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(16px, 2.5vw, 32px);
  align-items: start;
}

/* Video container */
.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line);
  position: relative;
  aspect-ratio: 16/9;
  max-height: clamp(220px, 42vh, 420px);
  width: 100%;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-placeholder {
  aspect-ratio: 16/9;
  max-height: clamp(220px, 42vh, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1c1a18, #11100f);
  color: var(--gray-dim);
  font-size: 0.88rem;
  padding: 20px;
  text-align: center;
}

.video-placeholder span {
  font-size: clamp(2rem, 4vw, 2.5rem);
  opacity: 0.4;
}

/* Step list */
.steps {
  display: grid;
  gap: clamp(8px, 1.2vh, 12px);
}

.step {
  display: grid;
  grid-template-columns: clamp(34px, 4vw, 40px) 1fr auto;
  gap: clamp(10px, 1.5vw, 14px);
  align-items: center;
  padding: clamp(10px, 1.5vh, 15px) clamp(12px, 1.5vw, 16px);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
  user-select: none;
}

.step:hover {
  border-color: rgba(244, 217, 4, 0.2);
  background: var(--bg-card-hover);
}

.step.completed {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.04);
}

.step-number {
  display: grid;
  place-items: center;
  width: clamp(28px, 3.5vh, 32px);
  height: clamp(28px, 3.5vh, 32px);
  border-radius: 50%;
  background: rgba(244, 217, 4, 0.14);
  color: var(--yellow);
  font-weight: 700;
  font-size: clamp(0.8rem, 1vw, 0.88rem);
  transition: background var(--tr), color var(--tr);
}

.step.completed .step-number {
  background: var(--green-dim);
  color: var(--green);
}

.step-body {
  display: grid;
  gap: 2px;
}

.step h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.2;
}

.step p {
  color: var(--gray);
  font-size: clamp(0.78rem, 0.9vw, 0.85rem);
  margin: 0;
  line-height: 1.35;
}

.step.completed h3 {
  text-decoration: line-through;
  color: var(--gray-dim);
}

.step-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: border-color var(--tr), background var(--tr);
}

.step.completed .step-check {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

/* FAQ list */
.faq-list {
  display: grid;
  gap: clamp(8px, 1.2vh, 12px);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--tr);
}

.faq-item[open] {
  border-color: rgba(244, 217, 4, 0.28);
}

.faq-item.read {
  border-color: rgba(34, 197, 94, 0.25);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: clamp(12px, 1.8vh, 16px) clamp(14px, 2vw, 20px);
  cursor: pointer;
  list-style: none;
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(0.95rem, 1.15vw, 1.05rem);
  font-weight: 600;
  color: var(--white);
  user-select: none;
  transition: color var(--tr);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "▾";
  color: var(--yellow);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform var(--tr);
}

.faq-item[open] .faq-question::after {
  transform: rotate(-180deg);
}

.faq-item.read .faq-question {
  color: var(--gray);
}

.faq-item.read .faq-question::after {
  color: var(--green);
}

.faq-answer {
  padding: 0 clamp(14px, 2vw, 20px) clamp(12px, 1.8vh, 16px);
  border-top: 1px solid var(--line);
}

.faq-answer p {
  color: var(--gray);
  font-size: clamp(0.84rem, 0.95vw, 0.92rem);
  line-height: 1.6;
  padding-top: clamp(8px, 1.2vh, 12px);
}

/* ── 9. PDF GUIDE RESOURCE ── */
.pdf-guide-wrap {
  margin-top: clamp(16px, 2.5vh, 28px);
  padding: clamp(14px, 2vh, 22px) clamp(16px, 2.5vw, 28px);
  background: linear-gradient(135deg, rgba(244, 217, 4, 0.07) 0%, rgba(244, 217, 4, 0.03) 100%);
  border: 1px solid rgba(244, 217, 4, 0.22);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2vw, 24px);
}

.pdf-guide-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pdf-guide-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  opacity: 0.85;
}

.pdf-guide-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--white);
  line-height: 1.2;
}

.pdf-guide-sub {
  font-size: clamp(0.78rem, 0.88vw, 0.84rem);
  color: var(--gray);
  margin-top: 1px;
}

.pdf-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: clamp(10px, 1.4vh, 13px) clamp(16px, 2vw, 24px);
  background: var(--yellow);
  color: #141300;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 0.95vw, 0.95rem);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(244, 217, 4, 0.25);
  transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
  position: relative;
  overflow: hidden;
}

.pdf-guide-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.pdf-guide-btn:hover::before {
  transform: translateX(100%);
}

.pdf-guide-btn:hover {
  background: var(--yellow-soft);
  box-shadow: 0 6px 24px rgba(244, 217, 4, 0.38);
  transform: translateY(-2px);
}

.pdf-guide-btn:active {
  transform: translateY(0);
}

.pdf-guide-btn svg {
  flex-shrink: 0;
}

/* Module navigation footer */
.mod-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(16px, 2.5vh, 28px) 0 clamp(20px, 3vh, 36px);
  border-top: 1px solid var(--line);
  margin-top: clamp(16px, 2.5vh, 28px);
  gap: 12px;
}

.mod-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  padding: clamp(10px, 1.4vh, 13px) clamp(16px, 2vw, 22px);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--gray);
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr), color var(--tr);
}

.mod-nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(244, 217, 4, 0.3);
  color: var(--white);
}

.mod-nav-btn.primary {
  background: var(--yellow);
  color: #141300;
  border-color: transparent;
}

.mod-nav-btn.primary:hover {
  background: var(--yellow-soft);
  color: #141300;
}

.mod-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── 10. MEDIA QUERIES (TABLET Y MÓVIL) ── */

/* Tablet & Móvil (<= 768px) */
@media (max-width: 768px) {
  body {
    min-height: auto;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-mark {
    text-align: center;
    font-size: clamp(4.5rem, 18vw, 7rem);
  }

  .home-heading p {
    max-width: 100%;
  }

  .clases-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .clases-btn {
    width: 100%;
  }

  .home-footer-bar {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .modules {
    grid-template-columns: 1fr;
  }

  .lesson {
    grid-template-columns: 1fr;
  }

  .video-wrap {
    max-height: none;
  }

  .mod-header {
    flex-direction: column;
    gap: 16px;
  }

  .mod-progress-wrap {
    align-items: flex-start;
  }

  .pdf-guide-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .pdf-guide-btn {
    width: 100%;
    justify-content: center;
  }

  .mod-nav {
    flex-direction: column-reverse;
  }

  .mod-nav-btn {
    width: 100%;
    justify-content: center;
  }

  footer {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* Móvil Compacto (<= 480px / 360px) */
@media (max-width: 480px) {
  .wrap {
    padding: 0 14px;
  }

  header {
    padding: 12px 0;
  }

  .step {
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
    padding: 10px;
  }
}
