/* =========================================================
   Nexia · hoja de estilos única
   Colores de marca: cambia aquí y se aplica a toda la web.
   ========================================================= */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/pjs-latin.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/pjs-latin-ext.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #0B1F3A;        /* azul marino de la marca */
  --teal: #0F9D8F;        /* verde azulado de la marca (decoración) */
  --teal-texto: #0A7A6F;  /* versión más oscura: textos y botones (contraste AA) */
  --texto: #1B2B40;
  --suave: #4A5A70;
  --fondo: #FFFFFF;
  --fondo-alt: #F3F6F9;
  --borde: #DCE3EA;
  --radio: 14px;
  --ancho: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-texto); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 4.2vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .contenedor { padding: 0 32px; } }

.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- Cabecera ---------- */
.cabecera { border-bottom: 1px solid var(--borde); background: #fff; position: sticky; top: 0; z-index: 5; }
.cabecera .contenedor { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.marca { font-weight: 800; font-size: 1.45rem; color: var(--navy); text-decoration: none; letter-spacing: -.02em; }
.marca span { color: var(--teal); }
.menu { display: flex; gap: 16px; margin-left: auto; align-items: center; font-size: .95rem; }
.menu a { color: var(--texto); text-decoration: none; font-weight: 600; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--teal-texto); }
.idiomas { display: flex; gap: 2px; font-size: .9rem; font-weight: 700; }
.idiomas a, .idiomas span { padding: 4px 8px; border-radius: 6px; text-decoration: none; }
.idiomas span { background: var(--navy); color: #fff; }
.idiomas a { color: var(--navy); }
.cabecera .btn { padding: 9px 14px; font-size: .9rem; }
@media (max-width: 719px) {
  .menu { order: 3; width: 100%; margin-left: 0; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; font-size: .9rem; }
  .cabecera .btn-cab { display: none; }
}

/* ---------- Botones ---------- */
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; line-height: 1.2; text-align: center;
}
.btn-principal { background: var(--teal-texto); color: #fff; }
.btn-principal:hover { background: var(--navy); color: #fff; }
.btn-secundario { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-secundario:hover { background: var(--navy); color: #fff; }
.oscuro .btn-secundario { background: transparent; border-color: #fff; color: #fff; }
.oscuro .btn-secundario:hover { background: #fff; color: var(--navy); }
.enlace-flecha { font-weight: 700; }
@media (max-width: 479px) { .botones .btn { width: 100%; } }

/* ---------- Secciones ---------- */
.seccion { padding: 56px 0; }
@media (min-width: 720px) { .seccion { padding: 88px 0; } }
.alt { background: var(--fondo-alt); }
.oscuro { background: var(--navy); color: #E6EDF5; }
.oscuro h1, .oscuro h2, .oscuro h3 { color: #fff; }
.oscuro a:not(.btn) { color: #7FE0D5; }
.antetitulo { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-texto); margin-bottom: .8em; }
.oscuro .antetitulo { color: #7FE0D5; }
.entradilla { font-size: 1.15rem; color: var(--suave); max-width: 46em; }
.oscuro .entradilla { color: #C9D6E8; }
.estrecho { max-width: 760px; }

.hero { padding: 48px 0 56px; }
@media (min-width: 720px) { .hero { padding: 88px 0; } }
.hero h1 { max-width: 15em; }
.prueba { display: flex; gap: 10px; align-items: flex-start; margin-top: 1.6em; font-weight: 600; color: var(--navy); }
.prueba::before { content: "✓"; color: #fff; background: var(--teal-texto); border-radius: 50%; width: 1.5em; height: 1.5em; flex: none; display: grid; place-items: center; font-size: .85em; margin-top: .1em; }

/* ---------- Tarjetas ---------- */
.rejilla { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 2em; }
@media (min-width: 640px) { .rejilla-2 { grid-template-columns: repeat(2, 1fr); } .rejilla-4 { grid-template-columns: repeat(2, 1fr); } .rejilla-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .rejilla-4 { grid-template-columns: repeat(4, 1fr); } }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; }
.tarjeta h3 { margin-bottom: .4em; }
.tarjeta p { margin: 0; color: var(--suave); }
.tarjeta img { width: 44px; height: 44px; margin-bottom: 14px; }
.cierre { font-weight: 600; color: var(--navy); margin-top: 1.6em; font-size: 1.1rem; }

/* ---------- Bloque con imagen ---------- */
.dos-col { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .dos-col { grid-template-columns: 1fr 1fr; gap: 56px; } }
.lista-check { list-style: none; padding: 0; margin: 1.2em 0; }
.lista-check li { position: relative; padding-left: 32px; margin-bottom: .8em; }
.lista-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.cifra { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 1.4em 0; }
.cifra strong { font-size: 2.6rem; color: var(--teal-texto); font-weight: 800; line-height: 1; }

/* ---------- Capturas y aviso de datos ficticios ---------- */
figure { margin: 0; }
/* Evita que una imagen grande ensanche la columna en móvil */
.dos-col > *, .paso > *, .rejilla > *, .galeria > * { min-width: 0; }
.captura img, .captura video { border-radius: 10px; border: 1px solid var(--borde); box-shadow: 0 10px 30px rgba(11,31,58,.10); background: #fff; }
.aviso-demo { font-size: .85rem; color: var(--suave); margin-top: 10px; display: flex; gap: 6px; }
.aviso-demo::before { content: "ⓘ"; }
.oscuro .aviso-demo { color: #C9D6E8; }

/* ---------- Pasos ---------- */
.pasos { counter-reset: paso; display: grid; gap: 56px; margin-top: 2.5em; }
.paso { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .paso { grid-template-columns: 5fr 7fr; gap: 56px; } .paso:nth-child(even) .paso-texto { order: 2; } }
.paso-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 12px; }
.paso-etiqueta { display: block; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--teal-texto); margin-bottom: .3em; }

.estado { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; background: var(--fondo-alt); border: 1px solid var(--borde); padding: 2px 8px; border-radius: 6px; color: var(--navy); margin-bottom: 10px; }

.galeria { display: grid; gap: 24px; margin-top: 2em; }
@media (min-width: 720px) { .galeria { grid-template-columns: repeat(3, 1fr); } }
.galeria figcaption { font-weight: 600; margin-top: 10px; color: var(--navy); }

.numerados { list-style: none; padding: 0; display: grid; gap: 16px; margin: 2em 0 0; }
@media (min-width: 720px) { .numerados { grid-template-columns: repeat(3, 1fr); } }
.numerados li { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; }
.numerados b { display: block; font-size: 1.6rem; color: var(--teal-texto); margin-bottom: .2em; }

/* ---------- Vídeo ---------- */
.video { max-width: 900px; }
.video video { width: 100%; aspect-ratio: 16 / 9; }

/* ---------- Preguntas frecuentes ---------- */
.faq { max-width: 820px; margin-top: 2em; }
.faq details { border-bottom: 1px solid var(--borde); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; color: var(--navy); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--teal-texto); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--suave); }

/* ---------- Sobre mí ---------- */
.foto { width: 100%; max-width: 360px; aspect-ratio: 4 / 5; border-radius: var(--radio); background: var(--fondo-alt); border: 2px dashed var(--borde); display: grid; place-items: center; text-align: center; padding: 16px; object-fit: cover; }

/* Datos clave en "Quién soy" y "Sobre mí" */
.datos-clave { list-style: none; padding: 0; margin: 0 0 1.4em; display: flex; flex-wrap: wrap; gap: 8px; }
.datos-clave li { background: var(--fondo-alt); border: 1px solid var(--borde); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .92rem; color: var(--navy); }

/* Ejemplo paso a paso (Procesos administrativos) */
.flujo { list-style: none; padding: 0; margin: 2em 0 0; display: grid; gap: 28px; }
.flujo li { position: relative; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px 20px; font-weight: 600; color: var(--navy); }
.flujo b { display: block; font-size: 1.4rem; color: var(--teal-texto); margin-bottom: .2em; }
.flujo li:not(:last-child)::after { content: "↓"; position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); color: var(--teal); font-weight: 800; font-size: 1.2rem; }
@media (min-width: 900px) {
  .flujo { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .flujo li:not(:last-child)::after { content: "→"; left: auto; right: -24px; bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* Bloque destacado pegado a la sección anterior (home) */
.seccion.pegada { padding-top: 0; }
.destacado { background: var(--fondo-alt); padding: 28px; }
.destacado p + p { margin-top: .8em; }
.destacado h2 { margin-top: 0; }

/* ---------- Textos legales ---------- */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.legal th, .legal td { text-align: left; border-bottom: 1px solid var(--borde); padding: 8px 8px 8px 0; vertical-align: top; }
.legal td a { overflow-wrap: anywhere; }
.legal .tabla { overflow-x: auto; }

/* ---------- Marcador de contenido pendiente ---------- */
.pendiente { background: #FFF1A8; color: #5A4500; border: 1px dashed #B58900; padding: 0 6px; border-radius: 4px; font-weight: 600; font-size: .92em; }

/* ---------- Pie ---------- */
.pie { background: var(--navy); color: #C9D6E8; padding: 40px 0; font-size: .95rem; }
.pie a { color: #fff; }
.pie .marca { color: #fff; }
.pie-fila { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: flex-start; }
.pie ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pie p { margin: .3em 0; }

/* ---------- Hoja de control animada (home · Producto estrella) ---------- */
/* En escritorio: texto arriba (lista en dos columnas) y la hoja debajo, a todo el ancho */
@media (min-width: 900px) {
  .dos-col-hoja { grid-template-columns: 1fr; gap: 32px; }
  .dos-col-hoja .lista-check { columns: 2; column-gap: 40px; }
  .dos-col-hoja .lista-check li { break-inside: avoid; }
}
.hoja { background: #fff; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 10px 30px rgba(11,31,58,.10); overflow: hidden; font-size: .74rem; line-height: 1.35; }
.hoja-barra { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--fondo-alt); border-bottom: 1px solid var(--borde); color: var(--suave); font-size: .78rem; }
.hoja-barra i { width: 9px; height: 9px; border-radius: 50%; background: #CBD3DD; }
.hoja-barra span { margin-left: 8px; }
.hoja table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.hoja th { background: var(--navy); color: #fff; text-align: left; font-weight: 700; font-size: .64rem; letter-spacing: .02em; padding: 8px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoja td { padding: 8px 6px; border-bottom: 1px solid var(--borde); color: var(--texto); vertical-align: middle; position: relative; }
.hoja th:first-child, .hoja td:first-child { padding-left: 10px; }
.hoja .c-es { width: 176px; }
.hoja .c-id { width: 100px; white-space: nowrap; }
.hoja .c-fe { width: 86px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hoja .c-ho { width: 52px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hoja .c-tr, .hoja .c-ho, .hoja .c-id, .hoja .c-ce { display: none; }
@media (min-width: 640px) { .hoja .c-tr, .hoja .c-ho { display: table-cell; } }
@media (min-width: 760px) { .hoja .c-id, .hoja .c-ce { display: table-cell; } }
@media (min-width: 900px) { .hoja { font-size: .82rem; } .hoja th { font-size: .7rem; } .hoja td, .hoja th { padding: 10px 8px; } .hoja .est { font-size: .68rem; } .hoja .c-es { width: 210px; } .hoja .c-id { width: 116px; } .hoja .c-fe { width: 100px; } .hoja .c-ho { width: 64px; } }
.hoja-pestanas { display: flex; gap: 18px; padding: 7px 12px; background: var(--fondo-alt); font-size: .64rem; font-weight: 700; color: var(--suave); }
.hoja-pestanas b { color: var(--navy); border-bottom: 2px solid var(--teal); }
.est { display: inline-block; padding: 3px 8px; border-radius: 999px; font-weight: 700; font-size: .62rem; letter-spacing: .01em; white-space: nowrap; }
.est-pend { background: #EEF1F5; color: #3C4A5E; }
.est-prop { background: #FFF0CC; color: #7A4A00; }
.est-conf { background: #DDF5E6; color: #146C38; }
.est-repr { background: #FFE6D5; color: #9A3F16; }
.est-anul { background: #FDE2E2; color: #B42318; }
.hoja td::after { content: ""; position: absolute; inset: 0; background: var(--teal); opacity: 0; pointer-events: none; }
.hoja tr.destello td::after { animation: destello 1.4s ease-out; }
.est.entra { animation: entra .35s ease-out; }
@keyframes destello { 0% { opacity: 0; } 20% { opacity: .14; } 100% { opacity: 0; } }
@keyframes entra { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.contador { font-variant-numeric: tabular-nums; }

/* ---------- Movimiento discreto (solo si el visitante no pide reducirlo) ---------- */
.tarjeta { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  /* Aparición al hacer scroll: la clase .revelar solo la pone animaciones.js */
  .revelar { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
  .revelar.visto { opacity: 1; transform: none; }
  /* Botones: cambio de color suave */
  .btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tarjeta { transition: transform .25s ease; }
  .tarjeta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 12px 28px rgba(11,31,58,.10); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
  .tarjeta:hover { transform: translateY(-3px); }
  .tarjeta:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hoja tr.destello td::after, .est.entra { animation: none; }
}

/* Texto a una medida cómoda de lectura, alineado como el resto */
.texto-medida { max-width: 46em; }

/* ---------- Oferta de prueba ----------
   Para quitarla de toda la web en un solo cambio: añade  display: none;  aquí. */
.oferta-prueba { font-size: .92rem; margin: 12px 0 0; color: var(--suave); }
.oscuro .oferta-prueba { color: #C9D6E8; }

/* ---------- Formulario "Que me llamen" ---------- */
.llamada { margin-top: 28px; scroll-margin-top: 90px; }
.formulario { background: #fff; color: var(--texto); border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px; max-width: 560px; }
.oscuro .formulario h3, .formulario h3 { color: var(--navy); margin-bottom: .8em; }
.oscuro .formulario a:not(.btn) { color: var(--teal-texto); }
.campo { margin-bottom: 14px; }
.campo label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 4px; font-size: .95rem; }
.campo label span { font-weight: 400; color: var(--suave); }
.campo input[type=text], .campo input[type=tel], .campo input[type=email], .campo select {
  width: 100%; font: inherit; font-size: 1rem; padding: 11px 12px; border: 1px solid #A9B6C6; border-radius: 10px; background: #fff; color: var(--texto); }
.campo input:focus, .campo select:focus { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal-texto); }
.campo [aria-invalid=true] { border-color: #B42318; }
.campo-ayuda { font-size: .85rem; color: var(--suave); margin: 6px 0 0; }
.campo-error { color: #B42318; font-size: .88rem; margin: 4px 0 0; }
.campo-error:empty { display: none; }
.casilla { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.casilla input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--teal-texto); }
.casilla label { font-weight: 500; margin: 0; }
.casilla .campo-error { grid-column: 1 / -1; }
.campo-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.info-rgpd { font-size: .82rem; color: var(--suave); margin: 0 0 14px; }
.formulario .btn { width: 100%; }
.formulario .btn[disabled] { opacity: .7; cursor: wait; }
.form-estado:empty { display: none; }
.form-estado { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.form-estado.ok { background: #DDF5E6; color: #146C38; }
.form-estado.error { background: #FDE2E2; color: #8A1C12; }
.form-estado.error a, .oscuro .formulario .form-estado.error a:not(.btn) { color: #8A1C12; }
.formulario.enviado .campo, .formulario.enviado .info-rgpd, .formulario.enviado button { display: none; }

/* ---------- Botones de contacto (debajo del vídeo y en el cierre) ----------
   Escritorio: manda "Que me llamen" y WhatsApp es secundario.
   Móvil (< 768 px): se invierte el orden y el estilo; WhatsApp pasa a ser el principal.
   Cada botón lleva los dos textos; aquí se decide cuál se ve. */
.solo-movil { display: none; }
.btn-llamar { background: var(--teal-texto); color: #fff; }
.btn-llamar:hover { background: var(--navy); color: #fff; }
.btn-wa { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-wa:hover { background: var(--navy); color: #fff; }
.oscuro .btn-wa { background: transparent; border-color: #fff; color: #fff; }
.oscuro .btn-wa:hover { background: #fff; color: var(--navy); }
@media (max-width: 767px) {
  .solo-pc { display: none; }
  .solo-movil { display: inline; }
  .botones-llamada .btn-wa { order: -1; }
  .botones-llamada .btn-wa, .oscuro .botones-llamada .btn-wa { background: var(--teal-texto); border-color: transparent; color: #fff; }
  .botones-llamada .btn-wa:hover, .oscuro .botones-llamada .btn-wa:hover { background: var(--navy); color: #fff; }
  .botones-llamada .btn-llamar { background: #fff; border-color: var(--navy); color: var(--navy); }
  .oscuro .botones-llamada .btn-llamar { background: transparent; border-color: #fff; color: #fff; }
  .botones-llamada .btn-llamar:hover { background: var(--navy); color: #fff; }
  .oscuro .botones-llamada .btn-llamar:hover { background: #fff; color: var(--navy); }
}
