/* ==========================================================================
   HIDROPEX — Hoja de estilos principal
   Sistema de diseño basado en las maquetas corporativas.
   ========================================================================== */

:root {
  /* Colores corporativos Hidropex */
  --hpx-blue:        #466BB1;   /* AZUL corporativo (botones, encabezados)    */
  --hpx-blue-600:    #3c5d9c;
  --hpx-blue-700:    #324f86;
  --hpx-blue-light:  #8aa6d6;   /* Azul claro (segunda línea de títulos hero) */
  --hpx-navy:        #4A4F54;   /* PLOMO corporativo (secciones oscuras)      */
  --hpx-navy-700:    #3e4246;
  --hpx-navy-900:    #313539;
  --hpx-gold:        #f4b81c;   /* Dorado de acento (emergencia, CTA)         */
  --hpx-gold-600:    #e0a90f;
  --hpx-gray:        #f4f6f9;   /* Fondo claro de secciones                   */
  --hpx-gray-200:    #e7ecf2;
  --hpx-border:      #e2e8f0;
  --hpx-text:        #1f2d3d;   /* Texto principal                            */
  --hpx-muted:       #5b6b7e;   /* Texto secundario                           */
  --hpx-white:       #ffffff;

  --hpx-radius:      10px;
  --hpx-radius-lg:   16px;
  --hpx-shadow:      0 10px 30px rgba(22, 36, 63, .08);
  --hpx-shadow-sm:   0 4px 14px rgba(22, 36, 63, .06);
  --hpx-container:   1200px;
  --hpx-font:        'Manrope', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

  /* Curvas y tiempos de movimiento (sistema de animación) */
  --hpx-ease:        cubic-bezier(.22, .61, .36, 1);   /* salida suave premium */
  --hpx-ease-soft:   cubic-bezier(.4, 0, .2, 1);       /* estándar material    */
  --hpx-dur:         .6s;                               /* reveals              */
  --hpx-dur-fast:    .25s;                              /* hover/micro          */
}

/* --------------------------------------------------------------- Reset/base */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--hpx-font);
  color: var(--hpx-text);
  background: var(--hpx-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hpx-blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--hpx-blue-700); }

h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.2; color: var(--hpx-text); font-weight: 800; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

.hpx-container { width: 100%; max-width: var(--hpx-container); margin: 0 auto; padding: 0 24px; }
.hpx-section { padding: 64px 0; }
.hpx-section--tight { padding: 44px 0; }
.hpx-bg-gray { background: var(--hpx-gray); }
.hpx-text-center { text-align: center; }
.hpx-mt-0 { margin-top: 0; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* ------------------------------------------------------------------ Buttons */
.hpx-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 6px;
  font-weight: 700; font-size: .92rem; line-height: 1;
  border: 2px solid transparent; cursor: pointer;
  transition: background var(--hpx-dur-fast) var(--hpx-ease-soft), color var(--hpx-dur-fast) var(--hpx-ease-soft), border-color var(--hpx-dur-fast) var(--hpx-ease-soft), transform var(--hpx-dur-fast) var(--hpx-ease), box-shadow var(--hpx-dur-fast) var(--hpx-ease);
  text-align: center;
}
.hpx-btn .hpx-arrow { transition: transform var(--hpx-dur-fast) var(--hpx-ease); }
.hpx-btn:hover .hpx-arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: no-preference) {
  .hpx-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22, 36, 63, .14); }
  .hpx-btn:active { transform: translateY(0); }
}

.hpx-btn--primary { background: var(--hpx-blue); color: #fff; }
.hpx-btn--primary:hover { background: var(--hpx-blue-700); color: #fff; }

.hpx-btn--gold { background: var(--hpx-gold); color: var(--hpx-navy); }
.hpx-btn--gold:hover { background: var(--hpx-gold-600); color: var(--hpx-navy); }

.hpx-btn--dark { background: var(--hpx-navy); color: #fff; }
.hpx-btn--dark:hover { background: var(--hpx-navy-900); color: #fff; }

.hpx-btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hpx-btn--outline:hover { background: rgba(255,255,255,.12); color: #fff; }

.hpx-btn--outline-blue { background: transparent; color: var(--hpx-blue); border-color: var(--hpx-blue); }
.hpx-btn--outline-blue:hover { background: var(--hpx-blue); color: #fff; }

.hpx-btn--light { background: #fff; color: var(--hpx-blue); }
.hpx-btn--light:hover { background: var(--hpx-gray); color: var(--hpx-blue-700); }

.hpx-btn--block { width: 100%; justify-content: center; }

/* =========================================================== TOP BAR ===== */
.hpx-topbar {
  background: #fff; border-bottom: 1px solid var(--hpx-border);
  font-size: .82rem; color: var(--hpx-text);
}
.hpx-topbar__inner { display: flex; align-items: stretch; justify-content: space-between; }
.hpx-topbar__info { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 10px 0; }
.hpx-topbar__info a, .hpx-topbar__info span { display: inline-flex; align-items: center; gap: 8px; color: var(--hpx-text); }
.hpx-topbar__info svg { color: var(--hpx-blue); flex: none; }
.hpx-topbar__actions { display: flex; align-items: stretch; }
.hpx-topbar__work {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--hpx-border); border-radius: 8px;
  padding: 8px 16px; margin: 8px 14px; font-weight: 600; color: var(--hpx-text);
  transition: border-color var(--hpx-dur-fast) var(--hpx-ease-soft), color var(--hpx-dur-fast) var(--hpx-ease-soft), background var(--hpx-dur-fast) var(--hpx-ease-soft);
}
.hpx-topbar__work:hover { border-color: var(--hpx-blue); color: var(--hpx-blue); }
.hpx-topbar__emergency {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--hpx-navy); color: #fff; padding: 10px 22px;
  transition: background var(--hpx-dur-fast) var(--hpx-ease-soft);
}
.hpx-topbar__emergency:hover { background: var(--hpx-navy-900); color: #fff; }
.hpx-topbar__emergency strong { color: var(--hpx-gold); font-size: .82rem; letter-spacing: .3px; }
.hpx-topbar__emergency small { display: block; font-size: .68rem; opacity: .8; }
.hpx-topbar__emergency svg { color: var(--hpx-gold); }

/* =========================================================== HEADER ====== */
.hpx-header { background: #fff; position: sticky; top: 0; z-index: 100; box-shadow: var(--hpx-shadow-sm); }
.hpx-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; }

.hpx-logo { display: inline-flex; align-items: center; gap: 12px; }
.hpx-logo__mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--hpx-blue); color: #fff; display: grid; place-items: center;
  font-weight: 900; font-size: 1.1rem; letter-spacing: -1px;
}
.hpx-logo__text strong { display: block; font-size: 1.35rem; font-weight: 900; color: var(--hpx-navy); letter-spacing: 1px; line-height: 1; }
.hpx-logo__text small { display: block; font-size: .55rem; letter-spacing: 2.5px; color: var(--hpx-muted); margin-top: 3px; }
.hpx-logo img { max-height: 52px; width: auto; }

/* Logo personalizado subido desde Personalizar → Identidad del sitio */
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 56px; width: auto; height: auto; transition: opacity var(--hpx-dur-fast) var(--hpx-ease-soft); }
.custom-logo-link:hover .custom-logo { opacity: .85; }

/* ------- Navegación principal ------- */
.hpx-nav { display: flex; align-items: center; gap: 18px; }
.hpx-menu { list-style: none; display: flex; align-items: center; gap: 6px; }
.hpx-menu > li { position: relative; }
.hpx-menu > li > a {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-weight: 700; font-size: .9rem; color: var(--hpx-text);
  border-bottom: 3px solid transparent;
  transition: color var(--hpx-dur-fast) var(--hpx-ease-soft);
}
.hpx-menu > li > a::before {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -3px; height: 3px;
  background: var(--hpx-blue); transform: scaleX(0); transform-origin: left;
  transition: transform var(--hpx-dur-fast) var(--hpx-ease);
}
.hpx-menu > li.current-menu-item > a,
.hpx-menu > li.current-menu-parent > a,
.hpx-menu > li:hover > a { color: var(--hpx-blue); }
.hpx-menu > li.current-menu-item > a::before,
.hpx-menu > li.current-menu-parent > a::before,
.hpx-menu > li:hover > a::before { transform: scaleX(1); }
.hpx-menu .menu-item-has-children > a::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; margin-top: -3px;
}
/* Submenús */
.hpx-menu .sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--hpx-border); border-radius: var(--hpx-radius);
  box-shadow: var(--hpx-shadow); padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s ease; z-index: 50;
}
.hpx-menu > li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hpx-menu .sub-menu a { display: block; padding: 10px 14px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--hpx-text); }
.hpx-menu .sub-menu a:hover { background: var(--hpx-gray); color: var(--hpx-blue); }

.hpx-nav__cta { display: inline-flex; }

/* Botón hamburguesa */
.hpx-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hpx-burger span { display: block; width: 26px; height: 3px; background: var(--hpx-navy); border-radius: 3px; margin: 5px 0; transition: .3s; }
.hpx-burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hpx-burger.is-open span:nth-child(2) { opacity: 0; }
.hpx-burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================== HERO ======== */
.hpx-hero { position: relative; background: linear-gradient(120deg, var(--hpx-blue-700), var(--hpx-blue)); color: #fff; overflow: hidden; }
.hpx-hero__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; min-height: 360px; padding: 56px 0; }
.hpx-hero__eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700; opacity: .85; margin-bottom: 12px; }
.hpx-hero h1 { font-size: 3rem; color: #fff; margin-bottom: 18px; }
.hpx-hero h1 .accent { color: var(--hpx-blue-light); display: block; }
.hpx-hero p { font-size: 1.05rem; opacity: .92; max-width: 46ch; }
.hpx-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hpx-hero__media { position: relative; }
.hpx-hero__media img { border-radius: var(--hpx-radius-lg); box-shadow: var(--hpx-shadow); width: 100%; object-fit: cover; aspect-ratio: 16/11; }
.hpx-hero--media-bleed .hpx-hero__media { align-self: stretch; }

/* Hero a sangre completa con imagen de fondo + overlay (Inicio) */
.hpx-hero--cover { position: relative; overflow: hidden; }
.hpx-hero--cover::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; right: 0; z-index: 0;
  background-image: var(--hpx-hero-img, none);
  background-size: cover; background-position: center; opacity: .35;
  transform: translate3d(0, var(--hpx-parallax, 0px), 0); will-change: transform;
}
.hpx-hero--cover .hpx-container { position: relative; z-index: 1; }
.hpx-hero--cover .hpx-hero__inner { grid-template-columns: 1fr; min-height: 460px; }
.hpx-hero--cover .hpx-hero__content { max-width: 640px; }
.hpx-hero__badges { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; }
.hpx-hero__badge { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.hpx-hero__badge svg { color: var(--hpx-blue-light); flex: none; }
.hpx-hero__badge strong { display: block; font-weight: 800; }
.hpx-hero__badge span { opacity: .8; }

/* Hero compacto (páginas internas) con breadcrumb */
.hpx-hero--page { overflow: hidden; }
.hpx-hero--page .hpx-hero__media { transform: translate3d(0, var(--hpx-parallax-media, 0px), 0); will-change: transform; }
.hpx-hero--page .hpx-hero__inner { min-height: 280px; }
.hpx-hero--page h1 { font-size: 2.6rem; }
.hpx-breadcrumb { font-size: .82rem; opacity: .85; margin-bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hpx-breadcrumb a { color: #fff; }
.hpx-breadcrumb span.sep { opacity: .6; }
.hpx-hero__rule { width: 64px; height: 4px; background: var(--hpx-gold); border-radius: 4px; margin: 0 0 18px; }

/* Tarjeta "Quiénes somos" superpuesta al hero */
.hpx-intro-card {
  position: relative; z-index: 5; margin-top: -64px; margin-bottom: 8px;
  background: #fff; border-radius: var(--hpx-radius-lg); box-shadow: var(--hpx-shadow); padding: 40px;
}
.hpx-intro-card .eyebrow { color: var(--hpx-blue); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; font-size: .82rem; }
.hpx-intro-card h2 { font-size: 1.9rem; margin: 6px 0 16px; }
.hpx-intro-card p { color: var(--hpx-muted); }
@media (max-width: 768px) { .hpx-intro-card { margin-top: 0; padding: 28px; } }

/* =================================================== FEATURE STRIP ======= */
.hpx-featurestrip { background: #fff; border-bottom: 1px solid var(--hpx-border); }
.hpx-featurestrip__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 22px 0; }
.hpx-feature { display: flex; align-items: center; gap: 14px; }
.hpx-feature__icon { width: 42px; height: 42px; flex: none; color: var(--hpx-blue); display: grid; place-items: center; }
.hpx-feature__icon svg { width: 30px; height: 30px; }
.hpx-feature strong { display: block; font-size: .92rem; color: var(--hpx-text); }
.hpx-feature span { font-size: .82rem; color: var(--hpx-muted); }

/* Variante sobre fondo oscuro (hero overlay strip) */
.hpx-darkstrip { background: var(--hpx-navy); color: #fff; }
.hpx-darkstrip .hpx-feature__icon { color: #fff; }
.hpx-darkstrip .hpx-feature strong { color: #fff; }
.hpx-darkstrip .hpx-feature span { color: rgba(255,255,255,.7); }

/* ============================================== SECTION HEADINGS ======== */
.hpx-section-title { text-align: center; margin-bottom: 40px; }
.hpx-section-title h2 { font-size: 2rem; color: var(--hpx-blue); }
.hpx-section-title--dark h2 { color: var(--hpx-text); }
.hpx-section-title p { color: var(--hpx-muted); max-width: 60ch; margin: 0 auto; }
.hpx-heading-rule { width: 56px; height: 4px; background: var(--hpx-gold); border-radius: 4px; margin-bottom: 16px; }

/* ==================================================== CARDS / GRIDS ===== */
.hpx-grid { display: grid; gap: 24px; }
.hpx-grid--2 { grid-template-columns: repeat(2, 1fr); }
.hpx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hpx-grid--4 { grid-template-columns: repeat(4, 1fr); }
.hpx-grid--5 { grid-template-columns: repeat(5, 1fr); }

.hpx-card {
  background: #fff; border: 1px solid var(--hpx-border); border-radius: var(--hpx-radius);
  padding: 28px; transition: transform .25s ease, box-shadow .25s ease;
}
.hpx-card:hover { transform: translateY(-4px); box-shadow: var(--hpx-shadow); }
.hpx-card__icon { width: 56px; height: 56px; color: var(--hpx-blue); margin-bottom: 16px; }
.hpx-card__icon svg { width: 56px; height: 56px; }
.hpx-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .5px; }
.hpx-card p { color: var(--hpx-muted); font-size: .92rem; }
.hpx-card__more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; color: var(--hpx-blue); }
.hpx-card__more:hover .hpx-arrow { transform: translateX(4px); }

/* Tarjeta de servicio (icono centrado) */
.hpx-service-card { text-align: center; }
.hpx-service-card .hpx-card__icon { margin: 0 auto 16px; }

/* Tarjeta de producto / noticia / proyecto con imagen */
.hpx-media-card { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.hpx-media-card:hover { transform: translateY(-4px); box-shadow: var(--hpx-shadow); }
.hpx-media-card__thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--hpx-gray-200); }
.hpx-media-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hpx-media-card:hover .hpx-media-card__thumb img { transform: scale(1.05); }
.hpx-media-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.hpx-media-card__date { font-size: .78rem; color: var(--hpx-muted); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.hpx-media-card__body h3 { font-size: 1rem; }
.hpx-media-card__body h3 a { color: var(--hpx-text); }
.hpx-media-card__body h3 a:hover { color: var(--hpx-blue); }
.hpx-media-card__body p { color: var(--hpx-muted); font-size: .9rem; }
.hpx-media-card__body .hpx-card__more { margin-top: auto; }

/* Variante tarjeta de servicio (título azul en mayúsculas, como el mockup) */
.hpx-media-card--service .hpx-media-card__body h3 { font-size: .95rem; }
.hpx-media-card--service .hpx-media-card__body h3 a { color: var(--hpx-blue); text-transform: uppercase; letter-spacing: .5px; }
.hpx-media-card--service .hpx-media-card__body h3 a:hover { color: var(--hpx-blue-700); }

/* =========================================== STATS BAND (dark) ========== */
.hpx-stats { background: var(--hpx-navy); color: #fff; border-radius: var(--hpx-radius-lg); padding: 36px; }
.hpx-stats__title { text-transform: uppercase; letter-spacing: 1px; font-size: .95rem; color: rgba(255,255,255,.7); margin-bottom: 24px; }
.hpx-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.hpx-stat { display: flex; align-items: center; gap: 16px; }
.hpx-stat__icon { color: var(--hpx-blue-light); flex: none; }
.hpx-stat__num { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.hpx-stat__label { text-transform: uppercase; font-size: .78rem; letter-spacing: 1px; color: var(--hpx-blue-light); }
.hpx-stat__sub { font-size: .82rem; color: rgba(255,255,255,.7); }

/* ============================ HERO INICIO — tarjeta asistencia 24/7 ===== */
.hpx-hero--home .hpx-hero__inner { grid-template-columns: 1.35fr .85fr; align-items: end; gap: 40px; }
.hpx-hero--home .hpx-hero__content { max-width: 640px; }
.hpx-hero__assist {
  background: rgba(26, 34, 48, .82); backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--hpx-radius);
  padding: 26px; max-width: 360px; margin-left: auto;
}
.hpx-hero__assist-icon { display: inline-grid; place-items: center; color: var(--hpx-blue-light); margin-bottom: 12px; }
.hpx-hero__assist h3 { color: #fff; font-size: 1.15rem; margin-bottom: 8px; }
.hpx-hero__assist h3 span { color: var(--hpx-gold); }
.hpx-hero__assist p { color: rgba(255, 255, 255, .8); font-size: .9rem; margin-bottom: 18px; max-width: none; }
.hpx-hero__assist .hpx-btn { width: 100%; justify-content: space-between; }
@media (max-width: 900px) {
  .hpx-hero--home .hpx-hero__inner { grid-template-columns: 1fr; align-items: start; }
  .hpx-hero__assist { margin-left: 0; max-width: 100%; }
}

/* ====================================================== LEY KARIN ======= */
.hpx-leykarin {
  background: linear-gradient(120deg, var(--hpx-blue-700), var(--hpx-blue));
  border-radius: var(--hpx-radius-lg); color: #fff; padding: 40px;
  display: grid; grid-template-columns: 1.1fr 1.5fr .9fr; gap: 36px; align-items: center;
}
.hpx-leykarin__shield {
  width: 64px; height: 64px; border-radius: 16px; background: rgba(255, 255, 255, .12);
  display: grid; place-items: center; color: #fff; margin-bottom: 16px;
}
.hpx-leykarin__intro h2 { color: #fff; font-size: 1.7rem; margin-bottom: 6px; }
.hpx-leykarin__intro strong { display: block; font-weight: 700; margin-bottom: 10px; opacity: .95; }
.hpx-leykarin__intro p { color: rgba(255, 255, 255, .85); font-size: .92rem; margin: 0; }
.hpx-leykarin__items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hpx-leykarin__item span {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; margin-bottom: 10px;
}
.hpx-leykarin__item strong { display: block; font-size: .95rem; margin-bottom: 6px; }
.hpx-leykarin__item p { color: rgba(255, 255, 255, .8); font-size: .82rem; margin: 0; }
.hpx-leykarin__actions { display: flex; flex-direction: column; gap: 12px; }
.hpx-leykarin__actions .hpx-btn { width: 100%; justify-content: space-between; }
@media (max-width: 980px) {
  .hpx-leykarin { grid-template-columns: 1fr; gap: 28px; }
  .hpx-leykarin__actions { flex-direction: row; flex-wrap: wrap; }
  .hpx-leykarin__actions .hpx-btn { width: auto; }
}
@media (max-width: 560px) { .hpx-leykarin__items { grid-template-columns: 1fr; } }

/* =============================== PRESENCIA NORTE GRANDE + STATS ========= */
.hpx-presencia { background: var(--hpx-navy); color: #fff; padding: 56px 0; }
.hpx-presencia__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hpx-presencia__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hpx-presencia__map { display: flex; align-items: center; gap: 24px; border-left: 1px solid rgba(255, 255, 255, .15); padding-left: 40px; }
.hpx-presencia__chile { width: 70px; height: auto; flex: none; }
.hpx-presencia__regions h3 { color: #fff; font-size: 1.2rem; line-height: 1.25; margin-bottom: 10px; }
.hpx-presencia__regions p { color: rgba(255, 255, 255, .7); font-size: .88rem; margin-bottom: 8px; }
.hpx-presencia__regions ul { list-style: none; display: grid; gap: 6px; }
.hpx-presencia__regions li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: rgba(255, 255, 255, .9); }
.hpx-presencia__regions li svg { color: var(--hpx-gold); flex: none; }
@media (max-width: 900px) {
  .hpx-presencia__inner { grid-template-columns: 1fr; gap: 32px; }
  .hpx-presencia__map { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 28px; }
}
@media (max-width: 560px) { .hpx-presencia__stats { grid-template-columns: 1fr; } }

/* ============================================ QUIENES SOMOS split ======= */
.hpx-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hpx-split__media img { border-radius: var(--hpx-radius); box-shadow: var(--hpx-shadow); }
.hpx-split h2 { font-size: 1.9rem; }
.hpx-split .eyebrow { color: var(--hpx-blue); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; font-size: .82rem; }
.hpx-split p { color: var(--hpx-muted); }

/* ============================================ MISIÓN / VISIÓN / VALORES = */
.hpx-mvv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hpx-mvv__card { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); padding: 28px; }
.hpx-mvv__icon { width: 60px; height: 60px; border-radius: 50%; background: var(--hpx-gray); display: grid; place-items: center; color: var(--hpx-blue); margin-bottom: 16px; }
.hpx-values-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hpx-values-list li { display: flex; align-items: center; gap: 8px; color: var(--hpx-text); font-size: .92rem; }
.hpx-values-list li::before { content: "✓"; color: var(--hpx-blue); font-weight: 900; }

/* ==================================================== MERCADOS ========== */
.hpx-markets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hpx-market { text-align: center; padding: 18px; }
.hpx-market__icon { color: var(--hpx-blue); margin: 0 auto 12px; }
.hpx-market strong { display: block; font-size: .92rem; }
.hpx-market span { color: var(--hpx-muted); font-size: .85rem; }

/* ==================================================== TIMELINE (historia) */
.hpx-timeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.hpx-timeline::before { content: ""; position: absolute; top: 40px; left: 6%; right: 6%; height: 2px; background: var(--hpx-border); z-index: 0; }
.hpx-timeline__item { position: relative; z-index: 1; text-align: center; }
.hpx-timeline__dot { width: 80px; height: 80px; margin: 0 auto 16px; border-radius: 50%; background: #fff; border: 2px solid var(--hpx-blue); color: var(--hpx-blue); display: grid; place-items: center; }
.hpx-timeline__year { font-size: 1.25rem; font-weight: 900; color: var(--hpx-text); }
.hpx-timeline__label { text-transform: uppercase; font-size: .72rem; letter-spacing: 1px; color: var(--hpx-blue); margin-bottom: 8px; }
.hpx-timeline__text { font-size: .82rem; color: var(--hpx-muted); }

/* Hitos (history mini cards) */
.hpx-milestones { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.hpx-milestone { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); overflow: hidden; }
.hpx-milestone__thumb { aspect-ratio: 4/3; background: var(--hpx-gray-200); }
.hpx-milestone__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hpx-milestone__body { padding: 14px; }
.hpx-milestone__year { font-weight: 900; color: var(--hpx-text); }
.hpx-milestone__body p { font-size: .82rem; color: var(--hpx-muted); margin: 4px 0 0; }

/* ==================================================== EQUIPO ============ */
.hpx-team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.hpx-member { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); padding: 22px; text-align: center; }
.hpx-member__photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid var(--hpx-gray-200); }
.hpx-member h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.hpx-member__role { color: var(--hpx-muted); font-size: .82rem; margin-bottom: 10px; }
.hpx-member__bio { font-size: .82rem; color: var(--hpx-muted); }
.hpx-member__social a { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--hpx-gray); color: var(--hpx-blue); margin-top: 12px; }
.hpx-member__social a:hover { background: var(--hpx-blue); color: #fff; }

/* Departamentos */
.hpx-depts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.hpx-dept { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); padding: 24px; text-align: center; }
.hpx-dept__icon { color: var(--hpx-blue); margin: 0 auto 14px; }
.hpx-dept h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }
.hpx-dept p { font-size: .82rem; color: var(--hpx-muted); }

/* ===================================== PRODUCTOS (catálogo + sidebar) === */
.hpx-catalog { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.hpx-cat-sidebar { background: var(--hpx-navy); border-radius: var(--hpx-radius); padding: 24px; color: #fff; position: sticky; top: 100px; }
.hpx-cat-sidebar h3 { color: #fff; text-transform: uppercase; font-size: .9rem; letter-spacing: 1px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.hpx-cat-list { list-style: none; }
.hpx-cat-list a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 600; }
.hpx-cat-list a:hover, .hpx-cat-list li.is-active a { background: var(--hpx-blue); color: #fff; }
.hpx-cat-sidebar .hpx-btn { margin-top: 18px; }

/* =========================================== ACCORDION (FAQ) ============ */
.hpx-faq-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.hpx-accordion { display: flex; flex-direction: column; gap: 14px; }
.hpx-accordion__item { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); overflow: hidden; }
.hpx-accordion__trigger {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 20px 24px; font-size: 1rem; font-weight: 700; color: var(--hpx-text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hpx-accordion__icon { flex: none; width: 22px; height: 22px; position: relative; }
.hpx-accordion__icon::before, .hpx-accordion__icon::after { content: ""; position: absolute; background: var(--hpx-blue); transition: transform .25s ease; }
.hpx-accordion__icon::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.hpx-accordion__icon::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.hpx-accordion__item.is-open .hpx-accordion__icon::after { transform: translateX(-50%) scaleY(0); }
.hpx-accordion__panel { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.hpx-accordion__panel-inner { padding: 0 24px 22px; color: var(--hpx-muted); font-size: .92rem; }

/* ====================================== LEGAL (sidebar TOC + content) === */
.hpx-legal-layout { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: start; }
.hpx-toc { background: #fff; border: 1px solid var(--hpx-border); border-radius: var(--hpx-radius); overflow: hidden; position: sticky; top: 100px; }
.hpx-toc__head { background: var(--hpx-blue); color: #fff; padding: 16px 20px; text-transform: uppercase; font-size: .85rem; letter-spacing: 1px; font-weight: 800; }
.hpx-toc ol { list-style: none; }
.hpx-toc li a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--hpx-border); color: var(--hpx-text); font-size: .88rem; }
.hpx-toc li a:hover, .hpx-toc li a.is-active { background: var(--hpx-gray); color: var(--hpx-blue); }
.hpx-toc li:last-child a { border-bottom: 0; }
.hpx-aside-card { background: var(--hpx-gray); border-radius: var(--hpx-radius); padding: 24px; text-align: center; margin-top: 20px; }
.hpx-aside-card__icon { color: var(--hpx-blue); margin: 0 auto 12px; }

.hpx-legal-article { display: flex; flex-direction: column; gap: 28px; }
.hpx-legal-block { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding-bottom: 26px; border-bottom: 1px solid var(--hpx-border); }
.hpx-legal-block:last-child { border-bottom: 0; }
.hpx-legal-block__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--hpx-gray); display: grid; place-items: center; color: var(--hpx-blue); }
.hpx-legal-block h3 { color: var(--hpx-blue); font-size: 1.1rem; }
.hpx-legal-block p { color: var(--hpx-muted); margin: 0; }

.hpx-compliance { background: var(--hpx-gray); border-radius: var(--hpx-radius); padding: 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; align-items: center; margin-top: 36px; }
.hpx-compliance__item { display: flex; align-items: center; gap: 10px; color: var(--hpx-muted); font-size: .88rem; }
.hpx-compliance__item svg { color: var(--hpx-blue); flex: none; }

/* ===================================================== CONTACTO ========= */
.hpx-contact-grid { display: grid; grid-template-columns: 360px 1fr; gap: 40px; align-items: start; }
.hpx-contact-info { display: flex; flex-direction: column; gap: 16px; }
.hpx-contact-card { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); padding: 20px; display: flex; gap: 16px; align-items: flex-start; }
.hpx-contact-card__icon { width: 48px; height: 48px; flex: none; border-radius: 10px; background: var(--hpx-blue); color: #fff; display: grid; place-items: center; }
.hpx-contact-card h4 { text-transform: uppercase; font-size: .8rem; letter-spacing: 1px; color: var(--hpx-blue); margin-bottom: 4px; }
.hpx-contact-card p { margin: 0; color: var(--hpx-text); font-size: .92rem; }
.hpx-emergency-card { background: var(--hpx-navy); color: #fff; border-radius: var(--hpx-radius); padding: 24px; }
.hpx-emergency-card h4 { color: var(--hpx-gold); text-transform: uppercase; letter-spacing: 1px; }
.hpx-emergency-card p { color: rgba(255,255,255,.8); font-size: .9rem; }

/* ===================================================== FORMS ============ */
.hpx-form { background:#fff; border:1px solid var(--hpx-border); border-radius: var(--hpx-radius); padding: 32px; box-shadow: var(--hpx-shadow-sm); }
.hpx-form__lead { color: var(--hpx-muted); margin-bottom: 24px; }
.hpx-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hpx-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.hpx-field--full { grid-column: 1 / -1; }
.hpx-field label { font-size: .82rem; font-weight: 600; color: var(--hpx-text); }
.hpx-field .req { color: var(--hpx-blue); }
.hpx-field input, .hpx-field select, .hpx-field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--hpx-border); border-radius: var(--hpx-radius);
  font-family: inherit; font-size: .92rem; color: var(--hpx-text); background: #fff; transition: border-color .2s ease, box-shadow .2s ease;
}
.hpx-field input:focus, .hpx-field select:focus, .hpx-field textarea:focus {
  outline: none; border-color: var(--hpx-blue); box-shadow: 0 0 0 3px rgba(27,83,163,.12);
}
.hpx-field textarea { min-height: 130px; resize: vertical; }
.hpx-form__consent { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--hpx-muted); margin: 8px 0 20px; }
.hpx-form__consent input { margin-top: 3px; }
.hpx-form__footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* Dropzone CV */
.hpx-dropzone { border: 2px dashed var(--hpx-border); border-radius: var(--hpx-radius); padding: 28px; text-align: center; color: var(--hpx-muted); background: var(--hpx-gray); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.hpx-dropzone:hover, .hpx-dropzone.is-dragover { border-color: var(--hpx-blue); background: #fff; }
.hpx-dropzone svg { color: var(--hpx-blue); margin-bottom: 8px; }
.hpx-dropzone input[type=file] { display: none; }

.hpx-form-note { background: var(--hpx-navy); color: #fff; border-radius: var(--hpx-radius); padding: 22px; }
.hpx-form-note h4 { color: #fff; text-transform: uppercase; font-size: .82rem; letter-spacing: 1px; }
.hpx-form-note p, .hpx-form-note li { color: rgba(255,255,255,.8); font-size: .85rem; }

.hpx-form-feedback { padding: 14px 16px; border-radius: var(--hpx-radius); margin-bottom: 18px; font-size: .9rem; display: none; }
.hpx-form-feedback.is-ok { display: block; background: #e6f4ea; color: #1b7a3d; border: 1px solid #b6e0c4; }
.hpx-form-feedback.is-err { display: block; background: #fdecec; color: #b3261e; border: 1px solid #f3c2c0; }

/* Mapa */
.hpx-map { border-radius: var(--hpx-radius); overflow: hidden; border: 1px solid var(--hpx-border); position: relative; min-height: 320px; background: var(--hpx-gray-200); }
.hpx-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
.hpx-map__card { position: absolute; top: 20px; left: 20px; background: #fff; border-radius: var(--hpx-radius); box-shadow: var(--hpx-shadow); padding: 16px 18px; max-width: 240px; }
.hpx-map__card strong { display: block; }
.hpx-map__card p { font-size: .85rem; color: var(--hpx-muted); margin: 6px 0; }

/* ================================================ BRANDS / CLIENTES ===== */
.hpx-brands { }
.hpx-brands__title { text-align: center; text-transform: uppercase; letter-spacing: 1.5px; color: var(--hpx-blue); font-weight: 800; font-size: 1.05rem; margin-bottom: 28px; }
.hpx-brands__track { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.hpx-brands__track img, .hpx-brands__logo { max-height: 46px; opacity: .8; filter: grayscale(20%); transition: opacity .2s ease; }
.hpx-brands__logo { font-weight: 900; font-size: 1.6rem; color: var(--hpx-navy); }
.hpx-brands__track img:hover { opacity: 1; }

/* ====================================================== CTA BANDS ======= */
.hpx-cta {
  background: linear-gradient(120deg, var(--hpx-blue-700), var(--hpx-blue));
  color: #fff; border-radius: 0; position: relative; overflow: hidden;
}
.hpx-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px 0; flex-wrap: wrap; }
.hpx-cta__text { display: flex; align-items: center; gap: 18px; }
.hpx-cta__text h2 { color: #fff; font-size: 1.6rem; margin: 0; }
.hpx-cta__text p { margin: 6px 0 0; opacity: .9; }
.hpx-cta__icon { flex: none; color: rgba(255,255,255,.9); }
.hpx-cta__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hpx-cta--inset .hpx-cta__inner { padding: 36px 40px; }
.hpx-cta--inset { border-radius: var(--hpx-radius-lg); }

/* ====================================================== FOOTER ========== */
.hpx-footer { background: var(--hpx-navy); color: rgba(255,255,255,.78); }
.hpx-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding: 56px 0 40px; }
.hpx-footer__brand .hpx-logo__text strong { color: #fff; }
.hpx-footer__brand .hpx-logo__text small { color: rgba(255,255,255,.6); }
.hpx-footer__about { font-size: .9rem; margin: 16px 0; max-width: 30ch; }
.hpx-footer h4 { color: #fff; text-transform: uppercase; font-size: .85rem; letter-spacing: 1px; margin-bottom: 18px; }
.hpx-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hpx-footer ul a { display: inline-block; color: rgba(255,255,255,.78); font-size: .9rem; transition: color var(--hpx-dur-fast) var(--hpx-ease-soft), transform var(--hpx-dur-fast) var(--hpx-ease); }
.hpx-footer ul a:hover { color: #fff; transform: translateX(4px); }
.hpx-footer__contact li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 12px; }
.hpx-footer__contact svg { color: var(--hpx-blue-light); flex: none; margin-top: 2px; }
.hpx-social { display: flex; gap: 10px; margin-top: 16px; }
.hpx-social a { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; transition: background var(--hpx-dur-fast) var(--hpx-ease-soft), color var(--hpx-dur-fast) var(--hpx-ease-soft), transform var(--hpx-dur-fast) var(--hpx-ease); }
.hpx-social a:hover { background: var(--hpx-blue); color: #fff; transform: translateY(-3px); }
.hpx-iso { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: .72rem; color: rgba(255,255,255,.7); }
.hpx-iso__badge { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); display: grid; place-items: center; font-size: .5rem; text-align: center; line-height: 1.1; font-weight: 700; }
.hpx-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; }
.hpx-footer__bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }
.hpx-footer__bottom a { color: rgba(255,255,255,.78); }

/* ====================================================== POST / BLOG ===== */
.hpx-post { max-width: 800px; margin: 0 auto; }
.hpx-post__meta { color: var(--hpx-muted); font-size: .85rem; margin-bottom: 16px; }
.hpx-post__content { font-size: 1.02rem; }
.hpx-post__content img { border-radius: var(--hpx-radius); margin: 24px 0; }
.hpx-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.hpx-pagination a, .hpx-pagination span { padding: 8px 14px; border: 1px solid var(--hpx-border); border-radius: 8px; color: var(--hpx-text); }
.hpx-pagination .current { background: var(--hpx-blue); color: #fff; border-color: var(--hpx-blue); }

/* Subscribe box */
.hpx-subscribe { background: var(--hpx-blue); color: #fff; border-radius: var(--hpx-radius); padding: 28px; }
.hpx-subscribe h3 { color: #fff; }
.hpx-subscribe p { opacity: .9; font-size: .9rem; }
.hpx-subscribe form { display: flex; flex-direction: column; gap: 10px; }
.hpx-subscribe input { padding: 12px 14px; border-radius: 8px; border: 0; }

/* Sidebar generic */
.hpx-side-box { background: var(--hpx-gray); border-radius: var(--hpx-radius); padding: 24px; margin-bottom: 20px; }
.hpx-side-box h3 { font-size: 1rem; }
.hpx-side-list { list-style: none; }
.hpx-side-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--hpx-text); font-size: .9rem; }
.hpx-side-list a:hover, .hpx-side-list li.is-active a { background: var(--hpx-blue); color: #fff; }

/* ====================================================== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .hpx-hero h1 { font-size: 2.4rem; }
  .hpx-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hpx-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .hpx-team, .hpx-depts { grid-template-columns: repeat(3, 1fr); }
  .hpx-timeline, .hpx-milestones { grid-template-columns: repeat(3, 1fr); }
  .hpx-timeline::before { display: none; }
  .hpx-catalog, .hpx-faq-layout, .hpx-legal-layout, .hpx-contact-grid { grid-template-columns: 1fr; }
  .hpx-cat-sidebar, .hpx-toc { position: static; }
  .hpx-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .hpx-compliance { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hpx-topbar__info { gap: 16px; font-size: .76rem; }
  .hpx-topbar__work { display: none; }
  .hpx-nav { position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); background: #fff;
    flex-direction: column; align-items: stretch; padding: 80px 20px 24px; gap: 8px;
    transform: translateX(100%); transition: transform .3s ease; box-shadow: -10px 0 40px rgba(0,0,0,.15); overflow-y: auto; z-index: 200; }
  .hpx-nav.is-open { transform: translateX(0); }
  .hpx-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .hpx-menu > li > a { padding: 14px 6px; border-bottom: 1px solid var(--hpx-border); }
  .hpx-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; }
  .hpx-menu .menu-item-has-children > a::after { margin-left: auto; }
  .hpx-nav__cta { margin-top: 10px; }
  .hpx-burger { display: block; z-index: 210; }
  .hpx-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden; transition: .3s; z-index: 150; }
  .hpx-nav-overlay.is-open { opacity: 1; visibility: visible; }
}

@media (max-width: 768px) {
  .hpx-section { padding: 44px 0; }
  .hpx-hero__inner { grid-template-columns: 1fr; }
  .hpx-hero__media { display: none; }
  .hpx-hero h1 { font-size: 2rem; }
  .hpx-featurestrip__grid, .hpx-grid--2, .hpx-grid--3, .hpx-grid--4, .hpx-grid--5,
  .hpx-mvv, .hpx-markets, .hpx-team, .hpx-depts, .hpx-timeline, .hpx-milestones,
  .hpx-stats__grid, .hpx-form-grid, .hpx-compliance, .hpx-footer__top { grid-template-columns: 1fr; }
  .hpx-split { grid-template-columns: 1fr; }
  .hpx-values-list { grid-template-columns: 1fr; }
  .hpx-cta__inner { flex-direction: column; align-items: flex-start; }
  .hpx-footer__bottom { flex-direction: column; align-items: flex-start; }
  .hpx-legal-block { grid-template-columns: 1fr; }
  .hpx-legal-block__icon { display: none; }
}

@media (max-width: 520px) {
  .hpx-topbar__info span:not(:first-child), .hpx-topbar__info a:not(:first-child) { display: none; }
}

/* ====================================================== MEJORAS UX ====== */

/* Aparición al hacer scroll (progressive enhancement: el atributo lo añade JS) */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity var(--hpx-dur) var(--hpx-ease), transform var(--hpx-dur) var(--hpx-ease); will-change: opacity, transform; }
  [data-reveal="left"]  { transform: translateX(-24px); }
  [data-reveal="right"] { transform: translateX(24px); }
  [data-reveal].is-visible { opacity: 1; transform: none; }
  [data-reveal][data-reveal-delay="1"] { transition-delay: .08s; }
  [data-reveal][data-reveal-delay="2"] { transition-delay: .16s; }
  [data-reveal][data-reveal-delay="3"] { transition-delay: .24s; }
  [data-reveal][data-reveal-delay="4"] { transition-delay: .32s; }
  [data-reveal][data-reveal-delay="5"] { transition-delay: .40s; }
}

/* Entrada escalonada del hero al cargar la página */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hpx-hero-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  .hpx-hero__content > *,
  .hpx-hero__assist { animation: hpx-hero-in .7s var(--hpx-ease) both; }
  .hpx-hero__content > *:nth-child(1) { animation-delay: .05s; }
  .hpx-hero__content > *:nth-child(2) { animation-delay: .14s; }
  .hpx-hero__content > *:nth-child(3) { animation-delay: .23s; }
  .hpx-hero__content > *:nth-child(4) { animation-delay: .32s; }
  .hpx-hero__content > *:nth-child(5) { animation-delay: .41s; }
  .hpx-hero__assist { animation-delay: .5s; }
}

/* Transición sutil entre páginas (fade-in al cargar, fade-out al navegar) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hpx-page-in { from { opacity: 0; } to { opacity: 1; } }
  /* Sin fill-mode: tras el fade-in la animación deja de fijar la opacidad,
     así el fade-out de .hpx-leaving (transición) no queda anulado. */
  body.hpx-pagefx { animation: hpx-page-in .4s var(--hpx-ease-soft); }
  body.hpx-leaving { opacity: 0; transition: opacity .2s var(--hpx-ease-soft); }
}

/* Header con sombra reforzada al hacer scroll */
.hpx-header.is-scrolled { box-shadow: 0 8px 28px rgba(22, 36, 63, .14); }

/* Acento superior en tarjetas al pasar el cursor */
.hpx-card, .hpx-media-card { position: relative; }
.hpx-card::after, .hpx-media-card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--hpx-blue); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease; border-radius: var(--hpx-radius) var(--hpx-radius) 0 0;
}
.hpx-card:hover::after, .hpx-media-card:hover::after { transform: scaleX(1); }

/* Botones flotantes (WhatsApp + volver arriba) */
.hpx-fab { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 12px; z-index: 120; }
.hpx-fab a, .hpx-fab button {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 0; cursor: pointer; box-shadow: var(--hpx-shadow); color: #fff;
  transition: transform .2s ease, opacity .3s ease, visibility .3s ease, background .2s ease;
}
.hpx-fab__wa { background: #25D366; }
.hpx-fab__wa:hover { background: #1ebe5a; color: #fff; transform: translateY(-3px); }
.hpx-fab__top { background: var(--hpx-blue); opacity: 0; visibility: hidden; transform: translateY(12px); }
.hpx-fab__top.is-visible { opacity: 1; visibility: visible; transform: none; }
.hpx-fab__top:hover { background: var(--hpx-blue-700); transform: translateY(-3px); }
@media (max-width: 520px) { .hpx-fab { right: 14px; bottom: 14px; } .hpx-fab a, .hpx-fab button { width: 48px; height: 48px; } }

/* Estado de carga en formularios */
.hpx-btn[disabled] { opacity: .75; cursor: progress; }
.hpx-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: hpx-spin .7s linear infinite; }
@keyframes hpx-spin { to { transform: rotate(360deg); } }

/* Foco visible accesible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(70, 107, 177, .45); outline-offset: 2px; border-radius: 4px;
}

/* Respeto a usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Lightbox */
.hpx-lightbox { position: fixed; inset: 0; background: rgba(15, 20, 30, .92); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 40px; }
.hpx-lightbox.is-open { display: flex; }
.hpx-lightbox img { max-width: 90vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.hpx-lightbox__close { position: absolute; top: 18px; right: 26px; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }

/* Carrusel automático de marcas (marquee) */
.hpx-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hpx-marquee__track { display: flex; gap: 60px; align-items: center; width: max-content; animation: hpx-marquee 32s linear infinite; }
.hpx-marquee:hover .hpx-marquee__track { animation-play-state: paused; }
@keyframes hpx-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hpx-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; } }

/* Testimonios */
.hpx-testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hpx-testimonial { background: #fff; border: 1px solid var(--hpx-border); border-radius: var(--hpx-radius); padding: 28px; display: flex; flex-direction: column; }
.hpx-testimonial__mark { color: var(--hpx-blue); opacity: .25; font-size: 3.2rem; line-height: .6; font-weight: 900; font-family: Georgia, serif; }
.hpx-testimonial__quote { color: var(--hpx-text); font-size: .95rem; margin: 10px 0 0; flex: 1; }
.hpx-testimonial__stars { color: var(--hpx-gold); margin-top: 14px; letter-spacing: 2px; }
.hpx-testimonial__author { display: flex; align-items: center; gap: 12px; margin-top: 16px; border-top: 1px solid var(--hpx-border); padding-top: 16px; }
.hpx-testimonial__avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--hpx-gray-200); display: grid; place-items: center; color: var(--hpx-blue); flex: none; }
.hpx-testimonial__name { font-weight: 800; font-size: .92rem; }
.hpx-testimonial__role { color: var(--hpx-muted); font-size: .8rem; }
@media (max-width: 768px) { .hpx-testimonials { grid-template-columns: 1fr; } }

/* Estilos de impresión (páginas legales y contenido) */
@media print {
  .hpx-topbar, .hpx-header, .hpx-nav-overlay, .hpx-fab, .hpx-cta, .hpx-footer,
  .hpx-compliance, .hpx-aside-card, .hpx-toc, .hpx-featurestrip, .hpx-brands { display: none !important; }
  .hpx-hero { background: none !important; color: #000 !important; padding: 12px 0 !important; }
  .hpx-hero::before { display: none !important; }
  .hpx-hero h1, .hpx-hero .accent, .hpx-hero p { color: #000 !important; }
  .hpx-legal-layout, .hpx-contact-grid { display: block !important; }
  .hpx-legal-block { break-inside: avoid; border-color: #ccc; }
  .hpx-section { padding: 8px 0 !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
}
