/* =====================================================
   VARIABLES Y RESET
===================================================== */
:root {
  --bg: #ffffff;
  --text: #111;
  --panel: #f6f6f6;
  --border: #ddd;
  --accent: #4A6B8C;
}


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

body {
  font-family: 'raleway', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 0.2em;
}

p {
  margin-bottom: 1.1em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

.page .start-course {
  display: inline-block;
  margin-top: 16px;

  background: #c9a052;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.page .start-course:hover {
  background: #b8922e;
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  margin-top: 30px;
  padding: 0 12px;
}

.sidebar-logo img {
  width: 88px;
  height: auto;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar-logo-text span {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #1a2332;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}



/* =====================================================
   MENÚ
===================================================== */
.menu a {
  display: block;
  padding: 10px 12px;
  margin-bottom: 6px;

  text-decoration: none;
  color: var(--text);

  border-radius: 6px;
}

.menu a:hover {
  background: rgba(201,160,82,0.12);
}

.menu-group .menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: inherit;
  font-family: inherit;
}

.menu-group .menu-toggle:hover {
  background: rgba(201,160,82,0.12);
}

.menu-parent-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-parent-row .menu-parent {
  flex: 1;
  text-decoration: none;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 600;
  border-radius: 6px;
  display: block;
  background: transparent;
  border: none;
  text-align: left;
  font-size: inherit;
  font-family: inherit;
}

.menu-parent-row .menu-parent:hover {
  background: rgba(201,160,82,0.12);
}

.menu-parent-row .menu-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 10px 8px;
  color: var(--text);
  transition: transform 0.2s;
  line-height: 1;
  width: auto;
  display: inline-block;
  margin-bottom: 0;
  border-radius: 0;
  font-weight: inherit;
  text-align: center;
}

.menu-group.open > .menu-parent-row .menu-toggle {
  transform: rotate(90deg);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.menu-group.open > .submenu {
  max-height: 3000px;
}

.submenu a {
  padding-left: 28px;
  font-size: 0.95rem;
  color: #555;
}

.menu a.active {
  background: #c9a052 !important;
  color: #fff !important;
}

/* Menú en modo enfoque */
.focus-mode .sidebar {
  display: none;
}

/* =====================================================
   TOPBAR
===================================================== */
.topbar {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburguesa móvil – oculta en desktop */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}

#navToggle {
  display: none;
}

/* =====================================================
   LAYOUT PRINCIPAL
===================================================== */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  flex: 1;

  background-color: #f7f2e9;
  background-image:
    /* fibras horizontales */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 3px,
      rgba(180,160,130,0.06) 3px,
      rgba(180,160,130,0.06) 4px
    ),
    /* fibras verticales */
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 5px,
      rgba(180,160,130,0.04) 5px,
      rgba(180,160,130,0.04) 6px
    ),
    /* manchas sutiles de papel reciclado */
    radial-gradient(ellipse at 15% 30%, rgba(200,180,150,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 75% 60%, rgba(200,180,150,0.1) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 10%, rgba(200,180,150,0.08) 0%, transparent 30%),
    radial-gradient(ellipse at 85% 85%, rgba(200,180,150,0.07) 0%, transparent 40%),
    /* viñeta */
    radial-gradient(ellipse at 50% 50%, transparent 50%, rgba(160,140,110,0.08) 100%);
}

.page {
  max-width: 900px;
  margin: 32px auto;
  padding: 32px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

/* =====================================================
   COOKIE BANNER Y MODAL
===================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a2332;
  color: #eee;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 9999;
  font-size: 0.9rem;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-buttons button {
  padding: 6px 18px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  background: transparent;
  color: #eee;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.2s;
}

.cookie-buttons button:hover {
  background: rgba(255,255,255,0.1);
}

/* Botón estilo link dentro del texto */
.link-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #c9a052 !important;
  text-decoration: underline !important;
  cursor: pointer;
  font-size: inherit !important;
  display: inline !important;
}

/* ---------- MODAL ---------- */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal.hidden {
  display: none;
}

.cookie-modal-content {
  background: #fff;
  max-width: 560px;
  width: 90%;
  padding: 32px 28px;
  border-radius: 12px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 4px 8px;
}

.cookie-modal h2 {
  margin-top: 0;
  color: #1a2332;
}

.cookie-modal h3 {
  margin-top: 20px;
  font-size: 1rem;
  color: #555;
}

.cookie-modal ul {
  margin: 8px 0 16px 20px;
}

.cookie-modal li {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.modal-buttons {
  margin-top: 24px;
}

/* =====================================================
   OCULTAR / MOSTRAR
===================================================== */
.hidden {
  display: none;
}

/* =====================================================
   BOTÓN MENÚ MÓVIL
===================================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 999;
  }

  /* Mostrar hamburguesa en móvil */
  #navToggle {
    display: inline-flex;
  }

  .logo {
    width: 90%;
    max-width: 500px;
  }
  .logo img {
    width: 200px;
    max-width: none;
    height: auto;
  }
  .main {
    margin-left: 0;
  }

  .page {
    margin: 16px;
    padding: 24px;
  }
}
/* Ocultar botón de modo enfoque en móvil */
@media (max-width: 768px) {
  #toggleFocus {
    display: none;
  }
}

/* =====================================================
   IMÁGENES
===================================================== */
img {
  width: 100%;
  height: auto;
}

.img-fx {
  border-radius: 12px;
  background: var(--panel);
  transition: transform 0.2s;
  cursor: zoom-in;
}

.img-fx:hover {
  transform: scale(1.01);
}

.page img.img-fx {
  cursor: zoom-in;
}

/* =====================================================
   MODAL CONTENIDO – FILTER MODAL
===================================================== */
/* Overlay del zoom */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}
.zoom-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =====================================================
   COOKIE TOGGLE
===================================================== */
/* Minitoggle para el botón de cookies en modo footer */
.cc-window {
  background: rgba(26,35,50,0.9) !important;
}

/* =====================================================
   FOOTER
===================================================== */
.course-footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo img {
  width: 48px;
  height: auto;
  display: block;
}

.footer-text {
  font-size: 0.85rem;
  color: #888;
}

.footer-text a {
  color: var(--accent);
  text-decoration: underline;
}

/* =====================================================
   FOOTER REDES SOCIALES
===================================================== */
.footer-social-icons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.footer-social-icons a:hover {
  opacity: 0.7;
}

.footer-social-icons svg {
  width: 24px;
  height: 24px;
  fill: #5a5a5a;
  transition: fill 0.2s;
}

.footer-social-icons a:hover svg {
  fill: #c9a052;
}

/* =====================================================
   BOTÓN INICIO
===================================================== */
.start-course {
  display: inline-block;
  margin-top: 16px;
  background: #c9a052;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: 0.2s;
}

.start-course:hover {
  background: #b8922e;
}

/* =====================================================
   ABOUT
===================================================== */
.author-profile {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  
}

.author-photo img {
  width: 100%;
  max-width: 240px;
  border-radius: 12px;
}

.about-logo-link {
  display: block;
  text-align: center;
  
}

.author-photo .about-logo {
  width: 120px;
  height: auto;
  opacity: 0.6;
  transition: opacity 0.2s;
  display: block;
  margin: 0 auto;
}

.author-photo .about-logo:hover {
  opacity: 1;
}

.social-links {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--accent);
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* =====================================================
   BOTÓN Atrás / Volver
===================================================== */
.back-button {
  display: inline-block;
  margin-bottom: 20px;
  background: transparent;
  border: 2px solid rgba(201,160,82,0.5);
  color: #c9a052;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.back-button:hover {
  background: #c9a052;
  color: #1a2332;
}

/* =====================================================
   SECTION SEPARATOR
===================================================== */
.section-separator-teclado {
  margin: 12px 0;
}

/* =====================================================
   MODO ENFOQUE
===================================================== */
.focus-mode .topbar {
  display: none;
}

/* =====================================================
   CONTENIDO PRINCIPAL – PÁGINAS DE TEMA
===================================================== */
.page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  color: #1a2332;
}

.page h2 {
  font-size: 1.5rem;
  margin-top: 32px;
  color: #1a2332;
}

.page h3 {
  font-size: 1.2rem;
  margin-top: 24px;
}

.page ul, .page ol {
  margin: 12px 0 16px 24px;
}

.page li {
  margin-bottom: 6px;
}

.page blockquote {
  margin: 20px 0;
  padding: 16px 20px;
}

blockquote h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: center;
}

blockquote h2::before,
blockquote h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #c9a052 20%,
    #c9a052 80%,
    transparent
  );
}

.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.page th, .page td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.page th {
  background: var(--panel);
  font-weight: 600;
}

/* Nota al pie o texto secundario */
.nota-secundaria {
  font-size: 0.85rem;
  color: #888;
  margin-top: 8px;
}

.page figure {
  margin: 20px 0;
}

.page figure img {
  border-radius: 12px;
}

.page figure figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  margin-top: 6px;
}

.page .contenido-adicional {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.page .contenido-adicional h3 {
  margin-top: 0;
}

/* =====================================================
   MODALES DE AYUDA – DAW
===================================================== */
/* Botón para abrir modal DAW */
.daw-btn {
  display: inline-block;
  margin-bottom: 20px;
  background: transparent;
  border: 2px solid rgba(201,160,82,0.5);
  color: #c9a052;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.daw-btn:hover {
  background: #c9a052;
  color: #1a2332;
}

/* Modal contenedor */
.daw-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 11000;
  align-items: center;
  justify-content: center;
}

.daw-modal.abierto {
  display: flex;
}

.daw-modal-contenido {
  background: #fff;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 12px;
  position: relative;
}

.daw-modal .close-modal {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
}

.daw-modal h2 {
  margin-top: 0;
  color: #1a2332;
}

.daw-modal img.modal-img {
  width: 100%;
  border-radius: 8px;
  margin: 16px 0;
}

.daw-modal h4 {
  color: #c9a052;
  margin-bottom: 4px;
}

/* ===============================
   Botón DAW (usado en HTML)
================================ */
.daw-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(201,160,82,0.5);
  border-radius: 2px;
  padding: 8px 16px;
  margin: 30px 0;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.daw-button:hover {
  background: rgba(74,144,226,0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.daw-icon svg {
  width: 22px;
  height: 22px;
  color: #6d7d91;
  flex-shrink: 0;
  display: block;
}

/* Modal DAW (usado en HTML) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 11000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 12px;
  position: relative;
}

.modal .close-modal {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
}

.modal h2 {
  margin-top: 0;
  color: #1a2332;
}

.modal img.modal-img {
  width: 100%;
  border-radius: 8px;
  margin: 16px 0;
}

.modal h4 {
  color: #1a2332;
  margin-bottom: 4px;
}

/* =====================================================
   MÓVIL – TOPBAR + OVERLAY
===================================================== */
.mobile-nav {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.mobile-nav a {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.mobile-nav a:hover {
  background: var(--panel);
}

body.mobile-open .mobile-nav {
  display: flex;
}

/* Overlay */
body.mobile-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 498;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  .author-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-photo img {
    margin: 0 auto;
  }

  .vex-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .vex-container svg {
    max-width: none;
  }

  .vex-container::after {
    content: "⇆ Desliza";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #777;
    margin-top: 4px;
  }
}

/* =====================================================
   OCULTAR / MOSTRAR TEXTO
===================================================== */
.is-hidden {
  display: none !important;
}
/* ===============================
   EN CONSTRUCCION / PAGINA NO ENCONTRADA
=============================== */
* {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
.construction {
      text-align: center;
      padding: 40px 24px;
      max-width:auto;
      
    }
    .error-code {
      font-size: 5rem;
      font-weight: 600;
      letter-spacing: 2px;
      color: var(--accent);
      margin-bottom: 12px;
    }

.logo {
      width: 60%;
      margin: 0 auto 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 20px;
      border: 2px dashed rgba(255,255,255,0.2);
      border-radius: 16px;
      color: var(--muted);
      font-size: 14px;
}

.logo img {
      width: auto;
      max-width: 280px;
      height: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #c9a052;
  line-height: 1.1;
  letter-spacing: 1px;
  background: rgba(201,160,82,0.1);
  padding: 8px 14px;
  border-radius: 8px;
  border: 2px solid red;
}

.logo-text span {
  font-size: 1.6rem;
  color: #1a2332;
}
    /* ===============================
   ABOUT
=============================== */
.author-profile {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  
}

.author-photo img {
  width: 100%;
  max-width: 240px;
  border-radius: 12px;
}

.social-links {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--accent);
}

.social-links svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* =====================================================
   PAGE 404
===================================================== */
.page-404 {
  text-align: center;
  padding: 60px 24px;
}

.page-404 h1 {
  font-size: 5rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-404 p {
  font-size: 1.1rem;
  color: #888;
  margin-bottom: 24px;
}

.page-404 a {
  color: var(--accent);
  text-decoration: underline;
}

/* =====================================================
   LESSON SUMMARY
===================================================== */
.lesson-summary {
  margin: 28px 0;
  padding: 20px 24px;
  background: transparent;
}

.lesson-summary h3 {
  margin-top: 0;
  color: #1a2332;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lesson-summary ul {
  margin: 12px 0 0 20px;
}

.lesson-summary li {
  margin-bottom: 8px;
}

/* =====================================================
   TARJETA DE ACORDES
===================================================== */
.accordion {
  position: relative;
}

.accordion summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #1a2332;
  padding: 8px 0;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.2s;
  color: #c9a052;
}

.accordion[open] summary::before {
  transform: rotate(90deg);
}

/* =====================================================
   RESPONSIVE GENERAL
===================================================== */
@media (max-width: 768px) {
  .page {
    margin: 12px;
    padding: 20px;
  }

  .page h1 {
    font-size: 1.6rem;
  }

  .page h2 {
    font-size: 1.3rem;
  }

  .author-profile {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* =====================================================
   Estilo para enlaces de "About" y "Política" en footer
===================================================== */
.footer-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: #5a5a5a;
  text-decoration: none;
  transition: 0.2s;
}
.footer-nav a:hover {
  color: #c9a052;
}

/* =====================================================
   SECCIÓN HEADER RESPONSIVE
===================================================== */
@media (max-width: 600px) {
  .topbar {
    padding: 6px 10px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .page {
    padding: 16px;
  }
  .page h1 {
    font-size: 1.4rem;
  }
  .sidebar {
    width: 240px;
  }
  .app {
    margin-left: 0;
  }
}

/* =====================================================
   SECTION SEPARATOR – RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  .section-separator-teclado {
    margin: 8px 0;
  }
}

/* =====================================================
   AJUSTES ADICIONALES
===================================================== */
.responsive-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
}

.responsive-table table {
  min-width: 500px;
}

/* =====================================================
   IFrame responsive
===================================================== */
.iframe-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 20px 0;
  border-radius: 12px;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =====================================================
   REFERENCE BLOCK
===================================================== */
.reference-block {
  background: var(--panel);
  padding: 20px;
  margin: 30px 0;
  border-radius: 6px;
}

/* =====================================================
   ANIMACIONES
===================================================== */


/* =====================================================
   SWITCH – Alternar entre secciones
===================================================== */
.seccion {
  display: none;
}

.seccion.activa {
  display: block;
}

/* =====================================================
   ACTIVIDADES
===================================================== */
.actividad {
  margin: 24px 0;
  padding: 20px;
  background: var(--panel);
  border-radius: 12px;
  border-left: 4px solid #c9a052;
}

.actividad h3 {
  margin-top: 0;
  color: #1a2332;
}

.actividad label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

.actividad input,
.actividad select,
.actividad textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

.actividad button {
  margin-top: 12px;
  background: #c9a052;
  color: #fff;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

.actividad button:hover {
  background: #b8922e;
}

.feedback {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
}

.feedback.ok {
  background: #d4edda;
  color: #155724;
}

.feedback.error {
  background: #f8d7da;
  color: #721c24;
}

/* =====================================================
   SUBRAYADO ANIMADO (para hover links)
===================================================== */
.underline-anim {
  display: inline-block;
  position: relative;
}

.underline-anim::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: #c9a052;
  transition: width 0.3s;
}

.underline-anim:hover::after {
  width: 100%;
}

/* ===============================
   LESSON NAV (Anterior / Siguiente)
   Design matching .interval-links
================================ */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.lesson-nav a {
  text-decoration: none;
  padding: 11px 32px;
  border: 1px solid rgba(201, 160, 82, 0.5);
  background: transparent;
  color: #c9a052;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  transition: all 0.3s ease;
}

.lesson-nav a:hover {
  background: #c9a052;
  color: #1a2332;
  border-color: #c9a052;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.lesson-nav a:only-child {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .lesson-nav {
    justify-content: center;
  }

  .lesson-nav a {
    flex: 1 1 45%;
    text-align: center;
  }
}

/* HELP MODAL */
.help-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  background: #fff;
  border: 2px solid rgba(201,160,82,0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: #c9a052;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.help-btn:hover {
  background: #c9a052;
  color: #1a2332;
  border-color: #c9a052;
}

.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.help-overlay.open {
  display: flex;
}

.help-modal {
  background: #fff;
  border-radius: 12px;
  max-width: 520px;
  width: 90%;
  padding: 36px 32px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}

.help-modal .close-modal {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.help-modal .close-modal:hover {
  color: #333;
}

.help-modal h2 {
  margin: 0 0 20px;
  color: #1a2332;
  font-size: 1.3rem;
}

.help-modal ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-modal ul li {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

.help-modal ul li:last-child {
  border-bottom: none;
}

.help-modal ul li strong {
  color: #c9a052;
}
