@charset "UTF-8";
/* =========================================================================
   VIALTECH — Soluciones en Seguridad Vial
   Hoja de estilos principal
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens de diseño
   ------------------------------------------------------------------------- */
:root {
  /* Color — derivado del azul corporativo del logotipo (#08447A) */
  --azul:        #08447A;
  --azul-osc:    #063560;
  --azul-claro:  #2E7CBF;
  --azul-texto:  #2668A1;   /* variante legible para textos pequeños */
  --tinta:       #06213C;
  --tinta-prof:  #041424;
  --ambar:       #F2A20C;
  --ambar-osc:   #C87F00;
  --asfalto:     #16181C;
  --niebla:      #EEF2F6;
  --niebla-2:    #E2E9F0;
  --papel:       #FFFFFF;
  --texto:       #1B2733;
  --texto-suave: #56646F;
  --linea:       #D6DFE8;
  --exito:       #157347;
  --error:       #B42318;

  /* Tipografía */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --cuerpo:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dato:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Escala tipográfica fluida */
  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1.0625rem;
  --t-md:   clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
  --t-lg:   clamp(1.5rem, 1.2vw + 1.1rem, 2rem);
  --t-xl:   clamp(2rem, 2.4vw + 1.2rem, 3.25rem);
  --t-2xl:  clamp(2.6rem, 4.4vw + 1rem, 5.25rem);
  --t-hero: clamp(2.05rem, 2.5vw + 1.25rem, 3.5rem);   /* titular de portada */

  /* Espaciado y geometría */
  --ancho:     1220px;
  --ancho-txt: 68ch;
  --gutter:    clamp(1.25rem, 4vw, 3rem);
  --sec-y:     clamp(4rem, 8vw, 7.5rem);
  --radio:     3px;
  --radio-lg:  5px;

  /* Sombras */
  --sombra-sm: 0 1px 2px rgba(6, 33, 60, .08);
  --sombra:    0 6px 22px -8px rgba(6, 33, 60, .22);
  --sombra-lg: 0 22px 55px -20px rgba(6, 33, 60, .35);

  --trans: 220ms cubic-bezier(.2, .7, .3, 1);
}

/* -------------------------------------------------------------------------
   2. Reset
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--cuerpo);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--texto);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.005em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); font-family: var(--cuerpo); font-weight: 600; line-height: 1.35; }

p  { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--azul); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ambar-osc); }

ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }
li { margin-bottom: .4em; }

strong { font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--ambar);
  outline-offset: 2px;
  border-radius: 2px;
}

.salto-contenido {
  position: absolute; left: -9999px; top: 0;
  background: var(--ambar); color: var(--tinta);
  padding: .8rem 1.4rem; font-weight: 600; z-index: 999;
}
.salto-contenido:focus { left: 1rem; top: 1rem; }

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

/* -------------------------------------------------------------------------
   3. Estructura
   ------------------------------------------------------------------------- */
.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.contenedor-estrecho { max-width: 860px; }

.seccion { padding-block: var(--sec-y); }
.seccion--niebla { background: var(--niebla); }
.seccion--tinta  { background: var(--tinta); color: #D8E4EF; }
.seccion--tinta h2, .seccion--tinta h3 { color: #fff; }
.seccion--compacta { padding-block: clamp(3rem, 5vw, 4.5rem); }

/* Marca vial: filete discontinuo que separa bloques ------------------------ */
.marca-vial {
  height: 3px;
  border: 0;
  margin: 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--azul) 0 26px,
    transparent 26px 44px
  );
  opacity: .32;
}
.seccion--tinta .marca-vial,
.marca-vial--clara {
  background-image: repeating-linear-gradient(
    to right,
    var(--ambar) 0 26px,
    transparent 26px 44px
  );
  opacity: .55;
}

/* Antetítulo (eyebrow) ----------------------------------------------------- */
.antetitulo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--dato);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--azul);
  margin: 0 0 1rem;
}
.antetitulo::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--ambar);
  flex: none;
}
.seccion--tinta .antetitulo,
.portada .antetitulo,
.cta-final .antetitulo,
.cabecera-pagina .antetitulo { color: var(--ambar); }

.entradilla {
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--texto-suave);
  max-width: 60ch;
}
.seccion--tinta .entradilla { color: #A9BFD3; }

.cabecera-seccion { max-width: 68ch; margin-bottom: clamp(2.5rem, 4vw, 4rem); }

/* -------------------------------------------------------------------------
   4. Botones
   ------------------------------------------------------------------------- */
.boton {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .95rem 1.7rem;
  font-family: var(--cuerpo);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radio);
  cursor: pointer;
  transition: background var(--trans), color var(--trans),
              border-color var(--trans), transform var(--trans);
}
.boton:hover { transform: translateY(-2px); }
.boton:active { transform: translateY(0); }

.boton--principal { background: var(--ambar); color: var(--tinta); border-color: var(--ambar); }
.boton--principal:hover { background: #FFB525; border-color: #FFB525; color: var(--tinta); }

.boton--azul { background: var(--azul); color: #fff; border-color: var(--azul); }
.boton--azul:hover { background: var(--azul-osc); border-color: var(--azul-osc); color: #fff; }

.boton--linea { background: transparent; color: var(--azul); border-color: var(--linea); }
.boton--linea:hover { border-color: var(--azul); background: var(--azul); color: #fff; }

.boton--linea-clara { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.boton--linea-clara:hover { background: #fff; color: var(--tinta); border-color: #fff; }

.boton .flecha { transition: transform var(--trans); }
.boton:hover .flecha { transform: translateX(4px); }

.grupo-botones { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Enlace con flecha -------------------------------------------------------- */
.enlace-flecha {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--dato); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--azul); text-decoration: none;
  border-bottom: 2px solid var(--ambar);
  padding-bottom: 3px;
}
.enlace-flecha:hover { color: var(--ambar-osc); }
.enlace-flecha svg { transition: transform var(--trans); }
.enlace-flecha:hover svg { transform: translateX(4px); }

/* -------------------------------------------------------------------------
   5. Cabecera y navegación
   ------------------------------------------------------------------------- */
.cabecera {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--linea);
  transition: box-shadow var(--trans);
}
.cabecera.encogida { box-shadow: var(--sombra); }

.barra {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 78px;
}

.marca { display: flex; align-items: center; flex: none; }
.marca img { width: 178px; height: auto; }

.nav-principal ul {
  display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem);
  list-style: none; margin: 0; padding: 0;
}
.nav-principal a {
  font-size: var(--t-sm); font-weight: 500; color: var(--texto);
  text-decoration: none; padding: .5rem 0; position: relative; display: block;
}
.nav-principal a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--ambar);
  transform: scaleX(0); transform-origin: left; transition: transform var(--trans);
}
.nav-principal a:hover::after,
.nav-principal a[aria-current="page"]::after { transform: scaleX(1); }
.nav-principal a[aria-current="page"] { color: var(--azul); font-weight: 600; }

.acciones-cabecera { display: flex; align-items: center; gap: 1rem; flex: none; }
.tel-cabecera {
  font-family: var(--dato); font-size: var(--t-sm); font-weight: 500;
  color: var(--azul); text-decoration: none; white-space: nowrap;
}

.hamburguesa {
  display: none; width: 46px; height: 46px; padding: 0;
  background: transparent; border: 1px solid var(--linea);
  border-radius: var(--radio); cursor: pointer;
}
.hamburguesa span {
  display: block; width: 20px; height: 2px; margin: 4px auto;
  background: var(--tinta); transition: transform var(--trans), opacity var(--trans);
}
.hamburguesa[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburguesa[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburguesa[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   6. Portada — cabecera principal
   ------------------------------------------------------------------------- */
.portada {
  position: relative;
  min-height: clamp(560px, 82vh, 820px);
  display: flex; align-items: flex-end;
  background: var(--tinta-prof);
  overflow: hidden;
}
.portada__fondo {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .92;
}
.portada::after {
  content: ""; position: absolute; inset: 0;
  background:
    /* Vela la franja izquierda para que el titular tenga contraste suficiente,
       y deja respirar la parte derecha, donde se ve la fotografía. */
    linear-gradient(100deg,
      rgba(4, 20, 36, .93)  0%,
      rgba(4, 20, 36, .86) 26%,
      rgba(4, 20, 36, .54) 52%,
      rgba(4, 20, 36, .12) 78%,
      rgba(4, 20, 36, .24) 100%),
    /* Funde el borde inferior con la banda de datos */
    linear-gradient(to top,
      rgba(4, 20, 36, .88)  0%,
      rgba(4, 20, 36, 0)   34%);
}
.portada__contenido {
  position: relative; z-index: 2;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  width: 100%;
}
.portada h1 {
  color: #fff;
  font-size: var(--t-hero);
  font-weight: 600;
  max-width: 19ch;
  margin-bottom: 1.3rem;
}
.portada h1 em { font-style: normal; color: var(--ambar); }

/* Mensaje de coste del accidente vial laboral: va en primera línea pero
   con peso visual contenido, para que el protagonismo quede en los pilares. */
.portada__alerta {
  position: relative;
  max-width: 46ch;
  margin: 0 0 1.5rem;
  padding: .75rem 1rem .75rem 1.15rem;
  border-left: 3px solid var(--ambar);
  background: rgba(6, 33, 60, .55);
  font-size: var(--t-sm);
  line-height: 1.5;
  color: #E4EDF5;
}
.portada__alerta strong { color: var(--ambar); font-weight: 600; }
.portada .entradilla { color: #C6D6E5; max-width: 54ch; margin-bottom: 2.2rem; }

/* Línea de eje animada bajo el titular */
.eje-animado { width: min(420px, 70%); height: 4px; margin-bottom: 1.8rem; overflow: hidden; }
.eje-animado svg { width: 100%; height: 100%; overflow: visible; }
.eje-animado line {
  stroke: var(--ambar); stroke-width: 4; stroke-dasharray: 26 18;
  stroke-dashoffset: 440;
  animation: pintar-eje 1.5s .35s cubic-bezier(.35,.75,.3,1) forwards;
}
@keyframes pintar-eje { to { stroke-dashoffset: 0; } }

/* -------------------------------------------------------------------------
   6 bis. Pilares de actividad
   Concienciación, prevención, formación y sostenibilidad son el núcleo del
   negocio, así que reciben el mayor peso tipográfico de la página.
   ------------------------------------------------------------------------- */
.pilares {
  background: var(--papel);
  border-bottom: 1px solid var(--linea);
  padding-block: clamp(2.75rem, 5vw, 4.75rem);
}
.pilares__rejilla {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 0;
}
.pilar {
  margin: 0;
  padding: clamp(1.1rem, 2vw, 1.6rem) clamp(1.2rem, 2vw, 2rem);
  border-left: 1px solid var(--linea);
  position: relative;
}
.pilar:first-child { border-left: 0; padding-left: 0; }
.pilar::after {
  content: ""; position: absolute;
  left: clamp(1.2rem, 2vw, 2rem); bottom: 0; width: 30px; height: 3px;
  background: var(--ambar);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--trans);
}
.pilar:first-child::after { left: 0; }
.pilar:hover::after { transform: scaleX(1); }
.pilar__num {
  display: block;
  font-family: var(--dato); font-size: 10px; font-weight: 500;
  letter-spacing: .16em; color: var(--azul-texto);
  margin-bottom: .55rem;
}
.pilar__titulo {
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.1vw + .9rem, 2.85rem);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.01em;
  color: var(--azul);
  margin: 0 0 .5rem;
  text-wrap: balance;
}
.pilar p {
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--texto-suave);
  margin: 0;
  max-width: 34ch;
}

/* -------------------------------------------------------------------------
   7. Banda de datos
   ------------------------------------------------------------------------- */
.banda-datos {
  background: var(--tinta);
  border-top: 3px solid var(--ambar);
  color: #fff;
}
.banda-datos__rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
}
.dato {
  padding: clamp(1.4rem, 2.4vw, 2rem) clamp(1.1rem, 2vw, 1.9rem);
  border-right: 1px solid rgba(255,255,255,.13);
}
.dato:last-child { border-right: 0; }
.dato__cifra {
  font-family: var(--display);
  font-size: clamp(1.85rem, 2.6vw, 2.5rem);
  font-weight: 700; line-height: .98; color: var(--ambar);
  display: block; margin-bottom: .35rem;
  font-variant-numeric: tabular-nums;
}
.dato__texto {
  font-size: var(--t-xs); line-height: 1.5; color: #B6C9DA; margin: 0;
}
.dato__fuente {
  display: block; margin-top: .7rem;
  font-family: var(--dato); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: #8AA3B8;
}

/* -------------------------------------------------------------------------
   8. Tarjetas de servicio
   ------------------------------------------------------------------------- */
.rejilla-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.2rem);
}
.tarjeta {
  display: flex; flex-direction: column;
  background: var(--papel);
  border: 1px solid var(--linea);
  border-radius: var(--radio-lg);
  overflow: hidden;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}
.tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-lg);
  border-color: var(--azul-claro);
}
.tarjeta__img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--niebla-2); }
.tarjeta__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms cubic-bezier(.2,.7,.3,1); }
.tarjeta:hover .tarjeta__img img { transform: scale(1.05); }
.tarjeta__etiqueta {
  position: absolute; left: 0; bottom: 0;
  background: var(--azul); color: #fff;
  font-family: var(--dato); font-size: 10px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .5rem .9rem;
}
.tarjeta__cuerpo { padding: clamp(1.5rem, 2.2vw, 2rem); display: flex; flex-direction: column; flex: 1; }
.tarjeta__cuerpo h3 { margin-bottom: .55rem; }
.tarjeta__cuerpo p  { font-size: var(--t-sm); color: var(--texto-suave); }
.tarjeta__lista { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.tarjeta__lista li {
  position: relative; padding-left: 1.35rem;
  font-size: var(--t-sm); color: var(--texto-suave); margin-bottom: .45rem;
}
.tarjeta__lista li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 2px; background: var(--ambar);
}
.tarjeta__pie { margin-top: auto; padding-top: .5rem; }

/* -------------------------------------------------------------------------
   9. Bloque partido (texto + imagen)
   ------------------------------------------------------------------------- */
.partido {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.partido--invertido .partido__media { order: -1; }
.partido__media { position: relative; }
.partido__media img { width: 100%; border-radius: var(--radio-lg); box-shadow: var(--sombra); }
.partido__media--marco::before {
  content: ""; position: absolute;
  inset: auto -14px -14px auto; width: 62%; height: 62%;
  border: 2px solid var(--ambar); border-radius: var(--radio-lg);
  z-index: -1;
}
.partido__texto ul { list-style: none; padding: 0; margin: 1.5rem 0; }
.partido__texto ul li {
  position: relative; padding-left: 1.75rem; margin-bottom: .8rem; color: var(--texto-suave);
}
.partido__texto ul li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 12px; height: 3px; background: var(--ambar);
}
.seccion--tinta .partido__texto ul li { color: #B4C7D8; }

/* -------------------------------------------------------------------------
   10. Ruta comercial — hitos kilométricos
   ------------------------------------------------------------------------- */
.ruta { position: relative; padding-left: clamp(2.5rem, 5vw, 4.5rem); }
.ruta::before {
  content: ""; position: absolute;
  left: clamp(.7rem, 1.6vw, 1.4rem); top: .5rem; bottom: .5rem; width: 4px;
  background-image: repeating-linear-gradient(
    to bottom, var(--ambar) 0 20px, transparent 20px 36px);
  opacity: .5;
}
.hito { position: relative; padding-bottom: clamp(2rem, 3.5vw, 2.8rem); }
.hito:last-child { padding-bottom: 0; }
.hito__marca {
  position: absolute;
  left: calc(clamp(2.5rem, 5vw, 4.5rem) * -1);
  top: 0; width: clamp(2.6rem, 4vw, 3.2rem);
  background: var(--azul); color: #fff;
  border-radius: 2px; text-align: center;
  padding: .35rem .2rem .45rem;
  box-shadow: 0 2px 0 var(--ambar);
}
.hito__marca span {
  display: block; font-family: var(--dato); font-size: 9px;
  letter-spacing: .08em; opacity: .75; line-height: 1;
}
.hito__marca strong {
  display: block; font-family: var(--display); font-size: 1.35rem;
  font-weight: 700; line-height: 1.05;
}
.hito h3 { font-size: var(--t-md); font-family: var(--cuerpo); font-weight: 600; margin-bottom: .3rem; }
.hito p  { font-size: var(--t-sm); color: var(--texto-suave); margin: 0; max-width: 58ch; }
.seccion--tinta .hito p { color: #A9BFD3; }

/* -------------------------------------------------------------------------
   11. Cobertura nacional
   ------------------------------------------------------------------------- */
.cobertura { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.mapa-es {
  width: 100%;
  height: auto;
  max-height: 480px;
  margin-inline: auto;
  display: block;
  overflow: visible;
}
.mapa-es .contorno { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.28); stroke-width: 1.2; }
.mapa-es .contorno--pt { fill: rgba(242,162,12,.10); stroke: rgba(242,162,12,.55); }
.mapa-es .nodo { fill: var(--ambar); }
.mapa-es .nodo--grande { fill: #fff; }
.mapa-es .halo { fill: none; stroke: var(--ambar); stroke-width: 1; opacity: .45; }

.recursos-red { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.13); margin-top: 2rem; }
.recurso { background: var(--tinta); padding: 1.4rem 1.2rem; }
.recurso strong {
  display: block; font-family: var(--display); font-size: 1.9rem;
  font-weight: 700; color: var(--ambar); line-height: 1;
}
.recurso span { font-size: var(--t-xs); color: #A9BFD3; line-height: 1.4; display: block; margin-top: .35rem; }

/* -------------------------------------------------------------------------
   12. Sectores y logotipos
   ------------------------------------------------------------------------- */
.rejilla-sectores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px; background: var(--linea);
  border: 1px solid var(--linea);
}
.sector { background: var(--papel); padding: clamp(1.4rem, 2.2vw, 1.9rem); transition: background var(--trans); }
.sector:hover { background: var(--niebla); }
.sector h3 {
  font-family: var(--cuerpo); font-size: var(--t-base);
  font-weight: 600; margin-bottom: .35rem;
}
.sector p { font-size: var(--t-sm); color: var(--texto-suave); margin: 0; }
.sector__num {
  font-family: var(--dato); font-size: 10px; letter-spacing: .12em;
  color: var(--azul-texto); display: block; margin-bottom: .7rem;
}

.tira-alianzas {
  display: flex; flex-wrap: wrap; gap: .6rem;
  list-style: none; padding: 0; margin: 0;
}
.tira-alianzas li {
  font-family: var(--dato); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: .08em; padding: .55rem 1rem;
  border: 1px solid var(--linea); border-radius: 100px;
  color: var(--texto-suave); background: var(--papel); margin: 0;
}
.seccion--tinta .tira-alianzas li {
  border-color: rgba(255,255,255,.2); background: transparent; color: #B4C7D8;
}

/* -------------------------------------------------------------------------
   13. Cabecera de páginas interiores
   ------------------------------------------------------------------------- */
.cabecera-pagina {
  position: relative;
  background: var(--tinta-prof);
  color: #fff;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.cabecera-pagina__fondo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .32;
}
.cabecera-pagina::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(4,20,36,.92) 15%, rgba(4,20,36,.62) 100%);
}
.cabecera-pagina .contenedor { position: relative; z-index: 2; }
.cabecera-pagina h1 { color: #fff; font-size: var(--t-xl); max-width: 20ch; margin-bottom: 1rem; }
.cabecera-pagina .entradilla { color: #BCD0E1; }

.miga { margin-bottom: 1.2rem; }
.miga ol {
  display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; padding: 0; margin: 0;
  font-family: var(--dato); font-size: var(--t-xs); letter-spacing: .08em;
  text-transform: uppercase;
}
.miga li { margin: 0; color: #7F9AB2; }
.miga li + li::before { content: "/"; margin-right: .5rem; color: #4E6B85; }
.miga a { color: #A9C3D9; text-decoration: none; }
.miga a:hover { color: var(--ambar); }

/* -------------------------------------------------------------------------
   14. Contenido de texto largo (legales, artículos)
   ------------------------------------------------------------------------- */
.prosa { max-width: var(--ancho-txt); }
.prosa h2 { font-size: var(--t-lg); margin-top: 2.4em; }
.prosa h2:first-child { margin-top: 0; }
.prosa h3 { font-size: var(--t-md); font-family: var(--cuerpo); font-weight: 600; margin-top: 2em; }
.prosa ul, .prosa ol { padding-left: 1.3em; }
.prosa li { color: var(--texto-suave); }
.prosa table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: var(--t-sm); }
.prosa th, .prosa td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--linea); vertical-align: top; }
.prosa th { background: var(--niebla); font-weight: 600; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; }

.tabla {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.8em 0;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
}
.tabla table { margin: 0; min-width: 460px; }
.tabla table th:first-child, .tabla table td:first-child { padding-left: 1.2rem; }
.tabla table tr:last-child td { border-bottom: 0; }

/* Tablas sobre fondo oscuro: el encabezado debe invertirse, porque el gris
   claro por defecto dejaba texto claro sobre fondo claro. */
.seccion--tinta .prosa th {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .2);
}
.seccion--tinta .prosa td {
  color: #C9D9E7;
  border-bottom-color: rgba(255, 255, 255, .13);
}
.seccion--tinta .tabla { border-color: rgba(255, 255, 255, .16); }
.seccion--tinta .prosa small { color: #93AABE; }
.seccion--tinta .prosa p,
.seccion--tinta .prosa li { color: #B9CCDC; }

.destacado {
  border-left: 4px solid var(--ambar);
  background: var(--niebla);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  border-radius: 0 var(--radio) var(--radio) 0;
}
.destacado p { font-size: var(--t-sm); margin-bottom: 0; }

/* Acordeón de preguntas frecuentes ---------------------------------------- */
.faq { border-top: 1px solid var(--linea); max-width: var(--ancho-txt); }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.35rem 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--t-base); color: var(--tinta);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-family: var(--display); font-size: 1.6rem; line-height: 1;
  color: var(--ambar); transition: transform var(--trans);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1.5rem; }
.faq details p { font-size: var(--t-sm); color: var(--texto-suave); }

/* -------------------------------------------------------------------------
   15. Formulario
   ------------------------------------------------------------------------- */
.bloque-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.formulario {
  background: var(--papel);
  border: 1px solid var(--linea);
  border-top: 4px solid var(--ambar);
  border-radius: var(--radio-lg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  box-shadow: var(--sombra);
}
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; }
.campo { display: flex; flex-direction: column; }
.campo--ancho { grid-column: 1 / -1; }

.campo label {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--tinta); margin-bottom: .45rem;
}
.campo .req { color: var(--error); }

.campo input, .campo select, .campo textarea {
  width: 100%;
  font-family: var(--cuerpo); font-size: var(--t-base); color: var(--texto);
  padding: .8rem .9rem;
  border: 1px solid var(--linea); border-radius: var(--radio);
  background: var(--papel);
  transition: border-color var(--trans), box-shadow var(--trans);
}
.campo textarea { resize: vertical; min-height: 130px; }
.campo select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2308447A' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(8,68,122,.14);
}
.campo input[aria-invalid="true"], .campo textarea[aria-invalid="true"], .campo select[aria-invalid="true"] {
  border-color: var(--error); box-shadow: 0 0 0 3px rgba(180,35,24,.1);
}
.campo__error { font-size: var(--t-xs); color: var(--error); margin-top: .35rem; min-height: 1em; }

.consentimiento { display: flex; gap: .75rem; align-items: flex-start; margin: 1.4rem 0 1.2rem; }
.consentimiento input { width: 18px; height: 18px; flex: none; margin-top: 3px; accent-color: var(--azul); }
.consentimiento label { font-size: var(--t-xs); line-height: 1.55; color: var(--texto-suave); text-transform: none; letter-spacing: 0; font-weight: 400; }

.trampa { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.aviso {
  padding: 1rem 1.2rem; border-radius: var(--radio);
  font-size: var(--t-sm); margin-bottom: 1.4rem;
}
.aviso--error { background: #FDECEA; border: 1px solid #F5C6C2; color: #86201A; }
.aviso--exito { background: #E7F5EE; border: 1px solid #B7DFC9; color: #0F5132; }

.datos-contacto { list-style: none; padding: 0; margin: 2rem 0 0; }
.datos-contacto li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--linea); margin: 0; }
.datos-contacto .etiqueta {
  font-family: var(--dato); font-size: var(--t-xs); letter-spacing: .1em;
  text-transform: uppercase; color: var(--azul-texto); min-width: 108px; flex: none; padding-top: 2px;
}
.datos-contacto .valor { font-weight: 500; }
.datos-contacto a { text-decoration: none; }

/* -------------------------------------------------------------------------
   16. Llamada a la acción final
   ------------------------------------------------------------------------- */
.cta-final {
  position: relative; background: var(--azul); color: #fff; overflow: hidden;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px);
}
.cta-final .contenedor { position: relative; z-index: 2; }
.cta-final h2 { color: #fff; max-width: 22ch; }
.cta-final p { color: #C9DDF0; max-width: 56ch; }

/* -------------------------------------------------------------------------
   17. Pie
   ------------------------------------------------------------------------- */
.pie { background: var(--tinta-prof); color: #93AABE; padding-block: clamp(3rem, 5vw, 4.5rem) 0; font-size: var(--t-sm); }
.pie__rejilla {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem); padding-bottom: 3rem;
}
.pie__marca img { width: 190px; margin-bottom: 1.2rem; }
.pie__marca p { font-size: var(--t-sm); color: #7E96AC; max-width: 34ch; }
.pie h2, .pie h3 {
  font-family: var(--dato); font-size: var(--t-xs); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem;
}
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { margin-bottom: .6rem; }
.pie a { color: #93AABE; text-decoration: none; }
.pie a:hover { color: var(--ambar); }
.pie__legal {
  border-top: 1px solid rgba(255,255,255,.11);
  padding-block: 1.6rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.8rem;
  align-items: center; justify-content: space-between;
  font-size: var(--t-xs); color: #6F879C;
}
.pie__legal ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.pie__legal li { margin: 0; }

/* -------------------------------------------------------------------------
   18. Banner de cookies
   ------------------------------------------------------------------------- */
.cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
  max-width: 640px; margin-inline: auto;
  background: var(--tinta); color: #C6D6E5;
  border: 1px solid rgba(255,255,255,.14);
  border-top: 3px solid var(--ambar);
  border-radius: var(--radio-lg);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--sombra-lg);
  transform: translateY(140%);
  transition: transform 380ms cubic-bezier(.2,.7,.3,1);
}
.cookies.visible { transform: translateY(0); }
.cookies p { font-size: var(--t-sm); margin-bottom: 1rem; }
.cookies a { color: var(--ambar); }
.cookies .grupo-botones .boton { padding: .7rem 1.3rem; }

/* -------------------------------------------------------------------------
   19. Animación al hacer scroll
   ------------------------------------------------------------------------- */
.revelar { opacity: 0; transform: translateY(22px); transition: opacity 620ms ease, transform 620ms cubic-bezier(.2,.7,.3,1); }
.revelar.visible { opacity: 1; transform: none; }

/* -------------------------------------------------------------------------
   20. Adaptación a pantallas pequeñas
   ------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .tel-cabecera { display: none; }
}

@media (max-width: 900px) {
  .pilar { border-left: 0; border-top: 1px solid var(--linea); padding-left: 0; padding-right: 0; }
  .pilar:first-child { border-top: 0; padding-top: 0; }
  .pilar::after, .pilar:first-child::after { left: 0; }
  .pilar p { max-width: none; }
  .hamburguesa { display: block; }
  .nav-principal {
    position: fixed; inset: 78px 0 auto 0;
    background: var(--papel);
    border-bottom: 1px solid var(--linea);
    box-shadow: var(--sombra-lg);
    max-height: 0; overflow: hidden;
    transition: max-height 340ms cubic-bezier(.2,.7,.3,1);
  }
  .nav-principal.abierta { max-height: 70vh; overflow-y: auto; }
  .nav-principal ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.5rem; }
  .nav-principal li { border-bottom: 1px solid var(--linea); margin: 0; }
  .nav-principal a { padding: 1rem 0; font-size: var(--t-md); }
  .nav-principal a::after { display: none; }
  .acciones-cabecera .boton { display: none; }
  .dato { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.13); }
  .partido--invertido .partido__media { order: 0; }
  .partido__media--marco::before { display: none; }
}

@media (max-width: 560px) {
  .marca img { width: 148px; }
  .barra { min-height: 68px; }
  .nav-principal { inset-block-start: 68px; }
  html { scroll-padding-top: 76px; }
  .pie__legal { flex-direction: column; align-items: flex-start; }
  .grupo-botones .boton { width: 100%; justify-content: center; }
}

/* -------------------------------------------------------------------------
   21. Preferencias del sistema
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .revelar { opacity: 1; transform: none; }
  .eje-animado line { stroke-dashoffset: 0; }
}

@media print {
  .cabecera, .pie, .cookies, .cta-final, .boton { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .cabecera-pagina, .portada { background: none; color: #000; }
  .cabecera-pagina::after, .portada::after, .portada__fondo, .cabecera-pagina__fondo { display: none; }
  .cabecera-pagina h1, .portada h1 { color: #000; }
}
