/* ============================================================
   ACADEMIA RAICES — styles.css
   Paleta: #50a41b (verde) · #000000 (negro) · #ffffff (blanco) · #f1e6b7 (crema)
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --verde: #50a41b;
  --verde-oscuro: #3f8a16;
  --verde-claro: #e6f3da;
  --negro: #0e0e0e;
  --blanco: #ffffff;
  --crema: #f1e6b7;
  --gris: #5a5a5a;
  --gris-claro: #e8e8e8;
  --verde-wsp: #25D366;

  --sombra: 0 12px 34px rgba(0, 0, 0, 0.10);
  --sombra-suave: 0 6px 18px rgba(0, 0, 0, 0.06);
  --radio: 18px;
  --trans: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--negro);
  background: var(--blanco);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }

.container { width: min(1140px, 92%); margin: 0 auto; }

section { position: relative; }

::selection { background: var(--verde); color: var(--blanco); }

/* ---------- Utilidades ---------- */
.tag {
  display: inline-block;
  color: var(--verde);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: 0.6rem;
}

.sec-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.sec-head h3 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.2;
}
.sec-head p { color: var(--gris); margin-top: 0.7rem; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--trans), border-color var(--trans);
}
.navbar.scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--gris-claro);
}
.navbar .container {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 0;
}
.logo { display: flex; align-items: center; gap: 0.7rem; }
.logo-img {
  width: 48px; height: 48px; border-radius: 12px; object-fit: cover;
  border: 2px solid var(--verde);
  transition: transform var(--trans);
}
.logo:hover .logo-img { transform: rotate(-4deg) scale(1.05); }
.logo-texto {
  display: flex; flex-direction: column; line-height: 1.15;
}
.logo-texto strong {
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.3px;
}
.logo-texto strong em {
  font-style: normal; color: var(--verde);
}
.logo-ubicacion {
  font-size: 0.72rem; font-weight: 600; color: var(--gris);
  letter-spacing: 0.2px;
}

.nav-links { display: flex; gap: 1.6rem; font-weight: 600; font-size: 0.95rem; }
.nav-links a { position: relative; padding: 0.3rem 0; transition: color var(--trans); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 3px; border-radius: 3px;
  background: var(--verde);
  transition: width var(--trans);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover, .nav-links a.active { color: var(--verde); }

.btn-nav { display: none; }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 42px; height: 42px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px;
  border-radius: 2px; background: var(--negro);
  transition: transform var(--trans), opacity var(--trans);
}
.nav-toggle.abierto span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.abierto span:nth-child(2) { opacity: 0; }
.nav-toggle.abierto span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--verde); color: var(--blanco) !important;
  font-weight: 700; padding: 0.85rem 1.8rem;
  border-radius: 50px; font-size: 0.98rem; border: none; cursor: pointer;
  transition: transform var(--trans), background var(--trans), box-shadow var(--trans);
  box-shadow: 0 6px 18px rgba(80, 164, 27, 0.35);
}
.btn:hover {
  background: var(--verde-oscuro);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(80, 164, 27, 0.45);
}
.btn:active { transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--verde) !important;
  border: 2px solid var(--verde); box-shadow: none;
}
.btn-outline:hover { background: var(--verde); color: var(--blanco) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 4.5rem 0;
  background: linear-gradient(160deg, var(--blanco) 0%, var(--verde-claro) 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; right: -140px; top: -140px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(80, 164, 27, 0.18), transparent 70%);
  border-radius: 50%;
  animation: flotar-bg 9s ease-in-out infinite;
}
.hero::after {
  content: "";
  position: absolute; left: -120px; bottom: -160px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(241, 230, 183, 0.8), transparent 70%);
  border-radius: 50%;
  animation: flotar-bg 11s ease-in-out infinite;
  animation-delay: -3s;
}
.hero .container {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem; align-items: center;
}
.hero-texto h2 {
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 800; line-height: 1.12; margin: 0.8rem 0;
}
.hero-texto h2 .resalta { color: var(--verde); position: relative; white-space: nowrap; }
.hero-texto h2 .resalta::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 6px;
  height: 10px; background: rgba(80, 164, 27, 0.22);
  z-index: -1; border-radius: 4px;
}
.hero-texto p {
  margin-bottom: 1.9rem; color: var(--gris); font-size: 1.06rem; max-width: 480px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--blanco); border: 1px solid var(--verde);
  padding: 0.45rem 1.1rem; border-radius: 50px;
  font-weight: 600; font-size: 0.85rem;
  animation: flotar 4s ease-in-out infinite;
  box-shadow: var(--sombra-suave);
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-imagen {
  position: relative;
  animation: flotar-suave 6s ease-in-out infinite;
}
.hero-imagen img {
  width: 100%; height: 460px;
  border-radius: 26px;
  box-shadow: var(--sombra);
  object-position: center;
}
.hero-imagen::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 26px;
  pointer-events: none;
}

/* ---------- Slider del hero ---------- */
.hero-slider {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
}
.hero-slides {
  position: relative;
  width: 100%;
  height: 460px;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  pointer-events: none;
}
.hero-slide.activo {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-controles {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  z-index: 3;
}
.hero-btn {
  width: 38px; height: 38px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--verde);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transition: background var(--trans), transform var(--trans);
}
.hero-btn:hover {
  background: var(--verde);
  color: var(--blanco);
  transform: scale(1.1);
}
.hero-dots {
  display: flex;
  gap: 0.45rem;
}
.hero-dot {
  width: 9px; height: 9px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
  transition: background var(--trans), width var(--trans);
}
.hero-dot.activo {
  background: var(--blanco);
  width: 22px;
  border-radius: 6px;
}

.hero-pausa {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--blanco);
  font-size: 0.9rem;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--trans);
}
.hero-pausa:hover { background: rgba(0, 0, 0, 0.7); }

@media (max-width: 900px) {
  .hero-slides { height: 340px; }
}
.hero-stats {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem; margin-top: 2rem;
}
.stat {
  text-align: center;
  background: var(--blanco);
  border: 1px solid var(--gris-claro);
  border-radius: 14px; padding: 0.9rem 0.5rem;
  transition: transform var(--trans), box-shadow var(--trans);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--sombra-suave); }
.stat .num { font-size: 1.7rem; font-weight: 800; color: var(--verde); }
.stat .lab { font-size: 0.72rem; color: var(--gris); text-transform: uppercase; letter-spacing: 0.7px; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-imagen img { height: 340px; }
}

/* ---------- Programas ---------- */
.programas { padding: 5rem 0 5.5rem; background: var(--blanco); }
.program-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
@media (max-width: 820px) { .program-grid { grid-template-columns: 1fr; } }

.prog-card {
  position: relative;
  background: var(--blanco);
  border: 2px solid var(--gris-claro);
  border-radius: var(--radio);
  padding: 2.2rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.prog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sombra);
  border-color: var(--verde);
}
.prog-card.destacado { border-color: var(--verde); }
.prog-card.destacado::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px; border-radius: 16px 16px 0 0;
  background: var(--verde);
}
.badge-dest {
  position: absolute; top: -14px; left: 1.4rem;
  background: var(--verde); color: var(--blanco);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1px;
  padding: 0.3rem 0.9rem; border-radius: 50px;
  box-shadow: 0 4px 12px rgba(80, 164, 27, 0.35);
}
.prog-icon {
  width: 58px; height: 58px; border-radius: 14px;
  background: var(--crema); display: grid; place-items: center;
  font-size: 1.7rem;
  transition: transform var(--trans), background var(--trans);
}
.prog-card:hover .prog-icon { transform: rotate(-6deg) scale(1.08); background: var(--verde-claro); }
.prog-card h4 { font-size: 1.3rem; font-weight: 700; }
.prog-card p { color: var(--gris); font-size: 0.95rem; }
.prog-card ul { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.93rem; }
.prog-card li { display: flex; align-items: center; gap: 0.55rem; }
.prog-card li::before {
  content: "✔";
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--verde-claro); color: var(--verde);
  font-size: 0.65rem; font-weight: 800;
}
.prog-card .btn { align-self: flex-start; margin-top: 0.4rem; }

/* ---------- Cursos ---------- */
.cursos {
  position: relative;
  padding: 5rem 0 6rem;
  background: linear-gradient(140deg, var(--verde-claro) 0%, var(--verde) 130%);
  overflow: hidden;
}

/* Encabezado compacto del bloque */
.cursos-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.6rem;
}
.cursos-head .tag { color: var(--negro); opacity: 0.75; }
.cursos-head h3 { color: var(--negro); font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 800; }
.cursos-head p {
  color: var(--negro);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.85;
}

/* Blobs orgánicos de fondo */
.cursos-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.22;
  filter: blur(8px);
}
.cursos-blob-a {
  width: 340px; height: 340px;
  top: -110px; right: -80px;
  background: var(--blanco);
}
.cursos-blob-b {
  width: 280px; height: 280px;
  bottom: -90px; left: -100px;
  background: var(--crema);
}
.cursos-blob-c {
  width: 190px; height: 190px;
  top: 30%; left: 6%;
  background: var(--blanco);
  opacity: 0.14;
}

/* Rejilla equilibrada 2x2 */
.curso-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 820px) { .curso-grid { grid-template-columns: 1fr; gap: 1.3rem; } }

.curso-card {
  --radio-curso: 30px;
  position: relative;
  display: flex;
  gap: 1.2rem;
  align-items: center;
  background: var(--blanco);
  border-radius: var(--radio-curso);
  padding: 1.7rem 1.9rem;
  overflow: hidden;
  box-shadow: var(--sombra);
  transition: transform var(--trans), box-shadow var(--trans);
}
.curso-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}
/* Formas orgánicas internas (círculos y curvas de color) */
.curso-card::before {
  content: "";
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  bottom: -50px; right: -35px;
  background: var(--verde-claro);
  transition: transform var(--trans);
  z-index: 0;
}
.curso-card::after {
  content: "";
  position: absolute;
  width: 170px; height: 170px;
  border: 1px dashed rgba(80, 164, 27, 0.3);
  border-radius: 50%;
  top: -80px; left: -60px;
  z-index: 0;
}
.curso-card:hover::before { transform: scale(1.3); }

.curso-circulo {
  flex: 0 0 auto;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--verde);
  color: var(--blanco);
  display: grid; place-items: center;
  font-size: 1.7rem;
  box-shadow: 0 10px 22px rgba(80, 164, 27, 0.4);
  transition: transform var(--trans), background var(--trans);
  position: relative;
  z-index: 1;
}
.curso-card:hover .curso-circulo {
  transform: rotate(-8deg) scale(1.1);
  background: var(--verde-oscuro);
}

.curso-contenido {
  position: relative;
  z-index: 1;
}
.curso-contenido h4 { font-size: 1.12rem; font-weight: 800; }
.curso-contenido p { font-size: 0.86rem; color: var(--gris); margin-top: 0.35rem; }

.curso-num {
  position: absolute;
  top: 12px; right: 18px;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(80, 164, 27, 0.14);
  transition: color var(--trans), transform var(--trans);
  z-index: 0;
}
.curso-card:hover .curso-num {
  color: rgba(80, 164, 27, 0.35);
  transform: scale(1.08);
}

/* ---------- Universidades ---------- */
.unis { padding: 5rem 0 5.5rem; background: var(--blanco); }
.uni-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem;
}
@media (max-width: 1024px) { .uni-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .uni-grid { grid-template-columns: 1fr; } }

.uni-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid var(--gris-claro); border-radius: var(--radio);
  padding: 2rem 1.2rem; text-align: center; min-height: 180px;
  background: var(--blanco);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.uni-card:hover {
  transform: translateY(-6px);
  border-color: var(--verde);
  box-shadow: var(--sombra);
}
.uni-logo {
  width: 84px; height: 84px;
  border-radius: 14px;
  display: grid; place-items: center;
  transition: transform var(--trans);
}
.uni-card:hover .uni-logo { transform: scale(1.12); }
.uni-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.uni-card h4 { font-weight: 700; font-size: 1rem; margin-top: 0.8rem; letter-spacing: 0.3px; }
.uni-card p { font-size: 0.78rem; color: var(--gris); }

/* ---------- Cuadro de Honor ---------- */
.honor {
  padding: 5rem 0 5.5rem;
  background: linear-gradient(180deg, var(--negro) 0%, #1a1a1a 100%);
  color: var(--blanco);
}
.honor .sec-head p { color: #b9b9b9; }
.honor .tag { color: var(--crema); }

.honor-banner {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.honor-banner img {
  width: 100%; height: 300px;
  object-position: center 40%;
  transition: transform 0.6s ease;
}
.honor-banner:hover img { transform: scale(1.04); }
.honor-banner .capa {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  display: flex; align-items: flex-end;
  padding: 1.4rem 1.8rem;
}
.honor-banner .capa span {
  font-weight: 700; font-size: 1rem;
  background: rgba(80, 164, 27, 0.9);
  color: var(--blanco); padding: 0.3rem 1rem; border-radius: 50px;
}

.honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
@media (max-width: 560px) { .honor-grid { grid-template-columns: 1fr; } }

.honor-card {
  background: #171717;
  border: 1px solid #333;
  border-radius: var(--radio);
  padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  transition: transform var(--trans), border-color var(--trans), background var(--trans);
}
.honor-card:hover {
  transform: translateY(-8px);
  border-color: var(--verde);
  background: #1e1e1e;
}
.honor-foto {
  width: 74px; height: 74px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--verde);
  transition: transform var(--trans);
}
.honor-foto img { width: 100%; height: 100%; }
.honor-card:hover .honor-foto { transform: scale(1.08); }
.honor-card .estrellas { color: var(--verde); font-size: 0.95rem; letter-spacing: 2px; }
.honor-card h4 { font-size: 1.1rem; font-weight: 700; }
.honor-card .carrera { color: var(--crema); font-weight: 600; font-size: 0.9rem; }
.honor-card blockquote { font-size: 0.82rem; color: #b9b9b9; font-style: italic; }

/* ---------- Contacto ---------- */
.contacto {
  position: relative;
  padding: 5.5rem 0;
  background: var(--verde);
  color: var(--blanco);
  text-align: center;
  overflow: hidden;
}
.contacto::before {
  content: "";
  position: absolute; left: -80px; bottom: -120px;
  width: 300px; height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.contacto::after {
  content: "";
  position: absolute; right: -80px; top: -120px;
  width: 300px; height: 300px;
  background: rgba(0, 0, 0, 0.10);
  border-radius: 50%;
}
.contacto .container { position: relative; z-index: 2; }
.contacto h3 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; }
.contacto p { max-width: 560px; margin: 0.9rem auto 2rem; opacity: 0.95; }
.contacto .btn { background: var(--blanco); color: var(--verde) !important; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2); }
.contacto .btn:hover { background: var(--crema); transform: translateY(-3px); }
.contacto .mini { margin-top: 1.3rem; font-size: 0.85rem; opacity: 0.92; }

/* ---------- Footer ---------- */
footer { background: var(--negro); color: #b9b9b9; padding: 2.4rem 0; font-size: 0.88rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #222;
  margin-bottom: 1.6rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; } }
footer h4 { color: var(--blanco); font-size: 1rem; margin-bottom: 0.9rem; }
.footer-desc { margin-top: 0.8rem; font-size: 0.88rem; max-width: 300px; }
.footer-contact { margin-top: 0.8rem; font-size: 0.85rem; }
footer .marca { display: flex; align-items: center; gap: 0.6rem; color: var(--blanco); font-weight: 800; }
footer .marca .accent { color: var(--verde); }
footer .marca img { width: 42px; height: 42px; border-radius: 10px; }
footer ul { display: flex; flex-direction: column; gap: 0.45rem; }
footer ul a { transition: color var(--trans); }
footer ul a:hover { color: var(--verde); }
.footer-sociales { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.footer-sociales a {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #222;
  color: var(--blanco);
  font-size: 0.95rem; font-weight: 700;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
}
.footer-sociales a:hover {
  background: var(--verde);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 18px rgba(80, 164, 27, 0.4);
}
.footer-bot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
.footer-bot a { color: var(--crema); }

/* ---------- Flotantes ---------- */
.flotante-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 0.8rem; align-items: center; }
.flotante-wsp, .flotante-top {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--blanco);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform var(--trans), background var(--trans);
}
.flotante-wsp { background: var(--verde-wsp); font-size: 1.8rem; animation: pulso 2.4s infinite; }
.flotante-wsp:hover { transform: scale(1.1); }
.flotante-top {
  display: none;
  background: var(--verde); font-size: 1.3rem;
  cursor: pointer;
}
.flotante-top.visible { display: grid; animation: aparecer 0.4s ease; }
.flotante-top:hover { background: var(--negro); }

/* ---------- Reveal on scroll ----------
   El contenido NUNCA desaparece: sin JS, sin animación o en cualquier
   estado de carga siempre se ve. La animación (un sutil deslizamiento,
   SIN cambi de opacidad) se aplica cuando el JS marca el bloque visible.
   Esto evita la desaparición por el factor opacidad. */

.reveal { opacity: 1; transform: none; }

html.js .reveal.visible {
  animation: revealEntrada 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes revealEntrada {
  from { transform: translateY(26px); }
  to   { transform: translateY(0); }
}

/* ---------- Animaciones ---------- */
@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes flotar-suave {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-14px) rotate(0.5deg); }
}
@keyframes flotar-bg {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
@keyframes pulso {
  0% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes aparecer {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Preferencia reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Table / Mobile ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 0; right: -100%;
    flex-direction: column;
    width: min(280px, 80%);
    height: 100vh;
    background: var(--blanco);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
    padding: 5.5rem 2rem 2rem;
    gap: 1.4rem;
    transition: right 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 50;
    font-size: 1.05rem;
  }
  .nav-links.abierto { right: 0; }
  .nav-links::before {
    content: "";
    position: absolute; top: 1.2rem; left: 1.2rem;
    width: 44px; height: 44px; border-radius: 12px;
    background: url("../Images/logo/Logo de la academia.jpg") center/cover no-repeat;
    border: 2px solid var(--verde);
  }
  .nav-toggle { display: flex; position: relative; z-index: 60; }
  .btn-nav { display: inline-block; padding: 0.55rem 1.1rem; font-size: 0.85rem; }
}

/* ============================================================
   BOTÓN PARA CAMBIAR DE TEMA (claro / oscuro)
   ============================================================ */
.btn-theme {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gris-claro);
  background: var(--blanco);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: border-color var(--trans), transform var(--trans), background var(--trans);
}
.btn-theme:hover {
  border-color: var(--verde);
  transform: rotate(20deg) scale(1.06);
}
.btn-theme .theme-icon { display: none; }

/* En tema claro se muestra la luna (pulsar = pasar a oscuro) */
html[data-tema="claro"] .btn-theme .theme-moon { display: block; }
/* En tema oscuro se muestra el sol (pulsar = volver a claro) */
html[data-tema="oscuro"] .btn-theme .theme-sun { display: block; }

@media (max-width: 900px) {
  .btn-theme { width: 42px; height: 42px; font-size: 1.05rem; }
}

/* ============================================================
   TEMA OSCURO — paleta y ajustes específicos
   ============================================================ */
html[data-tema="oscuro"] {
  --verde: #5fbd26;
  --verde-oscuro: #4a9a1d;
  --verde-claro: #16240f;
  --negro: #f5f5f5;
  --blanco: #121a12;
  --crema: #f4e9c5;
  --gris: #aab8a4;
  --gris-claro: #2a3a2a;
  --sombra: 0 12px 34px rgba(0, 0, 0, 0.45);
  --verde-wsp: #25d366;

  color-scheme: dark;
}

html[data-tema="oscuro"] body {
  background: #0c120b;
  color: var(--negro);
}

/* Navbar */
html[data-tema="oscuro"] .navbar {
  background: rgba(18, 26, 18, 0.92);
  border-bottom-color: var(--gris-claro);
}

/* Hero */
html[data-tema="oscuro"] .hero {
  background: linear-gradient(160deg, #0c120b 0%, #16240f 100%);
}
html[data-tema="oscuro"] .hero-badge { background: #16240f; border-color: var(--verde); }

/* Secciones con fondo claro/crema */
html[data-tema="oscuro"] .programas,
html[data-tema="oscuro"] .unis { background: #0c120b; }

html[data-tema="oscuro"] .cursos {
  background: linear-gradient(140deg, #13200f 0%, #1d3a12 130%);
}

/* Tarjetas */
html[data-tema="oscuro"] .prog-card,
html[data-tema="oscuro"] .uni-card,
html[data-tema="oscuro"] .stat {
  background: #182118;
  border-color: var(--gris-claro);
}
html[data-tema="oscuro"] .curso-card { background: #182118; }
html[data-tema="oscuro"] .curso-card::before { background: #22301c; }
html[data-tema="oscuro"] .curso-num { color: rgba(95, 189, 38, 0.2); }
html[data-tema="oscuro"] .prog-icon { background: #22301c; }

/* Cuadro de honor: ya es oscuro, se mantiene */
html[data-tema="oscuro"] .honor { background: #090c08; }
html[data-tema="oscuro"] .honor-card { background: #121a12; border-color: #26331f; }

/* Footer */
html[data-tema="oscuro"] footer { background: #050805; }
html[data-tema="oscuro"] .footer-sociales a { background: #2a3a2a; color: var(--blanco); }
html[data-tema="oscuro"] .footer-sociales a:hover { background: var(--verde); color: var(--blanco); }

/* Nav menu móvil */
html[data-tema="oscuro"] .nav-links { background: var(--blanco); box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); }

/* Preservar iconos y textos sobre color claro al invertir paleta */
html[data-tema="oscuro"] .btn,
html[data-tema="oscuro"] .btn-nav,
html[data-tema="oscuro"] .flotante-wsp,
html[data-tema="oscuro"] .flotante-top,
html[data-tema="oscuro"] .uni-logo { color: #ffffff; }

html[data-tema="oscuro"] .flotante-top:hover { background: var(--verde-fuerte); }

html[data-tema="oscuro"] .nav-toggle span { background: var(--negro); }