:root {
  --p: #9c6cfe;
  --p2: #b98dff;
  --p3: #7340f5;
  --dark: #1a1528;
  --dark2: #221c34;
  --dark3: #2c2440;
  --glass: rgba(156,108,254,0.09);
  --glass2: rgba(255,255,255,0.04);
  --text: #f0eeff;
  --muted: #9b93bb;
  --error: #ef4444;
  --success: #0ce93c;

  /* Altura reservada para el nav fijo: la usan scroll-margin y el JS */
  --nav-h: 130px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Aileron', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
}

/* Respeta la configuración del usuario si prefiere menos animaciones */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1, h2, h3, h4 { font-family: 'Aileron', 'Helvetica Neue', Helvetica, sans-serif; line-height: 1.1; }

img, svg { max-width: 100%; }

::selection { background: rgba(156,108,254,0.35); color: var(--text); }

/* Indicador de foco: solo visible cuando se navega con teclado.
   Es el anillo por defecto de todo el sitio; las reglas puntuales que vienen
   más abajo solo agregan color o movimiento encima de este. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 2px; }

/* Al navegar por #ancla el titulo no queda tapado por el nav fijo */
section[id] { scroll-margin-top: var(--nav-h); }

/* Campo trampa antispam: invisible para personas, visible para bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--p); border-radius: 2px; }

/* Enlace para saltar al contenido (accesibilidad) */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--p);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* ─── CONTENEDOR PRINCIPAL ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ─── TÍTULOS DE SECCIÓN ─── */
.section-header {
  text-align: center;
  margin: 0 auto 56px auto;
  max-width: 600px; 
}

.section-tag { 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  font-size: 11px; 
  letter-spacing: 2px; 
  text-transform: uppercase; 
  color: var(--p); 
  font-weight: 700; 
  margin-bottom: 16px; 
  justify-content: center;
}
.section-tag::before { content: ''; width: 20px; height: 1px; background: var(--p); }

h2.section-title { 
  font-size: clamp(36px, 4vw, 56px); 
  font-weight: 800; 
  letter-spacing: -2px; 
  margin-bottom: 16px; 
}

.section-sub { 
  color: var(--muted); 
  font-size: 17px; 
  line-height: 1.7; 
  font-weight: 300; 
  margin: 0; 
  text-align: center;
}

/* ─── BARRA DE NAVEGACIÓN ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
  padding: 20px 60px;
  backdrop-filter: blur(20px);
  background: rgba(26,21,40,0.75);
  border-bottom: 1px solid rgba(156,108,254,0.12);
  /* Transicion acotada a lo que realmente cambia (animar "all" fuerza recalculos de mas) */
  transition: padding .3s ease, background .3s ease;
}
nav.nav-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(26,21,40,0.92);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 90px; width: auto; display: block; }

.nav-links { display: flex; gap: 36px; list-style: none; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.5px; transition: color .2s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }
.nav-links a.active { color: var(--p2); }

.nav-cta {
  background: var(--p); color: #fff;
  border: none; padding: 10px 24px; border-radius: 100px;
  font-family: 'Aileron', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; letter-spacing: 0.3px;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--p2); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(156,108,254,0.35); }

/* ─── MENÚ EN ESCRITORIO ───
   Va en su propio min-width para no pisarse con el bloque móvil de más abajo,
   que comparte las mismas clases. */
@media (min-width: 1025px) {
  /* .nav-links NO debe ser flex acá: su único hijo visible es el <ul>. Si es
     flex, envuelve al <ul> en una segunda caja y aparecen dos filas de enlaces
     superpuestas. */
  .nav-links {
    display: block;
    gap: 0;
  }

  .mobile-menu-list {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .mobile-menu-list li { margin: 0; }

  .mobile-menu-link {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color .2s;
  }

  .mobile-menu-link:hover,
  .mobile-menu-link:focus-visible { color: var(--text); }
  .mobile-menu-link.active { color: var(--p2); }

  /* Los iconos, los separadores y el CTA del panel son exclusivos del móvil */
  .mobile-menu-icon,
  .mobile-menu-sep,
  .mobile-menu-footer { display: none; }

  /* En escritorio las tarjetas de testimonio no necesitan mínimos */
  .testi-card { min-width: 0; min-height: auto; }
}

/* Botón hamburguesa (solo visible en móvil) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
  position: relative;
}
.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── SECCIÓN PRINCIPAL (HERO) ─── */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 120px 60px 80px; position: relative; overflow: hidden; text-align: center;
}

.hero-content { position: relative; z-index: 2; }

.bg-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.orb1 { width: 600px; height: 600px; background: rgba(156,108,254,0.22); top: -100px; right: -150px; animation: float1 8s ease-in-out infinite; }
.orb2 { width: 400px; height: 400px; background: rgba(115,64,245,0.18); bottom: -50px; left: -100px; animation: float2 10s ease-in-out infinite; }
.orb3 { width: 300px; height: 300px; background: rgba(185,141,255,0.12); top: 50%; left: 50%; transform: translate(-50%,-50%); animation: float3 7s ease-in-out infinite; }

@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,20px) scale(1.05); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(20px,-30px); } }
@keyframes float3 { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.1); } }

.grid-3d {
  position: absolute; bottom: 0; left: 50%; width: 900px; height: 300px;
  background: repeating-linear-gradient(90deg, rgba(156,108,254,0.09) 0px, rgba(156,108,254,0.09) 1px, transparent 1px, transparent 60px),
  repeating-linear-gradient(0deg, rgba(156,108,254,0.09) 0px, rgba(156,108,254,0.09) 1px, transparent 1px, transparent 60px);
  transform-origin: bottom center; transform: translateX(-50%) perspective(400px) rotateX(60deg);
  opacity: 0.5; pointer-events: none;
}

.float-el {
  position: absolute; pointer-events: none;
  border: 1px solid rgba(156,108,254,0.3);
  backdrop-filter: blur(10px); background: rgba(156,108,254,0.07);
}
.fe1 { width: 80px; height: 80px; border-radius: 16px; top: 18%; left: 8%; transform: rotate(15deg); animation: floatEl1 6s ease-in-out infinite; }
.fe2 { width: 50px; height: 50px; border-radius: 50%; top: 30%; right: 10%; animation: floatEl2 8s ease-in-out infinite; }
.fe3 { width: 100px; height: 100px; border-radius: 20px; bottom: 25%; right: 7%; transform: rotate(-20deg); animation: floatEl1 9s ease-in-out infinite reverse; }
.fe4 { width: 40px; height: 40px; bottom: 30%; left: 12%; transform: rotate(45deg); animation: floatEl2 7s ease-in-out infinite; }

@keyframes floatEl1 { 0%,100% { transform: rotate(15deg) translateY(0); } 50% { transform: rotate(15deg) translateY(-16px); } }
@keyframes floatEl2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 100px;
  background: rgba(156,108,254,0.12); border: 1px solid rgba(156,108,254,0.3);
  font-size: 12px; color: var(--p2); letter-spacing: 1px; font-weight: 600;
  text-transform: uppercase; margin-bottom: 28px; position: relative; z-index: 2;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--p); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.4); } }

.hero-title { font-size: clamp(52px, 7vw, 96px); font-weight: 800; line-height: 1; letter-spacing: -3px; margin-bottom: 24px; position: relative; z-index: 2; }
.hero-title .line2 { color: var(--p); display: block; }
.hero-title .thin { font-weight: 300; font-style: italic; color: var(--muted); }

.hero-sub { margin: 0 auto 48px; font-size: 17px; color: var(--muted); line-height: 1.7; font-weight: 300; position: relative; z-index: 2; max-width: 500px; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; position: relative; z-index: 2; flex-wrap: wrap; }

.btn-primary { 
  background: var(--p); 
  color: #fff; 
  padding: 14px 36px; 
  border-radius: 100px; 
  font-size: 15px; 
  font-weight: 600; 
  border: none; 
  cursor: pointer; 
  transition: all .25s; 
  font-family: 'Aileron', sans-serif;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--p2);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(156,108,254,0.4);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost { 
  background: transparent; 
  color: var(--text); 
  padding: 14px 36px; 
  border-radius: 100px; 
  font-size: 15px; 
  font-weight: 500; 
  border: 1px solid rgba(255,255,255,0.14); 
  cursor: pointer; 
  transition: all .25s; 
  font-family: 'Aileron', sans-serif;
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--p);
  color: var(--p);
  transform: translateY(-2px);
}

/* ─── ESTILOS COMPARTIDOS ENTRE SECCIONES ─── */
section { padding: 100px 60px; }

/* ─── CÓMO FUNCIONA ─── */
#how { background: var(--dark2); border-top: 1px solid rgba(156,108,254,0.1); border-bottom: 1px solid rgba(156,108,254,0.1); }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.how-steps { display: flex; flex-direction: column; gap: 0; margin-top: 48px; }
.how-step { display: flex; gap: 24px; padding: 28px 0; border-bottom: 1px solid rgba(156,108,254,0.1); transition: all .3s; cursor: default; }
.how-step:last-child { border-bottom: none; }
.how-step:hover { padding-left: 12px; }
.step-num { font-family: 'Aileron', sans-serif; font-size: 42px; font-weight: 800; color: rgba(156,108,254,0.2); min-width: 52px; line-height: 1; transition: color .3s; }
.how-step:hover .step-num { color: var(--p); }
.step-content h4 { font-size: 18px; margin-bottom: 8px; }
.step-content p { color: var(--muted); font-size: 14px; line-height: 1.7; }

.how-visual { perspective: 1000px; }
.card-3d { background: var(--dark3); border: 1px solid rgba(156,108,254,0.2); border-radius: 24px; padding: 36px; transform: rotateY(-12deg) rotateX(6deg); transform-style: preserve-3d; transition: transform .5s; box-shadow: 30px 30px 60px rgba(0,0,0,0.4), 0 0 60px rgba(156,108,254,0.12); }
.card-3d:hover { transform: rotateY(-4deg) rotateX(2deg); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.card-dot { width: 10px; height: 10px; border-radius: 50%; }
.cd1 { background: #ff5f57; } .cd2 { background: #febc2e; } .cd3 { background: #28c840; }
.card-dots { display: flex; gap: 6px; }
.card-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.lesson-item { background: var(--glass); border: 1px solid rgba(156,108,254,0.15); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.lesson-icon { display: flex; color: var(--p2); }
.lesson-icon svg { width: 20px; height: 20px; display: block; }
.lesson-info { flex: 1; }
.lesson-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.lesson-badge { font-size: 10px; padding: 3px 10px; border-radius: 100px; font-weight: 700; letter-spacing: 0.5px; }
.lb-live { background: rgba(156,108,254,0.2); color: var(--p2); }
.lb-done { background: rgba(40,200,64,0.15); color: var(--success); }
.lb-soon { background: rgba(255,255,255,0.07); color: var(--muted); }

/* ─── CURSOS ─── */
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* Columna flex: el párrafo se estira, así las etiquetas y la flecha quedan a la
   misma altura en todas las tarjetas de la fila aunque el texto mida distinto. */
.course-card { background: var(--dark3); border: 1px solid rgba(156,108,254,0.12); border-radius: 20px; padding: 32px; position: relative; overflow: hidden; transition: all .3s; cursor: pointer; display: flex; flex-direction: column; }
.course-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(156,108,254,0.08), transparent); opacity: 0; transition: opacity .3s; }
.course-card:hover { transform: translateY(-6px); border-color: rgba(156,108,254,0.35); box-shadow: 0 24px 60px rgba(156,108,254,0.14); }
.course-card:focus-visible { transform: translateY(-6px); }
.course-card:hover::before { opacity: 1; }
.course-glyph { width: 56px; height: 56px; border-radius: 14px; background: rgba(122, 97, 172, 0.733); border: 1px solid rgba(122, 97, 172, 0.733); display: flex; align-items: center; justify-content: center; color: var(--text); margin-bottom: 24px; transition: all .4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.course-glyph svg { width: 26px; height: 26px; display: block; }
.course-card:hover .course-glyph { transform: translateY(-5px) scale(1.1); filter: drop-shadow(0 0 15px var(--p)); }
.course-card h3 { font-size: 22px; margin-bottom: 10px; }
.course-card p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 24px; flex: 1; }
.course-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.ctag { font-size: 11px; padding: 4px 12px; border-radius: 100px; border: 1px solid rgba(156,108,254,0.25); color: var(--p2); letter-spacing: 0.5px; }
.course-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(156,108,254,0.3); display: flex; align-items: center; justify-content: center; color: var(--p); font-size: 16px; transition: all .2s; align-self: flex-end; }
.course-card:hover .course-arrow { background: var(--p); color: #fff; border-color: var(--p); }
.course-card.featured { background: linear-gradient(135deg, rgba(156,108,254,0.16), rgba(115,64,245,0.08)); border-color: rgba(156,108,254,0.4); }

/* Distintivo de la tarjeta destacada: va arriba a la derecha, a la altura del
   glifo, así que no le quita ancho al título que viene más abajo. */
.course-badge {
  position: absolute;
  top: 32px;
  right: 32px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(156,108,254,0.18);
  border: 1px solid rgba(156,108,254,0.45);
  color: var(--p2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
}

/* ─── MODALIDADES ─── */
#modalidades { background: var(--dark2); }
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(156,108,254,0.1); border-radius: 20px; overflow: hidden; margin-top: 60px; }
.mod-item { background: var(--dark2); padding: 48px 40px; text-align: center; transition: background .3s; }
.mod-item:hover { background: var(--dark3); }
.mod-icon { display: block; margin-bottom: 24px; color: var(--p); }
.mod-icon svg { width: 40px; height: 40px; display: inline-block; }
.mod-item h3 { font-size: 22px; margin-bottom: 12px; }
.mod-item p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.mod-detail { margin-top: 20px; font-size: 12px; color: var(--p); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* ─── EQUIPO DOCENTE ─── */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
    justify-content: center;
    gap: 40px;
}
.staff-card {
    background: var(--dark3);
    border: 1px solid rgba(156,108,254,0.1);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}

.staff-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--p), transparent);
    transform: scaleX(0);
    transition: transform .3s;
}

.staff-card:hover {
    transform: translateY(-8px);
    border-color: rgba(156,108,254,0.3);
}

.staff-card:hover::after {
    transform: scaleX(1);
}

.staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
}

.staff-avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--p), transparent);
    z-index: -1;
}

.staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 50%;
    display: block;
}


.staff-card h4 {
    font-size: 18px;
    margin-bottom: 6px;
}

.staff-role {
    font-size: 12px;
    color: var(--p2);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-weight: 700;
}

.staff-bio {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
}

.staff-flags {
    margin-top: 16px;
}

.staff-flags img {
    width: 25px;
    height: auto;
}

/* ─── TESTIMONIOS ─── */
#testimonios { 
  background: var(--dark2); 
  overflow: hidden; 
  padding-bottom: 100px;
}

.testi-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 60px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Degradados laterales que disimulan la entrada y salida de las tarjetas */
.testi-slider::before,
.testi-slider::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.testi-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--dark2) 0%, transparent 100%);
}
.testi-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--dark2) 0%, transparent 100%);
}

.testi-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 20px 0;
}

.testi-card { 
  background: var(--dark3); 
  border: 1px solid rgba(156,108,254,0.1); 
  border-radius: 20px; 
  padding: 32px; 
  position: relative; 
  transition: all 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
  width: 350px;
  flex-shrink: 0;
  min-height: 300px;
}

.testi-card:hover {
  border-color: var(--p);
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(156, 108, 254, 0.15);
}

.quote-mark {
  font-size: 64px; 
  line-height: 1; 
  color: rgba(156,108,254,0.25); 
  font-family: 'Aileron', sans-serif; 
  position: absolute; 
  top: 16px; 
  right: 24px; 
}

.testi-stars { 
  color: var(--p); 
  font-size: 14px; 
  margin-bottom: 20px; 
  letter-spacing: 2px; 
}

.testi-text { 
  font-size: 15px; 
  line-height: 1.8; 
  color: #ccc9e8; 
  margin-bottom: 24px; 
  flex-grow: 1;
}

.testi-author { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-top: auto;
}

/* Avatar con las iniciales del alumno */
.author-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(156,108,254,0.15);
  border: 1px solid rgba(156,108,254,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--p2);
}

.author-name { font-size: 14px; font-weight: 700; }
.author-detail { font-size: 12px; color: var(--muted); }

/* ─── PREGUNTAS FRECUENTES ─── */
#faq { background: var(--dark2); }
.faq-inner { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid rgba(156,108,254,0.12); overflow: hidden; }
.faq-q { 
  width: 100%; 
  text-align: left; 
  background: none; 
  border: none; 
  color: var(--text); 
  padding: 24px 0; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  cursor: pointer; 
  font-size: 16px; 
  font-weight: 500; 
  transition: color .2s; 
  gap: 16px; 
  font-family: 'Aileron', sans-serif;
}
.faq-q:hover { color: var(--p2); }
.faq-icon { color: var(--p); font-size: 20px; flex-shrink: 0; transition: transform .3s; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease, padding .3s ease;
}
.faq-a.open { grid-template-rows: 1fr; padding-bottom: 20px; }
.faq-a p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  overflow: hidden;   /* necesario para que el truco de grid-template-rows recorte durante la animacion */
  min-height: 0;
}
.faq-icon.rot { transform: rotate(45deg); }

/* ─── FORMULARIO DE CONTACTO ─── */
#contacto { position: relative; overflow: hidden; }
.contact-orb { position: absolute; width: 500px; height: 500px; border-radius: 50%; filter: blur(120px); background: rgba(156,108,254,0.18); top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.contact-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-title { font-family: 'Aileron', 'Helvetica Neue', sans-serif; font-size: clamp(36px, 4vw, 56px); font-weight: 800; letter-spacing: -2px; margin-bottom: 20px; }
.contact-highlight { color: var(--p); }
.contact-desc { color: var(--muted); font-size: 16px; line-height: 1.8; margin-bottom: 40px; }
.contact-links { display: flex; flex-direction: column; gap: 16px; }
.clink { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; font-size: 15px; transition: color .2s; }
.clink:hover { color: var(--p2); }
/* Misma fila que los enlaces, pero es un dato, no algo clickeable */
.clink-static { cursor: default; }
.clink-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(156,108,254,0.1); border: 1px solid rgba(156,108,254,0.2); display: flex; align-items: center; justify-content: center; color: var(--p2); flex-shrink: 0; transition: background .2s, border-color .2s; }
.clink-icon svg { width: 18px; height: 18px; display: block; }
.clink:hover .clink-icon { background: rgba(156,108,254,0.18); border-color: rgba(156,108,254,0.4); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 700; cursor: pointer; }

.form-field input, .form-field select {
  background: var(--dark3);
  border: 1px solid rgba(156,108,254,0.15);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Aileron', sans-serif;
  font-size: 14px;
  transition: border-color .2s;
  appearance: none;
}

/* En los campos el indicador de foco es el borde, no el anillo */
.form-field input:focus-visible, .form-field select:focus-visible {
  border-color: var(--p);
  outline: none;
}

.form-field input.input-error,
.form-field select.input-error {
  border-color: var(--error);
}

.form-field select option { background: var(--dark3); }
.form-error { 
  font-size: 12px; 
  color: var(--error); 
  min-height: 18px; 
  display: block;
}
.form-message {
  font-size: 14px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  min-height: 18px;
  display: block;
}
.form-message:empty { padding: 0; min-height: 0; }
.form-message.success {
  background: rgba(40, 200, 64, 0.15);
  color: var(--success);
  border: 1px solid rgba(40, 200, 64, 0.3);
}
.form-message.error {
  background: rgba(255, 59, 48, 0.15);
  color: var(--error);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.btn-submit { 
  background: var(--p); 
  color: #fff; 
  border: none; 
  padding: 16px; 
  border-radius: 12px; 
  font-family: 'Aileron', sans-serif; 
  font-size: 15px; 
  font-weight: 600; 
  cursor: pointer; 
  transition: all .25s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:hover:not(:disabled) { 
  background: var(--p2); 
  box-shadow: 0 16px 40px rgba(156,108,254,0.4); 
  transform: translateY(-2px);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-text {
  transition: opacity 0.3s;
}
.btn-submit.loading .btn-text {
  opacity: 0;
}

.btn-loader {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 0;
}
.btn-submit.loading .btn-loader {
  opacity: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── PIE DE PÁGINA ─── */
footer { background: var(--dark2); border-top: 1px solid rgba(156,108,254,0.1); padding: 44px 60px 32px; }

/* Contenido centrado en una columna angosta. El fondo sigue de lado a lado
   (cortarlo dejaría una franja oscura suelta), pero el contenido se agrupa. */
.footer-inner {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo { display: inline-block; }
.footer-logo .logo-img { height: 52px; }

.footer-tagline {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 24px;
}

/* Enlaces en una sola fila horizontal que envuelve si no entra.
   IMPORTANTE: la regla base `nav { position: fixed; top: 0 }` aplica a TODOS
   los <nav>, así que este pie de navegación hay que devolverlo al flujo normal
   o salta al tope de la página encima del navbar. */
.footer-nav {
  position: static;
  padding: 0;
  backdrop-filter: none;
  background: none;
  border: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 28px;
  margin-bottom: 28px;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}

.footer-nav a:hover { color: var(--text); }

.footer-bottom {
  width: 100%;
  border-top: 1px solid rgba(156,108,254,0.08);
  padding-top: 22px;
}

.footer-bottom p { font-size: 13px; color: var(--muted); }

/* ─── PÁGINAS LEGALES (privacidad.html) ─── */
.legal-page {
  padding: calc(var(--nav-h) + 60px) 60px 100px;
}

.legal-inner { max-width: 760px; }

.legal-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.legal-updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 40px;
}

.legal-intro {
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 8px;
}

.legal-page h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 44px 0 14px;
  letter-spacing: -0.5px;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.legal-page p { margin-bottom: 16px; }

.legal-page ul {
  margin: 0 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-page li::marker { color: var(--p); }

.legal-page strong { color: var(--text); font-weight: 700; }

.legal-page a {
  color: var(--p2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page a:hover { color: var(--p); }

.legal-back {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.legal-back-link {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(156,108,254,0.12);
}

/* Nota de privacidad debajo del botón del formulario */
.form-legal {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.form-legal a {
  color: var(--p2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-legal a:hover { color: var(--p); }

/* ANIMACIONES AL HACER SCROLL */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* VENTANA MODAL DE CURSOS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 21, 40, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--dark3);
  border: 1px solid rgba(156, 108, 254, 0.3);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(30px);
  transition: transform 0.3s ease;
  max-height: 90dvh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--text);
  border-radius: 4px;
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(156, 108, 254, 0.12);
  border: 1px solid rgba(156, 108, 254, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p2);
  margin: 0 auto 20px;
}

.modal-icon svg { width: 30px; height: 30px; display: block; }

.modal-content h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.modal-content p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.modal-cta-btn {
  width: 100%;
  padding: 14px 24px;
}

/* DISEÑO ADAPTABLE A MÓVILES Y TABLETS */
@media (max-width: 1024px) {
  :root { --nav-h: 90px; }
  nav { padding: 12px 24px; }
  section { padding: 80px 30px; }
  .how-grid, .contact-grid { grid-template-columns: 1fr; }
  footer { padding: 40px 24px 28px; }
  .staff-grid { grid-template-columns: 1fr 1fr; }
  .courses-grid { grid-template-columns: 1fr 1fr; }
  .mod-grid { grid-template-columns: 1fr; }
  .how-visual { display: none; }
  .testi-card { width: min(85vw, 340px); }
  .logo-img { height: 56px; }

  .hamburger { display: flex; }
  .desktop-cta { display: none; }

  .legal-page { padding: calc(var(--nav-h) + 40px) 24px 80px; }
  .legal-back { font-size: 12px; padding: 9px 16px; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 270px;
    height: 100vh;
    background: var(--dark2);
    border-left: 1px solid rgba(156,108,254,0.2);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
  }

  .nav-links.open { right: 0; }

  /* Lista de links */
  .mobile-menu-list {
    list-style: none;
    flex: 1;
    padding-top: 72px;
    overflow-y: auto;
  }

  .mobile-menu-list li { margin: 0; }

  .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 24px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.2s;
  }

  .mobile-menu-link:hover,
  .mobile-menu-link:focus-visible {
    color: var(--text);
    border-left-color: var(--p);
    background: rgba(156,108,254,0.07);
  }

  .mobile-menu-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(156,108,254,0.08);
    border: 1px solid rgba(156,108,254,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p2);
    flex-shrink: 0;
  }

  .mobile-menu-icon svg { width: 16px; height: 16px; display: block; }

  /* Separador */
  .mobile-menu-sep {
    height: 1px;
    background: rgba(156,108,254,0.1);
    margin: 6px 24px;
  }

  /* CTA al pie */
  .mobile-menu-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(156,108,254,0.1);
  }

  .mobile-menu-cta {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--p);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: 'Aileron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
  }

  .mobile-menu-cta:hover { background: var(--p2); }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 21, 40, 0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 600px) {
  /* Sin blur en pantallas chicas: cuesta caro en GPU */
  nav { backdrop-filter: none; background: rgba(26,21,40,0.92); }
  .courses-grid, .mod-grid, .staff-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-title { letter-spacing: -2px; }
  .section-header { text-align: left; }
  .contact-grid { gap: 40px; }
  .testi-card { width: min(80vw, 300px); }
  .logo-img { height: 48px; }
  .testi-slider::before, .testi-slider::after { width: 50px; }
}

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #9c6cfe;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(156, 108, 254, 0.45);
  z-index: 1000;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}
.wa-float:hover {
  transform: translateY(-5px) scale(1.05);
  background-color: var(--p2);
  box-shadow: 0 14px 36px rgba(156, 108, 254, 0.55);
  color: #fff;
}
@media (max-width: 768px) {
  .wa-float { bottom: 20px; right: 20px; width: 50px; height: 50px; }
  .wa-float svg { width: 25px; height: 25px; }
}