/* ==========================================================================
   FERRIBERUM · estilos
   Colores y tipografías se cambian en el bloque :root de aquí abajo.
   ========================================================================== */

@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* Color de acento: azul marino. Se cambia aquí.
     --marino es el color de botones y franjas; --azul-luz es su versión clara,
     para líneas finas sobre fondo oscuro (donde el marino no se vería). */
  --marino: #1c3d72;
  --marino-fuerte: #152e58;
  --azul-luz: #7aa7ea;
  --azul-foco: #4f86d9;

  --chapa: #171a1d;        /* negro chapa */
  --acero: #22272c;        /* gris acero */
  --acero-claro: #2f363c;
  --linea-oscura: #404850;

  --galva: #e7e9ea;        /* gris galvanizado */
  --papel: #f6f7f6;
  --linea-clara: #cdd2d5;

  --tinta: #1a1e22;
  --tinta-suave: #4a535b;
  --luz: #f1f3f4;
  --luz-suave: #a9b1b8;

  --whatsapp: #25d366;

  --titular: "Saira Condensed", "Arial Narrow", Impact, sans-serif;
  --texto: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --alto-cabecera: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-cabecera) + 12px); }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--titular); font-weight: 700; line-height: 1.04; margin: 0; text-transform: uppercase; letter-spacing: 0.005em; }
h2 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h3 { font-size: 1.45rem; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--azul-foco); outline-offset: 3px; }

.ancho { width: min(100% - 2.5rem, 1160px); margin-inline: auto; }
.oculto-visual { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--marino); color: #fff; padding: .75rem 1rem; font-weight: 600; }
.saltar:focus { left: 0; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .7rem 1.5rem;
  font-family: var(--texto); font-size: 1.05rem; font-weight: 600; line-height: 1.1;
  text-decoration: none; text-align: center;
  color: #fff; background: var(--marino);
  border: 2px solid var(--marino); border-radius: 2px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.boton:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--chapa); }
.boton:active { transform: none; box-shadow: none; }
.boton svg { width: 1.25em; height: 1.25em; flex: none; }

.boton--linea { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.boton--linea:hover { background: var(--tinta); color: var(--papel); box-shadow: 5px 5px 0 var(--marino); }
.boton--oscuro { background: var(--chapa); color: var(--luz); border-color: var(--chapa); }
.boton--oscuro:hover { box-shadow: 5px 5px 0 rgba(23, 26, 29, .35); }
.boton--claro { background: transparent; color: var(--luz); border-color: var(--luz); }
.boton--claro:hover { background: var(--luz); color: var(--chapa); box-shadow: 5px 5px 0 var(--azul-luz); }
.boton--blanco { background: #fff; color: var(--marino-fuerte); border-color: #fff; }
.boton--blanco:hover { box-shadow: 5px 5px 0 rgba(0, 0, 0, .35); }
/* Sobre fondos oscuros el botón marino lleva un filo claro para que se distinga */
.cabecera .boton, .menu-movil .boton:not(.boton--claro), .titulo-pagina .boton { border-color: var(--azul-luz); }
.cabecera .boton:hover, .menu-movil .boton:not(.boton--claro):hover, .titulo-pagina .boton:hover { background: var(--marino-fuerte); box-shadow: 5px 5px 0 var(--azul-luz); }

.enlace-fuerte { font-weight: 600; text-decoration: underline; text-decoration-color: var(--marino); text-decoration-thickness: 3px; text-underline-offset: 5px; transition: text-underline-offset .15s ease; }
.enlace-fuerte:hover { text-underline-offset: 8px; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--alto-cabecera);
  color: var(--luz);
  background: linear-gradient(to bottom, rgba(23, 26, 29, .78), rgba(23, 26, 29, 0));
  transition: background-color .25s ease, box-shadow .25s ease;
}
.cabecera.fija, .cabecera.solida { background: var(--chapa); box-shadow: 0 1px 0 var(--linea-oscura); }
.cabecera__fila { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cabecera__logo img { height: 24px; width: auto; }
.menu { display: none; }
.menu a { text-decoration: none; font-weight: 500; padding: .5rem 0; border-bottom: 3px solid transparent; transition: border-color .15s ease; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--azul-luz); }
.cabecera__acciones { display: flex; align-items: center; gap: .5rem; }
.cabecera__llamar { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--linea-oscura); border-radius: 2px; }
.cabecera__llamar svg { width: 22px; height: 22px; }
.cabecera__presupuesto { display: none; min-height: 44px; padding: .5rem 1.1rem; font-size: 1rem; }
.hamburguesa { display: grid; place-items: center; width: 46px; height: 46px; background: none; border: 2px solid var(--linea-oscura); border-radius: 2px; color: inherit; cursor: pointer; }
.hamburguesa span, .hamburguesa span::before, .hamburguesa span::after { display: block; width: 20px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.hamburguesa span { position: relative; }
.hamburguesa span::before, .hamburguesa span::after { content: ""; position: absolute; left: 0; }
.hamburguesa span::before { top: -6px; }
.hamburguesa span::after { top: 6px; }
.menu-abierto .hamburguesa span { background: transparent; }
.menu-abierto .hamburguesa span::before { transform: translateY(6px) rotate(45deg); }
.menu-abierto .hamburguesa span::after { transform: translateY(-6px) rotate(-45deg); }

.menu-movil {
  position: fixed; inset: var(--alto-cabecera) 0 0 0; z-index: 99;
  background: var(--chapa); color: var(--luz);
  padding: 1.5rem 1.25rem 2rem;
  display: flex; flex-direction: column; gap: .25rem;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  overflow-y: auto;
}
.menu-abierto .menu-movil { transform: none; opacity: 1; visibility: visible; }
.menu-abierto .cabecera { background: var(--chapa); }
.menu-movil a.menu-movil__enlace { font-family: var(--titular); font-weight: 700; font-size: 1.9rem; text-transform: uppercase; text-decoration: none; padding: .55rem 0; border-bottom: 1px solid var(--linea-oscura); }
.menu-movil a.menu-movil__enlace[aria-current="page"] { color: var(--azul-luz); }
.menu-movil .boton { margin-top: 1.25rem; }

@media (min-width: 1080px) {
  .menu { display: flex; gap: clamp(1.1rem, 2vw, 2rem); }
  .hamburguesa, .cabecera__llamar, .menu-movil { display: none; }
  .cabecera__presupuesto { display: inline-flex; }
  .cabecera__logo img { height: 27px; }
}

/* Cabecera en móvil: menú a la izquierda, logo en el centro y teléfono a la derecha */
@media (max-width: 1079px) {
  .cabecera__fila { display: grid; grid-template-columns: 46px 1fr 46px; gap: .75rem; }
  .cabecera__acciones { display: contents; }
  .hamburguesa { order: 1; }
  .cabecera__logo { order: 2; justify-self: center; }
  .cabecera__llamar { order: 3; }
}

/* ---------- Portada (hero) ---------- */
.portada {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--luz);
  background: var(--chapa) url("../img/portada.jpg") center / cover no-repeat;
  padding-top: calc(var(--alto-cabecera) + 2rem);
  overflow: hidden;
}
.portada__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
@media (max-width: 700px) and (orientation: portrait) { .portada { background-image: url("../img/portada-movil.jpg"); } }
.portada__velo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(23, 26, 29, .86) 0%, rgba(23, 26, 29, .6) 42%, rgba(23, 26, 29, .28) 100%); }
.portada__texto { padding-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.portada h1, .portada__frase { text-shadow: 0 2px 16px rgba(0, 0, 0, .4); }
.portada h1 { font-weight: 800; font-size: clamp(2.9rem, 14.5vw, 7.75rem); line-height: .97; max-width: 11ch; letter-spacing: -0.005em; }
.portada__frase { margin-top: 1.1rem; max-width: 34rem; font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.45; color: var(--luz); }

/* Las dos "puertas": contratista / particular.
   Botones de cristal: transparentes, con un velo blanco sobre el vídeo. */
.puertas { display: grid; gap: .75rem; margin-bottom: 5.75rem; }
.puerta {
  position: relative; display: block; text-decoration: none;
  padding: 1.15rem 1.25rem 1.2rem;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px) saturate(1.15); -webkit-backdrop-filter: blur(10px) saturate(1.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.puerta strong { display: block; font-family: var(--titular); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1; text-transform: uppercase; }
.puerta__desc { display: block; margin-top: .35rem; font-size: 1rem; line-height: 1.35; }
.puerta:hover, .puerta:focus-visible { background: rgba(255, 255, 255, .92); border-color: #fff; color: var(--chapa); text-shadow: none; transform: translateY(-3px); }
@media (min-width: 700px) {
  .puertas { grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
  .puerta { padding: 1.5rem 1.75rem 1.6rem; }
}

/* Portada en móvil: titular grande, una sola frase y los dos botones en fila */
@media (max-width: 699px) {
  .portada__velo { background: linear-gradient(to top, rgba(23, 26, 29, .92) 0%, rgba(23, 26, 29, .78) 30%, rgba(23, 26, 29, .3) 58%, rgba(23, 26, 29, .12) 100%); }
  .portada h1 { font-size: clamp(3rem, 16.5vw, 4.4rem); line-height: .95; }
  .portada__frase { margin-top: .8rem; font-size: 1.08rem; font-weight: 500; }
  .portada__texto { padding-bottom: 1.25rem; }
  .solo-grande { display: none; }
  .puertas { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .puerta { padding: .75rem .85rem .9rem; }
  .puerta strong { font-size: clamp(1.45rem, 7vw, 1.75rem); }
  .puerta__soy { display: block; font-family: var(--texto); font-weight: 500; font-size: .95rem; text-transform: none; line-height: 1.3; }
  .puerta__desc { display: none; }
}

/* Entrada de la portada: una sola secuencia al cargar */
@keyframes subir { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.js .portada h1, .js .portada__frase, .js .puertas { animation: subir .7s cubic-bezier(.2, .7, .2, 1) both; }
.js .portada__frase { animation-delay: .12s; }
.js .puertas { animation-delay: .24s; }

/* ---------- Bandas (secciones) ---------- */
.banda { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.banda--chapa { background: var(--chapa); color: var(--luz); }
.banda--acero { background: var(--acero); color: var(--luz); }
.banda--galva { background: var(--galva); }
.banda--papel { background: var(--papel); }
.banda--acento { background: var(--marino); color: #fff; }
.banda__intro { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.banda__intro p { margin-top: 1rem; font-size: 1.15rem; color: var(--tinta-suave); }
.banda--chapa .banda__intro p, .banda--acero .banda__intro p { color: var(--luz-suave); }

/* ---------- Garantías (tira bajo la portada) ---------- */
.garantias { background: var(--acero); color: var(--luz); padding-block: 0; }
.garantias__rejilla { display: grid; grid-template-columns: 1fr 1fr; }
.garantia { padding: 1.4rem 1rem 1.5rem 0; border-top: 1px solid var(--linea-oscura); }
.garantia:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--linea-oscura); }
.garantia:nth-child(-n+2) { border-top: 0; }
.garantia h2 { font-size: 1.35rem; line-height: 1.05; color: var(--luz); }
.garantia p { margin-top: .4rem; font-size: .95rem; line-height: 1.4; color: var(--luz-suave); }
@media (min-width: 900px) {
  .garantias__rejilla { grid-template-columns: repeat(4, 1fr); }
  .garantia { padding: 1.9rem 1.5rem 2rem; border-top: 0; border-left: 1px solid var(--linea-oscura); }
  .garantia:first-child { padding-left: 0; border-left: 0; }
  .garantia:nth-child(even) { padding-left: 1.5rem; }
  .garantia h2 { font-size: 1.55rem; }
}

/* ---------- Dupla: texto + fotos ---------- */
.dupla { display: grid; gap: 2.25rem; align-items: center; }
.dupla__texto p { margin-top: 1.1rem; max-width: 34rem; color: var(--tinta-suave); font-size: 1.12rem; }
.dupla__texto .boton, .dupla__texto .enlace-fuerte { margin-top: 1.75rem; }
.dupla__fotos { display: grid; grid-template-columns: 1.15fr 1fr; gap: .75rem; align-items: start; }
.dupla__fotos img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; border-radius: 2px; }
.dupla__fotos img:last-child { margin-top: 2.5rem; }
@media (min-width: 900px) {
  .dupla { grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 6vw, 5rem); }
  .dupla--invertida .dupla__fotos { order: -1; }
  .dupla__fotos { gap: 1rem; }
  .dupla__fotos img { aspect-ratio: 4 / 5; }
  .dupla__fotos img:last-child { margin-top: 4rem; }
}

/* ---------- Trío de servicios (inicio) ---------- */
.trio { display: grid; gap: 2.25rem; }
.trio__item { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: inherit; }
.trio__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; transition: filter .25s ease; }
.trio__item h3 { margin-top: 1.1rem; font-size: clamp(1.55rem, 2.4vw, 1.9rem); }
.trio__item p { margin-top: .55rem; color: var(--tinta-suave); }
.trio__item .enlace-fuerte { margin-top: .9rem; }
.trio__item:hover img { filter: brightness(1.08) contrast(1.05); }
.trio__item:hover .enlace-fuerte { text-underline-offset: 8px; }
@media (min-width: 760px) {
  .trio { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
  .trio__item img { aspect-ratio: 1; }
}

/* ---------- Zona de trabajo ---------- */
.zona { display: grid; gap: 1.5rem; }
.zona h2 { font-size: clamp(2.4rem, 7.5vw, 5.5rem); font-weight: 800; line-height: 1.02; max-width: 13ch; }
.zona p { max-width: 32rem; color: var(--luz-suave); font-size: 1.12rem; }
@media (min-width: 900px) { .zona { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 4rem; } }

/* ---------- Llamada final ---------- */
.llamada { display: grid; gap: 1.5rem; }
.llamada h2 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
.llamada p { font-size: 1.15rem; font-weight: 500; max-width: 30rem; }
.llamada__botones { display: flex; flex-wrap: wrap; gap: .75rem; }
.banda--acento .boton--claro:hover { box-shadow: 5px 5px 0 rgba(0, 0, 0, .35); }
@media (min-width: 900px) { .llamada { grid-template-columns: 1fr auto; align-items: center; gap: 3rem; } }

/* ---------- Cabecera de páginas interiores ---------- */
.titulo-pagina { position: relative; isolation: isolate; color: var(--luz); background: var(--chapa); padding: calc(var(--alto-cabecera) + clamp(3rem, 8vw, 6rem)) 0 clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; }
.titulo-pagina__fondo { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; }
.titulo-pagina__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* Cabecera alta, para las páginas que llevan vídeo de fondo */
.titulo-pagina--alta { display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(420px, 68vh, 640px); }
.titulo-pagina.titulo-pagina--alta::after { background: linear-gradient(to top, rgba(23, 26, 29, .92) 0%, rgba(23, 26, 29, .68) 45%, rgba(23, 26, 29, .3) 100%); }
/* En pantallas anchas el texto va a la izquierda: se oscurece ese lado y el vídeo queda limpio a la derecha */
@media (min-width: 760px) {
  .titulo-pagina.titulo-pagina--alta::after { background: linear-gradient(to right, rgba(23, 26, 29, .9) 0%, rgba(23, 26, 29, .72) 36%, rgba(23, 26, 29, .28) 72%, rgba(23, 26, 29, .16) 100%); }
}
.titulo-pagina::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, rgba(23, 26, 29, .95) 0%, rgba(23, 26, 29, .8) 55%, rgba(23, 26, 29, .5) 100%); }
.titulo-pagina--alta h1, .titulo-pagina--alta p { text-shadow: 0 2px 16px rgba(0, 0, 0, .4); }
.titulo-pagina h1 { font-weight: 800; font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: .98; max-width: 14ch; }
.titulo-pagina p { margin-top: 1.25rem; max-width: 36rem; font-size: clamp(1.08rem, 2vw, 1.25rem); line-height: 1.5; color: var(--luz); }
.titulo-pagina .boton { margin-top: 1.75rem; }

/* ---------- Lista de servicios (marcador: perfil de viga) ---------- */
.servicios { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid var(--tinta); }
.servicio { display: grid; grid-template-columns: 30px 1fr; gap: .35rem 1rem; padding: 1.5rem 0; border-top: 2px solid var(--tinta); }
.servicio__viga { width: 26px; height: 30px; color: var(--marino); margin-top: .1rem; }
.servicio h3 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
.servicio p { grid-column: 2; color: var(--tinta-suave); max-width: 38rem; }
@media (min-width: 900px) {
  .servicio { grid-template-columns: 40px 1fr 1.25fr; gap: 1.5rem; padding: 2rem 0; align-items: start; }
  .servicio p { grid-column: 3; }
}

/* ---------- Motivos (por qué nosotros) ---------- */
.motivos { display: grid; gap: 0; }
.motivo { padding: 1.5rem 0; border-top: 1px solid var(--linea-oscura); }
.motivo h3 { color: var(--luz); font-size: 1.6rem; }
.motivo p { margin-top: .5rem; color: var(--luz-suave); max-width: 30rem; }
@media (min-width: 760px) {
  .motivos { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
  .motivo { padding: 1.9rem 0; }
}

/* Motivos con foto al lado */
.con-foto { display: grid; gap: 2rem; }
.con-foto__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 35%; border-radius: 2px; }
@media (min-width: 900px) {
  .con-foto { grid-template-columns: 1.2fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: stretch; }
  .con-foto__img { aspect-ratio: auto; height: 100%; min-height: 460px; }
  .motivos.motivos--columna { grid-template-columns: 1fr; }
}

/* ---------- Galería ---------- */
.galeria { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.galeria a { position: relative; display: block; overflow: hidden; border-radius: 2px; background: var(--acero); }
.galeria img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .45s ease; }
.galeria a:hover img { transform: scale(1.05); }
.galeria a::after { content: ""; position: absolute; inset: 0; border: 0 solid var(--azul-foco); transition: border-width .18s ease; pointer-events: none; }
.galeria a:hover::after, .galeria a:focus-visible::after { border-width: 5px; }
.galeria__play { position: absolute; left: .75rem; bottom: .75rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--marino); color: #fff; border: 2px solid #fff; border-radius: 50%; }
.galeria__play svg { width: 18px; height: 18px; margin-left: 2px; }
.galeria__pie { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .7rem .6rem; background: linear-gradient(to top, rgba(23, 26, 29, .9), rgba(23, 26, 29, 0)); color: #fff; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.galeria__nota { margin-top: 1rem; font-size: .95rem; color: var(--tinta-suave); }
@media (min-width: 760px) { .galeria { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

/* Visor (se abre al pulsar una foto o vídeo) */
.visor { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(13, 15, 17, .95); padding: 3.5rem 1rem; }
.visor.abierto { display: flex; }
.visor__medio { max-width: min(100%, 1100px); max-height: 100%; }
.visor__medio img, .visor__medio video { max-width: 100%; max-height: calc(100vh - 7rem); max-height: calc(100svh - 7rem); width: auto; height: auto; margin: auto; border-radius: 2px; }
.visor button { position: absolute; display: grid; place-items: center; width: 50px; height: 50px; background: var(--acero); color: var(--luz); border: 2px solid var(--linea-oscura); border-radius: 2px; cursor: pointer; font-size: 1.5rem; line-height: 1; transition: background-color .15s ease, color .15s ease; }
.visor button:hover { background: var(--azul-luz); color: var(--chapa); border-color: var(--azul-luz); }
.visor__cerrar { top: .75rem; right: .75rem; }
.visor__ant { left: .75rem; bottom: .75rem; }
.visor__sig { right: .75rem; bottom: .75rem; }
.visor__pie { position: absolute; left: 0; right: 0; bottom: 1.4rem; text-align: center; color: var(--luz-suave); font-size: .95rem; padding-inline: 4.5rem; }
@media (min-width: 760px) { .visor__ant, .visor__sig { bottom: auto; top: 50%; transform: translateY(-50%); } }

/* ---------- Formularios ---------- */
.contacto-rejilla { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contacto-rejilla { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 6vw, 5rem); align-items: start; } }

.formulario { display: grid; gap: 1.1rem; background: #fff; border: 2px solid var(--tinta); border-radius: 2px; padding: clamp(1.25rem, 3vw, 2rem); }
.campo { display: grid; gap: .35rem; }
.campo label { font-weight: 600; font-size: 1rem; }
.campo label small { font-weight: 400; color: var(--tinta-suave); font-size: .9rem; }
.campo input, .campo textarea, .campo select {
  width: 100%; font: inherit; color: var(--tinta);
  padding: .75rem .85rem; min-height: 52px;
  background: var(--papel); border: 2px solid var(--linea-clara); border-radius: 2px;
  transition: border-color .15s ease, background-color .15s ease;
}
.campo textarea { min-height: 130px; resize: vertical; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--azul-foco); background: #fff; }
.campos-dobles { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .campos-dobles { grid-template-columns: 1fr 1fr; } }
.acepto { display: grid; grid-template-columns: 24px 1fr; gap: .7rem; align-items: start; font-size: .95rem; color: var(--tinta-suave); }
.acepto input { width: 22px; height: 22px; margin: .15rem 0 0; accent-color: var(--marino); }
.trampa { position: absolute; left: -9999px; }
.formulario__legal { font-size: .85rem; line-height: 1.45; color: var(--tinta-suave); margin-top: -.4rem; }
.formulario .boton { justify-self: start; }
.formulario__estado { display: none; padding: .9rem 1rem; border-left: 5px solid var(--tinta); background: var(--galva); font-weight: 500; }
.formulario__estado.ok { display: block; border-left-color: #1f8a4c; }
.formulario__estado.error { display: block; border-left-color: #c62828; }

.datos { display: grid; gap: 0; list-style: none; margin: 1.75rem 0 0; padding: 0; border-bottom: 2px solid var(--tinta); }
.datos li { display: grid; gap: .1rem; padding: 1.1rem 0; border-top: 2px solid var(--tinta); }
.datos span { font-size: .95rem; color: var(--tinta-suave); }
.datos a { display: block; padding-block: .3rem; }
.datos a, .datos strong { font-family: var(--titular); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.1; text-decoration: none; text-transform: none; }
.datos a:hover { color: var(--marino); }

/* ---------- Texto legal ---------- */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.9rem; margin: 2.5rem 0 .75rem; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin-bottom: 1rem; color: var(--tinta-suave); }
.legal h3 { font-family: var(--texto); font-size: 1.15rem; font-weight: 600; line-height: 1.3; text-transform: none; letter-spacing: 0; margin: 1.6rem 0 .4rem; }
.legal a { text-decoration: underline; text-decoration-color: var(--marino); text-underline-offset: 3px; }
.pendiente { background: #fff3cd; border-left: 5px solid #e0a800; padding: .9rem 1rem; color: var(--tinta); }

/* ---------- Pie ---------- */
.pie { background: var(--chapa); color: var(--luz-suave); padding: clamp(2.5rem, 6vw, 4rem) 0 6.5rem; font-size: .98rem; }
.pie__rejilla { display: grid; gap: 2rem; }
.pie__logo img { height: 26px; width: auto; }
.pie__lema { margin-top: .9rem; max-width: 22rem; }
.pie h2 { font-family: var(--texto); font-size: 1rem; font-weight: 600; text-transform: none; color: var(--luz); margin-bottom: .6rem; letter-spacing: 0; line-height: 1.4; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--luz); text-decoration: underline; text-decoration-color: var(--azul-luz); text-underline-offset: 4px; }
.redes { display: flex; gap: .5rem; margin-top: 1.25rem; }
.redes a { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--linea-oscura); border-radius: 2px; color: var(--luz); transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.redes a:hover { background: var(--azul-luz); border-color: var(--azul-luz); color: var(--chapa); }
.redes svg { width: 20px; height: 20px; }
.pie__bajo { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--linea-oscura); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .9rem; }
.pie__bajo ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
/* En móvil el pie no repite la lista de páginas (ya está en el menú) y los enlaces tienen más aire para el dedo */
@media (max-width: 759px) {
  .pie__paginas { display: none; }
  .pie ul { gap: .7rem; }
}
@media (min-width: 760px) {
  .pie { padding-bottom: 3rem; }
  .pie__rejilla { grid-template-columns: 1.6fr 1fr 1.2fr; gap: 3rem; }
}

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 90;
  width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--whatsapp); color: #fff; border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}
.wa-flotante:hover { transform: scale(1.08); }
.wa-flotante svg { width: 32px; height: 32px; }
@media (min-width: 760px) { .wa-flotante { right: 1.5rem; bottom: 1.5rem; } }

/* ---------- Aparición al bajar ---------- */
.js .aparece { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .aparece.visto { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .aparece { opacity: 1; transform: none; }
}
