  body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #e8f4f8 0%, #d1e7f0 25%, #e0f2f0 50%, #d4edda 75%, #e8f5e9 100%) !important;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  min-height: 100vh;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

/* === FONDOS DEGRADADOS OPTIMIZADOS - GAMA VERDE Y AZUL === */

/* Función helper para fondos con efectos radiales */
body[class*="page-"]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* Página principal - Index */
body.page-index {
  background: linear-gradient(135deg, 
    #e3f2fd 0%, 
    #bbdefb 20%, 
    #c8e6c9 40%, 
    #a5d6a7 60%, 
    #e8f5e9 80%, 
    #f1f8e9 100%);
  background-attachment: fixed;
}

body.page-index::before {
  background: 
    radial-gradient(circle at 15% 25%, rgba(7, 61, 162, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(6, 134, 61, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(33, 150, 243, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(76, 175, 80, 0.06) 0%, transparent 50%);
}

/* Páginas de servicios médicos */
body.page-servicios {
  background: linear-gradient(135deg, 
    #e8f4f8 0%, 
    #d1e7f0 20%, 
    #c5e1ed 40%, 
    #b3d9e6 60%, 
    #e0f2f0 80%, 
    #d4edda 100%);
  background-attachment: fixed;
}

body.page-servicios::before {
  background: 
    radial-gradient(circle at 20% 30%, rgba(7, 61, 162, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(6, 134, 61, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(33, 150, 243, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
}

/* Páginas de especialidades */
body.page-especialidades {
  background: linear-gradient(135deg, 
    #e0f2f0 0%, 
    #c8e6c9 20%, 
    #a5d6a7 40%, 
    #81c784 60%, 
    #b3e5fc 80%, 
    #e1f5fe 100%);
  background-attachment: fixed;
}

body.page-especialidades::before {
  background: 
    radial-gradient(circle at 15% 40%, rgba(6, 134, 61, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(7, 61, 162, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(76, 175, 80, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(33, 150, 243, 0.05) 0%, transparent 50%);
}

/* Páginas informativas */
body.page-informacion {
  background: linear-gradient(135deg, 
    #f0f8ff 0%, 
    #e3f2fd 20%, 
    #e8f5e9 40%, 
    #c8e6c9 60%, 
    #e0f7fa 80%, 
    #f1f8e9 100%);
  background-attachment: fixed;
}

body.page-informacion::before {
  background: 
    radial-gradient(circle at 25% 25%, rgba(7, 61, 162, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(6, 134, 61, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(144, 238, 144, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 60% 30%, rgba(33, 150, 243, 0.04) 0%, transparent 50%);
}

/* Urgencias - Verde azulado más intenso */
body.page-urgencias {
  background: linear-gradient(135deg, 
    #e0f7fa 0%, 
    #b2ebf2 20%, 
    #80deea 40%, 
    #4dd0e1 60%, 
    #c8e6c9 80%, 
    #e8f5e9 100%);
  background-attachment: fixed;
}

body.page-urgencias::before {
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 188, 212, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(6, 134, 61, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(33, 150, 243, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 30% 60%, rgba(76, 175, 80, 0.06) 0%, transparent 50%);
}

/* Laboratorio - Verde más pronunciado */
body.page-laboratorio {
  background: linear-gradient(135deg, 
    #e8f5e9 0%, 
    #c8e6c9 20%, 
    #a5d6a7 40%, 
    #81c784 60%, 
    #b3e5fc 80%, 
    #e1f5fe 100%);
  background-attachment: fixed;
}

body.page-laboratorio::before {
  background: 
    radial-gradient(circle at 30% 40%, rgba(6, 134, 61, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(76, 175, 80, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(139, 195, 74, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(33, 150, 243, 0.05) 0%, transparent 50%);
}

/* Pediatría - Azul verdoso suave */
body.page-pediatria {
  background: linear-gradient(135deg, 
    #e0f7fa 0%, 
    #b2ebf2 20%, 
    #c8e6c9 40%, 
    #a5d6a7 60%, 
    #e1f5fe 80%, 
    #f1f8e9 100%);
  background-attachment: fixed;
}

body.page-pediatria::before {
  background: 
    radial-gradient(circle at 25% 35%, rgba(0, 188, 212, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(76, 175, 80, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(33, 150, 243, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(6, 134, 61, 0.05) 0%, transparent 50%);
}

/* Cardiología - Azul con toques verdes */
body.page-cardiologia {
  background: linear-gradient(135deg, 
    #e3f2fd 0%, 
    #bbdefb 20%, 
    #90caf9 40%, 
    #64b5f6 60%, 
    #c8e6c9 80%, 
    #e8f5e9 100%);
  background-attachment: fixed;
}

body.page-cardiologia::before {
  background: 
    radial-gradient(circle at 20% 40%, rgba(33, 150, 243, 0.11) 0%, transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(7, 61, 162, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 50% 30%, rgba(76, 175, 80, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(6, 134, 61, 0.06) 0%, transparent 50%);
}

/* Contacto */
body.page-contacto,
body.page-politica-privacidad {
  background: linear-gradient(135deg, 
    #e3f2fd 0%, 
    #bbdefb 20%, 
    #90caf9 40%, 
    #e8f5e9 60%, 
    #c8e6c9 80%, 
    #f1f8e9 100%);
  background-attachment: fixed;
}

body.page-contacto::before,
body.page-politica-privacidad::before {
  background: 
    radial-gradient(circle at 30% 30%, rgba(7, 61, 162, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(33, 150, 243, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(144, 202, 249, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 60% 20%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
}

/* Nosotros - Azul verdoso equilibrado */
body.page-nosotros {
  background: linear-gradient(135deg, 
    #e8f4f8 0%, 
    #d1e7f0 20%, 
    #c8e6c9 40%, 
    #a5d6a7 60%, 
    #e0f2f0 80%, 
    #f0f8ff 100%);
  background-attachment: fixed;
}

body.page-nosotros::before {
  background: 
    radial-gradient(circle at 20% 30%, rgba(7, 61, 162, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(6, 134, 61, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(33, 150, 243, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
}

/* Asegurar que el contenido esté sobre los fondos (.navbar y .topbar: sticky más abajo) */
.intro-section,
.site-footer {
  position: relative;
  z-index: 1;
}

html {
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #e8f4f8 0%, #d1e7f0 25%, #e0f2f0 50%, #d4edda 75%, #e8f5e9 100%);
  min-height: 100vh;
}

* {
  box-sizing: border-box;
}

:root {
  --site-navbar-height: 66px;
  /* Modales / lightboxes / folletos: por encima de .navbar (1002), .topbar (1001), menú móvil (~15000) y botones flotantes (10000) */
  --clinic-overlay-z: 30000;
  /* Hojas/pétalos/flores: por encima de casi toda la página; siempre por debajo de overlays (imagen ampliada, cards, folletos) */
  --season-particles-z: calc(var(--clinic-overlay-z) - 5000);
}

/* === BARRA VERDE PRINCIPAL (CENTRADA) — sticky con la barra azul === */
.navbar {
  background: linear-gradient(135deg, #d4ff4d 0%, #b8e600 50%, #a8d800 100%);
  padding: 10px 0;
  margin-bottom: 0;
  margin-top: 0;
  display: flex;
  justify-content: center; 
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1002;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
}

.navbar-content .title {
  flex: 0 0 auto;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* === Selector de idioma (junto a la bandera) === */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(20, 82, 49, 0.2);
}

.lang-switch__sep {
  color: rgba(20, 82, 49, 0.45);
  font-size: 12px;
  user-select: none;
}

.lang-switch__btn {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: #145231;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch__btn:hover {
  background: rgba(255, 255, 255, 0.7);
}

.lang-switch__btn.lang-switch__btn--active {
  background: #145231;
  color: #fff;
}

.lang-switch__btn:focus-visible {
  outline: 2px solid #073da2;
  outline-offset: 2px;
}

.title {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  color: black;
  gap: 10px;
}

.title .logo {
  height: 45px;
  margin-right: 10px;
}

.clinic-name {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  color: #145231;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
}

.nav-links a {
  color: black;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 16px;
  transition: background-color 0.3s, color 0.3s;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-links a:hover {
  background-color: #a8d800;
  color: white;
}

/* === BANDERA DE MÉXICO === */
.flag-mexico {
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.flag-mexico:hover {
  transform: scale(1.1);
}

.flag-mexico svg {
  display: block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* === RELOJ EN LA BARRA DE NAVEGACIÓN === */
#navbar-clock {
  display: flex;
  align-items: center;
  color: #145231;
  font-weight: bold;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  padding: 5px 10px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#navbar-clock .clock-time {
  letter-spacing: 1px;
}

#navbar-clock svg {
  flex-shrink: 0;
}

/* === IMAGEN ENTRE BARRAS === */
.banner-top {
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
  width: 100%;
  height: 200px;
  overflow: visible;
}

.banner-top img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: brightness(1.05) contrast(1.05);
}

.banner-text {
  display: none; /* Oculto para un diseño más formal y limpio */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 96px;
  font-weight: bold;
  font-style: italic;
  background: linear-gradient(135deg, #255238 0%, #145231 50%, #134429 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 5px rgba(144, 238, 144, 0.8), 
               0 0 10px rgba(144, 238, 144, 0.6),
               0 0 15px rgba(144, 238, 144, 0.4);
  z-index: 2;
  font-family: "Brush Script MT", "Brush Script Std", cursive;
  letter-spacing: 2px;
}

/* === DECORACIÓN NAVIDEÑA (NOCHEBUENA) === */
.banner-decoration-left,
.banner-decoration-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  z-index: 3;
  pointer-events: none;
}

.banner-decoration-left {
  left: 20px;
}

.banner-decoration-right {
  right: 20px;
}

.banner-decoration-left img,
.banner-decoration-right img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* === BARRA AZUL — sticky bajo la barra verde === */
.topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%),
    linear-gradient(135deg, #0a4db8 0%, #073da2 45%, #052d7a 100%);
  color: white;
  padding: 0;
  margin-top: 0;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(7, 61, 162, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: var(--site-navbar-height, 66px);
  z-index: 1001;
  overflow: visible;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.topbar-tagline {
  margin: 0;
  padding: 6px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.08);
}

.topbar > .topmenu {
  padding: 10px 0 12px;
}

/* Los triggers del menú deben quedar por encima del submenú cerrado (mismo li);
   si no, el rectángulo invisible del .submenu gana el apilado y los clics
   “atraviesan” hacia el contenido sin activar el enlace. Abierto: submenú en capa superior. */
.topbar .topmenu > li > a {
  position: relative;
  z-index: 1002;
}

/* === Acento decorativo suave en la barra de menú (estación cálida) === */
.topbar-season-accent {
  position: absolute;
  top: -16px;
  left: 0;
  width: 100%;
  height: 36px;
  pointer-events: none;
  z-index: 1001;
  overflow: visible;
}

.season-accent-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateX(-50%);
  opacity: 0.75;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: season-accent-glow 4.5s ease-in-out infinite;
}

.season-accent-dot:nth-child(1) { top: 26px; }
.season-accent-dot:nth-child(2) { top: 22px; }
.season-accent-dot:nth-child(3) { top: 18px; }
.season-accent-dot:nth-child(4) { top: 15px; }
.season-accent-dot:nth-child(5) { top: 12px; }
.season-accent-dot:nth-child(6) { top: 9px; }
.season-accent-dot:nth-child(7) { top: 7px; }
.season-accent-dot:nth-child(8) { top: 6px; }
.season-accent-dot:nth-child(9) { top: 7px; }
.season-accent-dot:nth-child(10) { top: 9px; }
.season-accent-dot:nth-child(11) { top: 12px; }
.season-accent-dot:nth-child(12) { top: 16px; }

@keyframes season-accent-glow {
  0%, 100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-accent-dot {
    animation: none;
    opacity: 0.7;
  }
}

/* === Barra compacta de urgencias (referencia rápida) === */
.urgency-mini-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #b71c1c 0%, #c62828 40%, #ad1457 100%);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 5;
}

.urgency-mini-bar__label {
  letter-spacing: 0.03em;
}

.urgency-mini-bar__phone {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}

.urgency-mini-bar__phone:hover {
  background: rgba(0, 0, 0, 0.25);
  transform: scale(1.03);
}

.urgency-mini-bar__phone:focus-visible {
  outline: 3px solid #ffeb3b;
  outline-offset: 2px;
}

.urgency-mini-bar__link {
  color: #ffecb3;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.urgency-mini-bar__link:hover {
  color: #fff;
}

/* === Menú móvil === */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 4px 8px 4px auto;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

.mobile-nav-toggle:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

.mobile-nav-toggle-bars,
.mobile-nav-toggle-bars::before,
.mobile-nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.mobile-nav-toggle-bars::before,
.mobile-nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
}

.mobile-nav-toggle-bars::before {
  top: -6px;
}

.mobile-nav-toggle-bars::after {
  top: 6px;
}

.topbar.nav-mobile-open .mobile-nav-toggle {
  background: rgba(255, 215, 0, 0.28);
  border-color: rgba(255, 235, 120, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}

.mobile-nav-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 15000;
  background: rgba(3, 18, 48, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 68px 18px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-panel:not([hidden]) {
  display: block;
  animation: mobile-nav-backdrop-in 0.22s ease;
}

@keyframes mobile-nav-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.mobile-nav-panel-inner {
  max-width: 400px;
  margin: 0 auto;
  background: linear-gradient(165deg, #1565c0 0%, #0d47a1 45%, #052d7a 100%);
  border-radius: 20px;
  padding: 18px 14px 22px;
  box-shadow:
    0 4px 0 rgba(255, 255, 255, 0.06) inset,
    0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  animation: mobile-nav-card-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mobile-nav-card-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-nav-panel .topmenu-mobile {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.mobile-nav-panel .topmenu-mobile > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.mobile-nav-panel .topmenu-mobile > li > a:active {
  transform: scale(0.99);
}

.mobile-nav-panel .topmenu-mobile > li > a:hover,
.mobile-nav-panel .topmenu-mobile > li > a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.mobile-nav-panel .topmenu-mobile > li > a.active {
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.9);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 224, 100, 0.45);
}

/* Sin flecha ni acordeón: mismos enlaces en todas las páginas (clon .topmenu-mobile) */
.mobile-nav-panel .topmenu-mobile li.has-submenu > a::after,
.mobile-nav-panel .topmenu-mobile li.has-submenu.submenu-open > a::after,
.mobile-nav-panel .topmenu-mobile li.has-submenu:hover > a::after {
  display: none !important;
  content: none !important;
}

.mobile-nav-panel .topmenu-mobile a::before {
  display: none !important;
}

.mobile-nav-panel .topmenu-mobile li.has-submenu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.mobile-nav-panel .topmenu-mobile .submenu {
  position: static !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 8px 0 0 0 !important;
  padding: 0 0 2px 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  z-index: auto !important;
  list-style: none;
}

.mobile-nav-panel .topmenu-mobile .submenu li {
  margin: 0 0 6px 0;
}

.mobile-nav-panel .topmenu-mobile .submenu a {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  color: #e8f4fd;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  white-space: normal;
  line-height: 1.35;
}

.mobile-nav-panel .topmenu-mobile .submenu a:hover,
.mobile-nav-panel .topmenu-mobile .submenu a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.mobile-nav-panel .topmenu-mobile .submenu a.active,
.mobile-nav-panel .topmenu-mobile .submenu a[aria-current="page"] {
  background: rgba(255, 215, 0, 0.22);
  color: #fffef5;
  font-weight: 700;
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}

body.nav-mobile-active {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel:not([hidden]) {
    animation: none;
  }

  .mobile-nav-panel-inner {
    animation: none;
  }
}

/* Móvil/tablet: misma barra que en PC — 4 enlaces centrados (como escritorio); sin hamburguesa ni submenú desplegable */
@media (max-width: 900px) {
  .topbar {
    position: sticky;
    top: var(--site-navbar-height, 66px);
    padding: 0 8px;
  }

  .topbar > .topmenu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    overflow-x: visible;
    overflow-y: visible;
    gap: 8px 10px;
    padding: 8px 10px 12px;
    margin: 0;
    row-gap: 8px;
  }

  .topbar .topmenu > li > a {
    font-size: clamp(11px, 3.1vw, 14px);
    padding: 8px 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .topbar .topmenu li.has-submenu > .submenu {
    display: none !important;
  }

  .topbar .topmenu li.has-submenu > a::after,
  .topbar .topmenu li.has-submenu.submenu-open > a::after,
  .topbar .topmenu li.has-submenu:hover > a::after {
    display: none !important;
    content: none !important;
  }

  .topbar .topmenu a::before {
    display: none !important;
  }

  .mobile-nav-toggle,
  .mobile-nav-panel {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .mobile-nav-panel {
    display: none !important;
  }
}

.topmenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.topmenu li {
  margin: 0;
  position: relative;
}

.topmenu li.has-submenu {
  position: relative;
}

.topmenu a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.topmenu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.topmenu a:hover::before {
  left: 100%;
}

.topmenu a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
  color: #ffd700;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.topmenu a.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.2) 100%);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.topmenu a:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.topmenu a:focus-visible,
.submenu a:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.topmenu li.has-submenu > a {
  padding-right: 14px;
}

.topmenu li.has-submenu > a::after {
  content: '';
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  vertical-align: 0.15em;
  opacity: 0.9;
}

.topmenu li.has-submenu.submenu-open > a::after,
.topmenu li.has-submenu:hover > a::after {
  transform: rotate(-135deg);
  vertical-align: -0.05em;
}

/* === SUBMENÚ === */
.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  min-width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 10px 0;
  margin-top: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1001;
  border: 1px solid rgba(7, 61, 162, 0.1);
}

.topmenu li.has-submenu:hover .submenu,
.topmenu li.has-submenu .submenu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
  z-index: 1003;
}

.submenu li {
  margin: 0;
}

.submenu a {
  display: block;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  padding: 12px 20px;
  background: transparent;
  border-radius: 0;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  box-shadow: none;
  border: none;
  text-align: left;
  white-space: nowrap;
  position: relative;
}

.submenu a::before {
  display: none;
}

.submenu a:hover {
  background: linear-gradient(135deg, rgba(7, 61, 162, 0.1) 0%, rgba(10, 77, 184, 0.1) 100%);
  color: #073da2;
  transform: translateX(5px);
  box-shadow: none;
  border: none;
}

/* Servicio actual (mismo estilo dorado en todas las páginas) */
.submenu a.active,
.submenu a[aria-current="page"] {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.38) 0%, rgba(255, 235, 150, 0.5) 100%);
  color: #8b6914;
  font-weight: 700;
  transform: translateX(4px);
}

.submenu a.active:hover,
.submenu a[aria-current="page"]:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.45) 0%, rgba(255, 228, 120, 0.55) 100%);
  color: #6b4f00;
}

.submenu a:hover::before {
  display: none;
}

.submenu li:first-child a {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.submenu li:last-child a {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

@keyframes submenu-item-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topmenu li.has-submenu .submenu.show > li {
  animation: submenu-item-reveal 0.28s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.topmenu li.has-submenu .submenu.show > li:nth-child(1) { animation-delay: 0.02s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(2) { animation-delay: 0.04s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(3) { animation-delay: 0.06s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(4) { animation-delay: 0.08s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(5) { animation-delay: 0.1s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(6) { animation-delay: 0.12s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(7) { animation-delay: 0.14s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(8) { animation-delay: 0.16s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(9) { animation-delay: 0.18s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(10) { animation-delay: 0.2s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(11) { animation-delay: 0.22s; }
.topmenu li.has-submenu .submenu.show > li:nth-child(12) { animation-delay: 0.24s; }

@media (max-width: 900px) {
  .submenu {
    left: 50%;
    right: auto;
    width: min(calc(100vw - 24px), 340px);
    max-width: min(calc(100vw - 24px), 340px);
    min-width: 0;
    transform: translateX(-50%) translateY(-8px);
  }

  .topmenu li.has-submenu:hover .submenu,
  .topmenu li.has-submenu .submenu.show {
    transform: translateX(-50%) translateY(0);
    z-index: 1003;
  }

  .submenu a {
    white-space: normal;
  }
}

/* === SLIDER === */
.slider {
  position: relative;
  max-width: 100%;
  height: 500px;
  overflow: hidden;
}

/* === FLECHAS DE NAVEGACIÓN === */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 26px;
  color: #0a2a66;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  line-height: 1;
  padding: 0;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-arrow-left {
  left: 20px;
}

.slider-arrow-right {
  right: 20px;
}

.slideItem {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.slideItem.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slides {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* === TEXTO DEL BANNER === */
.text-banner {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  max-width: 80%;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  z-index: 2;
}

.text-banner h2 {
  font-size: 40px;
  margin: 0 0 10px 0;
}

.text-banner p {
  font-size: 18px;
  margin: 0;
}

/* === DOTS === */
.dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  border-radius: 25px;
  display: inline-block;
}

.dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0 8px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dot:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.dot.active {
  background-color: #5cbf00;
  border-color: #5cbf00;
  box-shadow: 0 0 10px rgba(92, 191, 0, 0.6);
  transform: scale(1.15);
}

/* === SECCIÓN DE BIENVENIDA === */
.intro-section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

.intro-text h1 {
  color: #0a3c8a;
  font-size: 32px;
  margin-bottom: 15px;
}

.intro-text p {
  font-size: 18px;
  color: #333;
  line-height: 1.65;
  margin-bottom: 30px;
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/* === VIDEO CENTRADO === */
.intro-video {
  display: flex;
  justify-content: center;
}

.intro-video iframe {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

/* === BANNER ESTÁTICO (inicio: texto legible sobre foto) === */
.services-banner {
  position: relative;
  text-align: center;
  color: #fff;
  margin: 40px 0 0 0;
  padding-top: 1px;
  padding-bottom: 1px;
  background: linear-gradient(
    to bottom,
    rgba(7, 61, 162, 0.12) 0%,
    rgba(6, 134, 61, 0.08) 100%
  );
  box-shadow: 0 8px 28px rgba(7, 61, 162, 0.12);
  overflow: hidden;
  z-index: 3;
}

.services-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 30, 70, 0.45) 0%,
    rgba(3, 18, 48, 0.62) 45%,
    rgba(2, 12, 36, 0.75) 100%
  );
}

.services-banner .banner-img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: auto;
  min-height: 200px;
  display: block;
  object-fit: cover;
  filter: brightness(0.55) contrast(1.05);
  border: none;
  box-shadow: none;
}

.services-banner .banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92%, 800px);
  max-width: 800px;
  padding: 22px 20px;
  z-index: 2;
  background: rgba(0, 24, 56, 0.42);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.services-banner h2 {
  font-size: clamp(1.35rem, 4.5vw, 2.5rem);
  margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  line-height: 1.2;
}

.services-banner p {
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  margin: 0 0 22px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

@media (max-width: 600px) {
  .services-banner .banner-content {
    padding: 18px 14px;
    width: min(94%, 100%);
  }

  .services-banner p {
    margin-bottom: 18px;
  }
}

/* === BOTÓN === */
.btn-banner {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
  padding: 12px 28px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  display: inline-block;
}

.btn-banner:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

/* CTA final en páginas de servicios → contacto */
.service-contact-cta {
  max-width: 1200px;
  margin: 28px auto 40px;
  padding: 0 20px;
}

.service-contact-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px 32px;
  text-align: center;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(7, 61, 162, 0.07) 0%, transparent 55%),
    linear-gradient(145deg, #f5f9ff 0%, #eef6f1 48%, #f0f4fb 100%);
  border: 1px solid rgba(7, 61, 162, 0.14);
  border-radius: 18px;
  box-shadow:
    0 10px 32px rgba(7, 61, 162, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.service-contact-cta--rich .service-contact-cta-inner {
  position: relative;
  overflow: hidden;
}

.service-contact-cta--rich .service-contact-cta-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #06863d 0%, #073da2 50%, #d4ff4d 100%);
  opacity: 0.95;
}

.service-contact-cta-text {
  margin: 0;
  font-size: 1.125rem;
  color: #374151;
  line-height: 1.55;
  max-width: 560px;
}

.service-contact-cta-kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #073da2;
}

/* Bloque principal en páginas de servicio (texto breve) */
.service-page-intro {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 32px 36px;
  text-align: left;
  background: linear-gradient(155deg, #ffffff 0%, #f3f8fc 55%, #f5faf7 100%);
  border-radius: 18px;
  border: 1px solid rgba(7, 61, 162, 0.1);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.06);
}

.service-page-intro p {
  color: #444;
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 16px;
}

.service-page-intro p:last-child {
  margin-bottom: 0;
}

.service-page-intro h2 {
  font-size: 1.15rem;
  color: #073da2;
  margin: 24px 0 12px;
  font-weight: 700;
}

.service-page-intro h2:first-child {
  margin-top: 0;
}

.btn-service-contact {
  display: inline-block;
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #073da2 0%, #052d7a 100%);
  box-shadow: 0 4px 14px rgba(7, 61, 162, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-service-contact:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(7, 61, 162, 0.45);
}

.btn-service-contact:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .service-contact-cta-inner {
    padding: 24px 18px;
  }

  .service-contact-cta-text {
    font-size: 1rem;
  }
}

/* --- Sección de bienvenida --- */
.intro-section {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 50%, #e8ecf1 100%);
  border-radius: 20px;
  margin: 40px auto;
  max-width: 1200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.intro-text h1 {
  background: linear-gradient(135deg, #0a3c8a 0%, #073da2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 28px;
  margin-bottom: 10px;
}

.intro-text p {
  font-size: 18px;
  color: #444;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
}

.intro-text h2 {
  margin-top: 15px;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #06863d;
  background: none;
  -webkit-text-fill-color: #06863d;
  text-shadow: none;
}

/* --- Contenedor de videos alineados --- */
.video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap; /* Mantiene los 3 en una sola fila */
  margin-top: 30px;
  overflow: visible; /* Quita completamente la barra inferior */
}

/* --- Ajustes de tamaño de los videos --- */
.video-item iframe {
  width: 380px;
  height: 215px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
              0 0 0 3px rgba(144, 238, 144, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* --- Efecto hover (agrandar suavemente) --- */
.video-item iframe:hover {
  transform: scale(1.08) translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25),
              0 0 0 4px rgba(144, 238, 144, 0.4);
}

/* --- Diseño responsive (móviles y tablets) --- */
@media (max-width: 1200px) {
  .video-container {
    flex-wrap: wrap; /* Permite que bajen en pantallas pequeñas */
  }
  .video-item iframe {
    width: 90%;
    max-width: 360px;
  }
}

/* Título de bloque (inicio, al estilo Instalaciones) */
.home-section-intro {
  max-width: 900px;
  margin: 0 auto 8px;
  padding: 0 20px;
  text-align: center;
}

.home-section-intro .home-section-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #073da2;
  letter-spacing: -0.02em;
}

.home-section-intro .home-section-lead {
  margin: 0;
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  color: #455a64;
  line-height: 1.55;
}

/* Hub Nosotros: accesos al submenú (misma línea visual que Instalaciones) */
.nosotros-hub {
  max-width: 1040px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 24px 20px 48px;
  box-sizing: border-box;
}

.nosotros-hub__intro {
  text-align: center;
  margin-bottom: 36px;
}

.nosotros-hub__intro h1 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 4.5vw, 2.1rem);
  color: #073da2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nosotros-hub__intro p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #546e7a;
}

.nosotros-hub-grid {
  display: grid;
  /* minmax(0, 1fr): evita min-size:auto del ítem y desbordes que “corren” el grid a la derecha en móvil */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  min-width: 0;
}

@media (min-width: 900px) {
  .nosotros-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.nosotros-hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow-wrap: break-word;
  background: linear-gradient(145deg, #ffffff 0%, #f5f8fc 100%);
  padding: 24px 20px;
  border-radius: 16px;
  box-shadow:
    0 4px 16px rgba(7, 61, 162, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  border: 1px solid rgba(7, 61, 162, 0.1);
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.nosotros-hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(7, 61, 162, 0.14);
  border-color: rgba(7, 61, 162, 0.2);
}

.nosotros-hub-card:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.nosotros-hub-card__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 10px;
  display: block;
}

.nosotros-hub-card h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #0d47a1;
  line-height: 1.25;
}

.nosotros-hub-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #546e7a;
}

body.page-nosotros main.intro-section {
  max-width: none;
  width: 100%;
  min-width: 0;
  margin-top: 32px;
  margin-bottom: 48px;
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  body.page-nosotros main.intro-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nosotros-hub {
    padding-left: 0;
    padding-right: 0;
  }

  .nosotros-hub-grid {
    gap: 12px;
  }

  .nosotros-hub-card {
    padding: 18px 14px;
  }
}

/* === SECCIÓN DE CARDS === */
.cards-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Valores (flip): permite desbordes del efecto 3D */
.intro-section .cards-section {
  padding: 40px 20px;
  margin: 40px auto;
  overflow: visible;
}

.cards-container {
  gap: 30px;
  margin-bottom: 40px;
  align-items: stretch;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Inicio: filas incompletas centradas (flex); Valores sigue en grid */
.cards-container:not(.valores-container) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.cards-section .cards-container:not(.valores-container) > .service-card-slot {
  flex: 0 0 calc((100% - 60px) / 3);
  width: calc((100% - 60px) / 3);
  max-width: calc((100% - 60px) / 3);
  box-sizing: border-box;
}

/* Tarjetas de servicios (solo contenedor principal del inicio) */
.cards-section .cards-container > .service-card-slot {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.cards-section .cards-container > .service-card-slot > .card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(7, 61, 162, 0.08);
  box-shadow:
    0 4px 6px rgba(7, 61, 162, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.cards-section .cards-container > .service-card-slot > .card:hover,
.cards-section .cards-container > .service-card-slot > .card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(7, 61, 162, 0.2);
  box-shadow:
    0 12px 28px rgba(7, 61, 162, 0.12),
    0 20px 48px rgba(0, 0, 0, 0.1);
}

.cards-section .cards-container > .service-card-slot > .card:focus-visible {
  outline: none;
}

.cards-section .cards-container > .service-card-slot > .card:active {
  transform: translateY(-2px);
  transition-duration: 0.15s;
}

.cards-section .cards-container > .service-card-slot > .card > .card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 200px;
  max-height: 280px;
  overflow: hidden;
  background: #e8ecf1;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.cards-section .cards-container > .service-card-slot > .card > .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.cards-section .cards-container > .service-card-slot > .card:hover .card-image img,
.cards-section .cards-container > .service-card-slot > .card:focus-visible .card-image img {
  transform: scale(1.03);
}

.cards-section .cards-container > .service-card-slot > .card > .card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 61, 162, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.cards-section .cards-container > .service-card-slot > .card:hover .card-image::after,
.cards-section .cards-container > .service-card-slot > .card:focus-visible .card-image::after {
  opacity: 1;
}

.cards-section .cards-container > .service-card-slot > .card > .card-info {
  padding: 18px 20px 22px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
  overflow-x: hidden;
  overflow-y: visible;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.cards-section .cards-container > .service-card-slot > .card > .card-info h3 {
  margin: 0 0 10px 0;
  color: #073da2;
  font-size: clamp(16px, 2.8vw, 20px);
  font-weight: bold;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.cards-section .cards-container > .service-card-slot > .card > .card-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  .topmenu li.has-submenu .submenu.show > li {
    animation: none !important;
  }

  .cards-section .cards-container > .service-card-slot > .card,
  .cards-section .cards-container > .service-card-slot > .card > .card-image img,
  .cards-section .cards-container > .service-card-slot > .card > .card-image::after {
    transition: none !important;
  }

  .cards-section .cards-container > .service-card-slot > .card:hover,
  .cards-section .cards-container > .service-card-slot > .card:focus-visible,
  .cards-section .cards-container > .service-card-slot > .card:active {
    transform: none;
  }
}

/* === CARDS DE VALORES (FLIP CARDS) === */
.valores-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 80px;
  overflow: visible;
}

.valor-card {
  perspective: 1000px;
  height: 420px;
  cursor: pointer;
  margin: 10px;
  will-change: transform;
  transform: translateZ(0);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-style: preserve-3d;
  will-change: transform;
  transform: translateZ(0);
}

.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 25px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1),
              0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              border 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  will-change: transform, box-shadow;
  transform: translateZ(0);
}

.card-front::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(34, 139, 34, 0.3) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  transition: opacity 0.4s ease;
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  overflow: hidden;
}

.valor-icon {
  font-size: 56px;
  margin-bottom: 15px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  will-change: transform;
  transform: translateZ(0);
}

.card-front h3 {
  color: #073da2;
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 12px 0;
  flex-shrink: 0;
}

.card-back h3 {
  color: #06863d;
  font-size: 22px;
  font-weight: bold;
  margin: 0 0 15px 0;
  width: 100%;
  flex-shrink: 0;
}

.card-front p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
}

.valor-details {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  justify-content: flex-start;
}

.valor-details p {
  color: #444;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.valor-details ul {
  color: #444;
  font-size: 13px;
  line-height: 1.4;
  padding-left: 18px;
  margin: 0;
  flex: 1;
  overflow: visible;
  list-style-position: outside;
}

.valor-details ul li {
  margin-bottom: 5px;
}

/* Efectos hover para las cards de valores */
.valor-card:hover .card-inner:not(.flipped) .card-front {
  animation: gentleShakeWithScale 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  box-shadow: 0 12px 40px rgba(34, 139, 34, 0.6),
              0 0 80px rgba(34, 139, 34, 0.4),
              0 8px 25px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(34, 139, 34, 0.8);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 255, 240, 0.95) 100%);
  will-change: transform, box-shadow;
}

.valor-card:hover .card-inner:not(.flipped) .valor-icon {
  transform: scale(1.1) rotate(5deg) translateZ(0);
}

/* Animación de vibración suave combinada con scale - optimizada para 60fps */
@keyframes gentleShakeWithScale {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1.05);
  }
  25% {
    transform: translate3d(-2px, 1px, 0) scale(1.05);
  }
  50% {
    transform: translate3d(2px, -1px, 0) scale(1.05);
  }
  75% {
    transform: translate3d(-1px, 1px, 0) scale(1.05);
  }
}

/* Efecto de brillo verde al hover */
.valor-card:hover .card-inner:not(.flipped) .card-front::before {
  opacity: 1;
  animation: glowPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  will-change: transform, opacity;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate3d(0, 0, 0) scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: translate3d(0, 0, 0) scale(1.2);
  }
}

.valor-card .card-front > * {
  position: relative;
  z-index: 1;
}

/* Responsive para cards de valores */
@media (max-width: 1024px) {
  .valores-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 60px;
  }
  
  .valor-card {
    height: 400px;
    margin: 8px;
  }
}

@media (max-width: 768px) {
  .cards-section {
    padding: 30px 15px;
  }
  
  .valores-container {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 50px 20px;
  }
  
  .valor-card {
    height: 380px;
    margin: 5px;
  }
  
  .card-front,
  .card-back {
    padding: 20px;
  }
  
  .valor-icon {
    font-size: 48px;
    margin-bottom: 12px;
  }
  
  .card-front h3,
  .card-back h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }
  
  .card-front p {
    font-size: 13px;
  }
  
  .valor-details p {
    font-size: 13px;
    margin-bottom: 10px;
  }
  
  .valor-details ul {
    font-size: 12px;
    line-height: 1.5;
  }
  
  .valor-details ul li {
    margin-bottom: 5px;
  }
}

/* === ESTILOS PARA MISIÓN Y VISIÓN === */
.mission-vision-title {
  text-align: center;
  color: #073da2;
  font-size: 36px;
  margin-bottom: 20px;
  font-weight: bold;
}

.mission-vision-intro {
  text-align: center;
  font-size: 18px;
  color: #666;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.mission-vision-card {
  margin-bottom: 50px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
  padding: 50px;
}

.mission-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 50%, #e6f3ff 100%);
  border-top: 6px solid #073da2;
}

.mission-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(7, 61, 162, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.vision-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fff0 50%, #e8f5e9 100%);
  border-top: 6px solid #06863d;
}

.vision-card::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(6, 134, 61, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.mission-vision-content {
  position: relative;
  z-index: 1;
  text-align: left;
  max-width: 100%;
}

.mission-vision-heading {
  color: #073da2;
  font-size: 32px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: bold;
}

.vision-heading {
  color: #06863d;
}

.mission-vision-icon {
  font-size: 48px;
  line-height: 1;
  display: inline-block;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  filter: none;
  -webkit-filter: none;
}

.vision-heading .mission-vision-icon {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  filter: none;
  -webkit-filter: none;
}

.mission-vision-text {
  color: #333;
  font-size: 18px;
  line-height: 1.9;
  margin-bottom: 30px;
  font-weight: 500;
  text-align: left;
}

.mission-vision-details {
  background: rgba(255, 255, 255, 0.8);
  padding: 30px;
  border-radius: 12px;
  margin-top: 30px;
  border-left: 4px solid #073da2;
  text-align: left;
}

.vision-details {
  border-left-color: #06863d;
}

.mission-vision-subtitle {
  color: #073da2;
  font-size: 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.vision-subtitle {
  color: #06863d;
}

.mission-vision-subtitle span {
  font-size: 24px;
}

.mission-vision-list {
  color: #555;
  font-size: 16px;
  line-height: 1.9;
  margin: 0;
  padding-left: 25px;
  text-align: left;
  list-style-position: outside;
}

.mission-vision-list li {
  margin-bottom: 12px;
  padding-left: 5px;
}

.mission-vision-list li::marker {
  color: #073da2;
}

.vision-details .mission-vision-list li::marker {
  color: #06863d;
}

/* Responsive para Misión y Visión */
@media (max-width: 768px) {
  .mission-vision-card {
    padding: 30px 20px;
  }
  
  .mission-vision-heading {
    font-size: 26px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .mission-vision-icon {
    font-size: 40px;
  }
  
  .mission-vision-text {
    font-size: 16px;
    line-height: 1.7;
  }
  
  .mission-vision-details {
    padding: 20px;
  }
  
  .mission-vision-subtitle {
    font-size: 20px;
  }
  
  .mission-vision-list {
    font-size: 15px;
    line-height: 1.7;
    padding-left: 20px;
  }
  
  .mission-vision-list li {
    margin-bottom: 10px;
  }
}

/* === ESTILOS ELEGANTES PARA SUBPÁGINAS === */
.intro-section {
  position: relative;
  overflow: visible;
}

.intro-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(7, 61, 162, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.intro-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 134, 61, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.intro-text {
  position: relative;
  z-index: 1;
}

/* Cards elegantes para subpáginas */
.subpage-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 45px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12),
              0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 35px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 5px solid;
}

.subpage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 50%,
    rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

.subpage-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.subpage-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
              0 4px 12px rgba(0, 0, 0, 0.1);
}

.subpage-card:hover::after {
  opacity: 1;
}

.subpage-card > * {
  position: relative;
  z-index: 1;
}

/* Decoración de esquina para cards */
.subpage-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    transparent 100%);
  border-radius: 0 20px 0 100%;
  pointer-events: none;
  z-index: 0;
}

/* Títulos elegantes para subpáginas */
.subpage-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #073da2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.subpage-title-icon {
  font-size: 42px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Subtítulos elegantes */
.subpage-subtitle {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, currentColor 0%, transparent 100%) 1;
}

.subpage-subtitle-icon {
  font-size: 32px;
  display: inline-block;
}

/* Patrón decorativo de fondo */
.subpage-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.03;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(7, 61, 162, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(6, 134, 61, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(233, 30, 99, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  border-radius: 20px;
}

/* Líneas decorativas */
.decorative-line {
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    currentColor 20%, 
    currentColor 80%, 
    transparent 100%);
  margin: 25px 0;
  opacity: 0.3;
  border-radius: 2px;
}

/* Badges decorativos */
.subpage-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin: 5px;
  transition: all 0.3s ease;
}

.subpage-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Iconos decorativos flotantes */
.floating-icon {
  position: absolute;
  font-size: 60px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  animation: floatIcon 6s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -20px) rotate(5deg);
  }
  50% {
    transform: translate(-15px, -30px) rotate(-5deg);
  }
  75% {
    transform: translate(15px, -10px) rotate(3deg);
  }
}

/* Efecto de brillo en hover para cards */
.subpage-card:hover {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(248, 249, 250, 0.95) 100%);
}

/* Listas elegantes */
.subpage-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subpage-list li {
  padding: 12px 0 12px 35px;
  position: relative;
  color: #444;
  font-size: 16px;
  line-height: 1.8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.subpage-list li:last-child {
  border-bottom: none;
}

.subpage-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #06863d 0%, #0ab85a 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(6, 134, 61, 0.3);
}

.subpage-list li:hover {
  padding-left: 40px;
  color: #073da2;
}

/* Cajas de información destacadas */
.subpage-highlight {
  background: linear-gradient(135deg, 
    rgba(255, 245, 245, 0.8) 0%, 
    rgba(255, 235, 235, 0.6) 100%);
  padding: 30px;
  border-radius: 16px;
  border-left: 5px solid #e91e63;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.15);
  margin: 25px 0;
  position: relative;
  overflow: hidden;
}

.subpage-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233, 30, 99, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.subpage-highlight > * {
  position: relative;
  z-index: 1;
}

/* Responsive para subpáginas */
@media (max-width: 768px) {
  .subpage-card {
    padding: 30px 20px;
  }
  
  .subpage-title {
    font-size: 28px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .subpage-title-icon {
    font-size: 36px;
  }
  
  .subpage-subtitle {
    font-size: 22px;
  }
  
  .subpage-subtitle-icon {
    font-size: 28px;
  }
  
  .floating-icon {
    font-size: 40px;
  }
}

/* === CONTENEDORES DE LINKS (ESTILO CARD) === */
.link-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1),
              0 2px 6px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
  position: relative;
  text-decoration: none;
  overflow: hidden;
  border: 2px solid transparent;
}

.link-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(144, 238, 144, 0.5),
              0 0 60px rgba(144, 238, 144, 0.3),
              0 8px 25px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(144, 238, 144, 0.6);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 255, 240, 0.9) 100%);
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(144, 238, 144, 0.4), transparent);
  z-index: 1;
  pointer-events: none;
  border-radius: 12px;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
}

.link-card:hover::before {
  opacity: 1;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.link-card h3,
.link-card p {
  position: relative;
  z-index: 2;
  transition: color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.link-card:active {
  transform: translateY(-4px) scale(1.01);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Estilos para tarjetas de compromiso en misión y visión */
.commitment-card {
  cursor: default;
}

.commitment-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 25px rgba(144, 238, 144, 0.3),
              0 0 40px rgba(144, 238, 144, 0.2),
              0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(144, 238, 144, 0.5);
}

.commitment-card:hover > div:first-child {
  transform: scale(1.2) rotate(5deg);
}

/* Responsive para misión y visión */
@media (max-width: 768px) {
  .commitment-card {
    padding: 20px !important;
  }
}

/* === MODAL PARA CARD EXPANDIDA === */
.card-modal {
  display: none;
  position: fixed;
  z-index: var(--clinic-overlay-z);
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow-y: auto;
  overflow-x: hidden;
  animation: fadeIn 0.3s ease;
  isolation: isolate;
}

.card-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  margin: auto;
  padding: 0;
  border-radius: 12px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  animation: slideUp 0.3s ease;
  box-sizing: border-box;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 5;
  line-height: 1;
  transition: color 0.3s ease, transform 0.2s ease;
  background: none;
  border: none;
  padding: 4px 10px;
  font-family: inherit;
}

.close-modal:hover {
  color: #000;
}

.close-modal:focus-visible {
  outline: 3px solid #073da2;
  outline-offset: 2px;
  color: #073da2;
}

.close-modal:active {
  transform: scale(0.92);
}

.modal-image {
  width: 100%;
  max-height: min(85vh, 720px);
  overflow: hidden;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: inset 0 0 30px rgba(76, 175, 80, 0.1);
  box-sizing: border-box;
}

/* Carrusel dentro del modal (p. ej. baropodometría): folletos completos, sin recorte tipo “cover” */
/* Tamaño visual ~60% del diseño anterior (reducción ~40%); prioridad: contain + sin overflow que recorte */
.slider.modal-card-slider {
  height: min(35vh, 312px) !important;
  max-height: 340px !important;
  overflow: visible !important;
}

.modal-card-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  height: min(35vh, 312px);
  max-height: 340px;
  overflow: visible;
}

.modal-card-slider .slideItem {
  background: linear-gradient(135deg, #e8f5e9 0%, #dcedc8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: visible;
}

/* Anula .slides global (cover + 100% alto) dentro del carrusel del modal */
.modal-card-slider img.slides {
  position: relative;
  width: auto !important;
  height: auto !important;
  max-width: 60% !important;
  max-height: min(31vh, 288px) !important;
  object-fit: contain !important;
  object-position: center center;
  background: transparent;
  margin: auto;
  cursor: zoom-in;
}

/* Página propia baropodometría: carrusel más grande para lectura (sin recortes) */
.baropodometria-page-slider.modal-card-slider {
  margin: 0 auto 28px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  height: min(62vh, 560px) !important;
  max-height: 600px !important;
  overflow: hidden !important;
}

.baropodometria-page-slider .servicios-panorama-img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(56vh, 520px) !important;
  object-fit: contain !important;
  display: block;
  margin-left: auto;
  margin-right: auto;
  cursor: zoom-in;
}

.baropodometria-page-slider .slideItem {
  overflow: hidden;
}

.page-servicios .servicios-panorama-wrap {
  max-width: 576px;
  margin: 0 auto 28px;
  padding: 0 12px;
}

.page-servicios .servicios-panorama-img {
  width: 100%;
  max-width: 512px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Hemodiálisis: imagen / folleto visual al 50 % del ancho anterior (720px → 360px) */
.page-hemodialisis .servicios-panorama-wrap--hemodialisis {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.page-hemodialisis .servicios-panorama-wrap--hemodialisis .servicios-panorama-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Traumatología (ortopedia.html): folleto ~40% más pequeño para mejor proporción */
.page-traumatologia .servicios-panorama-wrap {
  max-width: 360px; /* aprox. 60% de 576px */
  margin-left: auto;
  margin-right: auto;
}

.page-traumatologia .servicios-panorama-wrap .servicios-panorama-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Folletos (imágenes panorámicas): ampliar con folleto-lightbox.js */
.servicios-panorama-wrap .servicios-panorama-img {
  cursor: zoom-in;
}

.servicios-panorama-wrap .servicios-panorama-img:focus-visible {
  outline: 3px solid #073da2;
  outline-offset: 3px;
}

.folleto-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--clinic-overlay-z);
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.folleto-lightbox.folleto-lightbox--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.folleto-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 18, 48, 0.82);
  cursor: pointer;
}

.folleto-lightbox__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.folleto-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.folleto-lightbox__close:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

.folleto-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1100px);
  max-height: 92vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.folleto-lightbox__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
}

/* Bloque título + texto + rejilla de servicios, centrado en la página */
.page-servicios .servicios-oferta-bloque {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}

/* Enlaces tipo card: flex + wrap para centrar filas incompletas (p. ej. baropodometría sola) */
.page-servicios .servicios-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto 32px;
  justify-content: center;
  text-align: left;
}

.page-servicios .servicios-link-grid .link-card {
  flex: 1 1 240px;
  max-width: min(100%, 280px);
  min-width: 0;
  box-sizing: border-box;
}

.modal-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-info {
  padding: 30px;
  overflow-x: hidden;
  word-wrap: break-word;
  box-sizing: border-box;
}

.modal-info h2 {
  margin: 0 0 15px 0;
  color: #073da2;
  font-size: 28px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-style: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Asegurar que todos los elementos dentro del modal no causen overflow horizontal */
.modal-info * {
  max-width: 100%;
  box-sizing: border-box;
}

.modal-info ul,
.modal-info ol {
  padding-left: 20px;
  word-wrap: break-word;
}

.modal-info a {
  word-wrap: break-word;
  display: inline-block;
  max-width: 100%;
}

/* Grid dentro del modal responsive */
.modal-info div[style*="grid"] {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 20px !important;
}

@media (min-width: 600px) {
  .modal-info div[style*="grid"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

.modal-info p {
  margin: 0;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}

.modal-info h3 {
  margin: 20px 0 10px 0;
  color: #073da2;
  font-size: 22px;
}

.modal-info h4 {
  margin: 15px 0 8px 0;
  color: #333;
  font-size: 18px;
}

.modal-info ul {
  margin: 10px 0;
  padding-left: 20px;
}

.modal-info li {
  margin: 5px 0;
  color: #444;
  font-size: 16px;
  line-height: 1.8;
}

.modal-info a {
  color: #073da2;
  text-decoration: none;
  transition: color 0.3s ease;
}

.modal-info a:hover {
  color: #052d7a;
  text-decoration: underline;
}

.modal-info div {
  margin: 15px 0;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animaciones de aparición */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Clases para animaciones de aparición basadas en scroll */
.scroll-animate {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.fade-in-up {
  transform: translateY(30px);
}

.scroll-animate.fade-in-left {
  transform: translateX(-30px);
}

.scroll-animate.fade-in-right {
  transform: translateX(30px);
}

.scroll-animate.fade-in-scale {
  transform: scale(0.9);
}

.scroll-animate.animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Responsive para cards */
@media (max-width: 992px) {
  .cards-container.valores-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot {
    flex: 0 0 calc((100% - 20px) / 2);
    width: calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }

  .cards-container:not(.valores-container) {
    gap: 20px;
  }

  /* Inicio — grid 2 cols: misma altura visual; imagen fija; texto con ellipsis */
  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card {
    min-height: 300px;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card > .card-image {
    height: 120px;
    min-height: 120px;
    max-height: 120px;
    aspect-ratio: unset;
    flex-shrink: 0;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card > .card-info {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 14px 14px 16px;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card > .card-info h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 8px;
    line-height: 1.28;
    word-break: break-word;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card > .card-info p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
  }
}

/* === PIE DE PÁGINA === */
.site-footer {
  background: linear-gradient(135deg, #0a4db8 0%, #073da2 50%, #052d7a 100%);
  color: white;
  padding: 30px 20px;
  margin-top: 0;
  box-shadow: 0 -4px 12px rgba(7, 61, 162, 0.3);
}

/* Teléfono (legacy) */
.footer-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: bold;
}

.phone-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.phone-icon-svg {
  width: 24px;
  height: 24px;
  color: white;
  vertical-align: middle;
}

.phone-number {
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

/* Redes sociales (legacy) */
.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex: 1;
}

/* Sección de datos legales del footer */
.footer-legal {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  margin-top: 20px;
}

.footer-legal-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #d4ff4d;
  text-decoration: underline;
}

.footer-links .separator {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 5px;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.6;
}

.footer-copyright p {
  margin: 5px 0;
}

.footer-update {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

#last-update {
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
}

.footer-visits {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-top: 5px;
}

#visit-counter {
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  background-color: rgba(255, 255, 255, 0.2);
}

.social-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Sección de datos legales del footer */
.footer-legal {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  margin-top: 20px;
}

.footer-legal-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #d4ff4d;
  text-decoration: underline;
}

.footer-links .separator {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 5px;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.6;
}

.footer-copyright p {
  margin: 5px 0;
}

.footer-update {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

#last-update {
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
}

/* Colores específicos para cada red social al hacer hover */
.social-icon[aria-label*="X"]:hover {
  background-color: #000000;
  color: white;
}

.social-icon[aria-label*="YouTube"]:hover {
  background-color: #FF0000;
  color: white;
}

.social-icon[aria-label*="Facebook"]:hover {
  background-color: #1877F2;
  color: white;
}

.social-icon[aria-label*="Instagram"]:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
}

@media (max-width: 768px) {
  .cards-container.valores-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Inicio: dos columnas en móvil (como Instalaciones), legibles y compactas */
  .cards-section .cards-container:not(.valores-container) > .service-card-slot {
    flex: 0 0 calc((100% - 12px) / 2);
    width: calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
  }

  .cards-section .cards-container:not(.valores-container) {
    gap: 12px;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card {
    min-height: 282px;
  }

  .cards-section .cards-container:not(.valores-container) > .service-card-slot > .card > .card-image {
    height: 108px;
    min-height: 108px;
    max-height: 108px;
  }

  .cards-section .cards-container > .service-card-slot > .card > .card-info {
    padding: 12px 10px 12px;
  }

  .cards-section .cards-container > .service-card-slot > .card > .card-info h3 {
    font-size: 0.92rem;
  }

  .cards-section .cards-container > .service-card-slot > .card > .card-info p {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .link-card {
    padding: 20px;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .modal-image {
    max-height: 300px;
  }
  
  .modal-image img {
    max-height: 300px;
  }

  /* Carrusel de folletos (Baropodometría): no recortar el bloque superior en móvil */
  .modal-image:has(#modalSliderWrap:not([hidden])) {
    max-height: min(78vh, 620px);
    overflow: visible !important;
  }

  .modal-image:has(#modalSliderWrap:not([hidden])) img.slides {
    max-height: min(31vh, 288px) !important;
  }

  /* Topbar responsive */
  .topbar {
    padding: 8px 0;
  }

  .topbar > .topmenu {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 10px;
  }

  .topbar .topmenu > li > a {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Footer responsive */
  .footer-phone {
    justify-content: center;
    width: 100%;
  }

  .footer-social {
    width: 100%;
    justify-content: center;
  }

  .footer-legal {
    padding: 15px 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }

  .footer-links .separator {
    display: none;
  }

  .footer-copyright {
    font-size: 12px;
  }
}

/* === FORMULARIOS DE AUTENTICACIÓN === */
.auth-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 0 20px;
}

.auth-box {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.auth-box h1 {
  color: #073da2;
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.form-group label {
  color: #333;
  font-weight: bold;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  font-family: Arial, Helvetica, sans-serif;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: #073da2;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.forgot-password {
  color: #073da2;
  text-decoration: none;
  font-size: 14px;
  font-weight: normal;
  margin-left: auto;
}

.forgot-password:hover {
  text-decoration: underline;
}

.btn-submit {
  background-color: #073da2;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-submit:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(7, 61, 162, 0.3);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.auth-footer p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

.auth-footer a {
  color: #073da2;
  text-decoration: none;
  font-weight: bold;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .auth-container {
    margin: 40px auto;
    padding: 0 15px;
  }

  .auth-box {
    padding: 30px 20px;
  }

  .auth-box h1 {
    font-size: 28px;
  }

  .form-group {
    gap: 6px;
  }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"],
  .form-group input[type="password"] {
    padding: 10px;
    font-size: 14px;
  }
}

/* === SECCIÓN DE CONTACTO === */
.contact-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.contact-section--page {
  max-width: none;
  margin: 0;
  padding: 48px 20px 56px;
  background: linear-gradient(180deg, #e8f2fc 0%, #f7fafc 42%, #eef5f1 100%);
}

.contact-section--page .contact-container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-page-header {
  max-width: 680px;
  margin: 0 auto 40px;
  padding: 0 8px;
  text-align: center;
}

.contact-page-header h1 {
  background: linear-gradient(135deg, #0a3c8a 0%, #073da2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.contact-page-header p {
  color: #4a5568;
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0;
}

.contact-card-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #073da2;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(7, 61, 162, 0.12);
  letter-spacing: 0.02em;
}

.contact-card-heading--center {
  text-align: center;
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.info-item--card {
  margin-bottom: 0;
  min-height: 148px;
  align-content: flex-start;
}

.info-item--schedule {
  margin-bottom: 0;
  border-left: 4px solid #073da2;
  background: linear-gradient(90deg, rgba(7, 61, 162, 0.07) 0%, #ffffff 14%);
}

.schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.schedule-list li {
  margin-bottom: 8px;
}

.schedule-list li:last-child {
  margin-bottom: 0;
}

.schedule-list strong {
  color: #073da2;
  font-weight: 700;
}

.info-phone-line {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
}

.info-item-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #073da2;
  font-weight: 600;
}

.contact-location-lead {
  text-align: center;
  color: #5a6570;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 520px;
}

.contact-location-row {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 22px;
}

.contact-calendar-anchor {
  justify-self: center;
  width: 100%;
  max-width: 320px;
}

.contact-location-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.contact-aside-text {
  margin: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.55;
}

.btn-maps-contact--emphasis {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(7, 61, 162, 0.22);
}

.btn-maps-contact--emphasis:hover {
  box-shadow: 0 6px 18px rgba(7, 61, 162, 0.32);
}

@media (max-width: 640px) {
  .contact-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .contact-location-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-location-aside {
    align-items: center;
  }

  .contact-aside-text {
    max-width: 420px;
  }

  .btn-maps-contact--emphasis {
    align-self: center;
  }
}

.contact-container {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: 36px;
  align-items: start;
}

/* Información de contacto */
.contact-info {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(7, 61, 162, 0.06);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
  padding: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.info-text h3 {
  color: #073da2;
  font-size: 18px;
  margin: 0 0 5px 0;
  font-weight: bold;
}

.info-text p {
  color: #666;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

a.info-item {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.contact-location {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(7, 61, 162, 0.06);
}

.contact-map-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-maps-cta {
  text-align: center;
  margin-top: 30px;
}

.btn-maps-contact {
  display: inline-block;
  padding: 12px 24px;
  background-color: #073da2;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-maps-contact:hover {
  background-color: #052d7a;
  color: white;
}

/* Formulario de contacto */
.contact-form-container {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-form h2 {
  background: linear-gradient(135deg, #0a3c8a 0%, #073da2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 28px;
  margin-bottom: 30px;
  text-align: center;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form label {
  color: #333;
  font-weight: bold;
  font-size: 14px;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
  transition: all 0.3s ease;
  background: white;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form input[type="email"]:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #073da2;
  box-shadow: 0 0 0 3px rgba(7, 61, 162, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.checkbox-group {
  margin: 20px 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: normal;
  font-size: 14px;
  color: #666;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label a {
  color: #073da2;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.btn-submit-contact {
  width: 100%;
  background: linear-gradient(135deg, #073da2 0%, #052d7a 100%);
  color: white;
  padding: 16px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 4px 12px rgba(7, 61, 162, 0.3);
  margin-top: 10px;
}

.btn-submit-contact:hover:not(:disabled) {
  background: linear-gradient(135deg, #0a4db8 0%, #073da2 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(7, 61, 162, 0.4);
}

.btn-submit-contact:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit-contact:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.btn-submit-contact:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.form-status-msg {
  margin: 12px 0 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.form-status-msg--error {
  background: #ffebee;
  color: #b71c1c;
  border-color: #ef9a9a;
}

/* Responsive para contacto */
@media (max-width: 992px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contact-section {
    margin: 20px auto;
    padding: 0 15px;
  }

  .contact-section--page {
    padding: 32px 15px 44px;
  }

  .contact-page-header {
    margin-bottom: 28px;
  }

  .contact-info,
  .contact-location {
    padding: 25px 20px;
  }

  .contact-page-header h1 {
    font-size: 1.5rem;
  }

  .contact-card-heading {
    font-size: 1.05rem;
  }

  .contact-page-header p {
    font-size: 0.98rem;
  }

  .info-item {
    padding: 12px;
  }

  .info-icon {
    font-size: 24px;
  }
}

/* Estilos para la Galería de Imágenes */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-section {
  margin-bottom: 50px;
}

.gallery-section h3 {
  font-size: 28px;
  margin-bottom: 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox Modal (galería Instalaciones, etc.) */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: var(--clinic-overlay-z);
  isolation: isolate;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.lightbox-modal.show,
.lightbox-modal[style*="flex"] {
  display: flex;
}

.lightbox-modal.fade-in {
  animation: fadeIn 0.3s ease;
}

.lightbox-modal.fade-out {
  animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  z-index: 6;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 134, 61, 0.9) 0%, rgba(46, 125, 50, 0.9) 100%);
  border: 2px solid rgba(76, 175, 80, 0.5);
  box-shadow: 0 4px 12px rgba(6, 134, 61, 0.5);
}

.lightbox-close:hover {
  background: linear-gradient(135deg, rgba(6, 134, 61, 1) 0%, rgba(46, 125, 50, 1) 100%);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(6, 134, 61, 0.7);
  border-color: rgba(76, 175, 80, 0.8);
}

.lightbox-image-wrapper {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 50px;
  overflow: hidden;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

/* Animaciones de deslizamiento */
.lightbox-image-wrapper.slide-out-left {
  animation: slideOutLeft 0.3s ease;
}

.lightbox-image-wrapper.slide-out-right {
  animation: slideOutRight 0.3s ease;
}

.lightbox-image-wrapper.slide-in-right {
  animation: slideInRight 0.3s ease;
}

.lightbox-image-wrapper.slide-in-left {
  animation: slideInLeft 0.3s ease;
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.lightbox-title-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  text-align: center;
}

.lightbox-title {
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, rgba(6, 134, 61, 0.9) 0%, rgba(46, 125, 50, 0.9) 100%);
  padding: 10px 25px;
  border-radius: 8px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 12px rgba(6, 134, 61, 0.4);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(6, 134, 61, 0.95) 0%, rgba(46, 125, 50, 0.95) 100%);
  color: white;
  border: 2px solid rgba(76, 175, 80, 0.5);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(6, 134, 61, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 0;
}

.lightbox-nav-btn svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.lightbox-nav-btn:hover {
  background: linear-gradient(135deg, rgba(6, 134, 61, 1) 0%, rgba(46, 125, 50, 1) 100%);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 8px 24px rgba(6, 134, 61, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(76, 175, 80, 0.8);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 2px 8px rgba(6, 134, 61, 0.6);
}

.lightbox-nav-left {
  left: 30px;
}

.lightbox-nav-right {
  right: 30px;
}

.lightbox-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  z-index: 4;
  background: linear-gradient(135deg, rgba(6, 134, 61, 0.9) 0%, rgba(46, 125, 50, 0.9) 100%);
  padding: 10px 24px;
  border-radius: 25px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 12px rgba(6, 134, 61, 0.4);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.lightbox-indicators span {
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive para la galería */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
  }

  .gallery-item img {
    height: 200px;
  }

  .gallery-section h3 {
    font-size: 24px;
  }

  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 40px;
    width: 40px;
    height: 40px;
  }

  .lightbox-image-wrapper {
    width: 95%;
    max-height: 75%;
    margin-top: 60px;
  }

  .lightbox-content {
    max-width: 100%;
    max-height: 100%;
  }

  .lightbox-title {
    font-size: 20px;
    padding: 8px 15px;
  }

  .lightbox-title-container {
    top: 10px;
  }

  .lightbox-nav-btn {
    width: 45px;
    height: 45px;
    font-size: 24px;
  }

  .lightbox-nav-left {
    left: 15px;
  }

  .lightbox-nav-right {
    right: 15px;
  }

  .lightbox-indicators {
    bottom: 20px;
    font-size: 16px;
    padding: 6px 15px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-item img {
    height: 220px;
  }

  .link-card {
    padding: 18px;
  }

  .link-card h3 {
    font-size: 18px;
  }

  .link-card p {
    font-size: 13px;
  }

  .lightbox-title {
    font-size: 16px;
    padding: 6px 12px;
  }

  .lightbox-image-wrapper {
    width: 95%;
    max-height: 70%;
    margin-top: 50px;
  }

  .lightbox-content {
    max-width: 100%;
    max-height: 100%;
  }

  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .lightbox-nav-left {
    left: 10px;
  }

  .lightbox-nav-right {
    right: 10px;
  }

  .lightbox-indicators {
    bottom: 15px;
    font-size: 14px;
    padding: 5px 12px;
  }
}

/* === Partículas estacionales (flores, hojas, pétalos) — muy sutiles === */
.season-particle {
  /* Pico de opacidad en la animación (keyframes usan este valor; en móvil se baja) */
  --season-opacity-peak: 1;
  position: fixed;
  top: -8vh;
  left: 0;
  pointer-events: none;
  user-select: none;
  z-index: var(--season-particles-z);
  will-change: transform;
  filter: drop-shadow(0 1px 2px rgba(6, 134, 61, 0.2));
}

@media (max-width: 900px) {
  .season-particle {
    --season-opacity-peak: 0.38;
  }
}

.season-particle--flower {
  animation-name: season-flower-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.season-particle--leaf {
  animation-name: season-leaf-fall;
  /* linear evita “paradas” entre keyframes (ease-in-out frenaba en cada tramo) */
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.season-particle--petal {
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  opacity: calc(var(--season-opacity-peak) * 0.4);
  animation-name: season-petal-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  box-sizing: border-box;
}

/* Variantes de pétalo (forma común; color y matiz) */
.season-particle--petal-v0 {
  background: linear-gradient(135deg, #fce4ec 0%, #f48fb1 45%, #e91e63 100%);
}

.season-particle--petal-v1 {
  width: 9px;
  height: 13px;
  border-radius: 50% 40% 50% 0;
  background: linear-gradient(160deg, #fff8fb 0%, #ffc1e3 50%, #f06292 100%);
}

.season-particle--petal-v2 {
  width: 11px;
  height: 12px;
  border-radius: 45% 55% 45% 0;
  background: linear-gradient(125deg, #ffebee 0%, #ffab91 55%, #e57373 100%);
}

.season-particle--petal-v3 {
  width: 8px;
  height: 15px;
  border-radius: 55% 45% 55% 0;
  background: linear-gradient(140deg, #f3e5f5 0%, #ce93d8 50%, #ab47bc 100%);
}

.season-particle--petal-v4 {
  width: 10px;
  height: 13px;
  border-radius: 48% 52% 48% 0;
  background: linear-gradient(145deg, #fff3e0 0%, #ffcc80 45%, #fb8c00 85%);
}

.season-particle--petal-v5 {
  width: 9px;
  height: 14px;
  border-radius: 52% 48% 52% 0;
  background: linear-gradient(130deg, #e8f5e9 0%, #a5d6a7 40%, #66bb6a 100%);
}

@keyframes season-flower-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  6% {
    opacity: var(--season-opacity-peak);
  }
  28% {
    opacity: calc(var(--season-opacity-peak) * 0.92);
  }
  52% {
    opacity: calc(var(--season-opacity-peak) * 0.74);
  }
  74% {
    opacity: calc(var(--season-opacity-peak) * 0.5);
  }
  90% {
    opacity: calc(var(--season-opacity-peak) * 0.26);
  }
  100% {
    transform: translateY(110vh) translateX(var(--season-drift, 20px))
      rotate(calc(360deg * var(--season-rot, 1)));
    opacity: 0;
  }
}

/* Caída con deriva horizontal de izquierda → derecha (--season-h-end en px) */
@keyframes season-leaf-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(-16deg);
    opacity: 0;
  }
  5% {
    opacity: var(--season-opacity-peak);
  }
  22% {
    transform: translateY(22vh) translateX(calc(var(--season-h-end) * 0.22 + 4px)) rotate(10deg);
    opacity: calc(var(--season-opacity-peak) * 0.94);
  }
  45% {
    transform: translateY(45vh) translateX(calc(var(--season-h-end) * 0.46 - 3px)) rotate(-12deg);
    opacity: calc(var(--season-opacity-peak) * 0.8);
  }
  68% {
    transform: translateY(68vh) translateX(calc(var(--season-h-end) * 0.7 + 5px)) rotate(8deg);
    opacity: calc(var(--season-opacity-peak) * 0.58);
  }
  86% {
    opacity: calc(var(--season-opacity-peak) * 0.3);
  }
  100% {
    transform: translateY(110vh) translateX(var(--season-h-end)) rotate(-10deg);
    opacity: 0;
  }
}

@keyframes season-petal-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: var(--season-opacity-peak);
  }
  24% {
    transform: translateY(24vh) translateX(calc(var(--petal-h-end) * 0.24 + 3px)) rotate(95deg);
    opacity: calc(var(--season-opacity-peak) * 0.93);
  }
  48% {
    transform: translateY(48vh) translateX(calc(var(--petal-h-end) * 0.48 - 2px)) rotate(185deg);
    opacity: calc(var(--season-opacity-peak) * 0.76);
  }
  72% {
    transform: translateY(72vh) translateX(calc(var(--petal-h-end) * 0.72 + 4px)) rotate(275deg);
    opacity: calc(var(--season-opacity-peak) * 0.52);
  }
  88% {
    opacity: calc(var(--season-opacity-peak) * 0.24);
  }
  100% {
    transform: translateY(110vh) translateX(var(--petal-h-end)) rotate(355deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-particle {
    display: none !important;
  }
}


/* Botones flotantes Facebook + WhatsApp (esquina inferior derecha) */
.floating-social-stack {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.floating-social-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: auto;
}

.floating-social-bubble {
  order: 0;
  max-width: min(240px, calc(100vw - 120px));
  margin: 0;
  padding: 10px 14px;
  background: #fff;
  color: #073da2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
  position: relative;
}

.floating-social-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-left-color: #fff;
}

.floating-social-item--bubble-active .floating-social-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.floating-social-btn {
  order: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.floating-social-btn:hover {
  transform: scale(1.07);
}

.floating-social-btn--facebook {
  background-color: #1877f2;
  animation: floating-social-pulse-fb 2.2s infinite;
}

.floating-social-btn--facebook:hover {
  background-color: #166fe5;
}

.floating-social-btn--whatsapp {
  background-color: #25d366;
  animation: floating-social-pulse-wa 2.2s infinite;
}

.floating-social-btn--whatsapp:hover {
  background-color: #20ba5a;
}

.floating-social-btn svg {
  fill: currentColor;
}

@keyframes floating-social-pulse-fb {
  0% {
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(24, 119, 242, 0.45);
  }
  70% {
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(24, 119, 242, 0);
  }
  100% {
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(24, 119, 242, 0);
  }
}

@keyframes floating-social-pulse-wa {
  0% {
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-social-btn--facebook,
  .floating-social-btn--whatsapp {
    animation: none;
  }

  .floating-social-item .floating-social-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .floating-social-bubble {
    font-size: 12px;
    max-width: min(200px, calc(100vw - 100px));
    padding: 8px 11px;
  }

  .floating-social-btn {
    width: 52px;
    height: 52px;
  }
}

/* === CALENDARIO === */
#current-date-calendar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 100%;
}

.calendar-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 15px;
}

.calendar-day-name {
    font-size: 18px;
    font-weight: bold;
    color: #073da2;
    margin-bottom: 5px;
}

.calendar-date {
    font-size: 48px;
    font-weight: bold;
    color: #073da2;
    line-height: 1;
    margin: 10px 0;
}

.calendar-month-year {
    font-size: 16px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-body {
    margin-top: 15px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    padding: 5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.calendar-day.empty {
    visibility: hidden;
}

.calendar-day.today {
    background-color: #073da2;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(7, 61, 162, 0.3);
}

.calendar-day:not(.empty):not(.today):hover {
    background-color: #f0f0f0;
}

/* Layout del mapa y calendario */
.map-calendar-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 968px) {
    .map-calendar-container {
        grid-template-columns: 1fr;
    }
}

/* Scrollbars ocultos (el scroll sigue funcionando con rueda/teclado/táctil) */
html,
body,
.card-modal,
.modal-content {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE / Edge legacy */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.card-modal::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

*::-webkit-scrollbar-thumb {
  background: transparent !important;
}

/* Listas de subservicios (tomografía, imagenología) */
.clinic-service-dl dt {
  font-weight: 600;
  color: #263238;
  margin-top: 0.65rem;
  font-size: 0.95rem;
}
.clinic-service-dl dd {
  margin: 0.15rem 0 0 0;
  color: #546e7a;
  font-size: 0.88rem;
  line-height: 1.45;
}
.clinic-service-details {
  margin-bottom: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  background: #fafafa;
}
.clinic-service-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #00695c;
  font-size: 1rem;
}
.clinic-service-details[open] summary {
  margin-bottom: 0.35rem;
}

/* Toggle global de animaciones */
.fx-toggle-btn {
  position: static;
  z-index: 2;
  margin-left: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0a4db8 0%, #073da2 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  white-space: nowrap;
}

.fx-toggle-btn:hover {
  filter: brightness(1.05);
}

.fx-off .topbar-season-accent,
.fx-off .season-particle {
  display: none !important;
}

/* Galería de carteles cuadrados de especialidades (inicio / servicios; distinto del slider de fotos) */
.specialty-promo-strip {
  max-width: 1200px;
  margin: 0 auto 8px;
  padding: 24px 16px 12px;
  box-sizing: border-box;
}

.specialty-promo-strip--inner {
  margin-top: 8px;
  margin-bottom: 28px;
  padding-left: 0;
  padding-right: 0;
}

.specialty-promo-strip__head {
  text-align: center;
  margin-bottom: 18px;
}

.specialty-promo-strip__title {
  font-size: clamp(1.28rem, 3.2vw, 1.72rem);
  color: #073da2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.specialty-promo-strip__lead {
  margin: 0 auto;
  max-width: 48rem;
  color: #546e7a;
  font-size: 1rem;
  line-height: 1.55;
}

/* Flex + wrap + centrado: la última fila con menos carteles queda centrada (grid 1fr las dejaba pegadas a la izquierda). */
.specialty-promo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
}

@media (min-width: 600px) {
  .specialty-promo-grid {
    gap: 14px;
  }
}

@media (min-width: 900px) {
  .specialty-promo-grid {
    gap: 16px;
  }
}

.specialty-promo-card {
  display: block;
  flex: 0 0 auto;
  width: 138px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(7, 61, 162, 0.12);
  border: 1px solid rgba(7, 61, 162, 0.08);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  background: #fff;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

@media (min-width: 400px) {
  .specialty-promo-card {
    width: 148px;
  }
}

@media (min-width: 600px) {
  .specialty-promo-card {
    width: 162px;
  }
}

@media (min-width: 900px) {
  .specialty-promo-card {
    width: 176px;
  }
}

@media (min-width: 1100px) {
  .specialty-promo-card {
    width: 188px;
  }
}

.specialty-promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(7, 61, 162, 0.18);
}

.specialty-promo-card:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 3px;
}

.specialty-promo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  vertical-align: middle;
}

.specialty-promo-strip__footer {
  text-align: center;
  margin: 20px 0 0;
}

.specialty-promo-strip__more {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  color: #073da2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.specialty-promo-strip__more:hover {
  color: #0a4db8;
}

/* Idioma desactivado */
.lang-switch {
  display: none !important;
}
