﻿/* ==========================================================
   BIM INGEZA — Hoja de estilos principal
   Paleta: claro y limpio + azul noche + luces RGB (como un teclado gamer)
   + amarillo solo en botones principales.
   Este archivo lo comparten TODAS las páginas del sitio.
   ========================================================== */

:root {
  --amarillo: #FFC400;          /* botones principales y detalles puntuales */
  --amarillo-hover: #E5B000;
  --noche: #0B1745;             /* cabecera, pie de página, títulos */
  --noche-profundo: #050B29;    /* degradados y fondos profundos */
  --azul-vivo: #2F6BFF;         /* hovers y detalles */
  --azul-cian: #19D3FF;

  /* Degradado RGB: recorre todo el espectro y vuelve al inicio (para que el bucle no tenga saltos) */
  --rgb: linear-gradient(90deg, #FF2D55, #FF9F0A, #FFE600, #30E36B, #19D3FF, #2F6BFF, #B026FF, #FF2D55);
  --gris-medio: #4A5780;        /* texto secundario */
  --gris-texto: #1F2A4D;        /* texto normal */
  --fondo: #FFFFFF;
  --fondo-suave: #F1F5FF;       /* franjas alternas de secciones */
  --borde: #DCE4F7;
  --radio: 12px;
  --sombra: 0 2px 12px rgba(20, 40, 120, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--gris-texto);
  background: var(--fondo);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

.contenedor {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

/* ---------- Cabecera / navegación ---------- */
.cabecera {
  background: var(--noche);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--sombra);
}

/* Línea RGB que recorre el borde inferior de la cabecera */
.cabecera::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 8s linear infinite;
}

/* Recorre el degradado RGB de forma continua (sirve para textos, líneas y bordes) */
@keyframes rgb-desliza {
  to { background-position: 200% 0; }
}

.cabecera .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

/* El nombre va liso (sin arcoíris): el color queda solo en el ícono */
.logo .logo-marca {
  color: #C9D6FF;
  font-weight: 400;
  letter-spacing: 3px;
}

/* El ícono es el archivo img/logo-icono.svg (pirámide amarilla con flechas X, Y, Z) */
.logo .logo-icono {
  width: 40px; height: 40px;
  transition: transform 0.3s;
}

.logo:hover .logo-icono { transform: rotate(-6deg) scale(1.08); }

.nav-principal { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* Ojo con la especificidad: ">" limita esto a los botones de PRIMER nivel del menú,
   para que no se filtre dentro de los mega-menús (.mega-item usa su propio estilo). */
.nav-principal > .nav-enlace,
.nav-principal > .nav-mega > .nav-mega-boton {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #D0D9F5;
  text-decoration: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.nav-principal > .nav-enlace:hover,
.nav-principal > .nav-mega > .nav-mega-boton:hover { color: #fff; background: rgba(255, 255, 255, 0.10); }

/* Página activa: subrayado de color, NO relleno (el relleno queda para el botón "Cotizar proyecto") */
.nav-principal > .nav-enlace.activo,
.nav-principal > .nav-mega.activo > .nav-mega-boton {
  color: #fff;
}
.nav-principal > .nav-enlace.activo::after,
.nav-principal > .nav-mega.activo > .nav-mega-boton::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--azul-cian);
  box-shadow: 0 0 8px rgba(25, 211, 255, 0.8);
}

.mega-flecha { font-size: 0.7em; transition: transform 0.15s; }
.nav-mega.abierto .mega-flecha { transform: rotate(180deg); }

/* ----- Mega-menú (Servicios, Software) ----- */
.nav-mega { position: static; }

.mega-panel {
  position: absolute;
  left: 0; right: 0; top: 100%;
  margin-top: 1px;
  background: var(--noche);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 40px rgba(5, 11, 41, 0.45);
  padding: 28px 0 24px;
}

.mega-columnas {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mega-columna h4 {
  color: var(--azul-cian);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.mega-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.mega-item:hover { background: rgba(255, 255, 255, 0.08); }

.mega-icono { font-size: 1.1rem; line-height: 1.3; flex-shrink: 0; }

.mega-texto strong { display: block; color: #fff; font-size: 0.88rem; font-weight: 700; }
.mega-texto small { display: block; color: #A9B7E0; font-size: 0.78rem; line-height: 1.4; margin-top: 2px; }

.mega-ver-todo {
  display: block;
  width: min(1100px, 100% - 32px);
  margin: 18px auto 0;
  color: var(--amarillo);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}
.mega-ver-todo:hover { text-decoration: underline; }

/* ----- Botón CTA (Cotizar proyecto), separado del resto del menú ----- */
.boton-cta-nav { padding: 9px 20px; font-size: 0.9rem; white-space: nowrap; }
.boton-cta-nav.activo { outline: 2px solid #fff; outline-offset: 2px; }

/* ----- Cabecera fija con desenfoque al hacer scroll ----- */
.cabecera { transition: background 0.2s, backdrop-filter 0.2s; }
.cabecera.con-scroll {
  background: rgba(11, 23, 69, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.boton-menu {
  display: none;
  background: none;
  border: 2px solid var(--azul-cian);
  color: var(--azul-cian);
  font-size: 1.3rem;
  border-radius: 8px;
  padding: 2px 10px;
  cursor: pointer;
}

/* ----- Menú de celular: enlaces simples + acordeones para los mega-menús ----- */
.nav-movil { display: none; }

.acordeon-boton {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: none;
  border: none;
  text-align: left;
  padding: 10px 4px;
  cursor: pointer;
}

.acordeon-panel { padding: 4px 4px 12px 12px; display: flex; flex-direction: column; gap: 14px; }
.acordeon-panel[hidden] { display: none; } /* "display:flex" de arriba gana sobre el [hidden] del navegador si no se dice esto */
.acordeon-grupo h5 { color: var(--azul-cian); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.acordeon-item { display: block; color: #D0D9F5; text-decoration: none; font-size: 0.88rem; padding: 5px 0; }
.acordeon-item:hover { color: #fff; }

/* ---------- Botones ---------- */
.boton {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.boton:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(5, 10, 40, 0.25);
}

.boton-amarillo { background: var(--amarillo); color: var(--noche-profundo); }
.boton-amarillo:hover { background: var(--amarillo-hover); }

.boton-oscuro { background: var(--noche); color: #fff; }

.boton-borde {
  border: 2px solid var(--noche);
  color: var(--noche);
}

/* Botón de contorno para usar SOBRE fondos oscuros (héroes, franjas azules) */
.boton-contorno-claro {
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  color: #fff;
}
.boton-contorno-claro:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Héroe (portada) ---------- */
.heroe {
  /* Azul noche con destellos cian y violeta que se desplazan despacio */
  background:
    radial-gradient(circle at 20% 25%, rgba(25, 211, 255, 0.26), transparent 42%),
    radial-gradient(circle at 80% 75%, rgba(176, 38, 255, 0.28), transparent 42%),
    linear-gradient(135deg, var(--noche-profundo) 0%, var(--noche) 100%);
  background-size: 140% 140%, 140% 140%, 100% 100%;
  animation: degradado-vivo 14s ease-in-out infinite alternate;
  color: #fff;
  padding: 88px 0;
  text-align: center;
}

@keyframes degradado-vivo {
  from { background-position: 0% 0%, 100% 100%, 0% 0%; }
  to   { background-position: 100% 100%, 0% 0%, 0% 0%; }
}

.heroe .etiqueta {
  display: inline-block;
  background: rgba(25, 211, 255, 0.12);
  color: var(--azul-cian);
  border: 1px solid var(--azul-cian);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.heroe h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 18px;
}

/* Palabras destacadas con texto RGB animado */
.heroe h1 span,
.franja-cta h2 span {
  background: var(--rgb);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rgb-desliza 8s linear infinite;
}

.heroe p {
  max-width: 640px;
  margin: 0 auto 32px;
  color: #C3CFF2;
  font-size: 1.1rem;
}

.heroe .acciones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Entrada escalonada de la portada al cargar la página */
.heroe .etiqueta,
.heroe h1,
.heroe p,
.heroe .acciones {
  opacity: 0;
  animation: subir-suave 0.7s ease-out forwards;
}

.heroe h1        { animation-delay: 0.15s; }
.heroe p         { animation-delay: 0.30s; }
.heroe .acciones { animation-delay: 0.45s; }

@keyframes subir-suave {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Malla TIN animada (la dibuja js/malla-tin.js) ---------- */
.heroe, .franja-cta {
  position: relative;
  overflow: hidden;
}

.malla-tin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.heroe > .contenedor,
.franja-cta > .contenedor {
  position: relative;
  z-index: 1;
}

/* ---------- Movimiento al hacer scroll (scroll reveal) ---------- */
/* El JavaScript agrega la clase .revelar a tarjetas y títulos,
   y les pone .visible cuando entran en pantalla. */
.revelar {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.revelar.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Si la persona prefiere menos movimiento, se desactiva todo */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .heroe { animation: none; }
  .heroe .etiqueta, .heroe h1, .heroe p, .heroe .acciones { animation: none; opacity: 1; }
  .cabecera::after,
  .heroe h1 span, .franja-cta h2 span,
  .seccion-titulo h2::after, .tarjeta::before, .paso .numero, .pie::before { animation: none; }
  .revelar { opacity: 1; transform: none; transition: none; }
}

/* ---------- Secciones ---------- */
.seccion { padding: 72px 0; }
.seccion-suave { background: var(--fondo-suave); }

.seccion-titulo { text-align: center; margin-bottom: 44px; }

.seccion-titulo .mini {
  color: var(--azul-vivo);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

.seccion-titulo h2 {
  color: var(--noche);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 6px 0 10px;
}

/* Rayita RGB decorativa bajo cada título */
.seccion-titulo h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  border-radius: 4px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 6s linear infinite;
  margin: 12px auto 0;
}

.seccion-titulo p { color: var(--gris-medio); max-width: 620px; margin: 0 auto; }

/* ---------- Tarjetas ---------- */
.rejilla {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tarjeta {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 26px;
  box-shadow: var(--sombra);
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.6s ease-out;
}

/* Barra RGB superior de cada tarjeta */
.tarjeta::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 6s linear infinite;
}

.tarjeta:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.22), 0 0 0 1px rgba(47, 107, 255, 0.35);
}

.tarjeta .icono {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--noche);
  color: var(--azul-cian);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  transition: transform 0.25s, background 0.25s;
}

.tarjeta:hover .icono {
  transform: scale(1.12) rotate(-4deg);
  background: var(--azul-vivo);
}

.tarjeta h3 { color: var(--noche); margin-bottom: 8px; font-size: 1.1rem; }
.tarjeta p { color: var(--gris-medio); font-size: 0.95rem; }

.tarjeta .herramientas {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tarjeta .herramientas span {
  background: var(--fondo-suave);
  border: 1px solid var(--borde);
  color: var(--gris-medio);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

a.tarjeta { text-decoration: none; display: block; }

/* ---------- Pasos (cómo trabajamos) ---------- */
.pasos {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.paso {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 24px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.paso:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
}

.paso .numero {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 6s linear infinite;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  font-weight: 900;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
}

.paso h3 { color: var(--noche); font-size: 1rem; margin-bottom: 6px; }
.paso p { font-size: 0.9rem; color: var(--gris-medio); }

/* ---------- Franja de llamada a la acción ---------- */
.franja-cta {
  background:
    radial-gradient(circle at 85% 20%, rgba(25, 211, 255, 0.22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(176, 38, 255, 0.24), transparent 45%),
    linear-gradient(135deg, var(--noche-profundo), var(--noche));
  color: #fff;
  text-align: center;
  padding: 56px 0;
}

.franja-cta h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
.franja-cta p { color: #C3CFF2; margin-bottom: 24px; }

/* ---------- Redes sociales ---------- */
.rejilla-redes {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tarjeta-red {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--gris-texto);
  box-shadow: var(--sombra);
  transition: transform 0.2s, border-color 0.2s;
}

.tarjeta-red:hover {
  transform: translateY(-4px);
  border-color: var(--azul-vivo);
  box-shadow: 0 8px 22px rgba(47, 107, 255, 0.25);
}

.tarjeta-red .icono-red {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.tarjeta-red strong { display: block; color: var(--noche); }
.tarjeta-red small { color: var(--gris-medio); }

/* Colores oficiales aproximados de cada red */
.red-youtube  .icono-red { background: #FF0000; }
.red-instagram .icono-red { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.red-tiktok   .icono-red { background: #000000; }
.red-facebook .icono-red { background: #1877F2; }
.red-x        .icono-red { background: #14171A; }
.red-whatsapp .icono-red { background: #25D366; }
.red-linkedin .icono-red { background: #0A66C2; }
.red-correo   .icono-red { background: var(--noche); color: var(--azul-cian); }

/* ---------- Aviso "en construcción" ---------- */
.aviso {
  background: #FFF8E1;
  border: 1px solid var(--amarillo);
  border-radius: var(--radio);
  padding: 16px 20px;
  color: #6B5A00;
  font-size: 0.95rem;
}

.aviso a { color: #5A4700; font-weight: 700; }

/* ---------- Pie de página ---------- */
.pie {
  position: relative;
  background: var(--noche-profundo);
  color: #9FB0DE;
  padding: 48px 0 24px;
  margin-top: 0;
}

/* Línea RGB en el borde superior del pie de página */
.pie::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 8s linear infinite;
}

.pie .columnas {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 32px;
}

.pie h4 {
  color: var(--azul-cian);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.pie a {
  color: #9FB0DE;
  text-decoration: none;
  display: block;
  padding: 3px 0;
  font-size: 0.92rem;
}

.pie a:hover { color: #fff; }

.pie .creditos {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- Software y herramientas (chips agrupados) ---------- */
.grupos-software {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grupo-software {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px;
  box-shadow: var(--sombra);
}

.grupo-software h3 {
  color: var(--noche);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Franja de logos/chips del stack, debajo del héroe */
.franja-stack { background: var(--noche-profundo); padding: 22px 0; }
.chips-centradas { justify-content: center; }
.chips-centradas span {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #C9D6FF;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
}

.chips span {
  background: var(--fondo-suave);
  border: 1px solid var(--borde);
  color: var(--noche);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.chips span:hover {
  background: #fff;
  border-color: var(--azul-vivo);
  transform: translateY(-2px);
}

/* ---------- Índice de áreas (portafolio) ---------- */
.indice-areas {
  background: #fff;
  border-bottom: 1px solid var(--borde);
  padding: 14px 0;
}

.indice-areas .contenedor {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.indice-areas a {
  text-decoration: none;
  color: var(--noche);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: var(--fondo-suave);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.indice-areas a:hover {
  background: var(--azul-vivo);
  border-color: var(--azul-vivo);
  color: #fff;
}

/* Que los títulos no queden tapados por la cabecera fija al saltar a un área */
[id] { scroll-margin-top: 84px; }

/* ---------- Listas de servicios con vistos ---------- */
.lista-vistos { list-style: none; margin-top: 14px; }

.lista-vistos li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
  color: var(--gris-medio);
  font-size: 0.93rem;
}

.lista-vistos li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--azul-vivo);
  font-weight: 900;
}

/* ---------- Insignias de estado (plugins, cursos) ---------- */
.insignia {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.insignia-disponible { background: #DDF7E6; color: #10693A; }
.insignia-desarrollo { background: #FFF1CC; color: #7A5A00; }
.insignia-proximamente { background: #E4EAFB; color: #2A3F8F; }

/* ---------- Galería de fotos ---------- */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 30px;
}

.filtros button {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--noche);
  background: #fff;
  border: 1px solid var(--borde);
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filtros button:hover { border-color: var(--azul-vivo); }

.filtros button.activo {
  background: var(--azul-vivo);
  border-color: var(--azul-vivo);
  color: #fff;
}

.galeria {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.foto {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--borde);
  box-shadow: var(--sombra);
  transition: transform 0.25s, box-shadow 0.25s;
}

.foto.oculta, .proyecto-tarjeta.oculta { display: none; }

.foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.4s;
}

.foto:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(47, 107, 255, 0.2); }
.foto:hover img { transform: scale(1.04); }

.foto figcaption {
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--gris-medio);
}

.foto figcaption strong { display: block; color: var(--noche); }

/* Espacio reservado mientras aún no hay foto real */
.foto-vacia {
  border: 2px dashed #B9C7EE;
  background: var(--fondo-suave);
  box-shadow: none;
}

.foto-vacia .hueco {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  color: #6F7FB3;
  font-size: 0.9rem;
  font-weight: 600;
}

.foto-vacia .hueco span { display: block; font-size: 2rem; margin-bottom: 4px; }

/* Visor: foto ampliada al hacer clic */
.visor {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5, 11, 41, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.visor.abierto { display: flex; }

.visor img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(47, 107, 255, 0.45);
}

.visor p {
  position: absolute;
  bottom: 18px;
  left: 0; right: 0;
  text-align: center;
  color: #D0D9F5;
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */

/* Menú tipo botón ☰ cuando hay poco ancho (con mega-menús, el de escritorio no cabe) */
@media (max-width: 900px) {
  .boton-menu { display: block; }
  .nav-principal, .boton-cta-nav { display: none; }

  .nav-movil {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--noche);
    flex-direction: column;
    padding: 8px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-movil.abierto { display: flex; }
  .nav-movil > .nav-enlace {
    color: #D0D9F5; text-decoration: none; font-weight: 600; font-size: 0.95rem;
    padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-movil > .nav-enlace.activo { color: var(--azul-cian); }
  .nav-movil .acordeon { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .boton-cta-movil { display: block; text-align: center; margin-top: 14px; }
}

@media (min-width: 901px) {
  .nav-movil, .boton-cta-movil { display: none !important; }
}

@media (max-width: 780px) {
  .heroe { padding: 60px 0; }
  .seccion { padding: 52px 0; }
}

/* ==========================================================
   LECCIONES ANIMADAS (diapositivas en movimiento)
   ----------------------------------------------------------
   Las controla js/diapositivas.js. Cada lección vive en su carpeta:
       aula-virtual/lecciones/<nombre>/index.html
   Cada diapositiva es un lienzo de 1280 × 720 px que se escala solo (como un video).
   Fondo BLANCO, textos en azul noche y luces RGB como acento.
   Las clases empiezan con "d-" (diapositiva) o "pl-" (dibujos de plano topográfico)
   para no mezclarse con el resto del sitio.
   ========================================================== */

/* Colores con significado: se repiten en todas las lecciones para que el alumno los reconozca */
.leccion {
  --c-control: #B026FF;   /* punto de control / geodésico (violeta) */
  --c-punto: #0EA5D8;     /* punto levantado en campo (cian oscuro, se lee sobre blanco) */
  --c-ok: #16A34A;        /* cumple */
  --c-alerta: #EA7A00;    /* atención */
  --c-mal: #E11D48;       /* no cumple */
  --altura: linear-gradient(90deg, #3D7BFF, #19D3FF, #30E36B, #FFE600, #FF9F0A, #FF2D55); /* de bajo a alto */
  /* Degradado RGB para TEXTO sobre blanco: mismos colores, pero más oscuros para que se lean */
  --rgb-texto: linear-gradient(90deg, #E11D48, #EA7A00, #16A34A, #0EA5D8, #2F6BFF, #9D2BE0, #E11D48);
  position: relative;
  outline: none;
}

.leccion:focus-visible .leccion-marco { box-shadow: 0 0 0 3px var(--azul-cian), 0 18px 46px rgba(20, 40, 120, 0.16); }

/* ---------- Marco (el "televisor") y lienzo ---------- */
.leccion-marco {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  color: var(--gris-texto);
  background: #fff;
  box-shadow: 0 0 0 1px var(--borde), 0 18px 46px rgba(20, 40, 120, 0.16);
}

.leccion-lienzo {
  position: absolute;
  left: 0; top: 0;
  width: 1280px;
  height: 720px;
  transform-origin: 0 0;
}

/* Barra de progreso RGB en la base del marco */
.leccion-barra {
  position: absolute;
  left: 0; bottom: 0;
  height: 5px;
  width: 0;
  z-index: 3;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 6s linear infinite;
  transition: width 0.5s ease;
}

/* Texto solo para lectores de pantalla */
.leccion-vivo {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Controles ---------- */
.leccion-controles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.lc-btn {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--noche);
  background: #fff;
  border: 1px solid var(--borde);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.lc-btn:hover:not(:disabled) {
  border-color: var(--azul-vivo);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.2);
}

.lc-btn:focus-visible, .lc-punto:focus-visible { outline: 3px solid var(--azul-cian); outline-offset: 2px; }
.lc-btn:disabled { opacity: 0.4; cursor: default; }

.lc-principal { background: var(--amarillo); border-color: var(--amarillo); color: var(--noche-profundo); }
.lc-principal:hover:not(:disabled) { background: var(--amarillo-hover); border-color: var(--amarillo-hover); }
.lc-btn[aria-pressed="true"] { background: var(--noche); border-color: var(--noche); color: #fff; }

.lc-puntos { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; gap: 6px; }

.lc-punto {
  width: 12px; height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--borde);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.lc-punto:hover { transform: scale(1.3); background: var(--azul-vivo); }
.lc-punto.hecho { background: #9DB4F0; }
.lc-punto.actual { background: var(--azul-vivo); transform: scale(1.35); box-shadow: 0 0 8px rgba(47, 107, 255, 0.7); }

.lc-contador { min-width: 3.5em; text-align: right; font-size: 0.9rem; font-weight: 700; color: var(--gris-medio); }

/* ---------- Pantalla completa (sirve también para grabar el video) ---------- */
.leccion.pantalla-completa {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.leccion.pantalla-completa .leccion-marco {
  width: min(100vw, calc(100vh * 16 / 9));
  width: min(100vw, calc(100dvh * 16 / 9));
  border-radius: 0;
  box-shadow: none;
}

.leccion.pantalla-completa .leccion-controles {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  margin: 0;
  padding: 28px 20px 14px;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95) 55%);
  transition: opacity 0.4s;
}

.leccion.pantalla-completa.quieto { cursor: none; }
.leccion.pantalla-completa.quieto .leccion-controles { opacity: 0; pointer-events: none; }

/* ---------- Textos de la página de la lección ---------- */
.leccion-cabecera { margin-bottom: 18px; }
.leccion-cabecera .volver { display: inline-block; margin-bottom: 8px; color: var(--azul-vivo); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.leccion-cabecera .volver:hover { text-decoration: underline; }
.leccion-cabecera h1 { color: var(--noche); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; }
.leccion-cabecera p { color: var(--gris-medio); margin-top: 4px; max-width: 760px; }
.leccion-ayuda { margin-top: 12px; color: var(--gris-medio); font-size: 0.88rem; }
.leccion-ayuda kbd { background: #fff; border: 1px solid var(--borde); border-radius: 6px; padding: 1px 7px; font: inherit; font-weight: 700; color: var(--noche); }

/* ---------- Diapositivas ---------- */
.diapo {
  position: absolute;
  inset: 0;
  padding: 44px 72px 0;
  font-size: 30px;
  line-height: 1.35;
  display: none;
}

.diapo.activa { display: block; animation: d-entra 0.45s ease-out; }
@keyframes d-entra { from { opacity: 0; } to { opacity: 1; } }

/* Marca de agua (queda bien al grabar el video) */
.diapo::after {
  content: "BIM INGEZA";
  position: absolute;
  right: 40px; bottom: 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(11, 23, 69, 0.28);
}

/* Aparición de lo que NO lleva data-paso (al entrar a la diapositiva) */
.aparece { animation: d-sube 0.6s ease-out both; animation-delay: var(--r, 0s); }
@keyframes d-sube { from { opacity: 0; transform: translateY(20px); } }

/* Trazo que se dibuja solo al entrar (líneas y contornos SVG) */
.d-dibuja { stroke-dasharray: 1 2; animation: d-dibuja 1.4s ease-in-out both; animation-delay: var(--r, 0s); }
@keyframes d-dibuja { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Lo que lleva data-paso="N" está oculto hasta el clic N */
.leccion.lista [data-paso] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease-out, transform 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.leccion.lista [data-paso].ya { opacity: 1; transform: none; }

.leccion.lista [data-anim="caer"] { transform: translateY(-46px); }
.leccion.lista [data-anim="izq"]  { transform: translateX(-60px); }
.leccion.lista [data-anim="der"]  { transform: translateX(60px); }
.leccion.lista [data-anim="fade"] { transform: none; }
.leccion.lista [data-anim="zoom"] { transform: scale(0.3); transform-box: fill-box; transform-origin: center; }

.leccion.lista [data-paso].ya[data-anim] { transform: none; }

.leccion.lista [data-anim="dibujar"] {
  opacity: 1;
  transform: none;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s ease-in-out;
}

.leccion.lista [data-anim="dibujar"].ya { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  .leccion *, .leccion *::before, .leccion *::after { animation: none !important; transition: none !important; }
}

/* ---------- Textos de las diapositivas ---------- */
.d-etapa {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 18px;
  border: 1px solid var(--azul-vivo);
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
  color: var(--azul-vivo);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.d-titulo { margin-bottom: 14px; color: var(--noche); font-size: 52px; font-weight: 800; line-height: 1.12; }
.d-titulo-grande { margin-bottom: 20px; color: var(--noche); font-size: 76px; font-weight: 900; line-height: 1.08; }

/* Palabras destacadas con texto RGB animado */
.d-titulo span, .d-titulo-grande span, .d-rgb {
  background: var(--rgb-texto);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rgb-desliza 8s linear infinite;
}

.d-texto { color: var(--gris-medio); font-size: 30px; }
.d-texto b, .d-texto strong { color: var(--noche); }
.d-texto.medio { font-size: 26px; line-height: 1.35; }
.d-pequeno { color: var(--gris-medio); font-size: 22px; line-height: 1.35; }
.d-pequeno b { color: var(--noche); }
.d-pista { margin-top: 26px; color: var(--gris-medio); font-size: 24px; }
.d-pista b { color: var(--noche); }

/* Referencia / fuente, abajo a la izquierda */
.d-ref {
  position: absolute;
  left: 72px; bottom: 20px;
  color: var(--gris-medio);
  font-size: 20px;
}

.d-chips { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.d-chips span {
  padding: 6px 18px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--fondo-suave);
  color: var(--noche);
  font-size: 24px;
  font-weight: 700;
}

/* Colores con significado para texto y para dibujos (currentColor) */
.k-control   { color: var(--c-control); }
.k-punto     { color: var(--c-punto); }
.k-ok        { color: var(--c-ok); }
.k-alerta    { color: var(--c-alerta); }
.k-mal       { color: var(--c-mal); }
.k-resultado { color: var(--azul-vivo); }

/* Fórmulas */
.d-formula { color: var(--noche); font-family: "Cambria Math", Cambria, "Times New Roman", serif; font-size: 40px; line-height: 1.25; white-space: nowrap; }
.d-formula i { font-style: italic; }
.d-formula sub { font-size: 0.6em; }
.d-num { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Tarjeta y dato destacado */
.d-tarjeta {
  padding: 18px 26px;
  border: 1px solid var(--borde);
  border-radius: 18px;
  background: var(--fondo-suave);
}

.d-tarjeta h4 { margin-bottom: 6px; color: var(--azul-vivo); font-size: 21px; letter-spacing: 1px; text-transform: uppercase; }

.d-dato {
  padding: 12px 22px;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: var(--fondo-suave);
  white-space: nowrap;
}

.d-dato small { display: block; color: var(--azul-vivo); font-size: 19px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.d-dato strong { display: block; color: var(--noche); font-size: 42px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.d-dato strong em { color: var(--gris-medio); font-size: 0.55em; font-style: normal; font-weight: 700; }
.d-dato span { display: block; color: var(--gris-medio); font-size: 20px; white-space: normal; }
.d-dato.fila { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }

/* Caja de resultado con brillo */
.d-resultado {
  display: inline-block;
  padding: 8px 30px;
  border: 2px solid var(--azul-vivo);
  border-radius: 20px;
  background: rgba(47, 107, 255, 0.08);
  box-shadow: 0 0 26px rgba(47, 107, 255, 0.20);
  color: var(--noche);
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.d-resultado .num { font-size: 76px; font-weight: 900; line-height: 1.1; }

/* Botón dentro de una diapositiva */
.d-boton {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 12px;
  background: var(--amarillo);
  color: var(--noche-profundo);
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}

.d-boton:hover { background: var(--amarillo-hover); }

/* Ruta de pasos (1 → 5) */
.d-ruta { display: flex; gap: 14px; }

.d-ruta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 22px 7px 8px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--fondo-suave);
  color: var(--noche);
  font-size: 23px;
  font-weight: 700;
  white-space: nowrap;
}

.d-ruta-item b {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--rgb);
  background-size: 200% 100%;
  animation: rgb-desliza 6s linear infinite;
  color: #fff;
  font-size: 21px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Filas de comprobación (semáforo) */
.d-check {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 22px;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: var(--fondo-suave);
}

.d-check .ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--c-ok);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.d-check.mal .ico { background: var(--c-mal); }
.d-check.alerta .ico { background: var(--c-alerta); }
.d-check h4 { margin-bottom: 2px; color: var(--noche); font-size: 25px; }
.d-check p { color: var(--gris-medio); font-size: 21px; line-height: 1.3; }
.d-check p b { color: var(--noche); }

/* Tablas (lista de puntos y memoria de cálculo) */
.d-tabla { width: 100%; border-collapse: collapse; font-size: 20px; font-variant-numeric: tabular-nums; }

.d-tabla th {
  padding: 5px 10px;
  border-bottom: 2px solid var(--borde);
  color: var(--azul-vivo);
  font-size: 17px;
  letter-spacing: 1px;
  text-align: left;
  text-transform: uppercase;
}

.d-tabla td { padding: 4px 10px; border-bottom: 1px solid var(--borde); }
.d-tabla td.num, .d-tabla th.num { text-align: right; }
.d-tabla tr.control td { color: var(--c-control); font-weight: 800; }
.d-tabla.compacta { font-size: 19px; }
.d-tabla.compacta td { padding: 3px 10px; line-height: 1.25; }
.d-tabla.grande { font-size: 21px; }
.d-tabla.grande td { padding: 8px 12px; vertical-align: top; }
.d-tabla.grande td.res { color: var(--noche); font-weight: 800; }

/* Controles interactivos (barras deslizables y botones) */
.d-rango {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 8px;
  outline: none;
  background: var(--altura);
  cursor: pointer;
}

.d-rango::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px; height: 34px;
  border: 4px solid var(--azul-vivo);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(47, 107, 255, 0.55);
}

.d-rango::-moz-range-thumb {
  width: 26px; height: 26px;
  border: 4px solid var(--azul-vivo);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(47, 107, 255, 0.55);
}

.d-rango:focus-visible { outline: 3px solid var(--azul-cian); outline-offset: 6px; }

.d-seg { display: flex; gap: 10px; }

.d-seg button {
  flex: 1;
  padding: 8px 0;
  border: 2px solid var(--borde);
  border-radius: 12px;
  background: #fff;
  color: var(--noche);
  font: inherit;
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
}

.d-seg button[aria-pressed="true"] { border-color: var(--azul-vivo); background: rgba(47, 107, 255, 0.10); color: var(--azul-vivo); }
.d-seg button:focus-visible { outline: 3px solid var(--azul-cian); outline-offset: 3px; }

/* ---------- Dibujos de plano topográfico (SVG) ---------- */
.d-svg { overflow: visible; }
.d-svg text { font-family: inherit; }

/* Estas cinco clases se usan dentro de <defs> (fuera de .leccion), por eso llevan colores directos */
.pl-marco { fill: rgba(11, 23, 69, 0.03); stroke: rgba(11, 23, 69, 0.28); stroke-width: 2; }
.pl-grid { stroke: rgba(11, 23, 69, 0.10); stroke-width: 1; }
.pl-eje { fill: #6F7FB3; font-size: 14px; font-family: "Inter", "Segoe UI", Arial, sans-serif; }
.pl-norte { fill: none; stroke: #6F7FB3; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pl-norte-t { fill: #6F7FB3; font-size: 18px; font-weight: 800; font-family: "Inter", "Segoe UI", Arial, sans-serif; text-anchor: middle; }

.pl-arista { fill: none; stroke: rgba(11, 23, 69, 0.72); stroke-width: 2; stroke-linecap: round; }
.pl-tri { stroke: none; }
.pl-punto { fill: var(--c-punto); stroke: var(--noche); stroke-width: 2.5; }
.pl-ctrl-tri { fill: var(--c-control); stroke: var(--noche); stroke-width: 2; stroke-linejoin: round; }
.pl-ctrl-anillo { fill: none; stroke: var(--c-control); stroke-width: 2.5; }

/* Rótulos: letras azul noche con un borde blanco para que se lean encima de líneas y colores */
.pl-etq, .pl-cota {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.pl-etq { fill: var(--noche); font-size: 17px; font-weight: 800; }
.pl-cota { fill: var(--gris-medio); font-size: 16px; font-weight: 600; }
.pl-etq.der, .pl-cota.der { text-anchor: end; }

.pl-curva { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.pl-curva.resaltada { stroke: var(--noche); stroke-width: 6; filter: drop-shadow(0 0 5px rgba(47, 107, 255, 0.55)); }
.pl-curva-etq { paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; font-size: 17px; font-weight: 800; font-family: "Inter", "Segoe UI", Arial, sans-serif; text-anchor: middle; }

/* Punto de control de prueba (verificación) */
.pl-q { stroke: var(--noche); stroke-width: 2; }
.pl-q.ok { fill: var(--c-ok); }
.pl-q.mal { fill: var(--c-mal); }

/* Perfil del terreno y dibujos de medidas */
.pf-suelo { fill: none; stroke: rgba(11, 23, 69, 0.45); stroke-width: 3; stroke-dasharray: 3 9; stroke-linecap: round; }
.pf-recta { fill: none; stroke: var(--c-punto); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.pf-txt { fill: var(--gris-medio); font-size: 22px; font-weight: 700; font-family: "Inter", "Segoe UI", Arial, sans-serif; }
.pf-txt.suave { fill: #7684B0; font-size: 20px; font-weight: 600; }
.pf-interr { fill: var(--c-alerta); font-size: 44px; font-weight: 900; text-anchor: middle; font-family: "Inter", "Segoe UI", Arial, sans-serif; }
.pf-cota { fill: var(--noche); font-size: 20px; font-weight: 800; text-anchor: middle; font-family: "Inter", "Segoe UI", Arial, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 4px; }

.d-guia { fill: none; stroke: rgba(11, 23, 69, 0.42); stroke-width: 2.5; stroke-dasharray: 9 8; stroke-linecap: round; }
.d-medida { fill: none; stroke: var(--azul-vivo); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Pulso tipo radar (punto geodésico) */
.d-radar { fill: none; stroke: var(--c-control); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: d-radar 2.6s ease-out infinite; animation-delay: var(--r, 0s); opacity: 0; }
@keyframes d-radar { 0% { transform: scale(0.25); opacity: 0.9; } 100% { transform: scale(1); opacity: 0; } }

.d-portada .d-arte { position: absolute; top: 165px; right: 30px; }
.d-portada-texto { position: absolute; top: 150px; left: 72px; width: 600px; }

/* ---------- Tarjeta de lección en el Aula Virtual ---------- */
.rejilla-lecciones { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.miniatura-leccion {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: 10px;
  background: #fff;
}

.miniatura-leccion svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.miniatura-leccion .play {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--amarillo);
  box-shadow: 0 0 0 8px rgba(255, 196, 0, 0.30), 0 6px 18px rgba(5, 10, 40, 0.25);
  color: var(--noche-profundo);
  font-size: 1.5rem;
  transition: transform 0.25s;
}

a.tarjeta:hover .miniatura-leccion .play { transform: scale(1.12); }

/* Si la pantalla es pequeña, los botones muestran solo el ícono */
@media (max-width: 700px) {
  .leccion-controles { gap: 8px; }
  .lc-btn { padding: 9px 12px; }
  .lc-txt { display: none; }
  .lc-principal .lc-txt { display: inline; }
  .lc-puntos { display: none; }
  .lc-contador { min-width: 0; margin-left: auto; }
}

/* En el celular en vertical, avisa que conviene girarlo */
@media (orientation: portrait) and (max-width: 700px) {
  .leccion.pantalla-completa::before {
    content: "↻ Gira el celular para ver la lección más grande";
    position: absolute;
    top: 12px; left: 0; right: 0;
    z-index: 6;
    color: var(--gris-medio);
    font-size: 14px;
    text-align: center;
  }
}
