/* ============================================================
   FACILITY SOLUTIONS — Hoja de estilos compartida
   Paleta:  Steel Azure #1A4A99 | Metallic Gold #D4AF37 | Graphite #2C2C2C
   Fuentes: Roboto (títulos) · Source Sans Pro (cuerpo)
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
  --steel-azure: #1A4A99;
  --steel-azure-dark: #163d80;
  --metallic-gold: #D4AF37;
  --gold-dark: #c19f2c;
  --graphite: #2C2C2C;
  --white: #ffffff;
  --text-dark: #222222;
  --gray-line: #e2e4e8;

  --font-title: 'Roboto', Arial, sans-serif;
  --font-body: 'Source Sans Pro', Arial, sans-serif;

  --maxw: 1325px;
  --radius: 14px;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; } /* evita scroll horizontal por el menú off-canvas, sin romper el header sticky */
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.55;
  background: var(--white);
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
p { font-weight: 400; } /* peso uniforme para todos los párrafos del cuerpo */

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

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 700; line-height: 1.1; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-line);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px;
}
.logo img { height: 52px; width: auto; }

.main-nav ul { display: flex; gap: 34px; align-items: center; }
.main-nav a {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: .3px;
  color: var(--steel-azure);
  transition: color .2s;
}
.main-nav a:hover { color: var(--metallic-gold); }
.main-nav a.active { color: var(--metallic-gold); }

/* Botón hamburguesa (móvil) */
.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px;
}
.nav-toggle span {
  display: block; height: 3px; width: 26px; margin: 5px auto;
  background: var(--steel-azure); border-radius: 2px; transition: .3s;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 700;
  border: 2px solid transparent; cursor: pointer;
  border-radius: 40px;
  padding: 14px 34px;
  font-size: 16px;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
}
.btn-gold { background: transparent; color: var(--steel-azure); border-color: var(--metallic-gold); }
/* Hover: TODOS los botones azul con letras blancas */
.btn:hover { background: var(--steel-azure); color: var(--white); border-color: var(--steel-azure); }
.btn:active { transform: translateY(1px); }

/* Botón "Ver más" de las tarjetas */
.ver-mas {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
}
.ver-mas:hover { color: var(--steel-azure); }

/* ============================================================
   HERO GENÉRICO CON IMAGEN DE FONDO + TÍTULO
   (usado en Nosotros y Contacto)
   ============================================================ */
.page-hero {
  position: relative;
  min-height: 340px;
  display: flex; align-items: flex-end;
  background: var(--steel-azure);
  overflow: hidden;
}
.page-hero img.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .55;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(26,74,153,.45);
}
.page-hero--contacto,
.page-hero--nosotros,
.page-hero--servicios { min-height: 560px; background: #ffffff; }
.page-hero--contacto img.hero-bg,
.page-hero--nosotros img.hero-bg,
.page-hero--servicios img.hero-bg { object-fit: contain; object-position: right bottom; opacity: 1; }
/* Mismo overlay que el hero de inicio: #1A4A99 al 65% sobre la imagen a opacidad completa */
.page-hero--contacto::after,
.page-hero--nosotros::after,
.page-hero--servicios::after { background: rgba(26, 74, 153, .65); }
.page-hero--nosotros img.hero-bg { object-fit: cover; object-position: center top; }
.page-hero--servicios img.hero-bg { object-fit: cover; object-position: top center; }
.page-hero .container { position: relative; z-index: 2; padding-bottom: 40px; }
.page-hero h1 {
  color: var(--white);
  font-weight: 900;
  font-size: clamp(46px, 8vw, 96px);
  letter-spacing: 1px;
}

/* ============================================================
   INICIO — HERO SPLIT
   ============================================================ */
.hero-split {
  background: var(--steel-azure) url("../assets/fondo-bannerhero-principal02.webp") center / cover no-repeat;
  position: relative; overflow: hidden;
}
/* Formas doradas decorativas (esquinas) — ocultas: el diseño diagonal ya viene en la imagen de fondo.
   Si vuelves a un fondo plano, quita este display:none. */
.hero-split::before { display: none; }
/* Overlay de marca: mismo color que los page-hero (#1A4A99) al 65%.
   Va sobre el fondo pero debajo del __stage (z-index:1), que contiene el card y la imagen. */
.hero-split::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(26, 74, 153, .65);
  z-index: 0;
}
/* Escenario: contexto de posicionamiento con altura fija en desktop.
   Centra el contenido (vertical y horizontal) dentro del contenedor. */
.hero-split__stage {
  position: relative; z-index: 1;
  min-height: 600px;
  padding-top: 40px; padding-bottom: 40px;
  display: flex; align-items: center; justify-content: center;
}
/* CAJA TEXTO: sin fondo, cuadrada (sin bordes redondeados) y con todo el contenido centrado */
.hero-content {
  position: relative; z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px;
  color: var(--white);
  text-align: center;
}
.hero-content h1 { font-family: var(--font-body); font-weight: 900; font-size: 48px; margin-bottom: 18px; }
.hero-content p { font-family: var(--font-title); font-weight: 400; font-size: 32px; line-height: 1.2; margin-bottom: 26px; max-width: 560px; }
/* Botón dorado sólido (el outline azul no se ve sobre el fondo azul del banner) */
.hero-content .btn { background: var(--metallic-gold); color: var(--steel-azure); border-color: var(--metallic-gold); font-family: var(--font-title); font-weight: 700; font-size: 32px; padding: 5px 34px; transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s; }
/* Hover propio del botón dorado del hero: dorado más oscuro + leve elevación + sombra (gana al hover global por especificidad) */
.hero-content .btn:hover { background: #C39E2F; border-color: #C39E2F; color: var(--steel-azure); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
/* CAJA IMAGEN: arriba-derecha, superpuesta */
.hero-media {
  position: absolute; right: 24px; top: 0;
  width: 44%; max-width: 470px;
  z-index: 3;
}
.hero-media img { border-radius: 10px; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* ============================================================
   SECCIONES GENÉRICAS
   ============================================================ */
section { position: relative; }
.section-pad { padding: 70px 0; }
.section-title {
  text-align: center;
  color: var(--steel-azure);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 48px;
}

/* ============================================================
   TARJETAS DE SERVICIOS (Inicio)
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  margin-bottom: 34px;
}
.cards-grid.row-2 {
  grid-template-columns: repeat(2, minmax(0, calc((100% - 68px) / 3)));
  justify-content: center;
}
.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
  background: var(--metallic-gold);
}
.card > img { width: 100%; height: 290px; object-fit: cover; display: block; }
/* Degradado azul en la parte inferior de la imagen */
.card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 290px;
  background: linear-gradient(to bottom, transparent 50%, rgba(26, 74, 153, .9) 100%);
  pointer-events: none;
  z-index: 1;
}
.card-body {
  background: var(--metallic-gold);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; flex: 1;
}
.card-body h3 {
  color: var(--steel-azure);
  text-transform: uppercase;
  font-size: 19px;
  margin-bottom: 12px;
}
.card-body p { color: var(--white); font-family: var(--font-title); font-weight: 400; font-size: 20px; margin-bottom: 18px; }
.card-body .ver-mas { margin-top: auto; align-self: flex-end; color: #1A4A99; font-family: var(--font-title); font-weight: 500; font-size: 15px; }

/* ============================================================
   CLIENTES (logos)
   ============================================================ */
.clients-carousel {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.clients-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: clients-scroll 55s linear infinite;
}
/* Casilla fija por logo: logos grandes en desktop */
.clients-track img { height: 330px; width: 400px; object-fit: contain; flex: 0 0 auto; }
/* Al saltar al ancla #clientes, dejar espacio para que el header sticky no tape el título */
#clientes { scroll-margin-top: 110px; padding-top: 20px; }
.clients-carousel:hover .clients-track { animation-play-state: paused; }
@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .clients-track { animation-duration: 90s; }
}

/* ============================================================
   FORMULARIO DE CONTACTO
   ============================================================ */
.contact-block { background: var(--steel-azure); color: var(--white); }
.contact-block .container {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start;
}
.contact-info h2 { font-size: clamp(30px, 8vw, 64px); font-weight: 900; margin-bottom: 24px; overflow-wrap: break-word; }
.contact-info p { margin-bottom: 10px; font-size: 24px; font-weight: 400; }

.contact-form { display: grid; gap: 18px; }
.contact-form.two-col { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
/* Honeypot anti-spam (oculto para humanos) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
/* Mensaje de estado del formulario */
.form-status { grid-column: 1 / -1; margin-top: 4px; font-weight: 700; min-height: 1.2em; }
.form-status.ok  { color: #1e7e34; }
.form-status.err { color: #c0392b; }
.contact-form.two-col .form-status,
.contact-form.two-col .hp-field { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  background: var(--metallic-gold);
  border: 0; border-radius: 15px;
  padding: 16px 22px;
  font-family: var(--font-body); font-size: 24px; font-weight: 400;
  color: var(--white);
  width: 100%;
}
.contact-form textarea { border-radius: 15px; resize: vertical; min-height: 120px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--white); opacity: .95; }
.contact-form .btn { justify-self: start; grid-column: 1 / -1; width: max-content; border-radius: 15px; font-size: 24px; font-weight: 600; background: var(--metallic-gold); color: var(--white); border-color: var(--metallic-gold); }

.form-subtitle { margin-bottom: 26px; font-size: 17px; }

/* Mapa */
.map-embed img,
.map-embed iframe { width: 100%; height: 380px; object-fit: cover; display: block; border: 0; }

/* ============================================================
   NOSOTROS — sección dorada
   ============================================================ */
.about-gold { background: var(--metallic-gold); color: var(--white); }
.about-gold .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
  align-items: center; padding: 70px 24px 45px;
  position: relative;
}
.about-text { position: relative; }
.about-text::before {
  content: ""; position: absolute;
  top: 0; bottom: 0;              /* = altura del bloque de texto */
  left: calc(638.5px - 50vw);    /* alcanza el borde izq. del viewport en pantallas anchas */
  width: 32px;
  background: var(--steel-azure);
}
.about-text p { margin-bottom: 20px; font-family: var(--font-title); font-size: 28px; font-weight: 400; line-height: 1.2; text-align: justify; }
.about-visual { display: flex; justify-content: center; }
.about-visual .circle {
  padding: 0; overflow: hidden;
  width: 520px; height: 520px; max-width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.about-visual .circle img { width: 100%; height: 100%; object-fit: contain; }

/* Sección dorada: características / iconos.
   Misma grilla que .about-gold (texto | imagen) → los íconos caen en la columna
   izquierda (bajo el párrafo) y la derecha queda vacía. */
.about-features { background: var(--metallic-gold); color: var(--white); }
.about-features .container {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start;
  padding: 20px 24px 70px;
}
.features {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
  padding-top: 20px;
}
/* Flexibles: los 3 se reparten la columna y se achican para NO romperse en una fila */
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1 1 0; min-width: 0; max-width: 180px; }
.feature .icon { margin-bottom: 10px; width: 100%; }
.feature .icon img { width: 100%; max-width: 150px; height: auto; margin: 0 auto; object-fit: contain; display: block; }
.feature span { color: var(--white); font-family: var(--font-body); font-weight: 600; font-size: clamp(13px, 1.5vw, 20px); line-height: 1.2; overflow-wrap: break-word; }

/* ============================================================
   ICONO REFERENCIAL (reutilizado en todo el sitio)
   ============================================================ */
.icon svg { width: 46px; height: 46px; }
.icon img { width: 135px; height: 135px; object-fit: contain; display: block; }
.icon.ref { color: var(--steel-azure); }
/* Caja fija para que todos los iconos ocupen el mismo espacio y queden alineados */
.icon-item .icon { display: flex; align-items: center; justify-content: center; width: 135px; height: 135px; }
.icon-item .icon img { width: 100%; height: 100%; }
/* Flexbox con justify-content:center → cualquier fila incompleta (1 o 2 items sobrantes)
   se centra automáticamente en cualquier dispositivo. El nº de items por fila lo define
   el flex-basis de .icon-item (ajustado por breakpoint). */
.icon-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 26px 20px; text-align: center; margin: 120px 0;
}
/* Espacio simétrico arriba/abajo del bloque de iconos: que mande solo el margen del grid */
.service-lead + .icon-grid { margin-top: 120px; }
.service-lead { margin-bottom: 0; }
.icon-grid + .sub-title { margin-top: 0; }
.icon-item {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  flex: 0 0 calc((100% - 60px) / 4); /* 4 por fila (3 gaps de 20px) */
}
.icon-grid.cols-3 .icon-item { flex-basis: calc((100% - 40px) / 3); } /* 3 por fila */
.icon-grid.cols-5 .icon-item { flex-basis: calc((100% - 80px) / 5); } /* 5 por fila */
.icon-item small { font-family: var(--font-title); font-weight: 400; font-size: 24px; color: var(--steel-azure); line-height: 1.3; overflow-wrap: break-word; }

/* ============================================================
   SERVICIOS
   ============================================================ */
/* Línea dorada divisoria de 4px a todo el ancho */
.gold-line { height: 4px; background: #D4AF37; width: 100%; max-width: var(--maxw); margin: 0 auto 56px; }
.gold-line + .service-banner { margin-top: 0; }
/* Franja de imagen a todo el ancho, separada del hero */
.service-banner { margin-top: clamp(24px, 4vw, 48px); }
.service-banner img { width: 100%; height: auto; display: block; }
.service-section { padding: 46px 0; scroll-margin-top: 110px; }
.service-section + .service-section { border-top: 1px solid var(--gray-line); }
/* Títulos de servicios: Roboto Bold, dorado, responsive (máx 64px) */
.service-section .section-title { color: var(--metallic-gold); font-weight: 700; font-size: clamp(32px, 6vw, 64px); overflow-wrap: break-word; }
.service-section .section-title--blue { color: var(--steel-azure); }
.sub-title {
  text-align: center;
  color: var(--steel-azure);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(24px, 4vw, 40px);
  text-transform: uppercase;
  margin: 26px 0 6px;
  padding-bottom: 40px;
}
.sub-title--nocaps { text-transform: none; padding-top: 40px; }
.service-lead { text-align: center; max-width: 100%; margin: 0 auto 10px; color: var(--steel-azure); font-family: var(--font-title); font-weight: 400; font-size: 28px; line-height: 1.2; }
.center-btn { text-align: center; margin-top: 30px; }
.center-btn .btn { font-family: var(--font-body); font-weight: 900; font-size: 24px; }
.pending-note {
  background: #fff7db; border: 1px dashed var(--gold-dark);
  color: #7a6414; border-radius: 8px;
  padding: 12px 16px; margin: 16px auto; max-width: 760px;
  font-size: 14px; text-align: center;
}

/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */
.whatsapp-float {
  position: fixed; right: 26px; bottom: 26px; z-index: 200;
  width: 62px; height: 62px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.whatsapp-float svg { width: 34px; height: 34px; fill: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--graphite); color: var(--white); padding: 50px 0 30px; }
.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
  justify-items: center;
  padding-left: 0;
  padding-right: 0;
}
/* Contacto / Cotiza y Menú alineados abajo */
.site-footer .container > .footer-col:nth-child(2),
.site-footer .container > .footer-col:nth-child(3) { align-self: end; }
/* Redes Sociales centrado respecto al menú */
.site-footer .footer-social { align-self: center; }
.footer-brand img { width: 204px; height: 111px; margin-bottom: 18px; }
.footer-brand p { font-size: 14px; color: #d7d7d7; max-width: 320px; }
.footer-col h4 { color: #ffffff; font-weight: 700; text-transform: uppercase; font-size: 20px; margin-bottom: 16px; }
.footer-col p, .footer-col li { font-size: 14px; color: #e2e2e2; margin-bottom: 8px; }
.footer-col p { font-size: 16px; font-weight: 400; }
.footer-col ul li, .footer-col ul li a { font-size: 24px; font-weight: 600; }
.footer-col ul { margin: 0; }
.footer-col ul li { margin-bottom: 2px; line-height: 1.25; }
.footer-col ul li:last-child, .footer-col p:last-child { margin-bottom: 0; }
.footer-social a { display: inline-flex; margin-right: 10px; }
.footer-social svg { width: 26px; height: 26px; fill: var(--white); }
.footer-social img { width: 32px; height: 32px; display: block; }

/* Términos y Políticas (acordeón del footer) */
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding: 18px 0 4px; }
/* Evitar que la regla .site-footer .container (grid de 4 col) afecte al contenedor legal */
.footer-legal .container { display: block; text-align: left; justify-items: start; padding-left: 24px; padding-right: 24px; }
.legal-accordion { text-align: left; }
.legal-accordion > summary {
  cursor: pointer; list-style: none; width: max-content;
  color: var(--metallic-gold); font-family: var(--font-title); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
}
.legal-accordion > summary::-webkit-details-marker { display: none; }
.legal-accordion > summary::after { content: "▾"; font-size: 12px; transition: transform .2s; }
.legal-accordion[open] > summary::after { transform: rotate(180deg); }
.legal-body { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.legal-item { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.legal-item > summary {
  cursor: pointer; list-style: none; padding: 12px 16px;
  color: #fff; font-family: var(--font-title); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.legal-item > summary::-webkit-details-marker { display: none; }
.legal-item > summary::after { content: "+"; font-size: 18px; color: var(--metallic-gold); }
.legal-item[open] > summary::after { content: "–"; }
.legal-item[open] > summary { border-bottom: 1px solid rgba(255,255,255,.1); }
.legal-text { padding: 14px 16px; color: #cfcfcf; font-size: 14px; }
.legal-text p { margin-bottom: 10px; line-height: 1.55; }
.legal-text p:last-child { margin-bottom: 0; }
.legal-text a { color: var(--metallic-gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Bajo el ancho del contenedor, la barra azul se fija al padding del contenedor */
@media (max-width: 1325px) {
  .about-text::before { left: -24px; }
}
/* iPad Pro (1024px) y menores: sección "Nosotros" apilada — texto arriba, imagen abajo */
@media (max-width: 1024px) {
  .about-gold .container { grid-template-columns: 1fr; }
  /* La barra azul del texto solo se ve en desktop (en responsive se encimaba con el texto) */
  .about-text::before { display: none; }
  /* Círculo responsive: llena la columna hasta 300px sin forzar desborde en pantallas chicas */
  .about-visual .circle { width: 100%; max-width: 300px; height: auto; aspect-ratio: 1 / 1; }
  /* La columna vacía de la derecha desaparece → íconos a todo el ancho, alineados al párrafo */
  .about-features .container { grid-template-columns: 1fr; }
  /* Footer con un respiro lateral en iPad Pro y menores */
  .site-footer .container { padding-left: 15px; padding-right: 15px; }
}
/* Tablet/celular: mismo look que desktop (imagen de fondo + overlay azul); solo ajustamos el respiro interno */
@media (max-width: 1200px) {
  .hero-content { padding: 40px 24px; }
}
@media (max-width: 900px) {
  .main-nav {
    position: fixed; top: 84px; right: 0;
    width: 260px; height: calc(100vh - 84px);
    background: var(--white);
    transform: translateX(100%); transition: transform .3s;
    box-shadow: -4px 0 16px rgba(0,0,0,.12);
    padding: 24px;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 22px; align-items: flex-start; }
  .nav-toggle { display: block; }

  .cards-grid, .cards-grid.row-2 { grid-template-columns: repeat(2, 1fr); }

  .contact-block .container { grid-template-columns: 1fr; }

  .site-footer .container { grid-template-columns: 1fr 1fr; }
  /* Tablet: 3 iconos por fila (los sobrantes se centran solos por el flex) */
  .icon-item,
  .icon-grid.cols-3 .icon-item,
  .icon-grid.cols-5 .icon-item { flex-basis: calc((100% - 40px) / 3); }
  /* Menos espacio vertical del bloque de iconos en tablet */
  .icon-grid { margin: 70px 0; }
  .service-lead + .icon-grid { margin-top: 70px; }
}

@media (max-width: 560px) {
  /* Heroes de nosotros/servicios/contacto: 50% más bajos en celular (560 -> 280px) */
  .page-hero--contacto,
  .page-hero--nosotros,
  .page-hero--servicios { min-height: 280px; }
  /* Solo el hero de contacto en celular: imagen en cover (los demás siguen en contain) */
  .page-hero--contacto img.hero-bg { object-fit: cover; }
  /* Banner de inicio a pantalla completa en celular (descontando el header sticky de 84px) */
  .hero-split__stage { min-height: calc(100vh - 84px); min-height: calc(100svh - 84px); }
  /* Tipografía del banner al 50% en celular */
  .hero-content h1 { font-size: 24px; }
  .hero-content p { font-size: 16px; }
  .hero-content .btn { font-size: 16px; }

  .cards-grid, .cards-grid.row-2 { grid-template-columns: 1fr; }
  .contact-form.two-col { grid-template-columns: 1fr; }
  .legal-body { grid-template-columns: 1fr; }
  /* Carrusel a todo el ancho del celular (rompe el padding del contenedor) para agrandar los logos */
  .clients-carousel { width: 100vw; margin-left: calc(50% - 50vw); }
  /* ~1.5 logos por pantalla: uno grande completo + el siguiente asomando; el resto sigue rotando */
  .clients-track { gap: 6px; }
  .clients-track img { width: 60vw; height: 150px; }
  .site-footer .container { grid-template-columns: 1fr; }
  /* Footer totalmente centrado en celulares para que se vea ordenado */
  .site-footer .container { text-align: center; }
  .footer-brand img { margin-left: auto; margin-right: auto; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  /* Móvil: 2 iconos por fila (los sobrantes se centran solos por el flex) */
  .icon-item,
  .icon-grid.cols-3 .icon-item,
  .icon-grid.cols-5 .icon-item { flex-basis: calc((100% - 20px) / 2); }
  /* Iconos más chicos: evita desborde horizontal en teléfonos angostos (~320px) */
  .icon img, .icon-item .icon { width: 100px; height: 100px; }
  .icon-item small { font-size: 18px; }
  .service-lead { font-size: 20px; }
  /* Párrafos de la sección Nosotros más chicos en celular */
  .about-text p { font-size: 20px; }
  .icon-grid { margin: 48px 0; }
  .service-lead + .icon-grid { margin-top: 48px; }
  .section-pad { padding: 48px 0; }
}

/* ============================================================
   PÁGINA 404
   ============================================================ */
.error-404 { text-align: center; padding: 90px 0 100px; }
.error-404 .error-code { font-family: var(--font-title); font-weight: 900; font-size: clamp(80px, 18vw, 160px); color: var(--metallic-gold); line-height: 1; }
.error-404 h1 { color: var(--steel-azure); font-size: clamp(26px, 5vw, 40px); margin: 6px 0 14px; text-transform: uppercase; }
.error-404 p { color: var(--text-dark); font-size: 18px; margin-bottom: 28px; }

/* ============================================================
   REVELADO AL HACER SCROLL (sutil; anima al cargar y al re-entrar)
   Usa animaciones CSS (keyframes): se reproducen SIEMPRE al aplicar
   is-visible, también al cargar la página (a diferencia de las
   transiciones, que necesitan un estado previo ya pintado).
   ============================================================ */
.reveal { opacity: 0; will-change: opacity, transform; }
.reveal.is-visible { animation: reveal-up .75s cubic-bezier(.22,.61,.36,1) both; }
.reveal-left.is-visible  { animation-name: reveal-left; }
.reveal-right.is-visible { animation-name: reveal-right; }
.reveal-zoom.is-visible  { animation-name: reveal-zoom; }

@keyframes reveal-up    { from { opacity: 0; transform: translateY(28px); }  to { opacity: 1; transform: none; } }
@keyframes reveal-left  { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes reveal-right { from { opacity: 0; transform: translateX(40px); }  to { opacity: 1; transform: none; } }
@keyframes reveal-zoom  { from { opacity: 0; transform: scale(.94); }        to { opacity: 1; transform: none; } }
