/* ============================================================
   LEVEL UP ACADEMY MURCIA — Hoja de estilos
   ============================================================ */

/* ============================
   1. VARIABLES
============================ */
:root {
  /* Colores de marca (tomados del logo) */
  --navy:        #062C6B;
  --navy-dark:   #041D48;
  --navy-light:  #17458F;
  --red:         #A31327;
  --red-dark:    #7F0E1E;
  --red-light:   #C7203A;

  --white:       #FFFFFF;
  --bg:          #FFFFFF;
  --bg-soft:     #F4F7FC;
  --bg-tint:     #EDF2FA;

  --text:        #16202E;
  --text-muted:  #5A6779;
  --border:      #DFE6F1;

  --shadow-sm: 0 1px 2px rgba(6, 44, 107, .06), 0 2px 8px rgba(6, 44, 107, .05);
  --shadow-md: 0 4px 12px rgba(6, 44, 107, .07), 0 12px 32px rgba(6, 44, 107, .07);
  --shadow-lg: 0 12px 24px rgba(6, 44, 107, .09), 0 28px 60px rgba(6, 44, 107, .10);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --header-h: 80px;
  --maxw: 1140px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ============================
   2. RESET Y BASE
============================ */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
}

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

a { color: var(--navy); }

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.3rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }

p { text-wrap: pretty; }

ul, ol { padding-left: 1.15rem; }

:focus-visible {
  outline: 3px solid var(--red-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.container-narrow { max-width: 860px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 0 0 8px 8px;
  z-index: 200; text-decoration: none; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ============================
   3. HEADER Y NAVEGACIÓN
============================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s var(--ease);
}

.header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.logo { display: flex; align-items: center; flex-shrink: 0; }

.logo-img {
  height: 58px;
  width: auto;
  transition: transform .3s var(--ease);
}
.logo:hover .logo-img { transform: scale(1.04); }

/* --- Navegación de escritorio --- */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav > a,
.dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  white-space: nowrap;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.nav > a:hover,
.dropdown-btn:hover,
.dropdown.is-open .dropdown-btn {
  color: var(--red);
  background: var(--bg-tint);
}

.nav > a.is-active {
  color: var(--navy);
  font-weight: 600;
  background: var(--bg-tint);
}

.dropdown-btn .caret {
  font-size: .6em;
  transition: transform .25s var(--ease);
}
.dropdown.is-open .dropdown-btn .caret { transform: rotate(180deg); }

.nav-cta {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark)) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  box-shadow: 0 4px 14px rgba(163, 19, 39, .28);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(163, 19, 39, .36);
}

/* --- Desplegables --- */
.dropdown { position: relative; }

.dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 110;
}

.dropdown.is-open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.dropdown-content a:hover,
.dropdown-content a.is-active {
  background: var(--bg-tint);
  color: var(--red);
}

/* --- Botón hamburguesa --- */
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
  color: var(--navy);
}
.menu-toggle:hover { background: var(--bg-tint); }

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: background .2s var(--ease);
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after  { top: 6px; }

.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* --- Navegación móvil --- */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 12px 20px 24px;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}

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

.nav-mobile a {
  padding: 13px 8px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a.is-active { color: var(--red); font-weight: 600; }

.nav-mobile .mobile-title {
  font-weight: 700;
  color: var(--navy);
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding-top: 18px;
  padding-bottom: 4px;
  border-bottom: 0;
  pointer-events: none;
}

.nav-mobile .mobile-sub { padding-left: 20px; font-size: .95rem; }

.nav-mobile .nav-cta {
  margin-top: 18px;
  text-align: center;
  justify-content: center;
  border-radius: 999px !important;
  border-bottom: 0 !important;
}

/* ============================
   4. BOTONES
============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), color .2s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(163, 19, 39, .26);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(163, 19, 39, .34);
}

.btn-navy {
  background: linear-gradient(135deg, var(--navy-light), var(--navy));
  color: #fff;
  box-shadow: 0 6px 18px rgba(6, 44, 107, .24);
}
.btn-navy:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6, 44, 107, .32);
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.full { width: 100%; }

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

/* ============================
   5. SECCIONES
============================ */
.section { padding: clamp(56px, 7vw, 92px) 0; }
.section-sm { padding: clamp(40px, 5vw, 64px) 0; }
.section-alt { background: var(--bg-soft); }

.section-navy {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: rgba(255, 255, 255, .88);
}
.section-navy h2, .section-navy h3 { color: #fff; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 4vw, 52px); }

.section-title { margin-bottom: 12px; }

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}
.section-navy .section-subtitle { color: rgba(255, 255, 255, .78); }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.section-navy .eyebrow { color: #FF9EB0; }

/* ============================
   6. TARJETAS Y REJILLAS
============================ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              border-color .3s var(--ease);
}

.card h3 { margin-bottom: 10px; }
.card p  { color: var(--text-muted); }
.card > *:last-child { margin-bottom: 0; }

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #C9D8F0;
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--bg-tint), #DCE7F8);
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card-link .card-more {
  margin-top: auto;
  padding-top: 16px;
  color: var(--red);
  font-weight: 600;
  font-size: .92rem;
}
.card-link:hover .card-more { text-decoration: underline; }

/* Contenido enriquecido dentro de una tarjeta */
.prose { line-height: 1.75; }
.prose > * + * { margin-top: 1rem; }
.prose h3 { margin-top: 2rem; }
.prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .45rem; }
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.prose blockquote {
  background: var(--bg-soft);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  color: var(--text-muted);
}

.lead { font-size: 1.08rem; color: var(--text-muted); }

/* Direcciones de correo y URLs largas: que partan en vez de desbordar */
.prose a, .prose li, .contact-list a, .footer a { overflow-wrap: anywhere; }
.prose, .card, .footer { min-width: 0; }

/* Lista con marcas de verificación */
.check-list { list-style: none; padding-left: 0; }
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--red);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: .72em;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ============================
   7. HERO
============================ */
.hero {
  position: relative;
  padding: clamp(48px, 6vw, 84px) 0 clamp(56px, 7vw, 96px);
  background:
    radial-gradient(ellipse 60% 70% at 8% 0%, rgba(163, 19, 39, .10) 0, transparent 60%),
    radial-gradient(ellipse 70% 80% at 96% 100%, rgba(6, 44, 107, .12) 0, transparent 60%),
    linear-gradient(170deg, #FFFFFF 0%, #F4F7FC 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }
.hero h1 .accent { color: var(--red); }

.hero-text > p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 26px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: .9rem;
  color: var(--text-muted);
  list-style: none;
  padding-left: 0;
}
.hero-badges li { display: flex; align-items: center; gap: 7px; }
.hero-badges li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* Tarjeta con formulario */
.hero-card {
  background: #fff;
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.hero-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.hero-card > p { color: var(--text-muted); font-size: .95rem; margin-bottom: 20px; }

/* ============================
   8. FORMULARIOS
============================ */
.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--navy);
}

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  /* 16px exactos: por debajo de eso Safari de iPhone hace zoom al enfocar
     el campo y descoloca toda la página. No bajar de 1rem. */
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

input::placeholder, textarea::placeholder { color: #9AA6B7; }

input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(163, 19, 39, .12);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%235A6779' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px;
  padding-right: 38px;
}

.form-note { font-size: .84rem; color: var(--text-muted); line-height: 1.5; }

.honeypot { position: absolute; left: -9999px; opacity: 0; }

/* ---- Casilla de consentimiento (RGPD) ----
   Va dentro de un <label>, así que toda la caja es pulsable: en móvil el
   objetivo es el bloque entero, no el cuadradito de 22 px. */
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .86rem;
  line-height: 1.55;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.consent:hover { border-color: #C3D2EA; }

.consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--red);
  cursor: pointer;
}

.consent:has(input:checked) {
  border-color: var(--red);
  background: rgba(163, 19, 39, .045);
}

.consent a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent a:hover { color: var(--red); }

.consent .req { color: var(--red); font-weight: 700; }

/* ============================
   9. BANNER
============================ */
/* La imagen se ve SIEMPRE completa (object-fit: contain). Para que no queden
   franjas planas a los lados, el fondo repite la propia imagen ampliada y
   desenfocada. */
.banner {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--red-dark) 100%);
}

.banner::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: url("../img/banner.jpg") center / cover no-repeat;
  filter: blur(28px) saturate(120%) brightness(.82);
  transform: scale(1.08);
  z-index: 0;
}

.banner .container {
  padding-inline: 0;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.banner-img {
  width: 100%;
  /* Alto flexible: la imagen nunca se recorta, sólo se adapta */
  height: clamp(170px, 33vw, 470px);
  object-fit: contain;
  object-position: center;
}

/* ============================
   10. TABLAS
============================ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: .92rem;
}

thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 13px 12px;
  position: sticky;
  top: 0;
  white-space: nowrap;
}
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child  { border-top-right-radius: var(--radius); }

tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--bg-soft); }
tbody tr:hover { background: var(--bg-tint); }

tbody td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }

.table-hint {
  display: none;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ============================
   11. PRECIOS
============================ */
.price-card {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
}

.price-card .price {
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin: 12px 0 4px;
}
.price-card .price small {
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-card .price-sub { font-size: .9rem; color: var(--text-muted); }

.price-featured {
  border: 2px solid var(--red);
  box-shadow: var(--shadow-md);
}

.price-tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================
   12. SOBRE MÍ
============================ */
.sobre-grid {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) 1.6fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.sobre-foto { position: sticky; top: calc(var(--header-h) + 24px); }

.foto-perfil {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.foto-caption {
  margin-top: 16px;
  text-align: center;
  font-size: .9rem;
  color: var(--text-muted);
}
.foto-caption strong { display: block; color: var(--navy); font-size: 1.05rem; }

.sobre-texto { display: grid; gap: 20px; }

/* ============================
   13. CONTACTO
============================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.contact-list { list-style: none; padding-left: 0; display: grid; gap: 18px; }

.contact-list li { display: flex; gap: 14px; align-items: flex-start; }

.contact-list .ci {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--bg-tint);
  font-size: 1.15rem;
}

.contact-list .cl { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; }
.contact-list a { color: var(--navy); font-weight: 500; text-decoration: none; word-break: break-word; }
.contact-list a:hover { color: var(--red); text-decoration: underline; }

.map-embed {
  width: 100%;
  aspect-ratio: 16 / 11;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================
   14. WHATSAPP FLOTANTE
============================ */
/* Aparece al bajar un poco: si estuviera fijo desde el principio taparía
   los botones de llamada a la acción de la portada en móvil. */
.wa-float {
  opacity: 0;
  visibility: hidden;
  transform: scale(.7);
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .42);
  transition: transform .3s var(--ease), box-shadow .25s var(--ease),
              opacity .3s var(--ease), visibility .3s;
}
.wa-float.is-visible { opacity: 1; visibility: visible; transform: none; }
.wa-float.is-visible:hover { transform: scale(1.08); box-shadow: 0 10px 28px rgba(37, 211, 102, .55); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ============================
   15. FOOTER
============================ */
.footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, .72);
  padding: clamp(40px, 5vw, 60px) 0 0;
  font-size: .92rem;
}

.footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
}

.footer h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-logo {
  height: 54px;
  width: auto;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  margin-bottom: 16px;
}

.footer ul { list-style: none; padding-left: 0; display: grid; gap: 10px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .86rem;
}

.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* ============================
   16. ANIMACIONES AL HACER SCROLL
============================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-left  { transform: translateX(-28px); }
.reveal-right { transform: translateX(28px); }

/* ============================
   17. RESPONSIVE
============================ */
@media (max-width: 1080px) {
  .nav > a, .dropdown-btn { padding: 9px 9px; font-size: .87rem; }
  .logo-img { height: 50px; }
}

@media (max-width: 960px) {
  :root { --header-h: 74px; }
  .logo-img { height: 46px; }

  .nav { display: none; }
  .menu-toggle { display: grid; }

  .hero-grid,
  .sobre-grid,
  .contact-grid,
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .sobre-foto { position: static; max-width: 340px; margin-inline: auto; }
  .foto-perfil { aspect-ratio: 1 / 1; }

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

  .table-hint { display: block; }
}

/* Zonas pulsables: en móvil el dedo necesita unos 44px de alto.
   Los enlaces de texto del pie y de contacto se quedaban en 20px. */
@media (max-width: 960px) {
  .footer ul a,
  .footer-legal a,
  .contact-list a {
    display: inline-block;
    padding-block: 9px;
  }
  .footer ul { gap: 2px; }
  .footer-legal { gap: 10px 18px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 16px; }

  .card { padding: 20px; }
  .hero-card { padding: 22px; }

  .hero-actions .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}

/* ============================
   18. PREFERENCIAS DEL USUARIO
============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .footer, .wa-float, .hero-card, .skip-link { display: none !important; }
  body { color: #000; }
  a { text-decoration: underline; }
}

/* ============================================================
   19. TEST DE NIVEL
============================================================ */
.test-progress {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
}

.test-progress .bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-tint);
  overflow: hidden;
}

.test-progress .bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy-light), var(--red));
  transition: width .35s var(--ease);
}

.q {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 16px;
  background: #fff;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.q.is-answered { border-color: #BFD3F0; }

/* Al saltar a una pregunta, dejarla por debajo de la cabecera Y de la
   barra de progreso, que también es fija. */
.q, .test-result { scroll-margin-top: calc(var(--header-h) + 76px); }

.q.is-missing {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(163, 19, 39, .10);
}

.q legend {
  font-weight: 600;
  color: var(--navy);
  padding: 0;
  margin-bottom: 14px;
  line-height: 1.5;
}

.q legend .num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--navy);
  font-size: .8rem;
  margin-right: 10px;
  vertical-align: 2px;
}

.q-options { display: grid; gap: 8px; }

.q-options label {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .95rem;
  font-weight: 400;
  color: var(--text);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}

.q-options label:hover { border-color: #B9CCEA; background: var(--bg-soft); }

.q-options input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--red);
  margin: 0;
  padding: 0;
}

.q-options input[type="radio"]:checked + span { font-weight: 600; color: var(--navy); }

.q-options label:has(input:checked) {
  border-color: var(--red);
  background: rgba(163, 19, 39, .05);
}

/* Resultado */
.test-result { display: none; }
.test-result.is-shown { display: block; }

/* Una vez corregido el test, la barra de progreso ya no aporta nada
   y taparía el resultado al quedarse fija arriba. */
body.test-done .test-progress { display: none; }

.test-result .result-level {
  font-size: clamp(3.2rem, 2rem + 7vw, 5.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--red);
  letter-spacing: -.03em;
}

.result-score {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.result-bands { display: grid; gap: 10px; margin-top: 26px; text-align: left; }

.band {
  display: grid;
  grid-template-columns: 46px 1fr 54px;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
}

.band b { color: var(--navy); }

.band .track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-tint);
  overflow: hidden;
}

.band .track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--navy-light);
}

.band.pass .track i { background: linear-gradient(90deg, #2E9E5B, #1F7A44); }
.band .n { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.test-alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: .92rem;
  margin-top: 18px;
}
.test-alert.err  { background: #FDECEF; border: 1px solid #F5C2CB; color: #7F0E1E; }
.test-alert.warn { background: #FFF4E5; border: 1px solid #FFD9A0; color: #7A4E00; }
.test-alert.ok   { background: #E9F7EF; border: 1px solid #B7E0C6; color: #1F7A44; }

@media (max-width: 640px) {
  .q { padding: 16px; }
  .test-progress { padding: 9px 14px; font-size: .8rem; gap: 10px; }
}
