/* =========================================================
   GRISAMX INDUSTRIAL — styles.css
   Paleta "Azul Eléctrico" + tipografía Lora/Poppins
   Un solo stylesheet global. Cambios locales solo vía <style>
   en el <head> de la página específica (ver manual A.D. sec.2)
   ========================================================= */

/* Tipografías: se cargan solo aquí. Para cambiarlas, se edita
   esta línea y las variables --font-head / --font-body. */
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@500;600;700&family=Poppins:wght@400;500;600;700&display=swap");

:root {
  /* ---- Marca: color ---- */
  --navy-900: #0B1440;      /* fondos oscuros, header, footer */
  --navy-800: #12235E;      /* variante de apoyo del navy */
  --steel-600: #6B7076;     /* texto secundario sobre blanco */
  --steel-300: #C7CBCF;     /* bordes, fondos claros neutros */
  --blue-electric: #0B6FD1; /* acento primario: links, botones, íconos */
  --accent-orange: #E8622D; /* acento secundario: números, hovers, detalles */
  --white: #FFFFFF;
  --off-white: #F5F6F8;
  --ink: #14171C;           /* texto de cuerpo, casi negro */

  /* ---- Tipografía ---- */
  --font-head: "Lora", Georgia, serif;
  --font-body: "Poppins", Arial, Helvetica, sans-serif;

  /* ---- Layout ---- */
  --container-w: 1180px;
  --radius: 6px;
  --shadow-card: 0 2px 14px rgba(11, 20, 64, 0.08);

  /* Logo: para cambiar el logo solo se reemplaza el archivo
     /assets/img/logo-grisamx.png (mismo nombre). Su tamaño se
     controla únicamente con estas variables (altura; el ancho
     se ajusta solo a la proporción de la imagen). */
  --logo-h: 76px;          /* header en escritorio */
  --logo-h-mobile: 66px;   /* header en tablet y móvil */
  --logo-h-footer: 56px;   /* footer del home */
}

/* ---------- Reset base ---------- */
* { 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;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-electric); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.25;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--off-white); }
.section-title { text-align: center; margin-bottom: 40px; }
.kicker {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-electric);
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--steel-300);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-inner .logo img { height: var(--logo-h); width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--navy-900);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--blue-electric); text-decoration: none; }
.main-nav a.is-active { color: var(--blue-electric); }
.lang-switch { display: flex; align-items: center; gap: 10px; }
.lang-switch a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--steel-600);
  font-weight: 500;
}
.lang-switch a.is-active { color: var(--navy-900); }
.lang-switch img,
.lang-switch svg { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.1); }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  margin: 5px 0;
}

/* Breakpoint del menú: 1024px (el logo horizontal ocupa ~250px) */
@media (max-width: 1024px) {
  .header-inner .logo img { height: var(--logo-h-mobile); }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--steel-300);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 14px; width: 100%; }
  .lang-switch { margin-top: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: var(--navy-900);
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,20,64,0.92) 0%, rgba(11,20,64,0.55) 55%, rgba(11,20,64,0.25) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: 90px 24px;
  margin: 0 auto;
  margin-left: max(24px, calc((100% - var(--container-w)) / 2));
}
.hero-content .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-orange);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-content h1 { color: var(--white); }
.hero-content p { color: var(--steel-300); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 8px; }

.hero-sm { min-height: 260px; }
.hero-sm .hero-content { padding: 60px 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-electric); color: var(--white); }
.btn-primary:hover { background: #0958a8; }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy-900); }
.btn-outline-dark { background: transparent; border-color: var(--navy-900); color: var(--navy-900); }
.btn-outline-dark:hover { background: var(--navy-900); color: var(--white); }

/* ---------- Card grids ---------- */
.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); }
.card-grid-4 { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .card-grid, .card-grid-2, .card-grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { aspect-ratio: 4/3; object-fit: cover; }
.card .card-body { padding: 22px; }
.card .card-body h3 { margin-bottom: 8px; }
.card .card-body p { color: var(--steel-600); font-size: 0.95rem; margin-bottom: 0; }

/* Dark market/number cards (Scope-style, from the deck) */
.market-card {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.market-card:nth-child(2) { background: var(--blue-electric); }
.market-card .num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-orange);
}
.market-card h3 { color: var(--white); margin-bottom: 4px; }
.market-card p { color: var(--steel-300); font-size: 0.92rem; margin-bottom: 14px; }
.market-card img { border-radius: 4px; aspect-ratio: 16/10; object-fit: cover; }

/* ---------- Stats ---------- */
.stat-grid { display: grid; gap: 32px; grid-template-columns: repeat(3, 1fr); }
.stat { }
.stat .figure {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--navy-900);
}
.stat .figure span { color: var(--blue-electric); font-size: 1.2rem; margin-left: 4px; }
.stat .label { color: var(--steel-600); font-size: 0.95rem; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Logo strip (clients / certifications) ---------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-items: stretch;
}
.logo-strip .logo-tile {
  background: var(--white);
  border: 1px solid var(--steel-300);
  border-radius: var(--radius);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 128px;
  flex: 0 0 auto;
  min-width: 150px;
}
.logo-strip img { height: 100px; width: auto; max-width: 260px; object-fit: contain; }
@media (max-width: 520px) {
  .logo-strip .logo-tile { height: 104px; min-width: 120px; padding: 10px 16px; }
  .logo-strip img { height: 78px; max-width: 200px; }
}

/* ---------- Notice box ---------- */
.notice-box {
  background: var(--off-white);
  border: 1px solid var(--steel-300);
  border-left: 4px solid var(--blue-electric);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  color: var(--steel-600);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy-900);
  color: var(--white);
  text-align: center;
  padding: 60px 24px;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--steel-300); max-width: 560px; margin: 0 auto 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--steel-300); }
.footer-grid {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 56px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--steel-300); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }
.footer-grid .logo {
  display: inline-block;
  background: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.footer-grid .logo img { height: var(--logo-h-footer); width: auto; display: block; }
.footer-grid .about-text { font-size: 0.88rem; color: var(--steel-300); max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--steel-600);
}
.footer-bottom a { color: var(--steel-600); }
/* Crédito del desarrollador (solo footer completo del home) */
.footer-bottom .credit { font-size: 0.9em; white-space: nowrap; }
.footer-bottom .credit a { color: inherit; text-decoration: none; }
.footer-bottom .credit a:hover { text-decoration: underline; }

/* Simplified footer (interior pages) */
.site-footer.footer-simple .footer-grid {
  grid-template-columns: 1fr;
  padding: 32px 24px;
  text-align: center;
}
.site-footer.footer-simple .footer-grid ul {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
}

/* ---------- WhatsApp floating button ---------- */
.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: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 60;
}
.wa-float svg { width: 28px; height: 28px; fill: var(--white); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Photo gallery + lightbox ---------- */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.photo-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.photo-gallery img:hover { opacity: 0.82; }
@media (max-width: 720px) {
  .photo-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 64, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

/* =========================================================
   CONTACTO: correos por idioma, WhatsApp y dirección
   ========================================================= */
.flag {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}
.contact-note { margin-bottom: 16px !important; }
.contact-lang {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.contact-lang:last-child { margin-bottom: 0; }
.contact-lang .flag { margin-top: 4px; }
.contact-lang .contact-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
}
.contact-lang a,
.footer-contact a { overflow-wrap: break-word; }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  background: #0E7C4A;   /* verde WhatsApp oscurecido para contraste AA */
  color: var(--white);
}
.btn-whatsapp:hover { background: #0A5F38; color: var(--white); }
.btn-whatsapp svg { width: 22px; height: 22px; flex-shrink: 0; }
.footer-contact li { display: flex; align-items: flex-start; gap: 8px; }
.footer-contact .flag { margin-top: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
   UTILIDADES
   Reemplazan los antiguos style="..." del HTML. Llevan
   !important para conservar exactamente la prioridad que
   tenían los estilos en línea. No usar style="" en los .htm.
   ========================================================= */
.lead { max-width: 760px !important; font-size: 1.05rem !important; }
.narrow { max-width: 640px !important; margin-left: auto !important; margin-right: auto !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.text-muted { color: var(--steel-600) !important; }
.rounded { border-radius: var(--radius) !important; }
.align-center { align-items: center !important; }
.gap-32 { gap: 32px !important; }
.gap-48 { gap: 48px !important; }
.order-1 { order: 1 !important; }
.order-2 { order: 2 !important; }
.media-row { display: flex !important; align-items: center !important; gap: 24px !important; }
.icon-96 { width: 96px !important; height: 96px !important; flex-shrink: 0 !important; }
.mt-14 { margin-top: 14px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-48 { margin-top: 48px !important; }
.mt-56 { margin-top: 56px !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-28 { margin-bottom: 28px !important; }
.mb-48 { margin-bottom: 48px !important; }
