/* ==========================================================================
   ALINE Industrial — Mangueras y Conexiones
   Landing page (una sola página)
   ==========================================================================

   ┌─────────────────────────────────────────────────────────────┐
   │  COLORES DE LA MARCA — son los del logo real, medidos        │
   │  directamente del PNG. Ya NO son provisionales.               │
   └─────────────────────────────────────────────────────────────┘   */

:root {
  --brand:        #01135D;   /* COLOR 1 — azul marino del logotipo */
  --accent:       #BA0A21;   /* COLOR 2 — rojo del emblema         */

  /* Tonos derivados (se ajustan solos a partir de los dos de arriba) */
  --brand-dark:   #000C3E;
  --brand-800:    #071A66;
  --brand-700:    #10287F;
  --accent-dark:  #8E0718;
  --accent-soft:  #FBE3E6;

  --ink:          #14192E;   /* texto principal   */
  --muted:        #5D6478;   /* texto secundario  */
  --line:         #E3E6EE;   /* bordes suaves     */
  --surface:      #F5F6FA;   /* fondo claro       */
  --white:        #ffffff;

  --font-head: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(1, 19, 93, 0.12);
  --shadow-md: 0 8px 24px rgba(1, 19, 93, 0.16);
  --shadow-lg: 0 18px 44px rgba(1, 19, 93, 0.24);

  --container: 1140px;
  --header-h: 118px; /* alto aprox. del header fijo, para el scroll con ancla */
}

/* ---------- Reset ligero ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;             /* evita cualquier desbordamiento lateral */
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--brand);
  line-height: 1.18;
  margin: 0 0 .55em;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;      /* nunca deja que un título se desborde */
}
p { margin: 0 0 1em; color: var(--muted); overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

/* El ancla se detiene debajo del header fijo, no oculta bajo él */
section[id] { scroll-margin-top: var(--header-h); }

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

section { padding: clamp(56px, 8vw, 92px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); }
.section-head p { font-size: clamp(15px, 2vw, 17px); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-align: center;
  line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.14); border-color: var(--white); }
.btn-solid { background: var(--brand); color: var(--white); }
.btn-solid:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar {
  background: var(--brand-dark);
  color: rgba(255,255,255,0.78);
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.topbar span { display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--accent); }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 20px;
}

/* --- Logo real de ALINE ---------------------------------------------------
   El logotipo es azul marino, igual que el fondo del header. Por eso va
   dentro de una PLACA BLANCA: es lo que se hace con un logo que solo existe
   en un color, y evita tener que alterar el archivo original.
   Para cambiar el logo, basta con reemplazar el PNG o su src. -------------- */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-plate {
  background: var(--white);
  border-radius: 6px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: box-shadow .15s ease;
}
.brand:hover .brand-plate { box-shadow: 0 2px 10px rgba(0,0,0,0.28); }
.brand-plate img { display: block; height: 40px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14.5px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); border-color: var(--accent); }
/* El CTA dentro del menú solo se usa en móvil; en desktop vive en .nav-actions */
.nav-links > .btn { display: none; }
.nav-links > .btn:hover { border-color: transparent; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--white); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 55%, var(--brand-700) 100%);
  color: var(--white);
  overflow: hidden;
  padding: clamp(52px, 8vw, 96px) 0 clamp(60px, 9vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 18%, rgba(186,10,33,0.20), transparent 46%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 34px);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
.hero-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(186,10,33,0.16);
  border: 1px solid rgba(186,10,33,0.42);
  color: #FF9AA6;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(30px, 5.2vw, 48px);
  margin-bottom: 18px;
}
.hero h1 span { color: var(--accent); }
.hero .lead {
  color: rgba(255,255,255,0.85);
  font-size: clamp(15.5px, 2.2vw, 18px);
  max-width: 520px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 38px; }

.hero-stats { display: flex; gap: clamp(20px, 4vw, 40px); flex-wrap: wrap; }
.hero-stats div strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(20px, 3vw, 26px);
  color: var(--white);
}
.hero-stats div span {
  font-size: 12.5px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Placeholder visual del hero (equipo de mangueras) */
.hero-visual {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.hero-visual .img-placeholder { min-height: 260px; }

/* Variante "sin marco": para una imagen de producto transparente (PNG sin fondo),
   las mangueras flotan sobre el fondo azul del hero, sin recuadro ni sombra. */
.hero-visual.bare {
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}
.hero-visual.bare .product-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.45));
}
.hero-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  line-height: 1.25;
}
.hero-badge strong { display: block; font-size: 18px; }

/* ---------- Placeholder de imagen (reemplazable por <img>) ---------- */
.img-placeholder {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  border: 2px dashed rgba(1,19,93,0.28);
  background:
    repeating-linear-gradient(135deg, rgba(1,19,93,0.03) 0 12px, rgba(1,19,93,0.06) 12px 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 28px 22px;
  color: var(--brand);
}
.img-placeholder.on-dark {
  border-color: rgba(255,255,255,0.35);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 12px, rgba(255,255,255,0.08) 12px 24px);
  color: rgba(255,255,255,0.92);
}
.img-placeholder .ph-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.img-placeholder.on-dark .ph-icon { background: rgba(186,10,33,0.2); color: #FF9AA6; }
.img-placeholder .ph-icon svg { width: 26px; height: 26px; }
.img-placeholder strong { font-family: var(--font-head); font-size: 15px; }
.img-placeholder small { font-size: 12.5px; opacity: 0.8; max-width: 320px; }

/* ---------- Imágenes reales ---------- */
/* Foto enmarcada (fachada, atención): llena el recuadro y recorta si hace falta */
.media-img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  box-shadow: var(--shadow-md);
}
/* Imagen de producto transparente (PNG sin fondo): se muestra completa, sin recorte */
.product-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ---------- Servicios (cards) ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card .icon-badge {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .icon-badge svg { width: 26px; height: 26px; color: var(--accent); }
.card h3 { font-size: 18px; margin-bottom: 9px; }
.card p { font-size: 14.5px; margin-bottom: 0; }

/* ---------- Bloque "equipo / inventario" con imagen ---------- */
.showcase { background: var(--surface); }
.showcase .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.showcase .img-placeholder { min-height: 320px; }

/* ---------- Por qué ALINE ---------- */
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; color: var(--ink); }
.checklist .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.checklist .check svg { width: 12px; height: 12px; }
.why .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.why .img-placeholder { min-height: 320px; }

/* ---------- Ubicación ---------- */
.location { background: var(--brand-dark); color: var(--white); }
.location h2, .location h3 { color: var(--white); }
.location .eyebrow { color: #FF9AA6; }
.location .section-head p { color: rgba(255,255,255,0.78); }
.location-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: stretch;
}
.location .img-placeholder {
  min-height: 340px;
  height: 100%;
  border-color: rgba(255,255,255,0.35);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 12px, rgba(255,255,255,0.08) 12px 24px);
  color: rgba(255,255,255,0.92);
}
.location .img-placeholder .ph-icon { background: rgba(186,10,33,0.2); color: #FF9AA6; }

/* Mapa de Google incrustado — ocupa la celda donde antes iba la foto de la
   fachada, así que copia las medidas de .media-img para que el grid no se
   mueva. El fondo claro es el respaldo: es lo que se ve mientras carga el
   mapa, y también si el equipo está sin internet (la página abre igual). */
.location-map {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 12px;
  display: block;
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.06);
}

.info-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 30px 28px;
}
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.info-row:last-of-type { border-bottom: none; }
.info-row .icon-wrap {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: rgba(186,10,33,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-row .icon-wrap svg { width: 19px; height: 19px; color: var(--accent); }
.info-row strong { display: block; font-size: 13.5px; color: var(--white); margin-bottom: 3px; }
.info-row span, .info-row a { font-size: 14px; color: rgba(255,255,255,0.82); overflow-wrap: anywhere; }
.info-row a:hover { color: var(--accent); }
.info-card .btn { margin-top: 22px; width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,0.7); padding: 52px 0 0; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,0.6); max-width: 300px; }
.footer-col h4 { color: var(--white); font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col li { font-size: 13.5px; color: rgba(255,255,255,0.72); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; font-size: 12.5px; color: rgba(255,255,255,0.5);
  flex-wrap: wrap; gap: 8px;
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); z-index: 200;
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; color: var(--white); }

/* ==========================================================================
   ANIMACIONES DE APARICIÓN AL HACER SCROLL (reveal)
   Los elementos con .reveal entran suavemente (fade + subida) al verse.
   La clase .is-visible la agrega js/main.js vía IntersectionObserver.
   Se aplica solo a bloques de contenido, NO al header ni al hero.
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Respeta a quien prefiere menos movimiento: sin animación, todo visible */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE  — el punto clave que pediste: que se vea bien en celular
   ========================================================================== */

/* Tablet */
@media (max-width: 940px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .showcase .split,
  .why .split,
  .location-grid { grid-template-columns: 1fr; }
  .location .img-placeholder { min-height: 260px; }
  .location-map { min-height: 300px; }   /* al apilarse, el mapa ya no comparte alto con la tarjeta */
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Celular */
@media (max-width: 680px) {
  .topbar { display: none; }        /* la barra superior se oculta en móvil */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--brand-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links > .btn { display: inline-flex; margin-top: 4px; } /* CTA visible dentro del menú móvil */
  .nav-toggle { display: flex; }
  .nav-actions .btn { display: none; } /* el CTA de escritorio se oculta en móvil */
  .site-header { position: sticky; }
  .navbar { position: relative; }

  .brand-plate { padding: 5px 9px; }
  .brand-plate img { height: 30px; }

  .grid-3 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { flex: 1 1 auto; }
  :root { --header-h: 70px; }
}

/* Pantallas muy chicas */
@media (max-width: 380px) {
  .brand-plate img { height: 26px; }
  .container { padding: 0 16px; }
}
