/* ============================================================
   ELECTRO SERVICIOS INDUSTRIALES — styles.css
   Paleta: blanco (fondo) / negro / rojo industrial
   ============================================================ */

/* -------------------- Fuentes autoalojadas --------------------
   Barlow Condensed + Inter (woff2) descargadas a assets/fonts/
   para mejorar Core Web Vitals: sin peticiones a terceros y
   sin CSS bloqueante de Google Fonts.
   ------------------------------------------------------------ */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('../assets/fonts/barlow-condensed-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../assets/fonts/barlow-condensed-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('../assets/fonts/barlow-condensed-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url('../assets/fonts/barlow-condensed-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../assets/fonts/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('../assets/fonts/inter-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../assets/fonts/inter-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('../assets/fonts/inter-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------- Respaldo con métricas ajustadas -------------------- */
@font-face {
  font-family: 'Barlow Condensed Fallback';
  src: local('Arial'), local('ArialMT');
  size-adjust: 81.512%;
  ascent-override: 122.681%;
  descent-override: 24.536%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('ArialMT');
  size-adjust: 106.58%;
  ascent-override: 90.894%;
  descent-override: 22.632%;
  line-gap-override: 0%;
}

:root {
  --rojo: #9a1713;
  --rojo-oscuro: #6e0f0c;
  --negro: #0D0D0D;
  --negro-suave: #1A1A1A;
  --gris: #4A4A4A;
  --gris-claro: #EDEDED;
  --blanco: #FFFFFF;

  --fuente-display: 'Barlow Condensed', 'Barlow Condensed Fallback', sans-serif;
  --fuente-cuerpo: 'Inter', 'Inter Fallback', sans-serif;

  --radio: 6px;
  --sombra: 0 10px 30px rgba(0,0,0,.12);
  --transicion: .25s ease;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fuente-cuerpo);
  color: var(--negro);
  background: var(--blanco);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
svg { fill: currentColor; }
h1, h2, h3, h4 { font-family: var(--fuente-display); line-height: 1.1; letter-spacing: .3px; }
button { font-family: inherit; cursor: pointer; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* -------------------- Botones -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fuente-cuerpo);
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radio);
  padding: 12px 22px;
  font-size: .95rem;
  transition: transform var(--transicion), background var(--transicion), border-color var(--transicion), color var(--transicion);
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--rojo); color: var(--blanco); }
.btn-primary:hover { background: var(--rojo-oscuro); }

.btn-outline { background: transparent; color: var(--blanco); border-color: var(--blanco); }
.btn-outline:hover { background: var(--blanco); color: var(--negro); }

.btn-ghost { background: transparent; color: var(--negro); border-color: var(--gris-claro); }
.btn-ghost:hover { border-color: var(--rojo); color: var(--rojo); }

.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* Flecha animada en botones primarios grandes */
.btn-primary.btn-lg .icon-arrow {
  margin-left: -4px;
  transition: transform .3s ease;
}
.btn-primary.btn-lg:hover .icon-arrow {
  transform: translateX(4px);
}
.btn-block { width: 100%; justify-content: center; margin-top: 20px; }

/* -------------------- Franja de peligro (elemento distintivo) -------------------- */
.hazard-bar {
  height: 14px;
  background: repeating-linear-gradient(
    -45deg,
    var(--negro), var(--negro) 16px,
    var(--rojo) 16px, var(--rojo) 32px
  );
}
.hazard-bar--thin { height: 8px; }

/* -------------------- Header -------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13,13,13,.82);
  transform: translateY(-100%);
  transition: transform var(--transicion), box-shadow var(--transicion);
  /* Necesario para anclar el menú desplegable móvil (position: absolute) */
  isolation: isolate;
}
.site-header.scrolled {
  transform: translateY(0);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { height: 44px; width: auto; }
.brand-fallback {
  font-family: var(--fuente-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: .5px;
  color: var(--blanco);
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-fallback span { color: var(--rojo); font-size: .95rem; letter-spacing: 2px; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-weight: 600;
  font-size: .95rem;
  color: rgba(255,255,255,.88);
  position: relative;
  padding-block: 4px;
}
.main-nav a:hover { color: var(--blanco); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--rojo);
  transition: width var(--transicion);
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Ajuste del btn-ghost y btn-primary para fondo oscuro del header */
.site-header .btn-ghost { color: rgba(255,255,255,.88); border-color: rgba(255,255,255,.25); }
.site-header .btn-ghost:hover { color: var(--blanco); border-color: var(--rojo); background: rgba(255,255,255,.05); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--blanco);
  transition: transform var(--transicion);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--blanco);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Respaldo visual mientras se sube hero-industrial.jpg a assets/imagenes/ */
  background:
    repeating-linear-gradient(-45deg, #000 0, #000 2px, transparent 2px, transparent 40px),
    linear-gradient(135deg, var(--negro) 0%, var(--negro-suave) 60%, #2a0000 100%);
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: kenburns 24s ease-in-out infinite alternate;
}
@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -1%); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,13,.55) 0%, rgba(13,13,13,.75) 55%, rgba(13,13,13,.92) 100%);
}

.hero-content { position: relative; z-index: 1; padding-block: 80px 60px; max-width: 760px; }

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blanco);
  background: var(--rojo);
  padding: 6px 14px;
  border-radius: 3px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--rojo); }

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 560px;
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.25);
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong {
  font-family: var(--fuente-display);
  font-size: 2rem;
  color: var(--rojo);
  line-height: 1;
}
.stat span { font-size: .82rem; color: rgba(255,255,255,.75); margin-top: 6px; }

/* -------------------- Secciones genéricas -------------------- */
section { padding-block: 88px; }

.section-eyebrow {
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 10px;
}
.section-eyebrow--light { color: var(--rojo); }

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--negro);
  max-width: 700px;
  margin-bottom: 16px;
}
.section-title--light { color: var(--blanco); }

.section-lead {
  font-size: 1.05rem;
  color: var(--gris);
  max-width: 620px;
  margin-bottom: 48px;
}

/* -------------------- Servicios -------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--blanco);
  border: 1px solid var(--gris-claro);
  border-radius: var(--radio);
  overflow: hidden;
  padding: 0;
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra);
  border-color: var(--rojo);
}

/* -------------------- Imagen de servicio -------------------- */
.service-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .4s ease;
  display: block;
  padding: 8px;
}
.service-card:hover .service-img img { transform: scale(1.04); }

.service-card h3,
.service-card p,
.service-actions {
  padding-inline: 24px;
}
.service-card h3 { padding-top: 20px; }

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.service-card p {
  color: var(--gris);
  font-size: .92rem;
  flex-grow: 1;
  margin-bottom: 20px;
}

.service-actions { display: flex; gap: 10px; padding-bottom: 24px; }
.service-actions a {
  flex: 1;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 4px;
  border: 1.5px solid var(--negro);
  transition: background var(--transicion), color var(--transicion), border-color var(--transicion);
}
.service-actions a:first-child { background: var(--negro); color: var(--blanco); }
.service-actions a:first-child:hover { background: var(--rojo); border-color: var(--rojo); }
.service-actions a:last-child { color: var(--negro); }
.service-actions a:last-child:hover { border-color: var(--rojo); color: var(--rojo); }

/* -------------------- Nosotros -------------------- */
.about { background: var(--negro); color: var(--blanco); }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-copy p { color: rgba(255,255,255,.78); margin-bottom: 26px; font-size: 1.02rem; }

.about-list { margin-bottom: 34px; }
.about-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: .98rem;
}
.about-list .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--rojo);
  flex-shrink: 0;
}

.about-media {
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  aspect-ratio: 4 / 5;
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* -------------------- Ubicación -------------------- */
.location {
  padding-bottom: 0;
}

/* Títulos justo encima del mapa */
.map-titles-above {
  padding-top: 16px;
  padding-bottom: 24px;
}

/* Mapa a ancho completo — pegado al CTA */
.map-fullwidth {
  width: 100%;
  padding: 0;
}

.map-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 420px;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ----- Tarjeta de contacto rediseñada (ancho completo) ----- */
.location-card {
  background: var(--negro);
  color: var(--blanco);
  padding-block: 48px;
  text-align: center;
}

.location-card h3 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}
.location-card h3::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rojo);
  border-radius: 2px;
  margin: 12px auto 0;
  animation: title-bar-grow .6s ease forwards;
}
@keyframes title-bar-grow {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 36px;
}

.contact-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 28px 16px 24px;
  text-decoration: none;
  color: var(--blanco);
  transition: background .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
  cursor: default;
  position: relative;
  isolation: isolate;
  box-shadow: 0 4px 20px rgba(154,23,19,.12), 0 1px 3px rgba(0,0,0,.3);
}
.contact-card-item::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(154,23,19,.2), transparent 50%, rgba(154,23,19,.08));
  z-index: -1;
  opacity: 0;
  transition: opacity .3s ease;
}
a.contact-card-item { cursor: pointer; }
a.contact-card-item:hover,
a.contact-card-item:focus-visible {
  background: rgba(154,23,19,.12);
  border-color: var(--rojo);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(154,23,19,.25);
}
a.contact-card-item:hover::before { opacity: 1; }

.contact-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(154,23,19,.15);
  color: var(--rojo);
  flex-shrink: 0;
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.contact-card-icon svg {
  width: 22px;
  height: 22px;
}
a.contact-card-item:hover .contact-card-icon {
  background: var(--rojo);
  color: var(--blanco);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(154,23,19,.35);
}

.contact-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.contact-card-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.4);
  font-weight: 600;
}
.contact-card-value {
  font-size: .9rem;
  font-weight: 600;
  overflow-wrap: break-word;
  word-wrap: break-word;
  letter-spacing: .2px;
}

.btn-contact-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  font-size: 1.05rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(154,23,19,.3);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.btn-contact-wa:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px rgba(154,23,19,.45);
}

/* Móvil: contacto */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .location-card { padding: 36px 24px; }
  .location-card h3 { font-size: 1.5rem; }
  .contact-card-item { padding: 24px 14px 20px; }
}

@media (max-width: 480px) {
  .location-card { padding: 32px 20px; }
  .location-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
  .location-card h3::after { margin: 10px auto 0; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 28px;
  }

  .contact-card-item {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    text-align: left;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    transition: all .3s ease;
  }
  .contact-card-item:active {
    transform: scale(.98);
    background: rgba(154,23,19,.15);
  }
  a.contact-card-item:active {
    border-color: var(--rojo);
    box-shadow: 0 4px 16px rgba(154,23,19,.25);
  }
  a.contact-card-item:active .contact-card-icon {
    background: var(--rojo);
    color: var(--blanco);
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(154,23,19,.3);
  }

  .contact-card-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }
  .contact-card-icon svg { width: 20px; height: 20px; }

  .contact-card-text {
    gap: 1px;
  }
  .contact-card-label {
    font-size: .65rem;
    letter-spacing: 1px;
  }
  .contact-card-value {
    font-size: .85rem;
  }

  .btn-contact-wa {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .map-titles-above { padding-top: 8px; padding-bottom: 16px; }
  .map-wrap { height: 300px; }
}

/* ---- Ultracompacto para pantallas muy pequeñas (<360px) ---- */
@media (max-width: 359px) {
  .map-titles-above { padding-top: 4px; padding-bottom: 10px; }
  .map-wrap { height: 220px; }

  .location-card { padding: 24px 14px; }
  .location-card h3 { font-size: 1.2rem; }

  .contact-grid { gap: 10px; margin-top: 18px; margin-bottom: 22px; }

  .contact-card-item {
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
  }
  .contact-card-icon { width: 36px; height: 36px; }
  .contact-card-icon svg { width: 17px; height: 17px; }
  .contact-card-text { gap: 0; }
  .contact-card-label { font-size: .6rem; }
  .contact-card-value { font-size: .78rem; }

  .btn-contact-wa {
    padding: 14px 20px;
    font-size: .9rem;
    border-radius: 10px;
  }
}

/* Animación de entrada para tarjetas de contacto (scroll-triggered) */
@media (prefers-reduced-motion: no-preference) {
  .contact-card-item {
    opacity: 0;
    transform: translateY(24px);
  }
  .contact-card-item.reveal-visible {
    animation: card-fade-in .5s ease forwards;
  }
  .contact-card-item.reveal-visible:nth-child(1) { animation-delay: .1s; }
  .contact-card-item.reveal-visible:nth-child(2) { animation-delay: .2s; }
  .contact-card-item.reveal-visible:nth-child(3) { animation-delay: .3s; }
  .contact-card-item.reveal-visible:nth-child(4) { animation-delay: .4s; }

  @keyframes card-fade-in {
    to { opacity: 1; transform: translateY(0); }
  }

  .btn-contact-wa {
    opacity: 0;
    transform: translateY(16px);
  }
  .btn-contact-wa.reveal-visible {
    animation: card-fade-in .5s ease .5s forwards;
  }
}

/* ============================================================
   BLOG PREVIEW SECTION
   ============================================================ */

.blog-preview {
  background: var(--blanco);
}

.blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

.blog-preview-card {
  background: var(--blanco);
  border: 1px solid var(--gris-claro);
  border-radius: var(--radio);
  overflow: hidden;
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.blog-preview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra);
  border-color: var(--rojo);
}

.blog-preview-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}
.blog-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  transition: transform .4s ease;
}
.blog-preview-card:hover .blog-preview-img img {
  transform: scale(1.05);
}

.blog-preview-body {
  padding: 22px 24px 24px;
}
.blog-preview-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rojo);
  margin-bottom: 8px;
}
.blog-preview-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.blog-preview-body h3 a {
  color: var(--negro);
  transition: color var(--transicion);
}
.blog-preview-body h3 a:hover {
  color: var(--rojo);
}
.blog-preview-body p {
  color: var(--gris);
  font-size: .9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.blog-preview-link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--rojo);
  transition: gap var(--transicion);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.blog-preview-link:hover {
  gap: 8px;
}

.blog-preview-cta {
  text-align: center;
  margin-top: 16px;
}

/* ============================================================
   BLOG LISTING PAGE (blog/index.html)
   ============================================================ */

.blog-page {
  padding-top: 140px;
  padding-bottom: 80px;
}

.blog-header {
  margin-bottom: 48px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.blog-card {
  background: var(--blanco);
  border: 1px solid var(--gris-claro);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra);
  border-color: var(--rojo);
}

.blog-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .4s ease;
}
.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-cat {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rojo);
  margin-bottom: 8px;
}
.blog-card-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.blog-card-body h2 a {
  color: var(--negro);
  transition: color var(--transicion);
}
.blog-card-body h2 a:hover {
  color: var(--rojo);
}
.blog-card-body > p {
  color: var(--gris);
  font-size: .9rem;
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.5;
}
.blog-card-meta {
  display: flex;
  gap: 12px;
  font-size: .78rem;
  color: var(--gris);
  margin-bottom: 16px;
}
.blog-card-link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--rojo);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transicion);
  align-self: flex-start;
}
.blog-card-link:hover {
  gap: 8px;
}

/* ============================================================
   BLOG ARTICLE PAGE (individual posts)
   ============================================================ */

.blog-post-page {
  padding-top: 130px;
  padding-bottom: 80px;
}

.blog-post-page > .container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.breadcrumbs {
  grid-column: 1 / -1;
  margin-bottom: 24px;
  font-size: .85rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}
.breadcrumbs li {
  color: var(--gris);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--gris-claro);
}
.breadcrumbs a {
  color: var(--gris);
  transition: color var(--transicion);
}
.breadcrumbs a:hover {
  color: var(--rojo);
}
.breadcrumbs [aria-current] {
  color: var(--negro);
  font-weight: 600;
}

.blog-article {
  min-width: 0;
}

.blog-article-header {
  margin-bottom: 32px;
}
.blog-article-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 16px;
}
.blog-article-meta {
  display: flex;
  gap: 10px;
  font-size: .85rem;
  color: var(--gris);
  align-items: center;
}

.blog-article-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--negro);
}
.blog-article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
}
.blog-article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}
.blog-article-body p {
  margin-bottom: 20px;
}
.blog-article-body ul, .blog-article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}
.blog-article-body li {
  margin-bottom: 8px;
}
.blog-article-body strong {
  font-weight: 700;
}

.blog-cta-box {
  background: var(--gris-claro);
  border-radius: var(--radio);
  padding: 28px 32px;
  margin-top: 40px;
  text-align: center;
  border-left: 4px solid var(--rojo);
}
.blog-cta-box p {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Blog Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar-widget {
  background: var(--gris-claro);
  border-radius: var(--radio);
  padding: 24px;
}
.sidebar-widget h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--negro);
}
.sidebar-posts {
  list-style: none;
  padding: 0;
}
.sidebar-posts li {
  padding-block: 8px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.sidebar-posts li:last-child {
  border-bottom: none;
}
.sidebar-posts a {
  font-size: .9rem;
  color: var(--gris);
  transition: color var(--transicion);
  line-height: 1.4;
}
.sidebar-posts a:hover {
  color: var(--rojo);
}

.sidebar-contact p {
  font-size: .9rem;
  color: var(--gris);
  margin-bottom: 16px;
}

.btn-outline-dark {
  background: transparent;
  color: var(--negro);
  border-color: var(--negro);
}
.btn-outline-dark:hover {
  background: var(--negro);
  color: var(--blanco);
}

/* Blog footer column */
.footer-col-blog {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================================
   BLOG RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .blog-post-page > .container {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .blog-page {
    padding-top: 110px;
  }
  .blog-post-page {
    padding-top: 110px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-preview-grid {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    grid-template-columns: 1fr;
  }
  .blog-cta-box {
    padding: 20px 16px;
  }
}

/* ============================================================
   CTA final
   ============================================================ */
.cta-final {
  background: var(--rojo);
  color: var(--blanco);
  text-align: center;
}
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.cta-final p { font-size: 1.05rem; color: rgba(255,255,255,.9); margin-bottom: 32px; }
.cta-final .hero-actions { justify-content: center; }
.cta-final .btn-outline { border-color: var(--blanco); }
.cta-final .btn-primary { background: var(--negro); }
.cta-final .btn-primary:hover { background: var(--negro-suave); }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--negro); color: rgba(255,255,255,.8); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-block: 56px 40px;
}
.footer-logo { height: 120px; width: auto; margin-bottom: 16px; border-radius: 12px; }
.footer-brand-fallback {
  font-family: var(--fuente-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blanco);
  margin-bottom: 16px;
  letter-spacing: .5px;
}
.footer-brand p { font-size: .9rem; max-width: 320px; color: rgba(255,255,255,.6); }

.footer-col h4 {
  color: var(--blanco);
  font-size: 1rem;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col a, .footer-col span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transicion), transform var(--transicion);
}
.footer-col a:hover { color: var(--rojo); transform: translateX(4px); }
.footer-col .icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--rojo); opacity: .7; transition: opacity var(--transicion); }
.footer-col a:hover .icon { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-block: 22px;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}
.footer-bottom a:hover { color: var(--rojo); }
.footer-bottom-links {
  display: flex;
  gap: 16px;
}
.footer-bottom-links a {
  color: rgba(255,255,255,.5);
  transition: color var(--transicion);
}
.footer-bottom-links a:hover {
  color: var(--rojo);
}

/* -------------------- Botón flotante WhatsApp -------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  z-index: 200;
  animation: pulse-wa 2.4s ease-in-out infinite;
  border: none;
  cursor: pointer;
  padding: 0;
}
.whatsapp-float svg { width: 30px; height: 30px; color: var(--blanco); }
.whatsapp-float:hover { transform: scale(1.08); }

@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(37,211,102,.5); }
  50% { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 12px rgba(37,211,102,0); }
}

/* -------------------- Selector de número WhatsApp -------------------- */
.wa-selector-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.wa-selector-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.wa-selector {
  background: var(--blanco);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 400px;
  padding: 32px 24px 28px;
  position: relative;
  transform: translateY(40px);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
}
.wa-selector-overlay.open .wa-selector {
  transform: translateY(0);
}

.wa-selector-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gris-claro);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
  color: var(--gris);
}
.wa-selector-close svg { width: 16px; height: 16px; }
.wa-selector-close:hover {
  background: #ddd;
  transform: rotate(90deg);
  color: var(--negro);
}

.wa-selector-header {
  text-align: center;
  margin-bottom: 24px;
}

.wa-selector-icon {
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--blanco);
  box-shadow: 0 4px 16px rgba(37,211,102,.3);
}
.wa-selector-icon svg { width: 28px; height: 28px; }

.wa-selector-title {
  font-family: var(--fuente-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--negro);
  margin-bottom: 4px;
}

.wa-selector-sub {
  font-size: .88rem;
  color: var(--gris);
}

.wa-selector-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--gris-claro);
  border-radius: 14px;
  background: var(--blanco);
  cursor: pointer;
  transition: all .25s ease;
  text-align: left;
  position: relative;
}
.wa-option:hover {
  border-color: #25D366;
  background: #f0faf4;
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(37,211,102,.15);
}
.wa-option:active {
  transform: translateX(4px) scale(.99);
}

.wa-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.wa-option-icon svg { width: 22px; height: 22px; }
.wa-option:hover .wa-option-icon {
  background: #25D366;
  color: var(--blanco);
  transform: scale(1.08);
}

.wa-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.wa-option-number {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-option-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gris);
  letter-spacing: .3px;
}
.wa-option-number {
  font-size: 1rem;
  font-weight: 700;
  color: var(--negro);
  letter-spacing: .5px;
}
.wa-option:hover .wa-option-number {
  color: #1a9e4a;
}

/* Selector responsive */
@media (max-width: 480px) {
  .wa-selector {
    padding: 20px 16px 18px;
    border-radius: 16px 16px 0 0;
  }
  .wa-selector-header { margin-bottom: 16px; }
  .wa-selector-title { font-size: 1rem; margin-bottom: 2px; }
  .wa-selector-sub { font-size: .78rem; }
  .wa-selector-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    box-shadow: 0 3px 12px rgba(37,211,102,.25);
  }
  .wa-selector-icon svg { width: 20px; height: 20px; }
  .wa-selector-close {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
  }
  .wa-selector-close svg { width: 14px; height: 14px; }

  .wa-selector-options { gap: 8px; }

  .wa-option {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 12px;
    border-width: 1px;
  }
  .wa-option:hover {
    transform: translateX(2px);
  }
  .wa-option:active {
    transform: translateX(2px) scale(.98);
  }

  .wa-option-icon {
    width: 34px;
    height: 34px;
  }
  .wa-option-icon svg { width: 17px; height: 17px; }
  .wa-option:hover .wa-option-icon { transform: scale(1.06); }

  .wa-option-label { font-size: .72rem; }
  .wa-option-number { font-size: .85rem; }
}

@media (max-width: 380px) {
  .wa-selector {
    padding: 16px 14px 14px;
    border-radius: 14px 14px 0 0;
  }
  .wa-selector-header { margin-bottom: 12px; }
  .wa-selector-title { font-size: .92rem; }
  .wa-selector-sub { font-size: .72rem; }
  .wa-selector-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
  }
  .wa-selector-icon svg { width: 17px; height: 17px; }
  .wa-selector-close {
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
  }
  .wa-selector-close svg { width: 12px; height: 12px; }

  .wa-selector-options { gap: 6px; }

  .wa-option {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 10px;
  }
  .wa-option-icon {
    width: 28px;
    height: 28px;
  }
  .wa-option-icon svg { width: 14px; height: 14px; }
  .wa-option-label { font-size: .65rem; }
  .wa-option-number { font-size: .78rem; }
  .wa-option-info { gap: 1px; }
}

@media (min-width: 600px) {
  .wa-selector-overlay {
    align-items: center;
  }
  .wa-selector {
    border-radius: 20px;
    transform: translateY(20px) scale(.96);
    opacity: 0;
    transition: transform .3s cubic-bezier(.32,.72,0,1), opacity .25s ease;
  }
  .wa-selector-overlay.open .wa-selector {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* -------------------- Revelado al scroll -------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col-blog { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--blanco);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 20px;
    border-bottom: 3px solid var(--rojo);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transicion), opacity var(--transicion);
    z-index: 99;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a {
    padding-block: 12px;
    width: 100%;
    border-bottom: 1px solid var(--gris-claro);
    color: var(--negro);
  }
  .main-nav a:hover { color: var(--rojo); }

  /* Solo logo + hamburguesa en móvil: ocultar botones de llamada y WhatsApp */
  .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }

  .hero { min-height: 100svh; }
  .hero-stats { gap: 26px; }
  .hero-img { object-position: center 25%; animation-duration: 40s; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .whatsapp-float { width: 54px; height: 54px; bottom: 16px; right: 16px; }
}


@media (max-width: 480px) {
  .hero-actions, .cta-final .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .cta-final .btn { justify-content: center; }
  section { padding-block: 60px; }
}

/* ---- Compacto para iPhone 14 Pro y similares (≤430px) ---- */
@media (max-width: 430px) {
  .hero { min-height: auto; }
  .hero-content { padding-block: 56px 36px; }

  .eyebrow { font-size: .72rem; padding: 5px 10px; margin-bottom: 14px; }

  .hero h1 { font-size: 2.2rem; margin-bottom: 14px; }

  .hero-sub {
    font-size: .95rem;
    margin-bottom: 22px;
    /* Texto completo visible en móvil */
  }

  .hero-actions { gap: 10px; }
  .btn-lg { padding: 12px 20px; font-size: .95rem; }

  .hero-stats {
    gap: 18px;
    margin-top: 28px;
    padding-top: 18px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .stat strong { font-size: 1.5rem; }
  .stat span { font-size: .75rem; }
}

/* -------------------- Impulsado por Aisbit -------------------- */
.footer-powered {
  background: var(--negro);
  border-top: 1px solid rgba(255,255,255,.06);
  padding-block: 14px;
  text-align: center;
}
.footer-powered a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  transition: color var(--transicion);
}
.footer-powered a:hover {
  color: var(--blanco);
}
.footer-powered img {
  width: 20px;
  height: 20px;
  opacity: .8;
  transition: opacity var(--transicion), transform var(--transicion);
}
.footer-powered a:hover img {
  opacity: 1;
  transform: scale(1.1);
}
