/* ==========================================================================
   HOSPITAL DE ESPECIALIDADES NUEVO LAREDO - HOJA DE ESTILOS PRINCIPAL v3.2
   Paleta Estricta: Azul Marino (#0D2040), Azul Oscuro (#071326),
                    Púrpura (#64289A), Cyan (#38BDF8), Blanco (#FFFFFF)
   Optimización Mobile-First, Header/Mega-Menu, Popups y Animaciones Continuas
   ========================================================================== */

:root {
  --he-navy: #0D2040;
  --he-navy-dark: #071326;
  --he-purple: #64289A;
  --he-purple-hover: #7B35BA;
  --he-purple-light: #F3E8FF;
  --he-purple-glow: rgba(100, 40, 154, 0.35);
  --he-cyan: #38BDF8;
  --he-cyan-light: #E0F2FE;
  --he-white: #FFFFFF;
  --he-bg-light: #F8FAFC;
  --he-text: #1E293B;
  --he-text-muted: #64748B;
  --he-border: #E2E8F0;
  --he-container: 1240px;
  --he-radius-sm: 10px;
  --he-radius-md: 16px;
  --he-radius-lg: 22px;
  --he-radius-full: 9999px;
  --he-font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --he-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   0. PRELOADER OFICIAL DE PÁGINA v4.0 (ÍCONO PROTAGONISTA SIN RECUADRO + EFECTOS LUMINOSOS)
   ========================================================================== */
#he-site-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at 50% 42%, #102a52 0%, #07152b 48%, #030914 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.52s ease;
}
#he-site-preloader.he-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.he-preloader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.44s ease;
}
#he-site-preloader.he-loaded .he-preloader-box {
  transform: scale(1.05) translateY(-5px);
  opacity: 0;
}
.he-preloader-stage {
  position: relative;
  width: 192px;
  height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.he-preloader-aura {
  position: absolute;
  width: 154px;
  height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.46) 0%, rgba(124, 58, 237, 0.24) 52%, rgba(7, 21, 43, 0) 76%);
  filter: blur(20px);
  pointer-events: none;
  animation: hePreloaderAura 2.6s ease-in-out infinite;
}
.he-preloader-pulse-wave {
  position: absolute;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.38);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.16);
  pointer-events: none;
  opacity: 0;
  animation: hePreloaderSonar 2.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.he-preloader-pulse-wave.he-wave-2 {
  border-color: rgba(168, 85, 247, 0.32);
  animation-delay: 1.3s;
}
.he-preloader-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8, 0 0 18px #ffffff;
  pointer-events: none;
  opacity: 0;
  animation: hePreloaderSpark 2.8s ease-in-out infinite;
}
.he-preloader-spark.he-spark-1 { top: 24px; left: 30px; animation-delay: 0.1s; }
.he-preloader-spark.he-spark-2 { top: 18px; right: 28px; background: #e0f2fe; animation-delay: 0.95s; }
.he-preloader-spark.he-spark-3 { bottom: 22px; right: 38px; background: #c084fc; box-shadow: 0 0 10px #c084fc; animation-delay: 1.75s; }
.he-preloader-emblem-core {
  position: relative;
  z-index: 3;
  width: 128px;
  height: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.52)) drop-shadow(0 10px 26px rgba(100, 40, 154, 0.36));
  animation: heEmblemProtagonist 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.he-preloader-emblem-img {
  width: 128px !important;
  height: 99px !important;
  max-width: 128px !important;
  max-height: 99px !important;
  object-fit: contain !important;
  display: block !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.he-preloader-emblem-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: var(--he-emblem-mask);
  mask-image: var(--he-emblem-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background: linear-gradient(112deg, transparent 22%, rgba(56, 189, 248, 0.92) 44%, #ffffff 50%, rgba(192, 132, 252, 0.88) 56%, transparent 78%);
  background-size: 240% 100%;
  mix-blend-mode: screen;
  animation: heEmblemLightSweep 2.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.he-preloader-text strong {
  display: block;
  font-family: var(--he-font-heading);
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.he-preloader-text span {
  display: block;
  font-family: var(--he-font-heading);
  font-size: 0.74rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 5px;
}
.he-preloader-bar-wrap {
  width: 184px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
  position: relative;
}
.he-preloader-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), #38bdf8, #ffffff, #a855f7, rgba(56, 189, 248, 0.15));
  background-size: 220% 100%;
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.75);
  animation: hePreloaderBar 1.65s ease-in-out infinite;
}
@keyframes heEmblemProtagonist {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.045); }
}
@keyframes heEmblemLightSweep {
  0% { background-position: 165% 0; }
  100% { background-position: -65% 0; }
}
@keyframes hePreloaderAura {
  0%, 100% { transform: scale(0.88); opacity: 0.72; }
  50% { transform: scale(1.2); opacity: 1; }
}
@keyframes hePreloaderSonar {
  0% { transform: scale(0.55); opacity: 0; }
  20% { opacity: 0.65; }
  100% { transform: scale(1.75); opacity: 0; }
}
@keyframes hePreloaderSpark {
  0%, 100% { transform: translateY(4px) scale(0.5); opacity: 0; }
  50% { transform: translateY(-8px) scale(1.15); opacity: 0.9; }
}
@keyframes hePreloaderBar {
  0% { background-position: 110% 0; }
  100% { background-position: -110% 0; }
}

/* ==========================================================================
   0.1 NEUTRALIZACIÓN DE PLUGINS CONFLICTIVOS, JOINCHAT DUPLICADO Y ELEMENTOR KIT
   ========================================================================== */
body.he-modern-site-v3 #gt-site-loader,
body.he-modern-site-v3 .gt-rescue-nav,
body.he-modern-site-v3 .elementor-location-header,
body.he-modern-site-v3 .elementor-location-footer,
body.he-modern-site-v3 footer.elementor-160,
.joinchat,
#joinchat,
.joinchat__button,
.wp-block-joinchat-button,
div[class*="joinchat"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ==========================================================================
   1. RESET, BLOQUEO DE DESBORDAMIENTO HORIZONTAL Y BLINDAJE DE TIPOGRAFÍA
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--he-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--he-text);
  background-color: var(--he-white);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100vw !important;
  overflow-x: clip !important;
}

body,
body.he-modern-site-v3 {
  width: 100%;
  max-width: 100vw !important;
  overflow-x: clip !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff !important;
  color: var(--he-text) !important;
  font-family: var(--he-font-body) !important;
  margin: 0 !important;
}

#he-main-content,
.he-modern-subpage,
.he-hero,
.he-subhero,
.he-section,
.he-footer {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

#he-main-content {
  flex: 1 0 auto;
}

img, svg, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

body.he-modern-site-v3 a {
  color: inherit;
  text-decoration: none !important;
  transition: all 0.22s ease;
}

ul {
  list-style: none;
}

/* Blindaje contra post-10.css de Elementor que forzaba 72px y letter-spacing -2px */
body.he-modern-site-v3 h1,
body.he-modern-site-v3 h2,
body.he-modern-site-v3 h3,
body.he-modern-site-v3 h4,
body.he-modern-site-v3 h5,
body.he-modern-site-v3 h6 {
  font-family: var(--he-font-heading) !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  letter-spacing: -0.02em !important;
  color: var(--he-navy);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

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

.text-center { text-align: center; }
.he-mt-lg { margin-top: 38px; }
.he-w-full { width: 100%; }
.he-text-cyan { color: var(--he-cyan) !important; }
.he-text-white h2,
.he-text-white p { color: #ffffff !important; }
.he-show-mobile-only { display: none; }

/* Barra Superior de Progreso de Lectura (Scroll Progress Bar) */
.he-scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--he-cyan) 0%, var(--he-purple) 50%, var(--he-cyan) 100%);
  z-index: 10005;
  transition: width 0.08s linear;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Animaciones modernas al hacer Scroll */
.he-reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.he-reveal-up.he-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Animación Continua de Flotación Suave (Iconos y Tarjetas) */
@keyframes heIconFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

@keyframes heOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 14px) scale(1.08); }
}

.he-float-anim {
  animation: heIconFloat 3.8s ease-in-out infinite;
  animation-delay: var(--he-float-delay, 0s);
}

.he-ambient-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(45px);
  z-index: 1;
  animation: heOrbFloat 8s ease-in-out infinite;
}
.he-orb-1 {
  width: 280px;
  height: 280px;
  top: -60px;
  left: -80px;
  background: rgba(56, 189, 248, 0.15);
}
.he-orb-2 {
  width: 320px;
  height: 320px;
  bottom: -90px;
  right: 5%;
  background: rgba(100, 40, 154, 0.25);
  animation-delay: -4s;
}

/* ==========================================================================
   2. TOPBAR OFICIAL (ESCRITORIO ESTÁTICO / MÓVIL CON TICKER CONTINUO SUAVE)
   ========================================================================== */
.he-topbar {
  background: var(--he-navy-dark) !important;
  color: #cbd5e1 !important;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1002;
  overflow: hidden;
}

.he-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
  padding-top: 3px;
  padding-bottom: 3px;
  gap: 10px;
  white-space: nowrap;
}

.he-topbar-desktop {
  display: flex;
}

.he-topbar-left,
.he-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Redes sociales en Topbar Desktop */
.he-topbar-socials {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}
.he-tb-soc-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1 !important;
  transition: all 0.2s ease;
}
.he-tb-soc-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  transform: translateY(-1px);
}
.he-tb-soc-fb:hover {
  background: #1877f2 !important;
  color: #ffffff !important;
}
.he-tb-soc-ig:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
  color: #ffffff !important;
}

.he-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e2e8f0 !important;
  white-space: nowrap;
}

body.he-modern-site-v3 .he-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffffff !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
body.he-modern-site-v3 .he-topbar-link:hover {
  color: var(--he-cyan) !important;
}

.he-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
  flex-shrink: 0;
}

.he-topbar-divider {
  opacity: 0.28;
}

/* Ticker continuo suave para móvil (Sin textos encimados ni saltos de renglón) */
.he-topbar-mobile-ticker {
  display: none;
  width: 100%;
  overflow: hidden;
  padding: 6px 0;
  background: #050d1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.he-tb-ticker-track {
  display: flex;
  width: max-content;
  animation: heTbTickerScroll 30s linear infinite;
}
.he-topbar-mobile-ticker:hover .he-tb-ticker-track,
.he-topbar-mobile-ticker:active .he-tb-ticker-track {
  animation-play-state: paused;
}

.he-tb-ticker-group {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 16px;
}

.he-tb-ticker-item {
  font-size: 0.73rem;
  font-weight: 700;
  color: #ffffff !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.he-tb-ticker-urgent {
  color: var(--he-cyan) !important;
}
.he-tb-ticker-urgent strong {
  color: #ffffff;
}
.he-tb-ticker-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.68rem;
}

@keyframes heTbTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   3. ENCABEZADO STICKY PROPORCIONADO (LAPTOP, DESKTOP Y MÓVIL) + SUBMENÚS LIMPIOS
   ========================================================================== */
.he-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--he-border);
  box-shadow: 0 4px 18px rgba(13, 32, 64, 0.05);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.he-header.is-scrolled {
  box-shadow: 0 8px 26px rgba(13, 32, 64, 0.11);
}

.he-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 12px;
}

.he-brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.he-main-logo {
  max-height: 40px;
  width: auto;
  display: block;
}

.he-desktop-nav .he-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
}

body.he-modern-site-v3 .he-nav-link {
  color: var(--he-navy) !important;
  font-size: 0.86rem;
  font-weight: 700 !important;
  position: relative;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
body.he-modern-site-v3 .he-nav-link:hover,
body.he-modern-site-v3 .he-nav-link.active {
  color: var(--he-purple) !important;
}
.he-nav-link::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--he-purple), var(--he-cyan));
  transition: width 0.25s ease;
  border-radius: 2px;
}
.he-nav-link:hover::after,
.he-nav-link.active::after {
  width: 100%;
}

.he-chevron {
  transition: transform 0.22s ease;
  opacity: 0.7;
}
.he-has-dropdown:hover .he-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* Submenús Desplegables Ordenados y Compactos */
.he-has-dropdown {
  position: relative;
}

.he-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(13, 32, 64, 0.14);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
}

.he-has-dropdown:hover .he-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.he-mega-dropdown {
  width: 520px;
  left: -20px;
  padding: 16px 18px;
  box-sizing: border-box;
}

.he-mega-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: var(--he-text-muted);
}
.he-mega-badge {
  background: var(--he-purple-light);
  color: var(--he-purple);
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.7rem;
}

.he-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}

body.he-modern-site-v3 .he-mega-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 600 !important;
  color: var(--he-navy) !important;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-sizing: border-box;
}
body.he-modern-site-v3 .he-mega-item:hover {
  background: #f5f3ff;
  color: var(--he-purple) !important;
  transform: translateX(3px);
}
.he-mega-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--he-purple);
  flex-shrink: 0;
}

.he-mega-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
body.he-modern-site-v3 .he-mega-all-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--he-navy) 0%, var(--he-purple) 100%);
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 700 !important;
  padding: 8px 12px;
  border-radius: 9px;
}
body.he-modern-site-v3 .he-mega-all-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.he-services-dropdown {
  width: 295px;
  padding: 14px 16px;
  box-sizing: border-box;
}
.he-dropdown-clean-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
}
body.he-modern-site-v3 .he-dropdown-clean-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600 !important;
  color: var(--he-navy) !important;
  white-space: nowrap;
}
body.he-modern-site-v3 .he-dropdown-clean-list li a:hover {
  background: #f8fafc;
  color: var(--he-purple) !important;
  transform: translateX(2px);
}
.he-dropdown-divider-item {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}
body.he-modern-site-v3 .he-dropdown-all-link {
  color: var(--he-purple) !important;
  font-weight: 700 !important;
}

/* Acciones del Header (Limpias y sin iconos repetidos) */
.he-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Iconos de Redes Sociales en Header Desktop */
.he-header-socials {
  display: flex;
  align-items: center;
  gap: 6px;
}
body.he-modern-site-v3 .he-head-soc-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  color: var(--he-navy) !important;
  border: 1px solid var(--he-border) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
body.he-modern-site-v3 .he-head-soc-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 10px rgba(13, 32, 64, 0.12) !important;
}
body.he-modern-site-v3 .he-head-soc-btn.he-soc-fb:hover {
  background: #1877f2 !important;
  color: #ffffff !important;
  border-color: #1877f2 !important;
}
body.he-modern-site-v3 .he-head-soc-btn.he-soc-ig:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
  color: #ffffff !important;
  border-color: #d6249f !important;
}

body.he-modern-site-v3 a.he-btn-urgencias {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, #7b35ba 0%, #4c1d95 100%) !important;
  color: #ffffff !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 0.81rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 12px rgba(100, 40, 154, 0.35) !important;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}
body.he-modern-site-v3 a.he-btn-urgencias:hover {
  filter: brightness(1.18) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(100, 40, 154, 0.45) !important;
}

.he-urg-text-short {
  display: none;
}

.he-urgencias-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--he-cyan);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  animation: he-pulse 1.8s infinite;
}
@keyframes he-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

body.he-modern-site-v3 button.he-hamburger {
  display: none;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  padding: 9px !important;
  box-shadow: none !important;
}
body.he-modern-site-v3 button.he-hamburger .he-ham-bar {
  display: block !important;
  width: 20px !important;
  height: 2.5px !important;
  background-color: var(--he-navy) !important;
  border-radius: 4px !important;
  transition: all 0.25s ease !important;
}

/* ==========================================================================
   4. HERO SECTION, SLIDESHOW SIN RECORTE Y CINTA DE MOVIMIENTO CONTINUO
   ========================================================================== */
.he-hero {
  position: relative;
  z-index: 50;
  background-color: #071326;
  background-image: 
    linear-gradient(90deg, rgba(7, 19, 38, 0.85) 0%, rgba(7, 19, 38, 0.65) 44%, rgba(7, 19, 38, 0.22) 72%, rgba(74, 28, 122, 0.35) 100%),
    url('../images/hero-bg-calidez-humana.jpg');
  background-position: 65% center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  padding: 54px 0 64px;
  overflow: visible;
}

/* Elevación de z-index al interactuar con el buscador para evitar que cualquier sección lo tape */
.he-hero.is-searching,
.he-hero:has(.he-smart-search-results.active),
.he-subhero.is-searching,
.he-subhero:has(.he-smart-search-results.active),
.he-hero-search-wrap.is-searching,
.he-hero-search-wrap:has(.he-smart-search-results.active) {
  z-index: 99999 !important;
  overflow: visible !important;
}
.he-hero.is-searching .he-hero-inner,
.he-subhero.is-searching .he-subhero-inner,
.he-hero:has(.he-smart-search-results.active) .he-hero-inner,
.he-subhero:has(.he-smart-search-results.active) .he-subhero-inner {
  z-index: 99999 !important;
  overflow: visible !important;
}

.he-hero-bg-glow {
  position: absolute;
  top: -15%;
  right: -8%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(100, 40, 154, 0.16) 50%, transparent 70%);
  pointer-events: none;
}

.he-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: 36px;
  position: relative;
  z-index: 5;
}

.he-kicker {
  display: inline-block;
  color: var(--he-cyan) !important;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

body.he-modern-site-v3 .he-hero-title {
  color: #ffffff !important;
  font-size: clamp(1.85rem, 3.2vw, 2.95rem) !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;
  margin-bottom: 14px;
}

.he-hero-subtitle {
  display: block;
  color: #e2e8f0 !important;
  font-size: clamp(1.08rem, 1.6vw, 1.42rem);
  font-weight: 600;
  margin-top: 6px;
}

.he-authority-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.45);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: var(--he-radius-full);
  margin: 8px 0 16px;
  flex-wrap: wrap;
}
.he-badge-item {
  font-size: 0.84rem;
  color: #f1f5f9;
}
.he-badge-item strong {
  color: var(--he-cyan);
  font-weight: 800;
}
.he-badge-dot {
  color: rgba(255, 255, 255, 0.4);
}

.he-hero-text {
  font-size: 0.98rem;
  color: #cbd5e1 !important;
  max-width: 590px;
  line-height: 1.62;
  margin-bottom: 20px;
}

/* Buscador Inteligente Inline */
.he-hero-search-wrap {
  margin-bottom: 24px;
  max-width: 610px;
  position: relative;
  z-index: 30;
}

.he-inline-search-box {
  position: relative;
  width: 100%;
}

.he-search-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid rgba(56, 189, 248, 0.55);
  border-radius: 14px;
  padding: 4px 14px;
  box-shadow: 0 12px 32px rgba(7, 19, 38, 0.28);
  transition: all 0.2s ease;
}
.he-search-input-wrap:focus-within {
  border-color: var(--he-cyan);
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.28);
}

.he-search-icon {
  color: var(--he-purple);
  flex-shrink: 0;
  margin-right: 10px;
}

body.he-modern-site-v3 input.he-smart-search-input {
  width: 100% !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-family: var(--he-font-body) !important;
  font-size: 0.95rem !important;
  color: var(--he-navy) !important;
  padding: 10px 0 !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
body.he-modern-site-v3 input.he-smart-search-input::placeholder {
  color: #64748b !important;
}

.he-hero-quick-tags {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

body.he-modern-site-v3 button.he-quick-query {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 99px !important;
  padding: 4px 11px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 button.he-quick-query:hover {
  background: var(--he-cyan) !important;
  color: var(--he-navy-dark) !important;
  border-color: var(--he-cyan) !important;
}

/* Resultados Desplegables del Buscador Inteligente (Full Z-Index y Protección Anti-Cortes) */
.he-smart-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 70px rgba(5, 13, 26, 0.45), 0 10px 28px rgba(5, 13, 26, 0.22) !important;
  max-height: min(65vh, 480px);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 999999 !important;
  display: none;
  text-align: left;
  padding: 8px 10px 10px;
  box-sizing: border-box;
  animation: heSearchFadeSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes heSearchFadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.he-smart-search-results.active {
  display: block !important;
}

.he-smart-search-results::-webkit-scrollbar {
  width: 6px;
}
.he-smart-search-results::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 99px;
}
.he-smart-search-results::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}
.he-smart-search-results::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Barra superior de resultados */
.he-sr-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}
.he-sr-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #334155;
}
.he-sr-count-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  flex-shrink: 0;
}
.he-sr-filter-hint {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Lista de resultados */
.he-sr-items-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Tarjeta individual de resultado */
body.he-modern-site-v3 a.he-search-result-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1px solid #f1f5f9 !important;
  text-decoration: none !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}
body.he-modern-site-v3 a.he-search-result-item:hover,
body.he-modern-site-v3 a.he-search-result-item:active {
  background: #f8fafc !important;
  border-color: #c7d2fe !important;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.he-sr-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.he-sr-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.he-sr-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.he-sr-bg-doc  { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.he-sr-bg-spec { background: #f3e8ff; color: #7e22ce; border: 1px solid #ddd6fe; }
.he-sr-bg-serv { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }

.he-sr-text-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  text-align: left;
}
.he-sr-badge-line {
  margin-bottom: 2px;
}
.he-sr-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
}
.he-badge-doc  { background: #ecfdf5; color: #047857; }
.he-badge-spec { background: #f3e8ff; color: #7e22ce; }
.he-badge-serv { background: #e0f2fe; color: #0284c7; }

.he-sr-title {
  font-size: 0.93rem;
  font-weight: 800;
  color: #0d2040;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.he-sr-sub {
  font-size: 0.77rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.he-modern-site-v3 .he-sr-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--he-navy) !important;
  color: #ffffff !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 7px 12px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 a.he-search-result-item:hover .he-sr-action {
  background: var(--he-purple) !important;
  transform: translateX(2px);
}

/* Pie de página del buscador */
.he-sr-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px 4px;
  border-top: 1px solid #f1f5f9;
  margin-top: 6px;
  font-size: 0.76rem;
  color: #64748b;
}
body.he-modern-site-v3 a.he-sr-bottom-wa {
  color: #16a34a !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
body.he-modern-site-v3 a.he-sr-bottom-wa:hover {
  text-decoration: underline !important;
}

/* Estado sin resultados */
.he-sr-empty-wrap {
  padding: 22px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.he-sr-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.he-sr-empty-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0d2040;
  margin-bottom: 6px;
}
.he-sr-empty-desc {
  font-size: 0.84rem;
  color: #64748b;
  max-width: 420px;
  line-height: 1.45;
  margin-bottom: 14px;
}
body.he-modern-site-v3 a.he-sr-empty-wa-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #25D366 !important;
  color: #ffffff !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3) !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 a.he-sr-empty-wa-btn:hover {
  background: #20bd5a !important;
  transform: translateY(-1px);
}

/* Botones Generales */
.he-hero-ctas,
.he-subhero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body.he-modern-site-v3 .he-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 13px 22px !important;
  border-radius: 12px !important;
  font-family: var(--he-font-heading) !important;
  font-size: 0.93rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.22s ease !important;
  border: none;
  text-align: center;
}

body.he-modern-site-v3 .he-btn-white {
  background: #ffffff !important;
  color: var(--he-navy) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
body.he-modern-site-v3 .he-btn-white:hover {
  background: var(--he-cyan-light) !important;
  transform: translateY(-2px);
}

body.he-modern-site-v3 .he-btn-outline-cyan {
  background: rgba(56, 189, 248, 0.08) !important;
  color: #ffffff !important;
  border: 2px solid var(--he-cyan) !important;
}
body.he-modern-site-v3 .he-btn-outline-cyan:hover {
  background: var(--he-cyan) !important;
  color: var(--he-navy-dark) !important;
  transform: translateY(-2px);
}

body.he-modern-site-v3 .he-btn-purple {
  background: linear-gradient(135deg, var(--he-purple) 0%, #4c1d95 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px var(--he-purple-glow);
}
body.he-modern-site-v3 .he-btn-purple:hover {
  background: var(--he-purple-hover) !important;
  transform: translateY(-2px);
}

/* SLIDESHOW OFICIAL DE PORTADA (ORDENADO, SIN RECORTE Y SIN TEXTOS AMONTONADOS) */
.he-hero-visual {
  position: relative;
  width: 100%;
  min-width: 0;
}

.he-hero-slider-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.16);
  background: #071326;
  width: 100%;
}

.he-hero-slides {
  position: relative;
  width: 100%;
  display: grid;
}

.he-hero-slide {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  z-index: 1;
}

.he-hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.he-slide-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.he-slide-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #071326;
  overflow: hidden;
}

.he-slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.6s ease;
}

.he-slide-link:hover .he-slide-img {
  transform: scale(1.015);
}

/* Barra inferior de título del Slide (Ordenada en 1 sola fila limpia) */
.he-slide-caption {
  padding: 11px 16px;
  background: linear-gradient(90deg, #071326 0%, #0d2040 55%, #3b155e 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  color: #ffffff;
}

.he-slide-caption-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.he-slide-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--he-purple);
  color: #ffffff !important;
}

.he-slide-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff !important;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.he-slide-btn {
  display: inline-flex;
  align-items: center;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--he-cyan) !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.he-slide-link:hover .he-slide-btn {
  background: var(--he-cyan);
  color: var(--he-navy-dark) !important;
}

/* Barra Inferior de Controles del Slideshow (Sin encimarse sobre la imagen) */
.he-slider-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 16px;
  background: #050d1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.he-slider-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.he-modern-site-v3 button.he-slider-dot {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  border-radius: 99px !important;
  background: rgba(255, 255, 255, 0.4) !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}
body.he-modern-site-v3 button.he-slider-dot.active {
  width: 22px !important;
  background: var(--he-cyan) !important;
}

.he-slider-arrows-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.he-modern-site-v3 button.he-slider-arrow {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 button.he-slider-arrow:hover {
  background: var(--he-purple) !important;
  border-color: var(--he-cyan) !important;
}

/* CINTA DE MOVIMIENTO CONTINUO (INFINITE MARQUEE RIBBON - LETRAS BLANCAS BRILLANTES) */
.he-marquee-strip {
  background: linear-gradient(90deg, #050d1a 0%, #0d2040 50%, #2e1052 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.22);
  border-bottom: 1px solid rgba(100, 40, 154, 0.35);
  padding: 11px 0;
  overflow: hidden;
  width: 100%;
  position: relative;
  z-index: 2 !important;
}

.he-marquee-track {
  display: flex;
  width: max-content;
  animation: heMarqueeScroll 38s linear infinite;
}
.he-marquee-strip:hover .he-marquee-track {
  animation-play-state: paused;
}

.he-marquee-group {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
}

body.he-modern-site-v3 .he-marquee-strip .he-marquee-item,
body.he-modern-site-v3 a.he-marquee-item,
body.he-modern-site-v3 span.he-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff !important;
  font-family: var(--he-font-heading);
  font-size: 0.83rem;
  font-weight: 700 !important;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
body.he-modern-site-v3 a.he-marquee-item:hover {
  color: var(--he-cyan) !important;
}

.he-marquee-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--he-cyan);
  box-shadow: 0 0 8px var(--he-cyan);
  display: inline-block;
  flex-shrink: 0;
}

@keyframes heMarqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   5. SECCIONES Y ENCABEZADOS
   ========================================================================== */
.he-section {
  padding: 64px 0;
}
.he-bg-white { background-color: var(--he-white); }
.he-bg-light { background-color: var(--he-bg-light); }
.he-bg-gradient-navy {
  background: linear-gradient(135deg, #071326 0%, #0d2040 55%, #3b155e 100%);
  color: #fff;
}

.he-section-header {
  max-width: 760px;
  margin: 0 auto 34px;
}

.he-section-tag {
  display: inline-block;
  background: #f3e8ff;
  color: var(--he-purple);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: var(--he-radius-full);
  margin-bottom: 10px;
}
.he-tag-cyan {
  background: rgba(56, 189, 248, 0.16);
  color: var(--he-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

body.he-modern-site-v3 .he-section-title {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem) !important;
  margin-bottom: 10px;
}

.he-section-desc {
  color: var(--he-text-muted);
  font-size: 0.96rem;
}
.he-bg-gradient-navy .he-section-desc {
  color: #cbd5e1;
}

/* ==========================================================================
   6. CUADRÍCULA DE 35 ESPECIALIDADES CON BOTÓN "VER MÁS..." Y DISEÑO DESPEJADO
   ========================================================================== */
.he-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

body.he-modern-site-v3 button.he-filter-tab {
  background: #f1f5f9 !important;
  color: var(--he-navy) !important;
  border: 1px solid #cbd5e1 !important;
  padding: 8px 15px !important;
  border-radius: var(--he-radius-full) !important;
  font-family: var(--he-font-heading) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap;
}
body.he-modern-site-v3 button.he-filter-tab:hover,
body.he-modern-site-v3 button.he-filter-tab.active {
  background: linear-gradient(135deg, var(--he-purple) 0%, #4c1d95 100%) !important;
  color: #ffffff !important;
  border-color: var(--he-purple) !important;
  box-shadow: 0 4px 14px var(--he-purple-glow) !important;
}

.he-all-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 18px;
}

.he-spec-card-v3 {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s ease, border-color 0.26s ease;
  box-shadow: 0 4px 14px rgba(13, 32, 64, 0.04);
}

.he-spec-card-v3.is-collapsed {
  display: none !important;
}

/* Línea superior degradada animada en cada especialidad */
.he-spec-card-v3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--he-navy), var(--he-purple), var(--he-cyan));
  opacity: 0.7;
  transition: opacity 0.25s ease, height 0.25s ease;
}

/* Destello Shimmer diagonal al pasar el cursor o tocar */
.he-spec-card-shimmer {
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.08), rgba(100, 40, 154, 0.08), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}
.he-spec-card-v3:hover .he-spec-card-shimmer {
  left: 140%;
}

.he-spec-card-v3:hover {
  transform: translateY(-5px);
  border-color: var(--he-purple);
  box-shadow: 0 16px 34px rgba(100, 40, 154, 0.12);
}
.he-spec-card-v3:hover::before {
  opacity: 1;
  height: 4px;
}

.he-spec-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.he-spec-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0d2040 0%, #64289a 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 5px 14px rgba(100, 40, 154, 0.22);
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.he-spec-card-v3:hover .he-spec-icon-wrap {
  background: linear-gradient(135deg, #64289a 0%, #0d2040 100%);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
}

.he-spec-vector-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
}

.he-spec-icon-wrap svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.he-spec-cat-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 99px;
  text-align: right;
}

body.he-modern-site-v3 .he-spec-card-title {
  font-size: 1.04rem !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  color: var(--he-navy) !important;
  margin-bottom: 6px;
}
body.he-modern-site-v3 .he-spec-card-title a {
  color: var(--he-navy) !important;
}
body.he-modern-site-v3 .he-spec-card-title a:hover {
  color: var(--he-purple) !important;
}

.he-spec-card-desc {
  font-size: 0.84rem;
  color: var(--he-text-muted);
  line-height: 1.46;
  margin-bottom: 14px;
  flex-grow: 1;
}

.he-spec-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

body.he-modern-site-v3 button.he-spec-quickview-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: var(--he-purple-light) !important;
  color: var(--he-purple) !important;
  border: 1px solid rgba(100, 40, 154, 0.2) !important;
  padding: 6px 11px !important;
  border-radius: 8px !important;
  font-family: var(--he-font-heading) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 button.he-spec-quickview-btn:hover {
  background: var(--he-purple) !important;
  color: #ffffff !important;
}

body.he-modern-site-v3 a.he-spec-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.79rem;
  font-weight: 800 !important;
  color: var(--he-navy) !important;
}
body.he-modern-site-v3 a.he-spec-go:hover {
  color: var(--he-purple) !important;
}
.he-spec-go-arrow {
  transition: transform 0.2s ease;
}
.he-spec-card-v3:hover .he-spec-go-arrow {
  transform: translateX(4px);
}

/* Botón "Ver las 35 Especialidades (+26 más)" */
.he-specs-load-more-wrap {
  margin-top: 28px;
}

body.he-modern-site-v3 button.he-btn-specs-more {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  background: linear-gradient(135deg, var(--he-navy) 0%, var(--he-purple) 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  padding: 13px 26px !important;
  border-radius: 99px !important;
  font-family: var(--he-font-heading) !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 24px rgba(13, 32, 64, 0.18) !important;
  transition: all 0.25s ease !important;
}
body.he-modern-site-v3 button.he-btn-specs-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(100, 40, 154, 0.32) !important;
}
.he-specs-more-icon {
  transition: transform 0.28s ease;
}
button.he-btn-specs-more[data-expanded="true"] .he-specs-more-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   7. SHOWCASE DE MÉDICOS EN 3 FILAS CON MOVIMIENTO CONTINUO INFINITO
   ========================================================================== */
.he-doctors-3row-wall {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  width: 100%;
}

.he-doctors-wall-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
  padding: 0 4px;
}

.he-wall-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--he-navy);
  box-shadow: 0 2px 8px rgba(13, 32, 64, 0.04);
}

.he-wall-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  flex-shrink: 0;
}

.he-wall-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.he-wall-swipe-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--he-text-muted);
}

/* Contenedor de las 3 filas con máscara de desvanecimiento suave en los bordes */
.he-doc-marquee-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000000 3%, #000000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000000 3%, #000000 97%, transparent 100%);
}

.he-doc-marquee-row {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 4px 0;
}

.he-doc-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

/* Fila 1 y 3 hacia la izquierda */
.he-marquee-dir-left .he-doc-marquee-track {
  animation: heDocMarqueeScrollLeft 48s linear infinite;
}

/* Fila 2 hacia la derecha */
.he-marquee-dir-right .he-doc-marquee-track {
  animation: heDocMarqueeScrollRight 46s linear infinite;
}

/* Pequeñas variaciones de velocidad para dinamismo natural */
.he-doc-marquee-row.he-speed-1 .he-doc-marquee-track { animation-duration: 48s; }
.he-doc-marquee-row.he-speed-2 .he-doc-marquee-track { animation-duration: 44s; }
.he-doc-marquee-row.he-speed-3 .he-doc-marquee-track { animation-duration: 50s; }

/* Pausar inmediatamente al pasar el cursor o mantener presionado en celular */
.he-doc-marquee-row:hover .he-doc-marquee-track,
.he-doc-marquee-row:focus-within .he-doc-marquee-track,
.he-doc-marquee-row.is-paused .he-doc-marquee-track {
  animation-play-state: paused !important;
}

.he-doc-marquee-group {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding-right: 14px;
}

@keyframes heDocMarqueeScrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes heDocMarqueeScrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.he-doc-hcard {
  flex: 0 0 325px;
  width: 325px;
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: 0 4px 14px rgba(13, 32, 64, 0.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.he-doc-hcard:hover {
  transform: translateY(-3px);
  border-color: var(--he-purple);
  box-shadow: 0 12px 26px rgba(100, 40, 154, 0.13);
}

.he-doc-hcard-avatar {
  width: 74px;
  height: 86px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0d2040 0%, #64289a 100%);
  cursor: pointer;
  position: relative;
}
.he-doc-hcard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.he-doc-hcard-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--he-cyan);
}

.he-doc-hcard-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.he-doc-hcard-role {
  display: inline-block;
  align-self: flex-start;
  background: #f3e8ff;
  color: var(--he-purple);
  font-size: 0.67rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.he-modern-site-v3 .he-doc-hcard-name {
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  color: var(--he-navy) !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
body.he-modern-site-v3 .he-doc-hcard-name:hover {
  color: var(--he-purple) !important;
}

.he-doc-hcard-shift {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.he-doc-hcard-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

body.he-modern-site-v3 button.he-hcard-btn-info {
  flex: 1 !important;
  background: #f1f5f9 !important;
  color: var(--he-navy) !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 5px 8px !important;
  font-family: var(--he-font-heading) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
body.he-modern-site-v3 button.he-hcard-btn-info:hover {
  background: var(--he-navy) !important;
  color: #ffffff !important;
}

body.he-modern-site-v3 a.he-hcard-btn-wa {
  flex: 1 !important;
  background: var(--he-purple) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 5px 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  white-space: nowrap !important;
}
body.he-modern-site-v3 a.he-hcard-btn-wa:hover {
  background: var(--he-purple-hover) !important;
}

.he-doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 22px;
}

.he-doc-card {
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 20px rgba(13, 32, 64, 0.05);
  transition: all 0.26s ease;
}
.he-doc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(13, 32, 64, 0.13);
  border-color: var(--he-purple);
}

.he-doc-photo-wrap {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #0d2040 0%, #3e1663 100%);
  overflow: hidden;
  cursor: pointer;
}

.he-doc-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
}
.he-doc-card:hover .he-doc-photo {
  transform: scale(1.04);
}

.he-doc-avatar-svg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  background: radial-gradient(circle at top right, #64289a, #0d2040 75%);
}
.he-doc-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--he-cyan);
  display: grid;
  place-items: center;
  color: var(--he-cyan);
}
.he-doc-avatar-badge {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e2e8f0;
}

.he-doc-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 26, 53, 0.78) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.he-doc-card:hover .he-doc-photo-overlay {
  opacity: 1;
}
.he-doc-quickview-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--he-navy);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 99px;
}

.he-doc-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.he-doc-role-pill {
  display: inline-block;
  align-self: flex-start;
  background: #f3e8ff;
  color: var(--he-purple);
  font-size: 0.73rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}

body.he-modern-site-v3 .he-doc-title {
  font-size: 1.05rem !important;
  color: var(--he-navy) !important;
  margin-bottom: 10px;
}

.he-doc-shifts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  flex-grow: 1;
}

.he-shift-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
}

.he-doc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

body.he-modern-site-v3 button.he-btn-doc-profile {
  background: #f1f5f9 !important;
  color: var(--he-navy) !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  padding: 9px 8px !important;
  font-family: var(--he-font-heading) !important;
  font-size: 0.79rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 button.he-btn-doc-profile:hover {
  background: var(--he-navy) !important;
  color: #ffffff !important;
  border-color: var(--he-navy) !important;
}

body.he-modern-site-v3 a.he-btn-doc-wa {
  background: var(--he-purple) !important;
  color: #ffffff !important;
  border-radius: 9px !important;
  padding: 9px 8px !important;
  font-size: 0.79rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.he-modern-site-v3 a.he-btn-doc-wa:hover {
  background: var(--he-purple-hover) !important;
}

/* ==========================================================================
   8. LOS 4 SERVICIOS HOSPITALARIOS PRINCIPALES
   ========================================================================== */
.he-services-quad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 22px;
}

.he-service-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  transition: all 0.28s ease;
}
.he-service-card:hover {
  transform: translateY(-6px);
  border-color: var(--he-cyan);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.he-service-thumb {
  position: relative;
  height: 165px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}
.he-service-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.he-service-card:hover .he-service-thumb img {
  transform: scale(1.05);
}

.he-service-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(7, 19, 38, 0.85);
  color: var(--he-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
}
.he-badge-urgent {
  background: var(--he-purple);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

body.he-modern-site-v3 .he-service-title {
  color: #ffffff !important;
  font-size: 1.18rem !important;
  margin-bottom: 8px;
}

.he-service-desc {
  color: #cbd5e1 !important;
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

body.he-modern-site-v3 a.he-service-btn,
body.he-modern-site-v3 a.he-btn-emergency {
  display: inline-block;
  text-align: center;
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 700 !important;
  font-size: 0.86rem;
  background: rgba(56, 189, 248, 0.18) !important;
  color: var(--he-cyan) !important;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
body.he-modern-site-v3 a.he-service-btn:hover,
body.he-modern-site-v3 a.he-btn-emergency:hover {
  background: var(--he-cyan) !important;
  color: var(--he-navy-dark) !important;
}

/* ==========================================================================
   9. SUBPÁGINAS MODERNAS (35 ESPECIALIDADES + 4 SERVICIOS + INSTITUCIONALES)
   ========================================================================== */
.he-subhero {
  position: relative;
  z-index: 50;
  background-color: #071326;
  background-image: 
    linear-gradient(90deg, rgba(7, 19, 38, 0.88) 0%, rgba(7, 19, 38, 0.70) 48%, rgba(13, 32, 64, 0.38) 100%),
    url('../images/hero-bg-calidez-humana.jpg');
  background-position: 65% center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 46px 0 54px;
  overflow: visible !important;
}

.he-subhero-inner {
  position: relative;
  z-index: 4;
  overflow: visible;
}

.he-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 18px;
}
body.he-modern-site-v3 .he-breadcrumbs a {
  color: #e2e8f0 !important;
}
body.he-modern-site-v3 .he-breadcrumbs a:hover {
  color: var(--he-cyan) !important;
}
.he-bc-sep {
  opacity: 0.45;
}

.he-subhero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 28px;
}

.he-subhero-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.he-cat-pill {
  background: rgba(56, 189, 248, 0.2);
  color: var(--he-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
}
.he-exp-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
}

body.he-modern-site-v3 .he-subhero-title {
  color: #ffffff !important;
  font-size: clamp(1.7rem, 2.8vw, 2.65rem) !important;
  margin-bottom: 10px;
}
.he-subhero-subtitle {
  color: #cbd5e1 !important;
  font-size: 1.02rem;
  margin-bottom: 22px;
}

.he-subhero-icon-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  backdrop-filter: blur(10px);
}
.he-subhero-big-icon {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--he-purple), var(--he-cyan));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.25);
}
.he-subhero-stat-text strong {
  display: block;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 4px;
}
.he-subhero-stat-text span {
  font-size: 0.86rem;
  color: #cbd5e1;
}

/* Detalle de Especialidad */
.he-spec-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 28px;
  align-items: start;
}

.he-spec-about-card {
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 26px rgba(13, 32, 64, 0.05);
}
body.he-modern-site-v3 .he-spec-about-heading {
  font-size: 1.5rem !important;
  margin-bottom: 14px;
}
.he-spec-about-p {
  font-size: 0.98rem;
  color: #334155;
  line-height: 1.72;
  margin-bottom: 22px;
}
body.he-modern-site-v3 .he-spec-sublist-title {
  font-size: 1.12rem !important;
  margin-bottom: 14px;
}
.he-spec-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}
.he-spec-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--he-navy);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.he-spec-check-item:hover {
  transform: translateX(4px);
  border-color: var(--he-purple);
}
.he-check-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--he-purple);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
}

.he-spec-sidebar-card {
  background: linear-gradient(145deg, #0d2040 0%, #4a1c7a 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 16px 36px rgba(13, 32, 64, 0.18);
}
.he-sidebar-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: var(--he-cyan);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
}
body.he-modern-site-v3 .he-spec-sidebar-card h3 {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  margin-bottom: 10px;
}
.he-spec-sidebar-card p {
  color: #cbd5e1 !important;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.he-sidebar-contact-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.86rem;
}
.he-sidebar-contact-box span {
  display: block;
  color: #94a3b8;
  font-size: 0.76rem;
}
body.he-modern-site-v3 .he-sidebar-contact-box a {
  color: var(--he-cyan) !important;
  font-size: 1.02rem;
  font-weight: 800 !important;
}

/* Subpáginas de Servicios (Rayos X, Laboratorio, Banco de Sangre, Urgencias) */
.he-service-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: center;
}
.he-service-hero-p {
  color: #e2e8f0 !important;
  font-size: 0.96rem;
  margin-bottom: 22px;
}
.he-service-main-img {
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.he-studies-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
  gap: 20px;
}
.he-study-card {
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 16px;
  padding: 22px;
  transition: all 0.24s ease;
  display: flex;
  flex-direction: column;
}
.he-study-card:hover {
  transform: translateY(-4px);
  border-color: var(--he-purple);
  box-shadow: 0 14px 30px rgba(13, 32, 64, 0.08);
}
.he-study-num {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--he-purple);
  background: #f3e8ff;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
body.he-modern-site-v3 .he-study-title {
  font-size: 1.06rem !important;
  margin-bottom: 8px;
}
.he-study-desc {
  font-size: 0.88rem;
  color: var(--he-text-muted);
  margin-bottom: 14px;
  flex-grow: 1;
}
body.he-modern-site-v3 a.he-study-link {
  font-size: 0.84rem;
  font-weight: 700 !important;
  color: var(--he-purple) !important;
}

/* Galerías y Paquetes Checkup con Lightbox */
.he-gallery-grid,
.he-checkup-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
  gap: 20px;
}
.he-gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #0d2040;
  box-shadow: 0 6px 20px rgba(13, 32, 64, 0.08);
}
.he-gallery-item img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.he-checkup-img-card {
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 20px rgba(13, 32, 64, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.he-checkup-img-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(100, 40, 154, 0.12);
}
.he-checkup-img-card .he-gallery-item {
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}
.he-checkup-img-card .he-gallery-item img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: transparent;
}
.he-gallery-item:hover img {
  transform: scale(1.02);
}
.he-gallery-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(13, 32, 64, 0.85);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
}

.he-checkup-img-body {
  padding: 14px 6px 4px;
  text-align: center;
}
body.he-modern-site-v3 .he-checkup-img-body h3 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--he-navy) !important;
  margin-bottom: 12px;
}

/* Franja de Estadísticas y Autoridad Médica con Efectos Especiales y Animaciones */
.he-stats-strip {
  position: relative;
  background: linear-gradient(135deg, #050d1a 0%, #0d2040 50%, #36105c 100%);
  color: #ffffff;
  padding: 68px 0;
  overflow: hidden;
}

.he-stats-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.12) 0%, transparent 68%);
  pointer-events: none;
}

.he-stats-orb-1 {
  width: 320px;
  height: 320px;
  top: -50px;
  left: -60px;
  background: rgba(56, 189, 248, 0.16);
  filter: blur(50px);
}

.he-stats-orb-2 {
  width: 340px;
  height: 340px;
  bottom: -60px;
  right: -50px;
  background: rgba(100, 40, 154, 0.28);
  filter: blur(55px);
}

.he-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  position: relative;
  z-index: 5;
}

.he-stat-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(7, 19, 38, 0.25);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.he-stat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 20px 45px rgba(7, 19, 38, 0.5), 0 0 25px rgba(56, 189, 248, 0.25);
}

/* Efecto Shimmer de luz diagonal */
.he-stat-shimmer {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.18), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
  pointer-events: none;
}
.he-stat-card:hover .he-stat-shimmer {
  left: 140%;
}

.he-stat-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(100, 40, 154, 0.45) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.he-stat-card:hover .he-stat-icon-wrap {
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 10px 26px rgba(56, 189, 248, 0.45);
  color: #ffffff;
}

.he-stat-num-row {
  margin-bottom: 4px;
}

.he-stat-number {
  display: inline-block;
  font-family: var(--he-font-heading);
  font-size: clamp(2.1rem, 3.2vw, 2.85rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #38bdf8 0%, #ffffff 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(56, 189, 248, 0.35));
}

.he-stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 6px;
}

.he-stat-sub {
  font-size: 0.78rem;
  color: #cbd5e1 !important;
  line-height: 1.45;
  max-width: 210px;
  margin: 0 auto;
}

/* Otras secciones de subpáginas (Nosotros, Servicios Hub, Seguros, Contacto) */
.he-services-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px;
}
.he-service-hub-card {
  background: #fff;
  border: 1px solid var(--he-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(13, 32, 64, 0.06);
}
.he-service-hub-img-wrap {
  position: relative;
  height: 230px;
}
.he-service-hub-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.he-service-hub-kicker {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(13, 32, 64, 0.88);
  color: var(--he-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 99px;
}
.he-service-hub-body {
  padding: 24px;
}
.he-service-hub-body h2,
.he-service-hub-body h3 {
  margin-bottom: 10px;
}
.he-service-hub-body p {
  color: var(--he-text-muted);
  margin-bottom: 16px;
}
.he-service-hub-list {
  margin-bottom: 20px;
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--he-navy);
}

.he-about-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: center;
}
.he-about-text p {
  margin-bottom: 14px;
  font-size: 0.98rem;
  color: #334155;
}
.he-about-images {
  display: grid;
  gap: 16px;
}
.he-about-img-main,
.he-about-img-sub {
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(13, 32, 64, 0.14);
}
.he-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.he-pillar-card {
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(13, 32, 64, 0.04);
}
body.he-modern-site-v3 .he-pillar-card h3 {
  color: var(--he-purple) !important;
  margin-bottom: 10px;
}

.he-insurer-advisor-card {
  background: #ffffff;
  border: 1px solid var(--he-border);
  border-radius: 22px;
  padding: 28px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  box-shadow: 0 12px 34px rgba(13, 32, 64, 0.07);
}
.he-advisor-photo {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}
.he-advisor-role {
  font-weight: 700;
  color: var(--he-purple);
  margin-bottom: 10px;
}

.he-info-banner {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.he-info-banner-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--he-navy), var(--he-purple));
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.he-info-banner-text {
  flex: 1 1 260px;
}

/* Aseguradoras y Contacto */
.he-insurers-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.he-insurer-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--he-navy);
  font-family: var(--he-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(13, 32, 64, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.he-insurer-pill:hover {
  transform: translateY(-2px);
  border-color: var(--he-purple);
}

.he-contact-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: center;
}
body.he-modern-site-v3 .he-contact-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem) !important;
  margin-bottom: 12px;
}
.he-contact-desc {
  color: var(--he-text-muted);
  margin-bottom: 20px;
}
.he-contact-list {
  display: grid;
  gap: 14px;
  font-size: 0.94rem;
}
body.he-modern-site-v3 a.he-phone-link,
body.he-modern-site-v3 a.he-mail-link {
  color: var(--he-purple) !important;
  font-weight: 700 !important;
  word-break: break-word;
}

/* ==========================================================================
   10. MODALES INTERACTIVOS (MÉDICO, ESPECIALIDAD, BUSCADOR, LIGHTBOX)
   ========================================================================== */
.he-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 38, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.he-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.he-modal-card {
  background: #ffffff;
  border-radius: 22px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s ease;
}
.he-modal-overlay.active .he-modal-card {
  transform: scale(1) translateY(0);
}

body.he-modern-site-v3 button.he-modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  background: rgba(241, 245, 249, 0.95) !important;
  border: 1px solid #cbd5e1 !important;
  color: var(--he-navy) !important;
  font-size: 1.4rem !important;
  line-height: 1 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  z-index: 15 !important;
}
body.he-modern-site-v3 button.he-modal-close:hover {
  background: var(--he-purple) !important;
  color: #ffffff !important;
}

/* Modal 1: Médico Especialista */
.he-doc-modal-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.he-doc-modal-media {
  background: linear-gradient(135deg, #0d2040, #64289a);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.he-doc-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.he-doc-modal-content {
  padding: 28px;
}
body.he-modern-site-v3 .he-doc-modal-name {
  font-size: 1.4rem !important;
  margin-bottom: 8px;
}
.he-doc-modal-bio {
  color: #475569;
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.he-doc-modal-meta {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
  display: grid;
  gap: 10px;
  font-size: 0.86rem;
}
.he-doc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
body.he-modern-site-v3 a.he-doc-spec-link-btn {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 700 !important;
  color: var(--he-purple) !important;
}

/* Modal 2: Vista Rápida de Especialidad Médica (#he-specialty-modal) */
.he-spec-modal-card {
  max-width: 720px;
}
.he-spec-modal-header {
  background: linear-gradient(135deg, #071326 0%, #0d2040 55%, #64289a 100%);
  color: #ffffff;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.he-spec-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.he-spec-modal-icon img {
  width: 36px;
  height: 36px;
  filter: brightness(0) invert(1);
}
.he-spec-modal-icon svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
}
.he-spec-modal-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--he-cyan);
  margin-bottom: 4px;
}
body.he-modern-site-v3 .he-spec-modal-title {
  color: #ffffff !important;
  font-size: 1.45rem !important;
  margin-bottom: 4px;
}
.he-spec-modal-subtitle {
  color: #cbd5e1 !important;
  font-size: 0.88rem;
}
.he-spec-modal-body {
  padding: 24px 28px;
}
.he-spec-modal-desc {
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 20px;
}
.he-spec-modal-section {
  margin-bottom: 20px;
}
body.he-modern-site-v3 .he-spec-modal-section h4 {
  font-size: 0.96rem !important;
  color: var(--he-navy) !important;
  margin-bottom: 10px;
}
.he-spec-modal-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 8px;
}
.he-spec-modal-srv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--he-navy);
}
.he-spec-modal-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
}
.he-spec-modal-doc-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
}
.he-spec-modal-doc-chip strong {
  display: block;
  font-size: 0.86rem;
  color: var(--he-navy);
}
.he-spec-modal-doc-chip span {
  display: block;
  font-size: 0.75rem;
  color: var(--he-text-muted);
}
body.he-modern-site-v3 a.he-spec-modal-doc-wa {
  background: var(--he-purple);
  color: #ffffff !important;
  font-size: 0.74rem;
  font-weight: 700 !important;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.he-spec-modal-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Modal 3: Buscador Súper Inteligente */
.he-search-modal-card {
  max-width: 720px;
  padding: 22px;
}
.he-search-modal-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.he-search-modal-header .he-search-input-wrap {
  flex: 1;
  box-shadow: none;
}
body.he-modern-site-v3 button.he-modal-close-inline {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: var(--he-navy) !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.he-search-Quick-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--he-text-muted);
  margin-bottom: 12px;
}
body.he-modern-site-v3 .he-search-Quick-suggestions button.he-quick-query {
  background: #f1f5f9 !important;
  color: var(--he-navy) !important;
  border-color: #cbd5e1 !important;
}
body.he-modern-site-v3 .he-search-Quick-suggestions button.he-quick-query:hover {
  background: var(--he-purple) !important;
  color: #ffffff !important;
}
.he-modal-results-area {
  position: static;
  display: block;
  box-shadow: none;
  border: none;
  padding: 0;
  max-height: 360px;
}

.he-lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   11. PIE DE PÁGINA (FOOTER DE ALTO CONTRASTE), MOBILE DOCK Y DESKTOP FLOAT
   ========================================================================== */
.he-footer {
  background: #060e1d !important;
  color: #cbd5e1;
  padding: 64px 0 32px;
  border-top: 4px solid var(--he-purple);
}
.he-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.he-footer-brand strong {
  color: #ffffff !important;
  font-size: 1.22rem;
  font-weight: 800;
  display: block;
}
.he-footer-brand span {
  color: var(--he-cyan) !important;
  font-size: 0.86rem;
  font-weight: 600;
}
.he-footer-text {
  margin: 12px 0 18px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #cbd5e1 !important;
}
.he-footer-social {
  display: flex;
  gap: 10px;
}
body.he-modern-site-v3 .he-footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  display: grid;
  place-items: center;
}
body.he-modern-site-v3 .he-footer-social a:hover {
  background: var(--he-purple);
  transform: translateY(-2px);
}
body.he-modern-site-v3 .he-footer-heading {
  color: #ffffff !important;
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  margin-bottom: 16px;
}
.he-footer-links {
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
}
body.he-modern-site-v3 .he-footer-links a {
  color: #ffffff !important;
  opacity: 0.92;
  display: inline-block;
}
body.he-modern-site-v3 .he-footer-links a:hover {
  color: var(--he-cyan) !important;
  opacity: 1;
  transform: translateX(4px);
}
.he-footer-emergency-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.he-emergency-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}
body.he-modern-site-v3 a.he-emergency-phone {
  display: block;
  font-size: 1.3rem;
  font-weight: 800 !important;
  color: var(--he-cyan) !important;
}
.he-emergency-sub {
  display: block;
  font-size: 0.84rem;
  color: #cbd5e1;
  margin-top: 4px;
}
.he-footer-address {
  color: #e2e8f0 !important;
  font-size: 0.86rem;
  line-height: 1.55;
}
.he-footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
}
.he-footer-copy { color: #94a3b8; }
.he-footer-legal-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
body.he-modern-site-v3 .he-footer-legal-links a {
  color: #cbd5e1 !important;
}
body.he-modern-site-v3 .he-footer-legal-links a:hover {
  color: #ffffff !important;
}

/* MENÚ MÓVIL PANTALLA COMPLETA POPUP (FULL-SCREEN APP MODAL FLUIDO TIPO NATIVO) */
.he-mobile-drawer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 99999;
  visibility: hidden;
  pointer-events: none;
  background: rgba(7, 19, 38, 0.65);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s step-end;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.he-mobile-drawer.active {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s;
}
.he-drawer-backdrop {
  display: none !important;
}
.he-drawer-content {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: none;
}
.he-mobile-drawer.active .he-drawer-content {
  transform: translateY(0);
}
.he-drawer-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #071326 0%, #0d2040 55%, #4a1c7a 100%);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 18px rgba(7, 19, 38, 0.25);
}
.he-drawer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  min-width: 0;
  flex: 1;
}
.he-drawer-logo {
  height: 36px !important;
  max-height: 36px !important;
  width: auto !important;
  max-width: 165px !important;
  object-fit: contain !important;
  display: block !important;
}
.he-drawer-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.71rem;
  font-weight: 700;
  color: #38bdf8;
  margin-top: 4px;
}
.he-drawer-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  display: inline-block;
  flex-shrink: 0;
  animation: he-pulse 1.8s infinite;
}
body.he-modern-site-v3 button.he-drawer-close {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 button.he-drawer-close:hover,
body.he-modern-site-v3 button.he-drawer-close:active {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: scale(0.92) !important;
}

.he-drawer-body {
  padding: 18px 20px 34px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #f8fafc;
  max-width: 580px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* 4 Widgets de Acceso Inmediato (Cards Tipo App) */
.he-drawer-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
body.he-modern-site-v3 a.he-drawer-quick-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(13, 32, 64, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none !important;
}
body.he-modern-site-v3 a.he-drawer-quick-card:active {
  transform: scale(0.97);
  background: #f1f5f9;
}
.he-dq-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.he-dq-num {
  font-family: var(--he-font-heading);
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--he-navy);
  line-height: 1;
}
.he-dq-urgent-text {
  color: #dc2626 !important;
}
.he-dq-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.he-dq-spec { background: #f3e8ff; color: #7e22ce; }
.he-dq-docs { background: #ecfdf5; color: #047857; }
.he-dq-mri  { background: #e0f2fe; color: #0284c7; }
.he-dq-urg  { background: #fee2e2; color: #dc2626; }
.he-dq-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid rgba(220, 38, 38, 0.5);
  animation: he-pulse 1.8s infinite;
}
.he-dq-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}

/* Encabezados de Sección Tipo App Móvil */
.he-app-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 14px 2px 7px;
}
.he-app-section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Lista de Navegación Tipo App Móvil */
.he-app-menu-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 4px 0;
  padding: 0;
  list-style: none;
}
.he-app-menu-item {
  width: 100%;
}

/* Botón / Tarjeta de Navegación */
body.he-modern-site-v3 .he-app-card-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 13px !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  border: 1px solid #e9edf2 !important;
  box-shadow: 0 2px 6px rgba(13, 32, 64, 0.03) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  -webkit-tap-highlight-color: transparent !important;
  text-align: left !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}
body.he-modern-site-v3 .he-app-card-btn:hover,
body.he-modern-site-v3 .he-app-card-btn:active {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  transform: scale(0.99);
}

/* Iconos de la App */
.he-app-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.he-icon-home   { background: #e0e7ff; color: #4338ca; }
.he-icon-spec   { background: #f3e8ff; color: #7e22ce; }
.he-icon-serv   { background: #e0f2fe; color: #0284c7; }
.he-icon-docs   { background: #ecfdf5; color: #047857; }
.he-icon-shield { background: #fef3c7; color: #b45309; }
.he-icon-about  { background: #fae8ff; color: #a21caf; }
.he-icon-pin    { background: #ffe4e6; color: #e11d48; }

.he-app-card-btn:hover .he-app-icon-wrap {
  transform: scale(1.06);
}

.he-app-text-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.he-app-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.he-app-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0d2040;
  line-height: 1.25;
}
.he-app-desc {
  font-size: 0.74rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.he-app-badge {
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.69rem;
  font-weight: 800;
  background: #f3e8ff;
  color: #7e22ce;
  white-space: nowrap;
  flex-shrink: 0;
}
.he-badge-live {
  background: #e0f2fe;
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.he-live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 6px #0284c7;
  animation: he-pulse 1.8s infinite;
}
.he-app-chevron-right {
  color: #94a3b8;
  flex-shrink: 0;
}

/* Acordeón Interactivo con Animación CSS Grid */
.he-drawer-caret {
  color: #94a3b8;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.he-drawer-has-submenu.is-open > .he-app-card-btn {
  border-bottom-left-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
  background: #f5f3ff !important;
}
.he-drawer-has-submenu.is-open .he-drawer-caret {
  transform: rotate(180deg);
  color: #7e22ce;
}

.he-drawer-submenu-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.he-drawer-has-submenu.is-open > .he-drawer-submenu-collapse {
  grid-template-rows: 1fr;
}
.he-drawer-submenu-inner {
  min-height: 0;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-top: none;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  padding: 6px 6px 10px;
  margin-top: -3px;
  box-shadow: 0 8px 18px rgba(13, 32, 64, 0.05);
}

.he-app-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
body.he-modern-site-v3 .he-app-sub-tile {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  transition: all 0.18s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}
body.he-modern-site-v3 .he-app-sub-tile:hover,
body.he-modern-site-v3 .he-app-sub-tile:active {
  background: #f5f3ff !important;
  transform: translateX(3px);
}
.he-sub-chip {
  width: 32px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.he-chip-cyan  { background: #e0f2fe; color: #0369a1; }
.he-chip-rose  { background: #ffe4e6; color: #e11d48; }
.he-chip-amber { background: #fef3c7; color: #b45309; }

.he-sub-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.he-sub-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.he-sub-hint {
  font-size: 0.71rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.he-sub-arrow {
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

body.he-modern-site-v3 a.he-drawer-sub-cta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 11px 14px !important;
  margin-top: 8px !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #0d2040 0%, #4a1c7a 100%) !important;
  color: #ffffff !important;
  font-size: 0.81rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(74, 28, 122, 0.25) !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 a.he-drawer-sub-cta:hover,
body.he-modern-site-v3 a.he-drawer-sub-cta:active {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Redes Sociales Oficiales en Drawer (Blindadas contra overflow con minmax(0, 1fr)) */
.he-drawer-soc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}
body.he-modern-site-v3 a.he-drawer-soc-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 11px 12px !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
body.he-modern-site-v3 a.he-drawer-soc-btn.he-soc-fb {
  background: #1877f2 !important;
}
body.he-modern-site-v3 a.he-drawer-soc-btn.he-soc-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
}
body.he-modern-site-v3 a.he-drawer-soc-btn:active {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.he-soc-meta {
  display: flex;
  flex-direction: column;
  min-width: 0 !important;
  flex: 1 !important;
  overflow: hidden !important;
  text-align: left;
}
.he-soc-name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.he-soc-handle {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

/* Botones de Contacto Inmediato */
.he-drawer-contact {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}
body.he-modern-site-v3 a.he-drawer-call {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #071326 0%, #0d2040 100%) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(7, 19, 38, 0.3) !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 a.he-drawer-call:active {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.he-call-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.he-call-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 2px solid rgba(239, 68, 68, 0.6);
  animation: he-pulse 1.8s infinite;
}
.he-call-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.he-call-badge {
  font-size: 0.69rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.he-call-text strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.01em;
}

body.he-modern-site-v3 a.he-drawer-wa {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: #25D366 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
  transition: all 0.2s ease !important;
}
body.he-modern-site-v3 a.he-drawer-wa:active {
  background: #20bd5a !important;
  transform: translateY(-1px);
}
.he-wa-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.he-wa-text span {
  font-size: 0.69rem;
  font-weight: 700;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.he-wa-text strong {
  font-size: 0.91rem;
  font-weight: 800;
  color: #ffffff;
}

/* DOCK FLOTANTE DE ESCRITORIO (SOLO ICONOS CIRCULARES: SUBIR, LUPA BUSCAR Y WHATSAPP ORIGINAL) */
.he-desktop-floating-dock {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 995;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.he-desktop-floating-dock .he-float-btn,
body.he-modern-site-v3 button.he-float-btn,
body.he-modern-site-v3 a.he-float-btn,
.he-float-circle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.he-desktop-floating-dock .he-float-btn svg,
.he-float-circle svg {
  display: block !important;
  margin: auto !important;
  pointer-events: none !important;
  flex-shrink: 0 !important;
}

.he-desktop-floating-dock button.he-float-top,
body.he-modern-site-v3 button.he-float-top {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  color: var(--he-navy) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 8px 20px rgba(7, 19, 38, 0.18) !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.he-desktop-floating-dock button.he-float-top.visible,
body.he-modern-site-v3 button.he-float-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.he-desktop-floating-dock button.he-float-top:hover,
body.he-modern-site-v3 button.he-float-top:hover {
  background: var(--he-navy) !important;
  color: #ffffff !important;
  border-color: var(--he-navy) !important;
}

.he-desktop-floating-dock button.he-float-search-icon,
body.he-modern-site-v3 button.he-float-search-icon {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  border-radius: 50% !important;
  background: var(--he-navy) !important;
  color: #ffffff !important;
  border: 2px solid rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 10px 26px rgba(7, 19, 38, 0.32) !important;
}
.he-desktop-floating-dock button.he-float-search-icon:hover,
body.he-modern-site-v3 button.he-float-search-icon:hover {
  background: var(--he-purple) !important;
  border-color: var(--he-cyan) !important;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.4) !important;
}

.he-desktop-floating-dock a.he-float-wa-original,
body.he-modern-site-v3 a.he-float-wa-original {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  border-radius: 50% !important;
  background: #25D366 !important;
  color: #ffffff !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45) !important;
}
.he-desktop-floating-dock a.he-float-wa-original:hover,
body.he-modern-site-v3 a.he-float-wa-original:hover {
  background: #1ebe5d !important;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.6) !important;
}

/* BARRA INFERIOR MÓVIL TIPO APP (3 ACCIONES: URGENCIAS, BUSCAR, WHATSAPP - CERO DUPLICADOS) */
.he-sticky-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid #cbd5e1;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  box-shadow: 0 -6px 24px rgba(7, 19, 38, 0.14);
}

body.he-modern-site-v3 .he-sticky-btn {
  flex: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 11px 8px !important;
  border-radius: 12px !important;
  font-family: var(--he-font-heading) !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  border: none !important;
}
body.he-modern-site-v3 a.he-sticky-call {
  background: var(--he-navy) !important;
  color: #ffffff !important;
}
body.he-modern-site-v3 button.he-sticky-search {
  background: #f1f5f9 !important;
  color: var(--he-navy) !important;
  border: 1px solid #cbd5e1 !important;
}
body.he-modern-site-v3 a.he-sticky-wa {
  background: linear-gradient(135deg, var(--he-purple) 0%, #4c1d95 100%) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   12. RESPONSIVE DESIGN INTEGRAL (LAPTOPS, TABLETS Y TODAS LAS MARCAS MÓVILES)
   ========================================================================== */
/* Ajuste fino para pantallas de Laptop (1024px - 1366px) para que nunca se vea apretado */
@media (max-width: 1280px) {
  .he-topbar {
    font-size: 0.73rem;
  }
  .he-header-inner {
    min-height: 58px;
    gap: 10px;
  }
  .he-main-logo {
    max-height: 36px;
  }
  .he-desktop-nav .he-menu {
    gap: 13px;
  }
  body.he-modern-site-v3 .he-nav-link {
    font-size: 0.81rem;
  }
  body.he-modern-site-v3 a.he-btn-urgencias {
    padding: 7px 12px !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 992px) {
  .he-desktop-nav,
  .he-hide-mobile,
  .he-urg-text-full,
  .he-desktop-floating-dock,
  .he-tb-addr-full,
  .he-topbar-desktop {
    display: none !important;
  }

  .he-topbar-mobile-ticker {
    display: block !important;
  }

  .he-show-mobile-only,
  .he-tb-addr-short {
    display: inline !important;
  }

  .he-urg-text-short {
    display: inline !important;
  }

  body.he-modern-site-v3 button.he-hamburger {
    display: flex !important;
  }

  /* Header compacto y limpio en tablet y celular (Logo + Urgencias + Menú) */
  .he-header-inner {
    min-height: 58px;
    gap: 8px;
  }
  .he-main-logo {
    max-height: 36px;
    max-width: 150px;
  }
  body.he-modern-site-v3 a.he-btn-urgencias {
    padding: 8px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 10px !important;
  }

  .he-hero {
    padding: 0 0 36px 0 !important;
    overflow: visible !important;
    position: relative;
    z-index: 50;
    background-color: #071326;
    background-image: 
      linear-gradient(180deg, rgba(7, 19, 38, 0.50) 0%, rgba(7, 19, 38, 0.78) 45%, rgba(7, 19, 38, 0.92) 100%),
      url('../images/hero-bg-calidez-humana.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
  }
  .he-hero > .he-container {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* OPCIÓN A: EN MÓVILES Y TABLETS EL SLIDESHOW VA PRIMERO (VISUAL-FIRST) A PANTALLA COMPLETA SIN BORDES */
  .he-hero-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .he-hero-visual {
    order: -1 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .he-hero-slider-wrap {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    box-shadow: 0 6px 20px rgba(13, 32, 64, 0.08) !important;
  }
  .he-slide-media {
    aspect-ratio: 16 / 9.5 !important;
    max-height: 290px !important;
  }
  .he-hero-content {
    order: 2 !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 18px 0 !important;
    box-sizing: border-box !important;
  }
  .he-hero-eyebrow {
    font-size: 0.72rem !important;
    text-align: center;
    margin-bottom: 6px !important;
  }
  body.he-modern-site-v3 .he-hero-title {
    font-size: 1.55rem !important;
    text-align: center;
    margin-bottom: 6px !important;
  }
  .he-hero-subtitle {
    font-size: 0.95rem !important;
    text-align: center;
    margin-bottom: 12px !important;
  }
  .he-authority-badge {
    justify-content: center;
    margin-bottom: 14px !important;
  }
  /* Ocultar párrafo largo en móvil para dar 100% protagonismo a las fotos y al buscador */
  .he-hero-text {
    display: none !important;
  }
  .he-hero-search-wrap {
    width: 100% !important;
    max-width: 480px;
    margin: 0 auto 16px !important;
  }
  .he-hero-ctas {
    width: 100% !important;
    max-width: 480px;
    margin: 0 auto;
  }

  .he-subhero-grid,
  .he-spec-detail-grid,
  .he-service-hero-split,
  .he-about-split,
  .he-contact-wrapper,
  .he-insurer-advisor-card,
  .he-doc-modal-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px;
  }

  .he-services-hub-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .he-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .he-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .he-sticky-mobile-bar {
    display: flex;
  }

  body,
  body.he-modern-site-v3 {
    padding-bottom: 68px !important;
  }
}

@media (max-width: 640px) {
  .he-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .he-topbar-inner {
    min-height: 32px;
    font-size: 0.73rem;
  }

  .he-section {
    padding: 46px 0;
  }

  .he-subhero {
    padding: 28px 0 36px;
    overflow: visible !important;
    position: relative;
    z-index: 50;
    background-color: #071326;
    background-image: 
      linear-gradient(180deg, rgba(7, 19, 38, 0.55) 0%, rgba(7, 19, 38, 0.80) 50%, rgba(7, 19, 38, 0.94) 100%),
      url('../images/hero-bg-calidez-humana.jpg');
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
  }

  body.he-modern-site-v3 .he-hero-title {
    font-size: 1.68rem !important;
  }
  .he-hero-subtitle {
    font-size: 1.02rem;
  }

  .he-authority-badge {
    padding: 6px 12px;
    gap: 6px;
    border-radius: 12px;
  }
  .he-badge-item {
    font-size: 0.76rem;
  }

  /* Botones de portada a ancho completo en móvil para tacto perfecto */
  .he-hero-ctas,
  .he-subhero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.he-modern-site-v3 .he-hero-ctas .he-btn,
  body.he-modern-site-v3 .he-subhero-actions .he-btn {
    width: 100%;
  }

  /* Pestañas de filtro con scroll horizontal táctil suave en celular */
  .he-filter-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .he-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  /* Tarjetas de Especialidades centradas y limpias en móvil */
  .he-all-specs-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .he-spec-card-v3 {
    padding: 18px;
    text-align: center;
    align-items: center;
  }
  .he-spec-card-top {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }
  .he-spec-cat-badge {
    text-align: center;
  }
  .he-spec-card-footer {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  /* Slideshow caption limpia y ordenada en móvil */
  .he-slide-caption {
    padding: 10px 12px;
    gap: 8px;
  }
  .he-slide-title {
    font-size: 0.8rem;
  }
  .he-slide-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  /* 3 Filas Horizontales de Médicos en Móvil */
  .he-doctors-wall-toolbar {
    justify-content: center;
    text-align: center;
  }
  .he-wall-swipe-hint {
    display: none;
  }
  .he-doc-hcard {
    flex: 0 0 282px;
    width: 282px;
    padding: 10px;
    gap: 10px;
  }
  .he-doc-hcard-avatar {
    width: 66px;
    height: 78px;
  }
  body.he-modern-site-v3 button.he-doc-row-arrow {
    display: none !important;
  }

  .he-spec-about-card,
  .he-spec-sidebar-card,
  .he-insurer-advisor-card {
    padding: 20px;
  }

  .he-spec-modal-header,
  .he-spec-modal-body,
  .he-spec-modal-footer,
  .he-doc-modal-content {
    padding: 18px;
  }

  /* MODAL DE BÚSQUEDA SÚPER INTELIGENTE OPTIMIZADO PARA MÓVIL (MÁS ANCHO Y TEXTO CÓMODO SIN AMONTONAR) */
  .he-modal-overlay#he-search-modal,
  #he-search-modal {
    padding: 8px 6px !important;
    align-items: flex-start !important;
    padding-top: max(8px, env(safe-area-inset-top, 8px)) !important;
  }
  .he-search-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    margin: 0 auto !important;
    border-radius: 14px !important;
    max-height: 90vh !important;
  }
  .he-search-modal-header {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .he-search-modal-header .he-search-input-wrap {
    border-radius: 10px !important;
  }
  .he-search-modal-header .he-smart-search-input {
    font-size: 0.85rem !important;
    padding: 9px 10px 9px 36px !important;
  }
  .he-search-modal-header .he-search-icon {
    left: 10px !important;
    width: 18px !important;
    height: 18px !important;
  }
  body.he-modern-site-v3 button.he-modal-close-inline {
    padding: 7px 11px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
    background: #f1f5f9 !important;
    color: var(--he-navy) !important;
    font-weight: 700 !important;
  }
  .he-search-Quick-suggestions {
    gap: 5px !important;
    margin-bottom: 8px !important;
    font-size: 0.73rem !important;
  }
  body.he-modern-site-v3 .he-search-Quick-suggestions button.he-quick-query {
    padding: 3px 8px !important;
    font-size: 0.71rem !important;
    border-radius: 6px !important;
  }
  .he-modal-results-area {
    max-height: 60vh !important;
  }
  .he-smart-search-results {
    max-height: min(62vh, 460px) !important;
    padding: 8px 6px !important;
    border-radius: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .he-sr-top-bar {
    padding: 6px 6px 8px !important;
    font-size: 0.74rem !important;
  }
  .he-sr-count-pill {
    font-size: 0.74rem !important;
  }
  .he-sr-filter-hint {
    display: none !important;
  }
  body.he-modern-site-v3 a.he-search-result-item {
    padding: 9px 8px !important;
    gap: 8px !important;
    border-radius: 10px !important;
    align-items: center !important;
  }
  .he-sr-left {
    gap: 8px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .he-sr-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
  }
  .he-sr-icon-box {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
  }
  .he-sr-text-block {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: left !important;
  }
  .he-sr-badge-line {
    margin-bottom: 2px !important;
  }
  .he-sr-badge {
    font-size: 0.63rem !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
    display: inline-block !important;
    white-space: normal !important;
  }
  .he-sr-title {
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    color: #0d2040 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .he-sr-sub {
    font-size: 0.73rem !important;
    color: #64748b !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  body.he-modern-site-v3 .he-sr-action {
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    padding: 5px 8px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }
  .he-sr-bottom-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 6px !important;
    padding: 8px 6px 4px !important;
  }
  body.he-modern-site-v3 a.he-sr-bottom-wa {
    display: block !important;
    padding: 6px 10px !important;
    background: #f0fdf4 !important;
    border-radius: 8px !important;
    border: 1px solid #bbf7d0 !important;
  }

  .he-footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* Dispositivos móviles compactos (iPhone SE, Galaxy S Mini, 320px - 375px) */
@media (max-width: 380px) {
  .he-main-logo {
    max-width: 128px;
    max-height: 32px;
  }
  .he-header-actions {
    gap: 6px;
  }
  body.he-modern-site-v3 button.he-hamburger {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }
  body.he-modern-site-v3 a.he-btn-urgencias {
    padding: 7px 9px !important;
    font-size: 0.74rem !important;
  }
  body.he-modern-site-v3 .he-sticky-btn {
    font-size: 0.74rem !important;
    padding: 10px 4px !important;
  }
}
