/* ==========================================================================
   CONCESIÓN VÍAS DEL NUS - VINUS S.A.S.
   Styles: Modern, High-Fidelity, Responsive CSS
   ========================================================================== 
   Autor:    Mateo Jaramillo Suarez
   Correo:   teojaramillosuarez@gmail.com
   Teléfono: 3157456196
   */

:root {
  --color-primary: #004785;
  --color-primary-dark: #00305a;
  --color-primary-light: #006ec4;
  --color-secondary: #0079c2;
  --color-emergency: #251234;
  --color-emergency-hover: #331947;
  --color-text-main: #2d3748;
  --color-text-muted: #64748b;
  --color-light-bg: #f8fafc;
  --color-white: #ffffff;
  --color-border: #e2e8f0;
  --color-accent: #f59e0b;
  --color-success: #10b981;
  --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  background-color: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding: 60px 24px;
  min-height: 55vh;
}

/* Aparicion progresiva de contenido al entrar en el viewport. */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.scroll-reveal.reveal-from-left {
  transform: translateX(-42px);
}

.scroll-reveal.reveal-from-right {
  transform: translateX(42px);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal,
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 35px 16px;
  }
}

/* ==========================================================================
   SITE HEADER: NAV SUPERPUESTO AL BANNER
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 1000;
}

/* Cuando la pagina tiene hero, el header se fija y se superpone a la imagen */
body.has-hero .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

/* Altura del header. El valor inicial es aproximado: main.js lo
   reemplaza midiendo el header real, para que el hero siempre pegue
   sin dejar espacio, sin importar los breakpoints. */
:root {
  --header-h: 110px;
}

/* ==========================================================================
   1. TOP BAR (PHONE & EMAIL)
   ========================================================================== */
.top-bar {
  background-color: #ffffff;
  border-bottom: 1px solid #f0f2f5;
  padding: 7px 0;
  font-size: 12.5px;
  color: #3b5998;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.top-bar-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-bar-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: var(--transition);
}

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

.social-facebook {
  background-color: #1877f2;
}

.social-instagram {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-youtube {
  background-color: #ff0000;
}

.social-twitter {
  background-color: #000000;
}

.social-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #3b6b99;
  font-weight: 500;
  transition: var(--transition);
}

.top-bar-item:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.top-bar-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Números de emergencia directos en la barra superior */
.top-bar-emergency-direct {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
  flex-wrap: wrap;
}

.top-bar-emergency-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: clamp(12px, 0.9vw, 13.5px);
  color: #3b6b99;
  letter-spacing: 0.2px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.top-bar-emergency-title:hover {
  color: var(--color-accent);
}

.top-bar-emergency-numbers {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.8vw, 12px);
  flex-wrap: wrap;
}

.top-bar-num-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(14px, 1.1vw, 16.5px);
  color: #00386e;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  line-height: 1.2;
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.top-bar-num-link strong {
  font-weight: 800;
}

.top-bar-num-link:hover {
  color: var(--color-accent);
  background-color: rgba(245, 158, 11, 0.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.top-bar-phone-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.top-bar-sep {
  color: #94a3b8;
  opacity: 0.45;
  font-size: 14px;
  font-weight: 400;
}

/* Estado transparente sobre el hero */
body.has-hero .top-bar-emergency-title {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

body.has-hero .top-bar-num-link {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

body.has-hero .top-bar-num-link:hover {
  color: var(--color-accent);
  background-color: rgba(255, 255, 255, 0.18);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
}

body.has-hero .top-bar-sep {
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Estado al hacer scroll en hero */
body.has-hero .site-header.scrolled .top-bar-emergency-title {
  color: var(--color-primary-dark);
  text-shadow: none;
}

body.has-hero .site-header.scrolled .top-bar-num-link {
  color: #00386e;
  text-shadow: none;
}

body.has-hero .site-header.scrolled .top-bar-num-link:hover {
  color: var(--color-accent);
  background-color: rgba(245, 158, 11, 0.12);
}

body.has-hero .site-header.scrolled .top-bar-sep {
  color: #94a3b8;
  text-shadow: none;
}

/* ==========================================================================
   2. MAIN HEADER & NAVIGATION
   ========================================================================== */
.main-header {
  background-color: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Estado transparente: barra de contactos y nav forman un solo bloque
   continuo sobre la foto: barra de contactos opaca arriba, nav de cristal abajo. */
body.has-hero .top-bar {
  background-color: transparent;
  border-bottom-color: transparent;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Barra de contactos: negro solido, sin translucidez. Es la unica pieza
   opaca del header, y por eso se separa bien del cristal del nav. */
body.has-hero .top-bar .container {
  display: flex;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 9px max(16px, calc((100% - 1380px) / 2));
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  background: rgba(3, 10, 20, 0.62);
  border: none;
  backdrop-filter: blur(22px) saturate(180%) brightness(115%);
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(115%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.10);
}

body.page-home .top-bar .container {
  justify-content: flex-end;
}

body.has-hero .main-header {
  background-color: transparent;
  box-shadow: none;
  border-bottom: none;
  position: relative;
  top: auto;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Nav: panel de cristal. El tinte es mas claro y saturado que la barra de
   contactos para que se lea como vidrio, con un brillo superior que marca
   el canto y da sensacion de espesor. */
body.has-hero .main-header .nav-wrapper {
  width: 100%;
  max-width: 100%;
  padding: 0 max(16px, calc((100% - 1380px) / 2));
  background: linear-gradient(180deg,
    rgba(30, 64, 105, 0.55) 0%,
    rgba(12, 34, 60, 0.5) 100%);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  backdrop-filter: blur(22px) saturate(180%) brightness(115%);
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(115%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 6px 20px rgba(0, 0, 0, 0.30);
}

/* Sobre fondo oscuro el nav va en blanco */
body.has-hero .nav-link,
body.has-hero .btn-toggle-menu {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Al pasar el cursor la letra se prende en naranja. Sin fondo blanco
   alrededor, para que no aparezca ese borde claro junto a las letras. */
body.has-hero .nav-link:hover,
body.has-hero .nav-link.active {
  color: var(--color-accent);
  background-color: transparent;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.75),
    0 1px 4px rgba(0, 0, 0, 0.6);
  border-radius: 6px;
}

/* El mismo encendido en naranja cuando el menu esta plegado en movil */
body.has-hero .nav-item:hover .btn-toggle-menu {
  color: var(--color-accent);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.75);
}

body.has-hero .top-bar-item {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

body.has-hero .top-bar-item:hover {
  color: #ffffff;
  opacity: 0.85;
}

body.has-hero .top-bar-icon {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

body.has-hero .logo-img {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.75));
}

body.has-hero .btn-toggle-menu:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Estado solido: al hacer scroll el header se vuelve blanco */
body.has-hero .site-header.scrolled .top-bar {
  background-color: transparent;
  border-bottom-color: transparent;
}

.site-header.scrolled .top-bar,
body.has-hero .site-header.scrolled .top-bar {
  background-color: var(--color-white);
  border-bottom-color: #f0f2f5;
}

body.has-hero .site-header.scrolled .top-bar .container {
  margin: 0 auto;
  padding: 7px 20px;
  max-width: 1240px;
  background-color: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

body.has-hero .site-header.scrolled .top-bar-item {
  color: #3b6b99;
  text-shadow: none;
  font-weight: 700;
}

body.has-hero .site-header.scrolled .top-bar-item:hover {
  color: var(--color-primary);
  opacity: 1;
}

body.has-hero .site-header.scrolled .main-header {
  background-color: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: none;
  margin-top: 0;
}

body.has-hero .site-header.scrolled .main-header .nav-wrapper {
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
body.has-hero .site-header.scrolled .nav-link,
body.has-hero .site-header.scrolled .btn-toggle-menu {
  color: #334155;
  text-shadow: none;
}

body.has-hero .site-header.scrolled .nav-link:hover,
body.has-hero .site-header.scrolled .nav-link.active {
  color: var(--color-accent);
  background-color: transparent;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

body.has-hero .site-header.scrolled .logo-img {
  background-color: transparent;
  padding: 0;
  filter: none;
}

body.has-hero .site-header.scrolled .logo-img-dark {
  display: block;
}

body.has-hero .site-header.scrolled .logo-img-light {
  display: none;
}

body.has-hero .site-header.scrolled .btn-toggle-menu:hover {
  background-color: #f1f5f9;
}

/* El header es fixed y el banner arranca debajo con margin-top, igual que
   antes. El nav mantiene su acabado de cristal (borde interior, brillo y
   desenfoque), pero al no tener la foto detras el difuminado se apoya en
   el tinte y los bordes, no en el contenido de la imagen. */
body.has-hero {
  background-color: #050d18;
}

body.has-hero .page-hero,
body.has-hero .hero-slider-section {
  margin-top: var(--header-h);
  padding-top: 0;
}

.main-header .container {
  max-width: 1380px;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
  height: 72px;
  width: 100%;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: clamp(38px, 3.8vw, 60px);
  width: auto;
  object-fit: contain;
  transition: height 0.25s ease;
}

.logo-img-light {
  display: none;
}

body.has-hero .logo-img-dark {
  display: none;
}

body.has-hero .logo-img-light {
  display: block;
}

/* Fallback Logo block in case user removes SVG */
.brand-logo-fallback {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3.5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f7ff;
}

.brand-text-block h1 {
  font-size: 24px;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: 0.5px;
}

.brand-text-block span {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--color-secondary);
  letter-spacing: 1.8px;
  display: block;
  margin-top: 3px;
}

/* Desktop Navigation Menu */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 16px);
  list-style: none;
  margin: 0 auto;
  padding: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: clamp(3px, 0.35vw, 5px);
  font-size: clamp(12px, 0.92vw, 14px);
  font-weight: 600;
  letter-spacing: clamp(0px, 0.02vw, 0.2px);
  text-transform: none;
  color: #334155;
  padding: 8px clamp(4px, 0.55vw, 9px);
  white-space: nowrap;
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: #16a34a;
}

.nav-link svg.arrow-down {
  width: clamp(8px, 0.7vw, 10px);
  height: clamp(8px, 0.7vw, 10px);
  fill: currentColor;
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-link svg.arrow-down {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--color-white);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  border: 1px solid #e2e8f0;
  z-index: 100;
}

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

/* Evitar que los menús desplegables de la derecha se salgan de la pantalla */
.nav-item:last-child .dropdown-menu,
.nav-item:nth-last-child(2) .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown-item {
  display: block;
  padding: 9px 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  text-transform: none;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: #f8fafc;
  color: #16a34a;
  padding-left: 26px;
}

/* Item especial ANIscopio Vinus (Visor ANI 4G) */
.dropdown-item-aniscopio {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(0, 71, 133, 0.04) 0%, rgba(245, 158, 11, 0.06) 100%);
  border-top: 1px dashed #e2e8f0;
  margin-top: 5px;
  padding: 10px 18px 10px 22px !important;
  color: #004785 !important;
  font-weight: 700 !important;
}

.dropdown-item-aniscopio:hover {
  background: linear-gradient(90deg, rgba(0, 71, 133, 0.1) 0%, rgba(245, 158, 11, 0.14) 100%) !important;
  color: #002b53 !important;
  padding-left: 24px !important;
}

.aniscopio-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.aniscopio-icon {
  color: #d97706;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-item-aniscopio:hover .aniscopio-icon {
  transform: rotate(-10deg) scale(1.15);
}

.aniscopio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.08);
  white-space: nowrap;
  line-height: 1;
  transition: all 0.2s ease;
}

.dropdown-item-aniscopio:hover .aniscopio-badge {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
  transform: translateX(2px);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

/* Offcanvas Hamburger Button */
.btn-toggle-menu {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  padding: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-toggle-menu:hover {
  background-color: #f1f5f9;
}

.btn-toggle-menu svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* ==========================================================================
   3. FRANJA DE LÍNEAS DE EMERGENCIA 24/7 (PROTAGONISTA - A LO LARGO)
   ========================================================================== */

/* Corrección de altura y separación bajo el nav en Home (elimina franja negra y asegura que banner + emergencias entren siempre en el 100% de la primera pantalla en cualquier PC o zoom) */
body.page-home {
  --header-h: 72px;
  --emergency-strip-h: 148px;
}

body.page-home .top-bar {
  display: none !important;
}

body.page-home .main-header {
  margin-bottom: 0 !important;
}

body.page-home .hero-slider-section {
  margin-top: var(--header-h, 72px) !important;
  height: calc(100vh - var(--header-h, 72px) - var(--emergency-strip-h, 148px)) !important;
  height: calc(100dvh - var(--header-h, 72px) - var(--emergency-strip-h, 148px)) !important;
  min-height: 220px !important;
  max-height: none !important;
}

/* Contenedor principal de la franja (Siempre visible en la primera pantalla sin importar resolución o zoom) */
.home-emergency-strip {
  width: 100%;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.22) 0%, transparent 65%),
              linear-gradient(135deg, #001428 0%, #002652 35%, #00397a 70%, #001935 100%);
  color: #ffffff;
  border-top: 5px solid #ffca28;
  border-bottom: 2px solid rgba(0, 114, 206, 0.5);
  box-shadow: 0 -4px 24px rgba(255, 202, 40, 0.3), 0 20px 50px -10px rgba(0, 15, 36, 0.85);
  z-index: 6;
}

.home-emergency-wrapper {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(22px, 2.8vh, 36px) clamp(16px, 2.2vw, 40px);
  min-height: clamp(128px, 16vh, 164px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.3vw, 24px);
  flex-wrap: nowrap;
}

/* 1. Bloque Izquierdo: Radar y Título 24/7 */
.home-emergency-lead {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 0.9vw, 14px);
  flex-shrink: 0;
}

.home-emergency-radar {
  position: relative;
  width: clamp(34px, 2.5vw, 40px);
  height: clamp(34px, 2.5vw, 40px);
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(34, 197, 94, 0.45);
  flex-shrink: 0;
}

.home-radar-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e;
}

.home-radar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.6);
  animation: radarWave 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes radarWave {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.home-emergency-lead-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-emergency-kicker {
  font-size: clamp(9.5px, 0.72vw, 11px);
  font-weight: 800;
  color: #ffca28;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-emergency-lead-text {
  margin: 0;
  font-size: clamp(13.5px, 1.05vw, 17px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.15;
  white-space: nowrap;
}

/* 2. Bloque Central: Las 3 Tarjetas de Emergencia ("a lo largo" y fluidas) */
.home-emergency-numbers-flow {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 18px);
  align-items: stretch;
}

.home-num-card {
  display: flex;
  align-items: center;
  gap: clamp(10px, 0.9vw, 14px);
  min-width: 0;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  padding: clamp(13px, 1.5vh, 18px) clamp(12px, 1.2vw, 20px);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.home-num-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.5);
}

/* Iconos adaptables */
.home-num-icon-box {
  width: clamp(42px, 3vw, 50px);
  height: clamp(42px, 3vw, 50px);
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.home-num-card:hover .home-num-icon-box {
  transform: scale(1.06) rotate(-3deg);
}

.icon-gold {
  background: linear-gradient(135deg, #ffb300 0%, #f59e0b 60%, #d97706 100%);
  color: #002244;
}

.home-num-hash-pill {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #002244;
  color: #ffca28;
  font-weight: 900;
  font-size: 10px;
  display: grid;
  place-items: center;
  border: 1.5px solid #ffca28;
}

.icon-blue {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 60%, #0369a1 100%);
  color: #ffffff;
}

.icon-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 60%, #047857 100%);
  color: #ffffff;
}

.home-num-card-svg {
  width: clamp(18px, 1.4vw, 24px);
  height: clamp(18px, 1.4vw, 24px);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Textos de los números */
.home-num-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-num-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.home-num-digits {
  font-size: clamp(13.5px, 1.15vw, 19.5px);
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #ffffff;
  line-height: 1.1;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.home-num-card:hover .home-num-digits {
  color: #ffca28;
}

.home-num-tag {
  font-size: clamp(8.5px, 0.6vw, 10px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1.1;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-gold {
  background: rgba(255, 202, 40, 0.2);
  color: #ffca28;
  border: 1px solid rgba(255, 202, 40, 0.4);
}

.tag-blue {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.tag-green {
  background: rgba(16, 185, 129, 0.2);
  color: #4ade80;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.home-num-sub {
  font-size: clamp(9.5px, 0.72vw, 11px);
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Bloque Derecho: Redes Sociales Oficiales */
.home-emergency-social-group {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 12px);
  flex-shrink: 0;
}

.home-social-header {
  display: flex;
  flex-direction: column;
  text-align: right;
  gap: 1px;
}

.home-social-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  white-space: nowrap;
}

.home-social-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.home-social-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-social-btn {
  width: clamp(34px, 2.4vw, 40px);
  height: clamp(34px, 2.4vw, 40px);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.home-social-btn svg {
  width: clamp(17px, 1.25vw, 20px);
  height: clamp(17px, 1.25vw, 20px);
}

.home-social-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 10px 10px 0 0;
  pointer-events: none;
}

.btn-facebook {
  background: #1877f2;
}

.btn-facebook:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.6);
}

.btn-instagram {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.btn-instagram:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 20px rgba(253, 29, 29, 0.6);
}

.btn-youtube {
  background: #ff0000;
}

.btn-youtube:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.6);
}

.btn-x {
  background: #0f1419;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-x:hover {
  transform: translateY(-3px) scale(1.06);
  border-color: #ffffff;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* En portátiles con zoom alto (125%-150%) ocultamos solo la etiqueta lateral de redes para mantener 1 sola fila compacta */
@media (max-width: 1220px) {
  .home-social-header {
    display: none;
  }
}

/* Tablets y pantallas medianas: 2 filas compactas (cabecera arriba + 3 tarjetas en fila abajo) */
@media (max-width: 960px) {
  .home-emergency-wrapper {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 8px 14px;
  }
  .home-emergency-lead {
    order: 1;
  }
  .home-emergency-social-group {
    order: 2;
    margin-left: auto;
  }
  .home-social-header {
    display: flex;
  }
  .home-emergency-numbers-flow {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

/* Celulares: diseño ultracompacto para que banner + los 3 teléfonos + redes entren siempre en la primera pantalla */
@media (max-width: 640px) {
  .home-emergency-wrapper {
    padding: 8px 10px;
    gap: 6px;
  }
  .home-emergency-lead {
    gap: 7px;
  }
  .home-emergency-radar {
    width: 24px;
    height: 24px;
  }
  .home-radar-dot {
    width: 8px;
    height: 8px;
  }
  .home-emergency-kicker {
    font-size: 8px;
  }
  .home-emergency-lead-text {
    font-size: 11.5px;
  }
  .home-social-header {
    display: none;
  }
  .home-social-buttons {
    gap: 4px;
  }
  .home-social-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  .home-social-btn svg {
    width: 14px;
    height: 14px;
  }
  .home-emergency-numbers-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .home-num-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 7px 8px;
    gap: 4px;
    border-radius: 10px;
  }
  .home-num-icon-box {
    display: none;
  }
  .home-num-digits {
    font-size: 12px;
  }
  .home-num-tag {
    font-size: 7.5px;
    padding: 1px 4px;
  }
  .home-num-sub {
    font-size: 8.5px;
  }
}

/* ==========================================================================
   4. HERO SLIDER / BANNER PRINCIPAL (RESPONSIVE IMAGE SLIDER)
   ========================================================================== */
.hero-slider-section {
  position: relative;
  background-color: #050d18;
  width: 100%;
  margin-top: 0;
  overflow: hidden;
  min-height: 220px;
  height: calc(100vh - var(--header-h, 72px) - var(--emergency-strip-h, 104px));
  height: calc(100dvh - var(--header-h, 72px) - var(--emergency-strip-h, 104px));
  isolation: isolate;
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
}

/* Línea horizonte inferior animada con degradado corporativo Vinus */
.hero-slider-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #004785, #0079c2, #00aeef, #ffca28, #0079c2, #004785);
  background-size: 300% 100%;
  animation: heroHorizonGlow 6s linear infinite;
  z-index: 5;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  opacity: 0;
  transform: translate3d(0, var(--hero-slider-static-y, 0px), 0) scale(1.05);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.33, 1);
  will-change: transform;
  z-index: 0;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translate3d(0, var(--hero-slider-static-y, 0px), 0) scale(1);
  z-index: 1;
  pointer-events: auto;
  animation: fadeInBanner 0.6s cubic-bezier(0.22, 1, 0.33, 1);
}

.hero-slide.slide-in-left {
  animation: slideInFromRight 0.6s cubic-bezier(0.22, 1, 0.33, 1);
}

.hero-slide.slide-in-right {
  animation: slideInFromLeft 0.6s cubic-bezier(0.22, 1, 0.33, 1);
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(40px) scale(1.02);
  }
  50% {
    transform: translateX(-8px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px) scale(1.02);
  }
  50% {
    transform: translateX(8px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes fadeInBanner {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }
  50% {
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-slide .banner-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.33, 1);
}

/* Efecto Ken Burns inverso: la imagen se acerca lentamente, como si la cámara
   avanzara hacia el banner mientras este se muestra */
.hero-slide.active .banner-img {
  animation: kenBurns 5.5s ease-out forwards;
  will-change: transform;
}

@keyframes kenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.active .banner-img {
    animation: none;
    transform: scale(1);
  }
}

/* Texto de bienvenida. El banner baja por margin-top en el contenedor, asi
   que aqui se centra normal sobre la imagen. */
.hero-welcome {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + var(--hero-slider-content-y, 0px)));
  opacity: calc(1 - var(--hero-slider-fade, 0));
  will-change: transform, opacity;
  transition: transform 0.1s ease-out, opacity 0.1s ease-out;
  z-index: 3;
  text-align: center;
  padding: 0 24px;
  width: 100%;
  max-width: 880px;
}

.hero-welcome.hero-copy-enter {
  animation: heroCopyEnter 0.6s ease both;
}

@keyframes heroCopyEnter {
  0% {
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

.hero-welcome-kicker {
  display: block;
  font-size: clamp(0.8rem, 1.15vw, 1rem);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-welcome-kicker::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--color-accent);
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.65);
}

.hero-welcome-title {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0;
  color: var(--color-white);
  margin-bottom: 28px;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.78), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-welcome-btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  isolation: isolate;
  padding: 16px 44px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-white);
  background: linear-gradient(120deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 45%,
    var(--color-secondary) 100%);
  background-size: 200% 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.33, 1),
    box-shadow 0.4s cubic-bezier(0.22, 1, 0.33, 1),
    border-color 0.4s ease;
  animation: ctaPulse 2.4s ease-in-out infinite;
}

/* Titileo suave: el boton "llama la atencion" sin distraer */
@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38),
      0 0 0 0 rgba(255, 255, 255, 0.45);
  }
  50% {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.44),
      0 0 0 12px rgba(255, 255, 255, 0);
  }
}

/* Brillo diagonal que cruza el boton al pasar el cursor */
.hero-welcome-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-22deg);
  transition: left 0.75s cubic-bezier(0.22, 1, 0.33, 1);
  pointer-events: none;
}

/* Anillo que se expande hacia afuera */
.hero-welcome-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.33, 1), opacity 0.55s ease;
  pointer-events: none;
}

.hero-welcome-btn:hover,
.hero-welcome-btn:focus-visible {
  transform: translateY(-4px) scale(1.03);
  border-color: #ffffff;
  background-position: 100% 50%;
  /* Al pasar el cursor el pulso cede el lugar a la animacion de hover */
  animation-play-state: paused;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.48);
}

.hero-welcome-btn:hover::before,
.hero-welcome-btn:focus-visible::before {
  left: 140%;
}

.hero-welcome-btn:hover::after,
.hero-welcome-btn:focus-visible::after {
  opacity: 1;
  transform: scale(1.18);
}

.hero-welcome-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Ajuste automático del contenido del banner en pantallas bajas o con zoom alto (125% - 175%) */
@media (max-height: 760px) {
  .hero-welcome-kicker {
    font-size: 0.78rem;
    margin-bottom: 10px;
  }
  .hero-welcome-kicker::after {
    margin-top: 8px;
  }
  .hero-welcome-title {
    font-size: clamp(1.35rem, 2.5vw, 1.95rem);
    margin-bottom: 16px;
  }
  .hero-welcome-btn {
    padding: 12px 30px;
    font-size: 12px;
  }
}

@media (max-height: 580px) {
  .hero-welcome-kicker {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }
  .hero-welcome-kicker::after {
    margin-top: 5px;
    height: 2px;
  }
  .hero-welcome-title {
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    margin-bottom: 10px;
  }
  .hero-welcome-btn {
    padding: 9px 22px;
    font-size: 11px;
  }
}

/* Respeta a quien pidio menos movimiento */
@media (prefers-reduced-motion: reduce) {
  .hero-welcome.hero-copy-enter {
    animation: none;
  }

  .hero-welcome-btn,
  .hero-welcome-btn::before,
  .hero-welcome-btn::after {
    transition: none;
  }

  .hero-welcome-btn {
    animation: none;
  }
}

/* Cortina suave sobre el carrusel: solo un velo oscuro, sin llegar a tapar
   la foto. El header ya aporta el contraste con su propio cristal. */
.hero-slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg,
    rgba(2, 16, 30, 0.32) 0%,
    rgba(2, 16, 30, 0.24) 40%,
    rgba(2, 16, 30, 0.45) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Duotone / dark blue cinematic overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(8, 45, 78, 0.82) 0%, rgba(6, 30, 54, 0.88) 100%);
  z-index: 1;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Government / Ministry Crest */
.ministry-crest {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}

.ministry-crest img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

/* Big condensed headline */
.hero-main-title {
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 18px;
  line-height: 1.08;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

/* Announcement Paragraph */
.hero-description {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 400;
  line-height: 1.65;
  color: #f1f5f9;
  max-width: 860px;
  margin: 0 auto 28px auto;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Carousel controls / indicators */
.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.slider-control:hover,
.slider-control:focus-visible {
  background: rgba(0, 71, 133, 0.85);
  border-color: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 16px rgba(0, 121, 194, 0.6);
}

.slider-prev {
  left: 24px;
}

.slider-next {
  right: 24px;
}

.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.55);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  outline: none;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.15);
}

.slider-dot.active {
  background: #ffffff;
  width: 32px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Auto-play progress bar at the bottom */
.slider-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #0079c2, #38bdf8);
  width: 0%;
  z-index: 20;
  transition: width 0.1s linear;
}

/* ==========================================================================
   5. QUICK ACCESS ACTION CARDS
   ========================================================================== */
/* Estilos para las tarjetas de gestión */
.management-section { padding: 60px 0; background: #f8fafc; }
.management-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.mgmt-card {
    background: var(--color-white);
    padding: 30px;
    border-top: 4px solid var(--color-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    height: 100%;
}

.mgmt-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--color-secondary);
}

.mgmt-card:hover .mgmt-icon {
    background: var(--color-primary);
    color: var(--color-white);
}

.mgmt-icon {
    width: 60px;
    height: 60px;
    background: #eef6fc;
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.mgmt-card p { 
    font-size: 13px; 
    color: #64748b; 
    line-height: 1.5; 
    flex-grow: 1;
    margin-bottom: 20px; 
}

.mgmt-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: #fff;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
    text-decoration: none;
    transition: var(--transition);
}

.mgmt-btn:hover { background-color: var(--color-secondary); color: #fff; }

.mgmt-icon svg { width: 30px; height: 30px; fill: currentColor; }
.mgmt-card h3 { color: #1e293b; margin-bottom: 15px; font-size: 1.1rem; }

@media (max-width: 992px) {
    .management-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .management-grid { grid-template-columns: 1fr; }
}

.quick-access-section {

  position: relative;
  z-index: 20;
  margin-top: 25px;
  padding-bottom: 40px;
}

.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.action-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  border-bottom: 4px solid var(--color-primary);
  cursor: pointer;
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--color-secondary);
}

.action-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #eef6fc;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.action-card:hover .action-card-icon {
  background: var(--color-primary);
  color: var(--color-white);
}

.action-card-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.action-card-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.action-card-content p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* ==========================================================================
   6. CENTRO OPERATIVO Y SERVICIOS: 3 COLUMNAS (CONTACTOS / VIDEO / CLIMA)
   ========================================================================== */
.hub-corredor-section {
  padding: 150px 0 160px 0;
  background-color: var(--color-white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hub-wave-background {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(7, 89, 133, 0.18);
}

.hub-wave-image {
  opacity: 0.34;
}

.hub-wave-background path {
  fill: url("#hub-wave-gradient");
  fill-opacity: 0.82;
}

/* --- Barra Superior: Estado del Corredor Vial --- */
.corridor-status-bar {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px 22px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.status-badge.normal {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.status-updated-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.8s infinite;
  display: inline-block;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-sectors-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.strip-sector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #10b981;
}

.strip-sector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.strip-sector-dot.normal {
  background-color: #10b981;
}

.strip-sector-info strong {
  display: block;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.25;
}

.strip-sector-info span {
  font-size: 11.5px;
  color: #64748b;
}

/* --- Layout Principal de 3 Columnas --- */
.hub-tri-grid {
  display: grid;
  grid-template-columns: 335px minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.hub-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.hub-col-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.hub-col-contacts .hub-card {
  margin: 0;
}

/* ==========================================================================
   COLUMNA 1: CONTACTOS Y GESTIONES EN RUTA
   ========================================================================== */
.hub-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hub-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Card 1: Contactos */
.contact-hub-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contact-hub-header {
  background: linear-gradient(135deg, #092c4c 0%, #154575 100%);
  color: var(--color-white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-hub-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-hub-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--color-white);
}

.hub-card-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #93c5fd;
}

.hub-card-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--color-white);
  margin: 0;
  line-height: 1.2;
}

.contact-hub-body {
  padding: 15px 16px 16px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

/* Boton de llamado rapido #674 */
.hub-call-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: var(--color-white);
  padding: 11px 16px;
  border-radius: 11px;
  text-decoration: none;
  margin-bottom: 0;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.hub-call-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5);
  color: var(--color-white);
}

.hub-call-left {
  display: flex;
  flex-direction: column;
}

.hub-call-badge {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #fee2e2;
}

.hub-call-num {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.hub-call-right {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.hub-call-right strong {
  font-size: 13.5px;
  font-weight: 800;
}

.hub-call-right span {
  font-size: 11.5px;
  color: #fecaca;
  font-weight: 500;
}

/* Subencabezado de sección de contactos */
.contact-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #64748b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-section-label::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: #e2e8f0;
}

/* Mini lista de telefonos proporcional y balanceada */
.contact-mini-list {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-mini-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  min-height: 48px;
  box-sizing: border-box;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.contact-mini-item:hover {
  background: #f0f7ff;
  border-color: #93c5fd;
  transform: translateX(3px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.contact-mini-icon {
  width: 34px;
  height: 34px;
  background: var(--color-white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
}

.contact-mini-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.contact-mini-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.contact-mini-lbl {
  font-size: 11px;
  color: #475569;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}

.contact-mini-val {
  font-size: 14.5px;
  color: #0f172a;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.contact-mini-val.val-email {
  font-size: 11.5px;
  font-weight: 700;
  color: #0369a1;
  word-break: break-all;
}

.contact-mini-val.val-schedule {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.contact-mini-item.contact-mini-schedule {
  background: #f0f7ff;
  border-color: #bae6fd;
  cursor: default;
}

.contact-mini-item.contact-mini-schedule:hover {
  transform: none;
}

/* Badges pequeños para dar orden y contexto */
.contact-mini-badge {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.contact-mini-badge.badge-free {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.contact-mini-badge.badge-emergency {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.contact-mini-badge.badge-support {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.contact-mini-badge.badge-email {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   BLOQUE DE ASISTENCIA GRATUITA EN VÍA 24/7 (CARD 1)
   ========================================================================== */
.hub-assistance-box {
  margin-top: 0;
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.hub-assistance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(22, 101, 52, 0.18);
}

.hub-assistance-title-wrap {
  display: flex;
  flex-direction: column;
}

.hub-assistance-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #15803d;
}

.hub-assistance-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #14532d;
  line-height: 1.2;
}

.hub-assistance-free-pill {
  font-size: 10.5px;
  font-weight: 800;
  background: #16a34a;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.hub-assistance-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-assistance-item {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(187, 247, 208, 0.9);
  border-radius: 9px;
  padding: 7px 11px;
  min-height: 44px;
  box-sizing: border-box;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-assistance-item:hover {
  transform: translateX(2px);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.08);
}

.hub-assistance-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-assistance-item-icon.ambulance {
  background: #fee2e2;
  color: #dc2626;
}

.hub-assistance-item-icon.tow {
  background: #e0f2fe;
  color: #0284c7;
}

.hub-assistance-item-icon.mechanic {
  background: #fef3c7;
  color: #d97706;
}

.hub-assistance-item-icon.inspection {
  background: #dcfce7;
  color: #16a34a;
}

.hub-assistance-item-icon.sos {
  background: #ede9fe;
  color: #7c3aed;
}

.hub-assistance-item-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.hub-assistance-item-icon.ambulance svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.hub-assistance-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hub-assistance-item-info strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.hub-assistance-item-info span {
  font-size: 11px;
  color: #475569;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-assistance-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  padding-top: 2px;
}

/* Card de Programación Oficina Móvil con Afiche Visible por fuera */
.mobile-office-hub-card {
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  padding: 13px 15px 15px;
  gap: 10px;
  box-sizing: border-box;
}

.hub-office-poster-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #092c4c;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hub-office-poster-wrap:hover {
  transform: translateY(-2px);
  border-color: #0079c2;
  box-shadow: 0 8px 24px rgba(0, 121, 194, 0.25);
}

.hub-office-poster-banner {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #092c4c;
}

.hub-office-poster-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #092c4c;
  transition: transform 0.3s ease;
}

.hub-office-poster-wrap:hover .hub-office-poster-img {
  transform: scale(1.03);
}

.hub-office-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 44, 76, 0.88) 0%, rgba(9, 44, 76, 0.25) 55%, rgba(9, 44, 76, 0.45) 100%);
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 9px;
  transition: background 0.2s ease;
}

.hub-office-poster-wrap:hover .hub-office-poster-overlay {
  background: linear-gradient(to top, rgba(9, 44, 76, 0.95) 0%, rgba(0, 121, 194, 0.25) 100%);
}

.hub-office-poster-badge {
  background: rgba(9, 44, 76, 0.92);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hub-office-poster-wrap:hover .hub-office-poster-badge {
  background: #0079c2;
  transform: translateY(-2px);
}

.hub-office-brief {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
}

.hub-office-brief-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #0369a1;
}

.hub-office-brief-towns {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

.hazmat-hub-card {
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  gap: 8px;
  box-sizing: border-box;
}

.hub-service-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}

.hub-service-icon {
  width: 36px;
  height: 36px;
  background: #eef6fc;
  color: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-service-icon.warning-icon {
  background: #fff7ed;
  color: #ea580c;
}

.hub-service-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hub-service-text h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 2px;
  line-height: 1.25;
}

.hub-service-text p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

.hub-action-btn {
  width: 100%;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 7px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.hub-action-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.hub-action-btn.secondary {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.hub-action-btn.secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   COLUMNA 2: VIDEO INSTITUCIONAL Y CONCESIÓN (CENTRO)
   ========================================================================== */
.hub-video-box {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
}

.hub-video-header {
  margin-bottom: 2px;
}

.hub-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  background-color: #eef6fc;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.hub-pill-tag.green {
  background-color: #ecfdf5;
  color: #065f46;
}

.pulse-dot.green-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
}

.hub-video-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  line-height: 1.2;
}

.video-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  background-color: #000;
  margin-bottom: 0;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hub-institution-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.hub-institution-body h4 {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.hub-institution-body p {
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
  text-align: justify;
}

/* Sección de Aliados y Firmas Constructoras Destacada */
.hub-partners-wrapper {
  flex: 1 1 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

.hub-partners-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.hub-partners-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #0369a1;
}

.hub-partners-sub {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.hub-partners-image {
  width: 100%;
  flex: 1 1 auto;
  height: auto;
  min-height: 200px;
  max-height: 255px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #ffffff;
  padding: 8px 6px;
  box-sizing: border-box;
}

.hub-stats-row {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 16px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.04);
}

.visitor-counter {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.75fr);
  gap: 16px 20px;
  align-items: center;
  margin: 0;
  padding: 22px 20px;
  color: #1e293b;
  background: linear-gradient(145deg, #f8fafc, #eff6ff);
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.visitor-counter-total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.visitor-counter-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.visitor-counter-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: var(--color-primary);
}

.visitor-counter-label {
  color: #475569;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.visitor-counter-odometer {
  max-width: 100%;
  padding: 9px 12px;
  overflow: hidden;
  color: #f8fafc;
  background: linear-gradient(180deg, #18232c 0 48%, #344452 49% 52%, #101820 53% 100%);
  border: 1px solid #42515d;
  border-radius: 7px;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.14), 0 2px 4px rgba(15, 23, 42, 0.16);
  font-family: 'Courier New', monospace;
  font-size: 25px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.visitor-counter-caption {
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.3;
}

.visitor-counter-periods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.visitor-counter-periods div {
  min-width: 0;
  padding: 11px 11px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visitor-counter-periods dt {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
}

.visitor-counter-periods dd {
  margin: 4px 0 0;
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.visitor-counter-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.4;
}

.visitor-counter[data-state="unavailable"] .visitor-counter-odometer {
  color: #cbd5e1;
}

.hub-stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  min-width: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  box-sizing: border-box;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.hub-stat-item:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.hub-stat-num {
  font-size: clamp(13.5px, 1.1vw, 16.5px);
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1.15;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  max-width: 100%;
  transition: color 0.3s ease;
}

.hub-stat-num small {
  font-size: 0.62em;
  font-weight: 800;
  color: #059669;
  margin-left: 1.5px;
  opacity: 0.95;
}

.hub-stat-desc {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  margin-top: 5px;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
  letter-spacing: -0.01em;
}

@keyframes statCounterPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); color: #059669; }
  100% { transform: scale(1); }
}

.hub-stat-num.counter-done {
  animation: statCounterPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hub-cta-wrapper {
  margin-top: 0;
  padding-top: 4px;
}

.hub-learn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 22px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  border-radius: 10px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 121, 194, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.hub-learn-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 121, 194, 0.4);
  color: var(--color-white);
}

.hub-learn-btn svg {
  transition: transform 0.2s;
}

.hub-learn-btn:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   COLUMNA 3: ESTACIONES METEOROLÓGICAS (DERECHA)
   ========================================================================== */
.hub-col-weather {
  height: 100%;
}

.hub-weather-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 14px 10px 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

.hub-weather-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid #f1f5f9;
}

/* Barra Informativa y Botón para Pasar de Parte */
.weather-part-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(135deg, #092c4c 0%, #154575 100%);
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
  box-shadow: 0 2px 6px rgba(9, 44, 76, 0.12);
}

.weather-part-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.part-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  background: #0079c2;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-switch-part {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.btn-switch-part:hover {
  background: #ffffff;
  color: #092c4c;
}

/* Botón Inferior para Cambiar Parte */
.weather-bottom-nav {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
}

.btn-bottom-switch {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.btn-bottom-switch:hover {
  background: #092c4c;
  color: #ffffff;
  border-color: #092c4c;
}

/* Acciones y Botón de Actualizar */
.hub-weather-actions {
  display: flex;
  align-items: center;
}

.btn-weather-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.btn-weather-refresh:hover {
  background: #e2e8f0;
  color: var(--color-primary);
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.btn-weather-refresh:active {
  transform: translateY(0);
}

.btn-weather-refresh .refresh-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.btn-weather-refresh.loading .refresh-icon {
  animation: spinWeather 0.8s linear infinite;
}

@keyframes spinWeather {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.station-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.station-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

.station-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.station-town-name {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.station-clock {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
}

.station-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Badge Visual del Clima Real */
.station-visual-badge {
  width: 66px;
  height: 54px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: background 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.weather-station-card:hover .station-visual-badge {
  transform: scale(1.04);
}

.weather-real-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.weather-station-card:hover .weather-real-icon {
  transform: scale(1.1) translateY(-1px);
}

/* Temas atmosféricos dinámicos para el badge visual */
.station-visual-badge.is-clear {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 3px 10px rgba(56, 189, 248, 0.35);
}

.station-visual-badge.is-partly {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.station-visual-badge.is-cloudy {
  background: linear-gradient(135deg, #64748b 0%, #334155 100%);
  box-shadow: 0 3px 10px rgba(71, 85, 105, 0.3);
}

.station-visual-badge.is-rain {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  box-shadow: 0 3px 10px rgba(30, 58, 138, 0.35);
}

.station-visual-badge.is-storm {
  background: linear-gradient(135deg, #475569 0%, #1e1b4b 100%);
  box-shadow: 0 3px 10px rgba(30, 27, 75, 0.4);
}

.station-visual-badge.is-fog {
  background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
  box-shadow: 0 3px 10px rgba(100, 116, 139, 0.25);
}

.station-visual-badge.is-night {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.4);
}

/* Efecto de resplandor ambiental detrás del icono */
.station-visual-badge::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.station-temp-data {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex-grow: 1;
}

.station-temp-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.station-temp {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.station-temp sup {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.station-condition {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.station-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.stat-pill-lbl {
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-pill svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
  opacity: 0.8;
}

/* ==========================================================================
   NUEVO ESTILO DE TARJETAS DE CLIMA: EXACTO A LA REFERENCIA (RAINY DARK GLASS)
   Con fondo dinámico según condición meteorológica (Lluvia, Sol, Nubes, Noche)
   ========================================================================== */
.weather-stations-grid {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

/* Tarjeta individual de clima compacta y optimizada */
.weather-station-card {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 142px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  background-color: #0b0f19;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.weather-station-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.weather-station-card:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

/* Capa de Fondo Dinámica según el clima actual */
.weather-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 0.6s ease, filter 0.6s ease;
  z-index: 0;
}

/* 1. Clima de Lluvia de Día (Lluvia ligera con sol y gotas diurnas) */
.weather-station-card.weather-theme-rain .weather-card-bg,
.weather-station-card.weather-theme-rain-day .weather-card-bg,
.weather-station-card:not([class*="weather-theme-"]) .weather-card-bg {
  background-image: linear-gradient(rgba(10, 16, 26, 0.28), rgba(10, 16, 26, 0.68)), url('../images/clima/clima-lluvia-bg.jpg');
}

/* 2. Clima de Lluvia de Noche (Gotas nocturnas con reflejos de faros) */
.weather-station-card.weather-theme-rain-night .weather-card-bg {
  background-image: linear-gradient(rgba(8, 12, 22, 0.32), rgba(5, 8, 18, 0.72)), url('../images/clima/clima-lluvia-noche-bg.jpg');
}

/* 3. Chubascos / Aguaceros Torrenciales de Día (Cortina densa de lluvia y aspersión en carretera) */
.weather-station-card.weather-theme-shower-day .weather-card-bg {
  background-image: linear-gradient(rgba(12, 18, 30, 0.28), rgba(8, 12, 22, 0.7)), url('../images/clima/clima-chubascos-dia-bg.jpg');
}

/* 4. Chubascos / Aguaceros Torrenciales de Noche (Lluvia pesada cortando los faros de vehículos) */
.weather-station-card.weather-theme-shower-night .weather-card-bg {
  background-image: linear-gradient(rgba(8, 10, 20, 0.32), rgba(4, 6, 16, 0.74)), url('../images/clima/clima-chubascos-noche-bg.jpg');
}

/* 5. Clima Soleado / Cielo despejado de día */
.weather-station-card.weather-theme-sunny .weather-card-bg {
  background-image: linear-gradient(rgba(12, 38, 72, 0.22), rgba(8, 24, 48, 0.62)), url('../images/clima/clima-soleado-bg.jpg');
}

/* 6. Clima Despejado de Noche / Cielo estrellado con luna */
.weather-station-card.weather-theme-night .weather-card-bg {
  background-image: linear-gradient(rgba(6, 10, 20, 0.25), rgba(5, 8, 16, 0.7)), url('../images/clima/clima-noche-bg.jpg');
}

/* 7. Pocas Nubes / Parcialmente Nublado de Día */
.weather-station-card.weather-theme-partly-cloudy-day .weather-card-bg {
  background-image: linear-gradient(rgba(10, 28, 56, 0.24), rgba(7, 20, 42, 0.66)), url('../images/clima/clima-parcial-dia-bg.jpg');
}

/* 8. Pocas Nubes / Parcialmente Nublado de Noche */
.weather-station-card.weather-theme-partly-cloudy-night .weather-card-bg {
  background-image: linear-gradient(rgba(6, 12, 24, 0.28), rgba(4, 8, 18, 0.72)), url('../images/clima/clima-parcial-noche-bg.jpg');
}

/* 9. Nubes Dispersas de Día (Cielo azul con nubes flotantes a distintas alturas) */
.weather-station-card.weather-theme-scattered-day .weather-card-bg {
  background-image: linear-gradient(rgba(10, 28, 56, 0.22), rgba(7, 20, 42, 0.64)), url('../images/clima/clima-dispersas-dia-bg.jpg');
}

/* 10. Nubes Dispersas de Noche (Luna y estrellas entre nubes nocturnas iluminadas) */
.weather-station-card.weather-theme-scattered-night .weather-card-bg {
  background-image: linear-gradient(rgba(6, 10, 22, 0.28), rgba(4, 8, 18, 0.72)), url('../images/clima/clima-dispersas-noche-bg.jpg');
}

/* 11. Nublado / Muy nuboso de Día (Cielo cubierto denso plomizo) */
.weather-station-card.weather-theme-cloudy .weather-card-bg {
  background-image: linear-gradient(rgba(18, 26, 38, 0.28), rgba(12, 18, 28, 0.66)), url('../images/clima/clima-nublado-bg.jpg');
}

/* 12. Nublado / Muy nuboso de Noche (Noche oscura con cielo encapotado) */
.weather-station-card.weather-theme-cloudy-night .weather-card-bg {
  background-image: linear-gradient(rgba(10, 14, 24, 0.35), rgba(6, 10, 18, 0.74)), url('../images/clima/clima-noche-nublada-bg.jpg');
}

/* 13. Clima Caluroso Tropical con Nubosidad (Zaragoza, Caucasia, Bajo Cauca >= 28°C con sol y nubes) */
.weather-station-card.weather-theme-hot-cloudy .weather-card-bg {
  background-image: linear-gradient(rgba(28, 36, 16, 0.22), rgba(16, 24, 38, 0.62)), url('../images/clima/clima-caluroso-bg.jpg');
}

/* 14. Tormenta Eléctrica (Rayos sobre autopista montañosa) */
.weather-station-card.weather-theme-storm .weather-card-bg {
  background-image: linear-gradient(rgba(20, 10, 32, 0.32), rgba(10, 6, 20, 0.72)), url('../images/clima/clima-tormenta-bg.jpg');
}

/* 15. Niebla / Neblina / Bruma en la vía */
.weather-station-card.weather-theme-fog .weather-card-bg {
  background-image: linear-gradient(rgba(16, 22, 32, 0.26), rgba(10, 16, 26, 0.68)), url('../images/clima/clima-niebla-bg.jpg');
}

/* 16. Granizo o Nieve en Altas Montañas */
.weather-station-card.weather-theme-snow .weather-card-bg {
  background-image: linear-gradient(rgba(16, 24, 34, 0.28), rgba(10, 18, 28, 0.7)), url('../images/clima/clima-granizo-bg.jpg');
}

/* Contenido Principal sobre el Fondo */
.weather-card-content {
  position: relative;
  z-index: 1;
  padding: 8px 12px 7px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
  gap: 4px;
}

/* 1. Encabezado de la Tarjeta: Pin de Ubicación + Nombre de Municipio */
.weather-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  height: 18px;
  min-height: 18px;
}

.weather-pin-icon {
  width: 12px;
  height: 12px;
  stroke: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}

.weather-card-location .station-town-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. Fila Principal: Gran Temperatura + Icono y Condición */
.weather-card-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 1px 0;
  height: 48px;
  min-height: 48px;
}

.weather-main-temp {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.weather-main-condition-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
}

.weather-main-icon-wrap {
  width: 58px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.weather-main-desc {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Fila de Pronóstico cada 3 horas con Flechitas de Navegación */
.weather-hourly-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.weather-hourly-nav {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 50px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #ffffff;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
  z-index: 2;
}

.weather-hourly-nav:hover:not(.disabled) {
  background: rgba(56, 189, 248, 0.45);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  transform: scale(1.05);
}

.weather-hourly-nav.disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

.weather-hourly-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto !important;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-sizing: border-box;
}

.weather-hourly-row::-webkit-scrollbar {
  display: none;
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1px;
  flex: 0 0 calc((100% - 10px) / 3);
  min-width: calc((100% - 10px) / 3);
  box-sizing: border-box;
}

.hourly-time {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  height: 12px;
  line-height: 12px;
}

.hourly-icon-wrap {
  width: 100%;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.hourly-pop {
  font-size: 8.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.1px;
  height: 14px;
  min-height: 14px;
  box-sizing: border-box;
}

.hourly-pop.pop-rain {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
}

.hourly-pop.pop-rain svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.hourly-pop.pop-dry {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.1);
}

.hourly-temp {
  font-size: 10.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  line-height: 13px;
  height: 13px;
}

/* ==========================================================================
   ANIMACIONES VIVAS PARA ICONOS DE CLIMA (NUBES, LLUVIA, SOL, LUNA Y TORMENTA)
   ========================================================================== */

/* SVG contenedor con overflow visible para permitir movimiento fluido sin cortes */
.weather-animated-svg {
  overflow: visible !important;
  display: block;
}

.weather-svg-main {
  width: 52px;
  height: 38px;
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.5));
}

.weather-svg-mini {
  width: 33px;
  height: 25px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

/* Gotas de lluvia más gruesas, brillantes y proporcionales a las tarjetas */
.weather-rain-group {
  filter: drop-shadow(0 1px 4px rgba(56, 189, 248, 0.8));
}

.weather-svg-main .weather-rain-group line,
.weather-svg-main .weather-anim-drop line,
.weather-svg-main .weather-anim-drop-fast line {
  stroke: #38bdf8 !important;
  stroke-width: 3.5px !important;
}

.weather-svg-mini .weather-rain-group line,
.weather-svg-mini .weather-anim-drop line,
.weather-svg-mini .weather-anim-drop-fast line {
  stroke: #38bdf8 !important;
  stroke-width: 2.8px !important;
}

/* 1. Nube flotando y meciéndose en el aire (vaivén orgánico continuo y visible) */
@keyframes weatherCloudFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(3px, -2px) scale(1.02);
  }
  50% {
    transform: translate(-2.5px, 1px) scale(0.99);
  }
  75% {
    transform: translate(1.6px, -0.8px) scale(1.01);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

.weather-anim-cloud {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherCloudFloat 3.8s ease-in-out infinite;
  will-change: transform;
}

/* Variación en las mini-nubes del pronóstico para movimiento asincrónico natural */
.hourly-item:nth-child(2n) .weather-anim-cloud {
  animation-duration: 4.4s;
  animation-delay: -1.2s;
}

.hourly-item:nth-child(3n) .weather-anim-cloud {
  animation-duration: 3.5s;
  animation-delay: -2.1s;
}

.hourly-item:nth-child(3n + 1) .weather-anim-cloud {
  animation-duration: 4.0s;
  animation-delay: -0.6s;
}

/* 2. Gotas de lluvia cayendo en cascada continua inclinada */
@keyframes weatherRainDrops {
  0% {
    transform: translate(0, -6px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  75% {
    opacity: 0.95;
  }
  100% {
    transform: translate(-3.2px, 13px);
    opacity: 0;
  }
}

.weather-anim-drop {
  transform-box: fill-box;
  animation: weatherRainDrops 0.85s cubic-bezier(0.35, 0, 0.65, 1) infinite;
  will-change: transform, opacity;
}

.weather-anim-drop.drop-1 {
  animation-delay: 0s;
}

.weather-anim-drop.drop-2 {
  animation-delay: 0.28s;
}

.weather-anim-drop.drop-3 {
  animation-delay: 0.56s;
}

.weather-anim-drop.drop-4 {
  animation-delay: 0.42s;
}

/* 3. Sol con pulso radiante dorado */
@keyframes weatherSunPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
  }
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.95));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
  }
}

@keyframes weatherSunRaysRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.weather-anim-sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherSunPulse 3.4s ease-in-out infinite;
  will-change: transform;
}

.weather-anim-sun-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherSunRaysRotate 18s linear infinite;
  will-change: transform;
}

/* 4. Luna con vaivén suave y brillo */
@keyframes weatherMoonFloat {
  0% {
    transform: translate(0, 0) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.4));
  }
  50% {
    transform: translate(1px, -1.5px) rotate(2deg);
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8));
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.4));
  }
}

.weather-anim-moon {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherMoonFloat 4.2s ease-in-out infinite;
  will-change: transform;
}

/* 5. Estrellas titilando en la noche */
@keyframes weatherStarTwinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.weather-anim-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherStarTwinkle 2.4s ease-in-out infinite;
}

/* 6. Relámpago de tormenta eléctrica */
@keyframes weatherLightningFlash {
  0%, 68%, 78%, 88%, 100% {
    opacity: 0;
  }
  70%, 76%, 82% {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 1));
  }
}

.weather-anim-lightning {
  animation: weatherLightningFlash 2.6s infinite;
}

/* 7. Nube trasera en Paralaje 3D (se desplaza hacia la izquierda en contra-fase) */
@keyframes weatherCloudParallaxBack {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-3.5px, 1.2px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.weather-anim-cloud-back {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherCloudParallaxBack 4.8s ease-in-out infinite;
  will-change: transform;
}

/* 8. Cielo Cubierto / Nube Estratificada Densa */
@keyframes weatherOvercastDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(1.8px, -1.8px) scale(1.015);
  }
  66% {
    transform: translate(-1.8px, 1.2px) scale(0.985);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

.weather-anim-cloud-overcast {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherOvercastDrift 4.6s ease-in-out infinite;
  will-change: transform;
}

/* 9. Gotas de Lluvia Torrencial / Chubascos Rápidos (0.6s) */
@keyframes weatherShowerDropFast {
  0% {
    transform: translateY(-7px);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(16px);
    opacity: 0;
  }
}

.weather-anim-drop-fast {
  transform-box: fill-box;
  animation: weatherShowerDropFast 0.6s cubic-bezier(0.35, 0, 0.65, 1) infinite;
  will-change: transform, opacity;
}

/* 10. Copos de Nieve o Granizo Volando Suavemente */
@keyframes weatherSnowFlakeFlutter {
  0% {
    transform: translate(0, -6px) rotate(0deg);
    opacity: 0;
  }
  25% {
    transform: translate(1.8px, 1px) rotate(45deg);
    opacity: 1;
  }
  75% {
    transform: translate(-1.8px, 9px) rotate(120deg);
    opacity: 0.95;
  }
  100% {
    transform: translate(0, 16px) rotate(180deg);
    opacity: 0;
  }
}

.weather-anim-snowflake {
  transform-box: fill-box;
  animation: weatherSnowFlakeFlutter 2.5s ease-in-out infinite;
  will-change: transform, opacity;
}

/* 11. Ondas de Niebla y Bruma Flotante Horizontal */
@keyframes weatherFogWaveDrift {
  0% {
    transform: translateX(-3px);
    opacity: 0.7;
  }
  50% {
    transform: translateX(4px);
    opacity: 1;
  }
  100% {
    transform: translateX(-3px);
    opacity: 0.7;
  }
}

.weather-anim-fog-wave {
  transform-box: fill-box;
  animation: weatherFogWaveDrift 4.5s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Indicador de Probabilidad de Lluvia */
.hourly-pop {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hourly-pop.pop-rain {
  color: #60a5fa;
}

.hourly-pop.pop-dry {
  color: rgba(255, 255, 255, 0.5);
}

.hourly-temp {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   BARRA PARA PASAR A OTRA PARTE EN EL CLIMA (2 PARTES: 4 Y 5 MUNICIPIOS)
   ========================================================================== */
.weather-part-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 71, 133, 0.08) 0%, rgba(56, 189, 248, 0.12) 100%);
  border: 1px solid rgba(0, 71, 133, 0.16);
  border-radius: 10px;
  padding: 6px 10px;
  margin-bottom: 8px;
}

.weather-part-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.part-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #004785;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 5px;
}

.part-desc {
  font-size: 10.5px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-switch-part {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #004785;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
  box-shadow: 0 2px 6px rgba(0, 71, 133, 0.2);
  flex-shrink: 0;
  font-family: inherit;
}

.btn-switch-part:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.btn-switch-part svg {
  transition: transform 0.2s ease;
}

.btn-switch-part:hover svg {
  transform: translateX(2px);
}

/* Botón inferior de transición */
.weather-bottom-nav {
  margin-top: 8px;
  padding-top: 0;
}

.btn-bottom-switch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px dashed #0284c7;
  color: #004785;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  font-family: inherit;
}

.btn-bottom-switch:hover {
  background: #f0f9ff;
  border-color: #004785;
  color: #004785;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 71, 133, 0.12);
}

.btn-bottom-switch svg {
  transition: transform 0.2s ease;
  color: #0284c7;
}

.btn-bottom-switch:hover svg {
  transform: translateX(3px);
}

/* Animación sutil al mostrar las tarjetas */
.weather-station-card.is-revealed {
  animation: weatherCardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes weatherCardFadeIn {
  from {
    opacity: 0.2;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   ANIMACIÓN AL HACER SCROLL: TARJETAS DE CLIMA (CASCADA DINÁMICA)
   ========================================================================== */
.weather-station-card.weather-scroll-reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              min-height 0.35s ease,
              background 0.35s ease,
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  transition-delay: var(--weather-delay, 0ms);
  will-change: opacity, transform;
}

.weather-station-card.weather-scroll-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.weather-station-card.weather-scroll-reveal.is-revealed:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.35);
  transition-delay: 0ms !important;
}

/* Entrada viva y con personalidad para el ícono del clima */
.weather-station-card.weather-scroll-reveal.is-revealed .weather-real-icon {
  animation: weatherIconEntrance 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--weather-delay, 0ms) + 120ms);
}

@keyframes weatherIconEntrance {
  0% {
    opacity: 0;
    transform: scale(0.7) rotate(-7deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Entrada fluida para el valor de temperatura */
.weather-station-card.weather-scroll-reveal.is-revealed .station-temp {
  animation: weatherTempEntrance 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--weather-delay, 0ms) + 140ms);
}

@keyframes weatherTempEntrance {
  0% {
    opacity: 0;
    transform: translateX(-6px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-station-card.weather-scroll-reveal,
  .weather-station-card.weather-scroll-reveal.is-revealed {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .weather-station-card.weather-scroll-reveal.is-revealed .weather-real-icon,
  .weather-station-card.weather-scroll-reveal.is-revealed .station-temp {
    animation: none !important;
  }
}

.stat-pill {
  padding: 2px 5px;
  color: #1e3a5f;
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(147, 197, 253, 0.8);
}

/* ==========================================================================
   MODALES INTERACTIVOS (OFICINA MÓVIL Y SUSTANCIAS PELIGROSAS)
   ========================================================================== */
.hub-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hub-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hub-modal-dialog {
  background: var(--color-white);
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hub-modal-dialog.hub-modal-large {
  max-width: 680px;
}

.hub-modal-dialog.hub-modal-flyer {
  max-width: 780px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.hub-modal-dialog.hub-modal-flyer .hub-modal-body {
  overflow-y: auto;
  max-height: calc(92vh - 85px);
  padding: 18px 22px 24px;
}

.hub-modal-overlay.open .hub-modal-dialog {
  transform: scale(1);
}

.hub-modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.hub-modal-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-modal-icon {
  width: 42px;
  height: 42px;
  background: #eef6fc;
  color: var(--color-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-modal-icon.warning-icon {
  background: #fff7ed;
  color: #ea580c;
}

.hub-modal-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hub-modal-title-group h3 {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 3px;
}

.hub-modal-title-group p {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.hub-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}

.hub-modal-close:hover {
  color: #0f172a;
}

.hub-modal-body {
  padding: 22px 24px;
}

/* Visor de Afiche en Alta Calidad */
.hub-modal-poster-preview {
  position: relative;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  background: #061e35;
}

.hub-modal-poster-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0a2540;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
  gap: 8px;
}

.hub-modal-poster-toolbar-title {
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hub-modal-poster-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-modal-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.hub-modal-action-link:hover {
  background: #0079c2;
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.hub-modal-poster-img-link {
  display: block;
  position: relative;
  background: #061e35;
  text-align: center;
  padding: 10px;
  cursor: zoom-in;
  text-decoration: none;
}

.hub-modal-poster-img-link img {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  border-radius: 8px;
  image-rendering: auto;
  margin: 0 auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
}

.hub-modal-poster-img-link:hover img {
  transform: scale(1.01);
}

.hub-modal-poster-zoom-tip {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 44, 76, 0.9);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
}

.modal-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.schedule-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-primary);
  background: #eef6fc;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.schedule-details strong {
  display: block;
  font-size: 13.5px;
  color: #1e293b;
}

.schedule-details span {
  font-size: 11.5px;
  color: #64748b;
}

.hub-modal-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 12px;
  color: #475569;
}

.hub-modal-note svg {
  width: 18px;
  height: 18px;
  fill: var(--color-primary);
  flex-shrink: 0;
}

.hub-modal-note p {
  margin: 0;
  line-height: 1.4;
}

.modal-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  margin-bottom: 18px;
}

.modal-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rule-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.rule-box strong {
  display: block;
  font-size: 12px;
  color: #1e293b;
  margin-bottom: 4px;
}

.rule-box p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  line-height: 1.35;
}

/* ==========================================================================
   RESPONSIVE PARA LA SECCIÓN DE 3 COLUMNAS Y CLIMA
   ========================================================================== */
@media (max-width: 1200px) {
  .hub-tri-grid {
    grid-template-columns: 280px 1fr 310px;
    gap: 16px;
  }

  .hub-stats-row {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }

  .hub-stats-row .hub-stat-item:nth-child(1),
  .hub-stats-row .hub-stat-item:nth-child(2),
  .hub-stats-row .hub-stat-item:nth-child(3) {
    grid-column: span 2;
  }

  .hub-stats-row .hub-stat-item:nth-child(4),
  .hub-stats-row .hub-stat-item:nth-child(5) {
    grid-column: span 3;
  }

  .hub-stat-num {
    font-size: 18.5px;
  }
}

@media (max-width: 1024px) {
  .corridor-status-bar .status-sectors-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hub-tri-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .hub-col-center {
    grid-column: 1 / -1;
    order: -1; /* Video on top on tablets */
  }

  .hub-col-contacts {
    grid-column: 1;
    height: auto;
  }

  .hub-col-weather {
    grid-column: 2;
    height: auto;
  }

  .modal-rules-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* 1. SECCIÓN AZUL PRINCIPAL Y FONDO */
  .hub-corredor-section {
    padding: 35px 0 45px 0 !important;
    background: linear-gradient(180deg, #075985 0%, #086a9f 25%, #0c4a6e 75%, #075985 100%) !important;
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }

  .hub-wave-background {
    display: none !important;
  }

  /* 2. GRID Y COLUMNAS: FLUJO VERTICAL LIMPIO */
  .hub-tri-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hub-col,
  .hub-col-contacts,
  .hub-col-center,
  .hub-col-weather {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    flex: 0 0 auto !important;
    order: unset !important;
    box-sizing: border-box !important;
  }

  /* 3. COLUMNA 1: CONTACTOS Y ASISTENCIA */
  .contact-hub-card,
  .mobile-office-hub-card,
  .hazmat-hub-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .contact-hub-body {
    padding: 12px 14px 14px !important;
    gap: 10px !important;
  }

  .hub-call-btn {
    padding: 10px 14px !important;
  }

  .hub-assistance-box {
    padding: 10px 12px !important;
  }

  .hub-assistance-item {
    padding: 6px 10px !important;
  }

  /* 4. COLUMNA 2: VIDEO, SOCIOS Y ESTADÍSTICAS */
  .hub-video-box {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 12px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.96) !important;
  }

  .video-embed-container {
    width: 100% !important;
    border-radius: 10px !important;
  }

  .hub-partners-wrapper {
    margin-top: 10px !important;
    padding: 8px !important;
  }

  .hub-partners-image {
    max-height: 180px !important;
    width: 100% !important;
    object-fit: contain !important;
  }

  .hub-stats-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 12px 10px !important;
    border-radius: 10px !important;
  }

  .hub-stats-row .hub-stat-item {
    min-width: 0 !important;
    padding: 8px 6px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .hub-stats-row .hub-stat-item:nth-child(1),
  .hub-stats-row .hub-stat-item:nth-child(2),
  .hub-stats-row .hub-stat-item:nth-child(3),
  .hub-stats-row .hub-stat-item:nth-child(4) {
    grid-column: span 1 !important;
  }

  .hub-stats-row .hub-stat-item:nth-child(5) {
    grid-column: 1 / -1 !important;
  }

  .hub-stat-num {
    font-size: 18px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .hub-stat-desc {
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .visitor-counter {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 10px !important;
  }

  .visitor-counter-total {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .visitor-counter-periods {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  /* 5. COLUMNA 3: CAJA METEOROLÓGICA Y ESTACIONES */
  .hub-weather-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 12px 10px 12px !important;
    border-radius: 12px !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .weather-stations-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .weather-station-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    min-height: 130px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .weather-card-content {
    padding: 8px 10px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }

  .weather-card-main-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 42px !important;
  }

  .weather-main-temp {
    font-size: 26px !important;
  }

  .weather-main-icon-wrap {
    width: 48px !important;
    height: 36px !important;
  }

  .weather-main-desc {
    font-size: 11px !important;
    max-width: 145px !important;
  }

  .weather-hourly-wrapper {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 3px !important;
    box-sizing: border-box !important;
  }

  .weather-hourly-nav {
    width: 20px !important;
    min-width: 20px !important;
    height: 46px !important;
    flex-shrink: 0 !important;
    border-radius: 5px !important;
  }

  .weather-hourly-row {
    display: flex !important;
    flex-direction: row !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    padding: 3px 4px !important;
    gap: 4px !important;
    box-sizing: border-box !important;
  }

  .hourly-item {
    flex: 0 0 calc((100% - 8px) / 3) !important;
    min-width: calc((100% - 8px) / 3) !important;
    max-width: calc((100% - 8px) / 3) !important;
    box-sizing: border-box !important;
  }

  .hub-modal-dialog {
    margin: 10px !important;
  }
}

@media (max-width: 480px) {
  .hub-corredor-section {
    padding: 24px 0 36px 0 !important;
  }

  .hub-weather-box {
    padding: 10px 8px 8px 8px !important;
  }

  .hub-weather-header {
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
  }

  .hub-weather-title {
    font-size: 15px !important;
  }

  .hub-weather-subtitle {
    font-size: 10.5px !important;
  }

  .btn-weather-refresh {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }

  .weather-part-banner {
    padding: 4px 6px !important;
    gap: 4px !important;
  }

  .part-pill {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }

  .btn-switch-part {
    font-size: 9.5px !important;
    padding: 2.5px 6px !important;
  }

  .weather-station-card {
    min-height: 124px !important;
    border-radius: 10px !important;
  }

  .weather-card-content {
    padding: 6px 8px !important;
    gap: 3px !important;
  }

  .weather-card-location .station-town-name {
    font-size: 12.5px !important;
  }

  .weather-main-temp {
    font-size: 24px !important;
  }

  .weather-main-icon-wrap {
    width: 42px !important;
    height: 32px !important;
  }

  .weather-main-desc {
    font-size: 10px !important;
    max-width: 120px !important;
  }

  .weather-hourly-wrapper {
    gap: 2px !important;
  }

  .weather-hourly-nav {
    width: 18px !important;
    min-width: 18px !important;
    height: 44px !important;
    border-radius: 4px !important;
  }

  .weather-hourly-row {
    padding: 2px 3px !important;
    gap: 3px !important;
    border-radius: 6px !important;
  }

  .hourly-item {
    flex: 0 0 calc((100% - 6px) / 3) !important;
    min-width: calc((100% - 6px) / 3) !important;
    max-width: calc((100% - 6px) / 3) !important;
  }

  .hourly-time {
    font-size: 8.5px !important;
  }

  .hourly-icon-wrap {
    height: 20px !important;
  }

  .hourly-pop {
    font-size: 7.5px !important;
    padding: 0 2px !important;
  }

  .hourly-temp {
    font-size: 10px !important;
  }

  .btn-bottom-switch {
    font-size: 10px !important;
    padding: 7px 8px !important;
    line-height: 1.3 !important;
  }

  .hub-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding: 10px 6px !important;
  }

  .hub-stat-num {
    font-size: 16.5px !important;
  }

  .hub-stat-desc {
    font-size: 10px !important;
  }

  .visitor-counter-periods {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 5px !important;
  }
}

/* Parte alta de la tarjeta: cielo dibujado con CSS. La capa de sol, nubes,
   lluvia y niebla se enciende segun la condicion que reporte la API. */
.weather-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 76px;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(180deg, #eaf2f8 0%, #cfe2f8 58%, #b7d3f7 100%);
  transition: background 0.8s ease, transform 0.5s cubic-bezier(0.22, 1, 0.33, 1);
}

.weather-footage {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.78) contrast(0.96);
}

.weather-media.has-footage .weather-footage {
  opacity: 0.86;
}

.weather-media.has-poster .weather-footage {
  opacity: 0.82;
}

.weather-media.has-footage > span,
.weather-media.has-poster > span {
  display: none !important;
}

.weather-media::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 39, 65, 0.03), rgba(12, 39, 65, 0.16));
  pointer-events: none;
}

.weather-media.is-clear,
.weather-media.is-partly {
  background: linear-gradient(180deg, #d9edf8 0%, #c8e5fb 58%, #a9d1f5 100%);
}

.weather-media.is-cloudy {
  background: linear-gradient(180deg, #e3ebf2 0%, #d5e1ec 58%, #bccddd 100%);
}

.weather-media.is-rain,
.weather-media.is-storm {
  background: linear-gradient(180deg, #a8c0d3 0%, #94b0ca 58%, #7899b8 100%);
}

.weather-media.is-fog {
  background: linear-gradient(180deg, #e6edf1 0%, #cbd7df 58%, #b6c6d2 100%);
}

.weather-media.is-snow {
  background: linear-gradient(180deg, #f2f7fb 0%, #dceaf5 58%, #c8ddef 100%);
}

.weather-media.is-night {
  background: linear-gradient(180deg, #263c59 0%, #405d7d 58%, #6688a8 100%);
}

/* Cada capa arranca oculta y solo aparece en su condicion.
   El nombre del pueblo se exceptua para que nunca se oculte. */
.weather-media > span:not(.weather-place) {
  position: absolute;
  display: none;
  pointer-events: none;
}

/* --- Sol: disco con halo, respira despacio --- */
.weather-media .sky-sun {
  top: 14%;
  right: 18%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6cf 0%, #ffd75e 45%, rgba(255, 199, 44, 0) 72%);
  box-shadow: 0 0 34px 12px rgba(255, 210, 92, 0.55);
  animation: sunPulse 5.5s ease-in-out infinite;
}

/* --- Nubes: manchas suaves que cruzan el cielo --- */
.weather-media .sky-cloud {
  height: 42px;
  border-radius: 50px;
  background:
    radial-gradient(ellipse 25% 55% at 24% 63%, rgba(255,255,255,0.98) 96%, transparent 100%),
    radial-gradient(ellipse 31% 80% at 50% 40%, rgba(255,255,255,0.98) 96%, transparent 100%),
    radial-gradient(ellipse 25% 55% at 76% 63%, rgba(255,255,255,0.98) 96%, transparent 100%),
    linear-gradient(transparent 54%, rgba(255,255,255,0.98) 55% 82%, transparent 84%);
  filter: drop-shadow(0 3px 4px rgba(57, 86, 112, 0.16));
  opacity: 1;
}

.weather-media .sky-cloud-1 {
  top: 28%;
  left: -18%;
  width: 150px;
  animation: cloudDrift 18s linear infinite;
}

.weather-media .sky-cloud-2 {
  top: 42%;
  left: -28%;
  width: 110px;
  opacity: 0.7;
  animation: cloudDrift 27s linear infinite 4s;
}

/* Cielo cubierto: mas nube, mas gris */
.weather-media.is-cloudy {
  background: linear-gradient(180deg, #e3ebf2 0%, #d5e1ec 58%, #bccddd 100%);
}

.weather-media.is-cloudy .sky-sun {
  opacity: 0.35;
  box-shadow: 0 0 22px 8px rgba(255, 210, 92, 0.3);
}

.weather-media.is-cloudy .sky-cloud-1,
.weather-media.is-cloudy .sky-cloud-2 {
  opacity: 1;
}

/* --- Lluvia: cortinas de lineas que caen --- */
.weather-media .sky-rain {
  inset: 0;
  background-image:
    repeating-linear-gradient(168deg, transparent 0 8px, rgba(42, 84, 122, 0.48) 8px 9px, transparent 9px 19px),
    repeating-linear-gradient(168deg, transparent 0 14px, rgba(255, 255, 255, 0.52) 14px 15px, transparent 15px 27px);
  opacity: 0.48;
  animation: rainFall 0.65s linear infinite;
}

/* --- Rayo: solo en tormenta --- */
.weather-media .sky-bolt {
  inset: 0;
  background:
    linear-gradient(105deg, rgba(255, 245, 190, 0) 46%, rgba(255, 245, 190, 0.95) 50%, rgba(255, 245, 190, 0) 54%) no-repeat;
  background-size: 42% 100%;
  background-position: 60% 0;
  animation: boltFlash 6s steps(1, end) infinite;
}

/* --- Niebla: velos horizontales que se deslizan --- */
.weather-media .sky-fog {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(214, 222, 230, 0) 0%, rgba(214, 222, 230, 0.85) 45%, rgba(232, 238, 243, 0.95) 100%);
  animation: fogRoll 14s ease-in-out infinite alternate;
}

/* --- Cielo nocturno --- */
.weather-media.is-night {
  background: linear-gradient(180deg, #1b2c4a 0%, #0a1424 100%);
}

.weather-media.is-night .sky-sun {
  background: radial-gradient(circle, #f4f6ff 0%, #cdd6ee 45%, rgba(205, 214, 238, 0) 72%);
  box-shadow: 0 0 30px 10px rgba(200, 214, 245, 0.4);
}

/* Encendido de cada capa segun la condicion */
.weather-media.is-clear .sky-sun { display: block; }
.weather-media.is-clear .sky-cloud { display: block; }

.weather-media.is-partly .sky-sun { display: block; }
.weather-media.is-partly .sky-cloud { display: block; }
.weather-media.is-partly .sky-cloud-2 { display: block; }

.weather-media.is-cloudy .sky-cloud,
.weather-media.is-cloudy .sky-cloud-2 { display: block; }

.weather-media.is-rain,
.weather-media.is-storm {
  background: linear-gradient(180deg, #a8c0d3 0%, #94b0ca 58%, #7899b8 100%);
}

.weather-media.is-rain .sky-cloud,
.weather-media.is-rain .sky-cloud-2,
.weather-media.is-storm .sky-cloud,
.weather-media.is-storm .sky-cloud-2 { display: block; }

.weather-media.is-rain .sky-rain,
.weather-media.is-storm .sky-rain { display: block; }

.weather-media.is-storm .sky-bolt { display: block; }

.weather-media.is-fog { display: block; }
.weather-media.is-fog .sky-cloud,
.weather-media.is-fog .sky-cloud-2 { display: block; }
.weather-media.is-fog .sky-fog { display: block; }

.weather-media.is-snow {
  background: linear-gradient(180deg, #f2f7fb 0%, #dceaf5 58%, #c8ddef 100%);
}

.weather-media.is-snow .sky-cloud,
.weather-media.is-snow .sky-cloud-2,
.weather-media.is-snow .sky-snow { display: block; }

.weather-media .sky-snow {
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.6px, rgba(255, 255, 255, 0) 2.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1.2px, rgba(255, 255, 255, 0) 2px);
  background-size: 34px 34px, 22px 22px;
  animation: snowFall 6s linear infinite;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes cloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(145%); }
}

@keyframes rainFall {
  from { background-position: 0 0, 0 0; }
  to { background-position: -12px 90px, -8px 120px; }
}

@keyframes boltFlash {
  0%, 88%, 100% { opacity: 0; }
  90%, 93% { opacity: 1; }
}

@keyframes fogRoll {
  from { transform: translateX(-6%); }
  to { transform: translateX(6%); }
}

@keyframes snowFall {
  from { background-position: 0 -20px, 0 -10px; }
  to { background-position: 14px 40px, -10px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .weather-media > span {
    animation: none;
  }
}

/* Nombre del pueblo: pastilla de vidrio sobre el cielo */
.weather-place {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Punto de vivo antes del nombre */
.weather-place::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
  animation: liveDot 2.4s ease-in-out infinite;
}

@keyframes liveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.weather-stations-grid .weather-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 17px 18px 19px;
  min-width: 0;
}

/* Temperatura protagonista, con la descripcion debajo */
.weather-reading {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.weather-stations-grid .weather-temp {
  font-size: 40px;
  font-weight: 900;
  margin: 0;
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: -2px;
}

/* El grado va pequeno: se separa con una marca en el HTML, no con first-letter */
.weather-stations-grid .weather-temp sup {
  font-size: 0.5em;
  font-weight: 800;
  vertical-align: super;
  margin-left: 1px;
}

.weather-stations-grid .weather-desc {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  line-height: 1.35;
}

/* Humedad y viento, apenas debajo de la temperatura */
.weather-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0;
  padding-top: 13px;
  border-top: 1px solid var(--color-border);
}

.weather-metric {
  min-width: 0;
  padding: 9px 11px;
  background: var(--color-light-bg);
  border-radius: 9px;
}

.weather-metric dt {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 3px;
}

.weather-metric dd {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.weather-stations-grid .weather-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #a3adba;
  white-space: nowrap;
}

/* Relojchito antes de la hora */
.weather-stations-grid .weather-time::before {
  content: "";
  flex-shrink: 0;
  width: 11px;
  height: 11px;
  border: 2px solid #b6c0cd;
  border-radius: 50%;
}

#weatherNotice {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  font-size: 12.5px;
  color: #7c2d12;
  line-height: 1.5;
}

/* ==========================================================================
   INNER NAV (Menu interno de secciones: Misión / Visión / Objetivos / Valores)
   ========================================================================== */
.inner-nav {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: var(--header-h);
  z-index: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.inner-nav-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}

.inner-nav-btn {
  display: inline-block;
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 18px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.inner-nav-btn:hover {
  color: var(--color-primary);
  background-color: transparent;
}

.inner-nav-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 700;
}

.inner-panel {
  margin-top: 0;
}

/* Secciones unificadas en una misma página continua */
.institutional-section {
  scroll-margin-top: calc(var(--header-h, 80px) + 70px);
}

.institutional-divider {
  border: 0;
  height: 1px;
  background-color: #e2e8f0;
  margin: 44px 0;
}



/* ==========================================================================
   PAGE HERO (Universal Parallax & Dynamic Interior Motion)
   Autor: Mateo Jaramillo Suarez | teojaramillosuarez@gmail.com | 3157456196
   ========================================================================== */
.page-hero {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
  background-color: #051a2d;
  isolation: isolate;
  clip-path: inset(0 0 0 0);
  -webkit-clip-path: inset(0 0 0 0);
}

/* La foto interior se queda fija/estática en el viewport mientras el contenido sube sobre ella */
.page-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 650px;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, var(--hero-static-y, 0px), 0);
  will-change: transform;
  pointer-events: none;
  animation: heroImageAwaken 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroImageAwaken {
  0% {
    transform: translate3d(0, 0, 0) scale(1.08);
    filter: brightness(0.92) blur(1.5px);
  }
  100% {
    transform: translate3d(0, var(--hero-static-y, 0px), 0) scale(1);
    filter: brightness(1) blur(0);
  }
}

/* Línea horizonte inferior animada con degradado corporativo Vinus */
.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #004785, #0079c2, #00aeef, #ffca28, #0079c2, #004785);
  background-size: 300% 100%;
  animation: heroHorizonGlow 6s linear infinite;
  z-index: 4;
}

/* Velo cinemático con reflejo de luz ambiental */
.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg,
    rgba(2, 16, 30, 0.22) 0%,
    rgba(2, 16, 30, 0.16) 40%,
    rgba(2, 16, 30, 0.72) 100%);
  pointer-events: none;
  z-index: 2;
}

.page-hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--hero-mouse-x, 50%) var(--hero-mouse-y, 30%), rgba(0, 174, 239, 0.18) 0%, transparent 60%);
  pointer-events: none;
  transition: background 0.25s ease-out;
}

.page-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 24px 55px;
  text-align: center;
  z-index: 3;
  transform: translate3d(0, var(--hero-content-y, 0px), 0);
  opacity: calc(1 - var(--hero-fade, 0));
  will-change: transform, opacity;
  transition: transform 0.08s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.08s cubic-bezier(0.2, 0, 0.2, 1);
}

.page-hero-content h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.1;
  margin-bottom: 10px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65), 0 1px 4px rgba(0, 0, 0, 0.5);
  animation: heroTextRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-hero-content p {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 500;
  color: #dbeafe;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  animation: heroTextRise 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroTextRise {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Badge superior en el banner */
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 24, 48, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 174, 239, 0.45);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 800;
  color: #dbeafe;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  animation: heroTextRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffca28;
  box-shadow: 0 0 8px #ffca28;
}

/* Indicador de scroll sutil en el banner */
.page-hero-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(219, 234, 254, 0.75);
  letter-spacing: 0.5px;
  animation: bounceCue 2s infinite ease-in-out;
}

@keyframes bounceCue {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ==========================================================================
   PAGE BODY (Texto institucional)
   ========================================================================== */
.page-body-section {
  padding: 60px 0 70px;
  background-color: var(--color-light-bg);
}

.page-body-content {
  max-width: 820px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

/* Variante de ancho completo: ocupa todo el contenedor sin columnas */
.page-body-wide {
  max-width: none;
  padding: 48px 56px;
}

.page-body-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.page-body-wide h2 {
  font-size: 26px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}

.page-body-content p {
  font-size: 15px;
  color: #475569;
  line-height: 1.75;
  margin-bottom: 18px;
}

.page-body-wide p {
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 22px;
  text-align: justify;
}

.page-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.page-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background-color: var(--color-light-bg);
  border-left: 4px solid var(--color-primary);
  border-radius: 6px;
}

.page-info-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.page-info-value {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

@media (max-width: 768px) {
  :root {
    --header-h: 92px;
  }

  body.has-hero .main-header {
    margin-top: 0;
  }

  body.has-hero .main-header .nav-wrapper {
    border-bottom-color: rgba(255, 255, 255, 0.18);
  }
  .page-hero {
    height: 260px;
  }

  .inner-nav {
    top: var(--header-h);
  }

  .inner-nav-list {
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
  }

  .inner-nav-btn {
    padding: 13px 16px;
    font-size: 11.5px;
  }

  .page-hero-content {
    padding: 0 16px 30px;
  }

  .page-body-section {
    padding: 35px 0 45px;
  }

  .page-body-content {
    padding: 26px 20px;
  }

  .page-body-wide {
    padding: 28px 20px;
  }

  .page-body-content h2,
  .page-body-wide h2 {
    font-size: 20px;
  }

  .page-body-content p,
  .page-body-wide p {
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
  }

  .page-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .page-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   7. FREE ON-ROAD SERVICES (24/7)
   ========================================================================== */
.services-section {
  padding: 70px 0;
  background-color: var(--color-white);
}

/* Titulo de servicios con lineas tricolor (amarillo, azul y rojo) a los lados */
.flag-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.flag-title-text strong {
  color: var(--color-accent);
  font-weight: 900;
}

/* La linea seafar con los tres colores de la bandera */
.flag-line {
  display: block;
  width: clamp(40px, 12vw, 150px);
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #fcd116 0%,
    #fcd116 33%,
    #003893 33%,
    #003893 66%,
    #ce1126 66%,
    #ce1126 100%);
  box-shadow: 0 2px 8px rgba(0, 56, 147, 0.25);
}

@media (max-width: 768px) {
  .flag-title {
    gap: 14px;
  }

  .flag-title-text {
    text-align: center;
  }

  .flag-line {
    height: 4px;
  }
}

/* ==========================================================================
   MAPA DEL ESTADO DE LA VÍA (Área lista para conectar el mapa)
   ========================================================================== */
.map-stage {
  position: relative;
  width: 100%;
  height: clamp(420px, 62vh, 720px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.10);
  background-color: #e8eef5;
}

/* Cuadricula de fondo para que se note que es el area del mapa */
.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 71, 133, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 133, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Texto central mientras no haya mapa conectado */
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px;
  text-align: center;
}

.map-placeholder svg {
  width: 62px;
  height: 62px;
  fill: var(--color-primary);
  opacity: 0.35;
}

.map-placeholder h3 {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.map-placeholder p {
  max-width: 520px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #64748b;
  margin: 0;
}

/* Cuando se conecte el mapa, este bloque se oculta */
.map-stage.has-map .map-placeholder {
  display: none;
}

/* El mapa se monta aqui dentro */
#mapStage > #map {
  position: absolute;
  inset: 0;
}

/* Botón de Estado de la Vía (integrado al flujo flexible del header sin colisiones) */
.btn-estado-via {
  position: static;
  transform: none;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: clamp(5px, 0.7vw, 9px);
  margin: 0;
  padding: clamp(7px, 0.75vw, 10px) clamp(11px, 1.2vw, 20px);
  font-size: clamp(10px, 0.85vw, 11.5px);
  font-weight: 800;
  letter-spacing: clamp(0.5px, 0.12vw, 1.6px);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  color: var(--color-white);
  background: linear-gradient(120deg,
    var(--color-primary-dark) 0%,
    var(--color-primary) 45%,
    var(--color-secondary) 100%);
  background-size: 200% 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.33, 1),
    box-shadow 0.3s cubic-bezier(0.22, 1, 0.33, 1),
    background-position 0.3s ease, border-color 0.3s ease;
  animation: ctaPulse 2.4s ease-in-out infinite;
}

.btn-estado-via:hover,
.btn-estado-via:focus-visible {
  transform: scale(1.04);
  background-position: 100% 50%;
  border-color: #ffffff;
  animation-play-state: paused;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  outline: none;
}

.btn-estado-via.active {
  background: linear-gradient(120deg, #b45309 0%, #f59e0b 50%, #fbbf24 100%);
  background-size: 200% 100%;
  border-color: rgba(255, 255, 255, 0.95);
}

.btn-estado-via-icon {
  width: clamp(13px, 1vw, 16px);
  height: clamp(13px, 1vw, 16px);
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   ESCALADO Y RESPONSIVE DE CABECERA PARA TODAS LAS PANTALLAS DE PC / PORTÁTIL
   Permite que computadores con letra grande, zoom de pantalla o baja resolución
   (1366x768, escala Windows al 125%/150%) mantengan SIEMPRE el menú visible.
   ========================================================================== */

/* Laptops estándar y pantallas medianas (1150px - 1380px) */
@media (max-width: 1380px) {
  .logo-img {
    height: 48px;
  }
  .navbar-nav {
    gap: 10px;
  }
  .nav-link {
    font-size: 11px;
    letter-spacing: 0.2px;
    padding: 6px 3px;
  }
  .btn-estado-via {
    padding: 8px 14px;
    font-size: 10.5px;
    letter-spacing: 1px;
  }
}

/* Laptops compactos o pantallas con escala 125% - 150% (992px - 1149px) */
@media (max-width: 1150px) {
  .nav-wrapper {
    gap: 8px;
  }
  .logo-img {
    height: 42px;
  }
  .navbar-nav {
    gap: 6px;
  }
  .nav-link {
    font-size: 10.5px;
    letter-spacing: 0px;
    padding: 5px 2px;
    gap: 3px;
  }
  .btn-estado-via {
    padding: 7px 11px;
    font-size: 10px;
    letter-spacing: 0.5px;
    gap: 5px;
  }
}

/* Pantallas pequeñas de PC y tablets horizontales (881px - 991px) */
@media (max-width: 991px) and (min-width: 881px) {
  .nav-wrapper {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .logo-img {
    height: 36px;
  }
  .navbar-nav {
    gap: 4px;
  }
  .nav-link {
    font-size: 9.5px;
    letter-spacing: -0.2px;
    padding: 4px 1px;
    gap: 2px;
  }
  .btn-estado-via {
    padding: 6px 9px;
    font-size: 9.5px;
    letter-spacing: 0px;
    gap: 4px;
  }
}

/* Tablets en vertical y smartphones (<= 880px): SOLO AQUÍ se activa el menú hamburguesa */
@media (max-width: 880px) {
  .navbar-nav {
    display: none !important;
  }

  .btn-toggle-menu {
    display: flex !important;
  }

  .btn-estado-via {
    margin-left: auto;
    padding: 7px 12px;
    font-size: 10px;
  }
}

/* Teléfonos móviles pequeños (<= 580px): el botón se vuelve icono compacto */
@media (max-width: 580px) {
  .btn-estado-via-text {
    display: none;
  }

  .btn-estado-via {
    padding: 8px;
    border-radius: 50%;
  }

  .btn-estado-via-icon {
    width: 17px;
    height: 17px;
  }
}

@media (max-width: 768px) {
  .nav-wrapper {
    padding-right: 16px;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.services-section > .container {
  max-width: none;
  padding-left: clamp(20px, 2.5vw, 40px);
  padding-right: clamp(20px, 2.5vw, 40px);
}

/* Contenedor: perspectiva 3D */
.service-card {
  position: relative;
  height: 275px;
  perspective: 1200px;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Elemento que rota 3D */
.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.33, 1);
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover .service-card-inner,
  .service-card:focus-visible .service-card-inner {
    transform: rotateY(180deg);
  }
}

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

/* Ambas caras ocupan exactamente el mismo espacio */
.service-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-sizing: border-box;
}

/* Cara Frontal: Foto de referencia clara + Título */
.service-face-front {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  padding: 10px 10px 14px 10px;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-face-front {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(7, 89, 133, 0.14);
}

.service-img-box {
  position: relative;
  width: 100%;
  height: 145px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

.service-card:hover .service-img {
  transform: scale(1.08);
}

.service-badge-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(7, 89, 133, 0.9);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

.service-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px 0;
  line-height: 1.25;
}

.service-subtext {
  font-size: 11px;
  color: #0284c7;
  font-weight: 600;
  display: block;
  line-height: 1.2;
}

.service-tap-hint {
  margin-top: auto;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Cara Trasera: Detalle en azul corporativo */
.service-face-back {
  background: linear-gradient(145deg, #075985 0%, #033654 100%);
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 14px 34px rgba(7, 89, 133, 0.32);
  padding: 16px 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  gap: 8px;
  transition: box-shadow 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover .service-face-back,
  .service-card:focus-visible .service-face-back {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2),
      0 20px 46px rgba(7, 89, 133, 0.42);
  }
}

.service-back-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: #7dd3fc;
}

.service-back-badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.service-face-back h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.service-face-back p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  color: #e0f2fe;
}

.service-back-call {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  text-decoration: none;
  margin-top: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .service-card-inner {
    transition: none;
  }
}

/* ==========================================================================
   8. LATEST NEWS & PRESS RELEASES
   ========================================================================== */
.news-section {
  padding: 70px 0;
  background-color: var(--color-white);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.news-thumb {
  height: 200px;
  background-color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.news-thumb svg, .news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-thumb img,
.news-card:hover .news-thumb svg {
  transform: scale(1.05);
}

.news-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.news-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 18px;
  flex-grow: 1;
}

.news-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-link:hover {
  color: var(--color-secondary);
  gap: 10px;
}

/* ==========================================================================
   10. INSTITUTIONAL FOOTER LOGOS (Carrusel Interactivo Giratorio)
   Autor: Mateo Jaramillo Suarez | teojaramillosuarez@gmail.com | 3157456196
   ========================================================================== */
.footer-institutions {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 30px 0 34px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

/* Bloque Superior: Logo Ministerio de Transporte Solo */
.inst-top-solo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.inst-top-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 32px 8px 32px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.inst-top-card:hover,
.inst-top-card:focus-visible {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--color-primary, #0079c2);
  box-shadow: 0 12px 28px -4px rgba(0, 121, 194, 0.22);
  outline: none;
}

.inst-top-img {
  max-height: 48px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.28s ease;
}

.inst-top-card:hover .inst-top-img {
  transform: scale(1.04);
}

.inst-top-tooltip {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.25s ease;
}

.inst-top-card:hover .inst-top-tooltip {
  color: var(--color-primary, #0079c2);
}

/* Divisor sutil */
.inst-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 16px auto;
  max-width: 760px;
  position: relative;
  text-align: center;
}

.inst-divider::before,
.inst-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1 30%, #cbd5e1 70%, transparent);
}

.inst-divider-text {
  padding: 0 16px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.inst-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.inst-carousel-arrow {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  user-select: none;
}

.inst-carousel-arrow:hover {
  background: var(--color-primary, #0079c2);
  border-color: var(--color-primary, #0079c2);
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 121, 194, 0.35);
}

.inst-carousel-arrow:active {
  transform: scale(0.95);
}

.inst-carousel-arrow:focus-visible {
  outline: 3px solid rgba(0, 121, 194, 0.45);
  outline-offset: 2px;
}

.inst-carousel-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 12px 6px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.inst-carousel-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: instLogoMarquee 24s linear infinite;
  will-change: transform;
}

/* Pausa instantánea al pasar el cursor, enfocar o manipular manualmente */
.inst-carousel-wrapper:hover .inst-carousel-track,
.inst-carousel-wrapper:focus-within .inst-carousel-track,
.inst-carousel-track.is-paused {
  animation-play-state: paused !important;
}

@keyframes instLogoMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% / 4));
  }
}

/* Tarjeta individual de entidad */
.inst-logo-card {
  flex: 0 0 240px;
  width: 240px;
  height: 84px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 16px 6px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease;
  user-select: none;
}

.inst-logo-card:hover,
.inst-logo-card:focus-visible {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--color-primary, #0079c2);
  background-color: #ffffff;
  box-shadow: 0 12px 28px -4px rgba(0, 121, 194, 0.22);
  outline: none;
}

.inst-logo-card:active {
  transform: translateY(-1px) scale(1.0);
}

.inst-logo-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 121, 194, 0.35), 0 12px 28px -4px rgba(0, 121, 194, 0.22);
}

.inst-logo-card-inner {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inst-logo-img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: contrast(102%) saturate(98%);
  transition: transform 0.28s ease, filter 0.28s ease;
}

.inst-logo-img.logo-vinus {
  max-height: 48px;
  max-width: 175px;
}

.inst-logo-img.logo-mintransporte {
  max-height: 44px;
  max-width: 165px;
}

.inst-logo-img.logo-ani {
  max-height: 52px;
  max-width: 140px;
}

.inst-logo-img.logo-supertransporte {
  max-height: 42px;
  max-width: 180px;
}

.inst-logo-card:hover .inst-logo-img,
.inst-logo-card:focus-visible .inst-logo-img {
  transform: scale(1.05);
}

.inst-logo-tooltip {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.2px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  transition: color 0.25s ease;
}

.inst-logo-card:hover .inst-logo-tooltip,
.inst-logo-card:focus-visible .inst-logo-tooltip {
  color: var(--color-primary, #0079c2);
}

/* Responsividad en tablet y móvil */
@media (max-width: 768px) {
  .footer-institutions {
    padding: 24px 0 28px 0;
  }
  
  .inst-carousel-header {
    margin-bottom: 16px;
  }
  
  .inst-carousel-hint {
    font-size: 11.5px;
  }

  .inst-carousel-wrapper {
    gap: 8px;
  }

  .inst-carousel-arrow {
    width: 36px;
    height: 36px;
  }

  .inst-logo-card {
    flex: 0 0 205px;
    width: 205px;
    height: 76px;
    padding: 6px 12px;
  }

  .inst-logo-card-inner {
    height: 44px;
  }

  .inst-logo-img.logo-vinus { max-height: 42px; max-width: 150px; }
  .inst-logo-img.logo-mintransporte { max-height: 38px; max-width: 140px; }
  .inst-logo-img.logo-ani { max-height: 44px; max-width: 120px; }
  .inst-logo-img.logo-supertransporte { max-height: 36px; max-width: 150px; }

  .inst-carousel-viewport {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  }
}

.main-footer {
  background-color: #0c1a2e;
  color: #94a3b8;
  padding: 60px 0 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 45px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--color-secondary);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 13.5px;
  color: #94a3b8;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-white);
  padding-left: 5px;
}

.footer-about p {
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

/* ==========================================================================
   11. OFFCANVAS / MOBILE NAVIGATION
   ========================================================================== */
.offcanvas-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: #ffffff;
  z-index: 2000;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.offcanvas-menu.open {
  right: 0;
}

.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.offcanvas-overlay.open {
  opacity: 1;
  visibility: visible;
}

.offcanvas-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
}

.btn-close-offcanvas {
  background: none;
  border: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
}

.offcanvas-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.offcanvas-nav-links li {
  border-bottom: 1px solid #f1f5f9;
}

.offcanvas-nav-links a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

/* ==========================================================================
   MODAL DE LÍNEAS DE EMERGENCIA (se abre al entrar a la página)
   ========================================================================== */
/* ==========================================================================
   MODAL INSTITUCIONAL DE BIENVENIDA Y LÍNEAS DE ASISTENCIA 24/7
   Autor: Mateo Jaramillo Suarez | teojaramillosuarez@gmail.com | 3157456196
   ========================================================================== */
.emergency-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, rgba(3, 14, 28, 0.78) 0%, rgba(2, 8, 16, 0.92) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.emergency-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.emergency-modal-overlay[hidden],
.hub-modal-overlay[hidden] {
  display: none !important;
}

.emergency-modal {
  position: relative;
  width: 100%;
  max-width: 610px;
  margin: auto;
  max-height: calc(100dvh - 32px);
  background: #ffffff;
  border-radius: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 30px 80px -10px rgba(0, 20, 50, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 50px rgba(0, 71, 133, 0.18);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.emergency-modal-overlay.open .emergency-modal {
  transform: translateY(0) scale(1);
}

/* Botón de cierre: prominente, fácil de pulsar con el dedo en celular */
.emergency-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.emergency-modal-close:hover,
.emergency-modal-close:focus {
  background: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  transform: rotate(90deg) scale(1.05);
}

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

/* Cinta superior institucional: Logos Vinus & ANI de gran formato */
.emergency-modal-pre-header {
  background: linear-gradient(90deg, #051424 0%, #0a2544 50%, #003666 100%);
  padding: 16px 24px;
  padding-right: 68px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid rgba(245, 158, 11, 0.7);
  position: relative;
}

.emergency-modal-brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.emergency-modal-logo-vinus {
  height: 48px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.emergency-modal-brand-sep {
  width: 1.5px;
  height: 38px;
  background: rgba(255, 255, 255, 0.35);
}

.emergency-modal-logo-ani {
  height: 40px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  opacity: 0.96;
}

/* Cabecera del modal */
.emergency-modal-header {
  padding: 16px 24px 8px;
  text-align: left;
}

.emergency-modal-kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #0079c2;
  margin-bottom: 4px;
}

.emergency-modal-title {
  font-size: 20px;
  font-weight: 900;
  color: #0a2540;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.emergency-modal-subtitle {
  font-size: 12.5px;
  color: #475569;
  margin: 5px 0 0;
  line-height: 1.4;
}

.emergency-modal-subtitle strong {
  color: #004785;
  font-weight: 700;
}

/* Tarjeta Principal Hero: #674 */
.emergency-modal-hero-card {
  margin: 10px 24px 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #081d33 0%, #003666 55%, #004b87 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0, 40, 80, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-card-left {
  flex: 1;
  min-width: 0;
}

.hero-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 7px;
  border-radius: 10px;
  margin-bottom: 4px;
}

.hero-card-number-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-card-dial {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero-card-tag {
  font-size: 10px;
  font-weight: 800;
  color: #93c5fd;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.hero-card-desc {
  font-size: 11px;
  color: #cbd5e1;
  margin: 3px 0 0;
  line-height: 1.3;
  max-width: 320px;
}

.hero-card-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45);
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  transition: all 0.25s ease;
}

.hero-card-call-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.6);
  background: linear-gradient(135deg, #fbbf24 0%, #b45309 100%);
  color: #ffffff;
}

.hero-btn-pulse-wave {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  opacity: 0;
  animation: modalBtnPulse 2.2s infinite;
  pointer-events: none;
}

@keyframes modalBtnPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* Grid de Líneas Secundarias (2 Columnas) */
.emergency-modal-grid {
  margin: 0 24px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.emergency-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  touch-action: manipulation;
  transition: all 0.25s ease;
}

.emergency-modal-item:hover {
  background: #ffffff;
  border-color: #0079c2;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 71, 133, 0.12);
}

.emergency-item-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emergency-item-icon-wrap.phone-icon {
  background: rgba(0, 121, 194, 0.12);
  color: #0079c2;
}

.emergency-item-icon-wrap.tollfree-icon {
  background: rgba(0, 71, 133, 0.12);
  color: #004785;
}

.emergency-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.emergency-modal-label {
  font-size: 9.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 2px;
}

.emergency-modal-number {
  font-size: 14.5px;
  font-weight: 900;
  color: #004785;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.emergency-modal-action {
  font-size: 9.5px;
  color: #0079c2;
  font-weight: 600;
  margin-top: 1px;
}

.emergency-item-arrow {
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.emergency-modal-item:hover .emergency-item-arrow {
  color: #0079c2;
  transform: translateX(3px);
}

/* Pie de Modal */
.emergency-modal-footer {
  padding: 0 24px 20px;
  display: flex;
  justify-content: center;
}

.emergency-modal-dismiss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #004785 0%, #002b4d 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 16px rgba(0, 71, 133, 0.3);
  transition: all 0.25s ease;
}

.emergency-modal-dismiss-btn:hover {
  background: linear-gradient(135deg, #00569e 0%, #003666 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 71, 133, 0.45);
}

.emergency-modal-dismiss-btn:active {
  transform: translateY(0);
}

/* Optimización móvil: evita desbordamiento, fácil cierre táctil y ajuste al alto de pantalla */
@media (max-width: 640px) {
  .emergency-modal-overlay {
    padding: 10px;
  }

  .emergency-modal {
    margin: auto 0;
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .emergency-modal-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .emergency-modal-pre-header {
    padding: 12px 14px;
    padding-right: 56px;
  }

  .emergency-modal-brand-group {
    gap: 12px;
  }

  .emergency-modal-logo-vinus {
    height: 38px;
    max-width: 165px;
  }

  .emergency-modal-brand-sep {
    height: 30px;
  }

  .emergency-modal-logo-ani {
    height: 32px;
    max-width: 120px;
  }

  .emergency-modal-header {
    padding: 12px 14px 6px;
  }

  .emergency-modal-title {
    font-size: 17px;
  }

  .emergency-modal-subtitle {
    font-size: 11.5px;
  }

  .emergency-modal-hero-card {
    margin: 8px 14px 10px;
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
  }

  .hero-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-card-dial {
    font-size: 28px;
  }

  .hero-card-desc {
    max-width: 100%;
    text-align: center;
  }

  .hero-card-call-btn {
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
  }

  .emergency-modal-grid {
    margin: 0 14px 12px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .emergency-modal-item {
    padding: 9px 12px;
  }

  .emergency-modal-footer {
    padding: 0 14px 14px;
  }

  .emergency-modal-dismiss-btn {
    padding: 11px 18px;
    font-size: 13px;
  }
}

/* ==========================================================================
   12. RESPONSIVE DESIGN (OPTIMIZADO PARA SMARTPHONES Y TABLETS)
   ========================================================================== */

/* Tablets y pantallas medianas (<= 1024px) */
@media (max-width: 1024px) {
  :root {
    --header-h: 100px;
  }

  body.has-hero .main-header {
    margin-top: 0;
  }

  body.has-hero .main-header .nav-wrapper {
    background-color: rgba(4, 22, 40, 0.68);
    border-bottom-color: rgba(255, 255, 255, 0.18);
  }

  .nav-wrapper {
    height: 72px;
    justify-content: space-between;
    gap: 12px;
  }

  .emergency-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .emergency-col:not(:last-child)::after {
    display: none;
  }

  .emergency-col {
    background: rgba(255, 255, 255, 0.06);
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .action-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .status-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* Teléfonos móviles estándar (<= 768px) */
@media (max-width: 768px) {
  /* Contenedores con márgenes seguros para pantallas pequeñas */
  .container {
    padding: 0 16px;
  }

  .scroll-reveal.reveal-from-left,
  .scroll-reveal.reveal-from-right {
    transform: translateY(28px);
  }

  .scroll-reveal.reveal-from-left.is-visible,
  .scroll-reveal.reveal-from-right.is-visible {
    transform: translateY(0);
  }

  /* Top Bar en celulares */
  .top-bar {
    padding: 8px 0;
  }

  .top-bar .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
  }

  body.has-hero .top-bar .container {
    max-width: 100%;
    margin: 0;
    padding: 7px 16px;
    gap: 12px;
  }

  .top-bar-group {
    gap: 10px;
  }

  .top-bar-emergency-direct {
    gap: 6px;
    font-size: 11px;
  }

  .top-bar-emergency-title {
    font-size: 11px;
    gap: 4px;
  }

  .top-bar-emergency-numbers {
    gap: 4px;
    font-size: 11px;
  }

  .top-bar-num-link {
    font-size: 13px;
    font-weight: 800;
    padding: 2px 5px;
  }

  .top-bar-item {
    font-size: 11.5px;
    gap: 5px;
  }

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

  .social-icon svg {
    width: 12px;
    height: 12px;
  }

  /* Cabecera y logo en celulares */
  .nav-wrapper {
    height: 64px;
  }

  .logo-img {
    height: 44px;
    max-width: 220px;
    width: auto;
  }

  .btn-toggle-menu {
    padding: 8px;
    border-radius: 50%;
    background: transparent;
  }

  .btn-toggle-menu:hover,
  .btn-toggle-menu:active,
  body.has-hero .btn-toggle-menu:hover,
  body.has-hero .btn-toggle-menu:active {
    background: transparent;
  }

  .btn-toggle-menu:focus-visible {
    background: transparent;
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  .btn-toggle-menu svg {
    width: 28px;
    height: 28px;
  }

  /* Banner de Emergencias en celulares */
  .emergency-banner {
    padding: 20px 0;
  }

  .emergency-title {
    font-size: 0.95rem;
  }

  .emergency-number {
    font-size: 1.6rem;
  }

  /* Banner principal en celulares: ajustado para que la franja de emergencias 24/7 siempre entre en la pantalla principal */
  .hero-slider-section {
    height: calc(100vh - var(--header-h, 64px) - var(--emergency-strip-h, 118px));
    height: calc(100dvh - var(--header-h, 64px) - var(--emergency-strip-h, 118px));
    min-height: 210px;
    max-height: none;
  }

  .hero-slide .banner-img {
    object-fit: cover;
    object-position: center;
  }

  /* Slider controls táctiles */
  .slider-control {
    width: 38px;
    height: 38px;
  }

  .slider-prev {
    left: 10px;
  }

  .slider-next {
    right: 10px;
  }

  /* Accesos Rápidos en 1 columna */
  .quick-access-section {
    margin-top: 15px;
    padding-bottom: 30px;
  }

  .action-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .action-card {
    padding: 16px 18px;
  }

  /* Servicios y Noticias en 1 columna */
  .services-section, 
  .section-road-status, 
  .news-section {
    padding: 45px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .section-subtitle {
    font-size: 13.5px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .service-card {
    height: 265px;
  }

  .service-img-box {
    height: 135px;
  }

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

    .service-card {
      height: 275px;
      max-width: 320px;
      margin: 0 auto;
      width: 100%;
    }

    .service-img-box {
      height: 150px;
    }
  }

  .services-section > .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Logos institucionales */
  .institutions-grid {
    gap: 16px 22px;
  }

  .inst-logo-item {
    height: 48px;
    width: 140px;
    padding: 2px 6px;
  }

  /* Footer en celulares */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Teléfonos muy pequeños (<= 420px como iPhone SE / Galaxy A) */
@media (max-width: 420px) {
  .top-bar .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .top-bar-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .logo-img {
    height: 38px;
    max-width: 180px;
  }

  .emergency-number {
    font-size: 1.45rem;
  }
}

@media (max-width: 360px) {
  .top-bar .container,
  body.has-hero .top-bar .container {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .top-bar-social {
    align-self: flex-end;
  }
}

/* ==========================================================================
   ÁLBUM FOTOGRÁFICO INTERACTIVO 3D (GALERÍA TIPO LIBRO)
   ========================================================================== */
.book-gallery-section {
  padding: 85px 0 95px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 45%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.book-gallery-section::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 450px;
  background: radial-gradient(ellipse at center, rgba(0, 71, 133, 0.08) 0%, rgba(0, 121, 194, 0.03) 50%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Marcadores / Tabs de Cinta superiores */
.book-ribbon-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 28px;
  position: relative;
  z-index: 10;
}

.book-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-white);
  border: 1px solid #cbd5e1;
  padding: 9px 18px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.33, 1);
}

.book-tab:hover {
  background: #f8fafc;
  border-color: #0079c2;
  color: #004785;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 71, 133, 0.12);
}

.book-tab.active {
  background: linear-gradient(135deg, #004785 0%, #0079c2 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(0, 71, 133, 0.28);
  transform: translateY(-2px);
}

.book-tab-icon {
  font-size: 15px;
  line-height: 1;
}

/* Escenario del Libro 3D */
.book-stage {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 30px 15px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Flechas de Navegación Flotantes */
.book-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid #cbd5e1;
  color: #004785;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.33, 1);
}

.book-arrow svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2.6;
  fill: none;
}

.book-arrow:hover {
  background: #004785;
  color: #ffffff;
  border-color: #004785;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 14px 30px rgba(0, 71, 133, 0.35);
}

.book-arrow-prev {
  left: -12px;
}

.book-arrow-next {
  right: -12px;
}

.book-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: translateY(-50%) scale(1);
  box-shadow: none;
}

/* Contenedor del Libro 3D */
.book-container {
  width: 100%;
  max-width: 1040px;
  min-height: 570px;
  position: relative;
  perspective: 2400px;
  transform-style: preserve-3d;
  border-radius: 18px;
  background: #111827;
  /* Simula el grosor de las páginas del libro debajo */
  box-shadow:
    0 35px 70px -15px rgba(15, 23, 42, 0.35),
    0 18px 30px rgba(0, 0, 0, 0.12),
    0 4px 0 1px #e2e8f0,
    0 8px 0 2px #cbd5e1,
    0 12px 0 3px #94a3b8;
  transition: min-height 0.3s ease;
}

/* Lomo central y pliegue sutil de páginas interiores (sin líneas duras que recorten) */
.book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 20px;
  transform: translateX(-50%);
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.01) 35%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(0, 0, 0, 0.01) 65%,
    rgba(0, 0, 0, 0.05) 100%
  );
  z-index: 22;
  pointer-events: none;
  border: none !important;
}

/* Ocultar totalmente el lomo en la portada y contraportada */
.book-container.is-cover .book-spine,
.book-container:has(.spread-cover.active) .book-spine,
.book-container:has(.spread-backcover.active) .book-spine,
.spread-cover .book-spine,
.spread-backcover .book-spine {
  display: none !important;
}

/* Marcapáginas / cinta decorativa desactivada para evitar recortar texto o imágenes */
.book-ribbon-bookmark {
  display: none !important;
}

/* Spread (Doble Página Abierta) */
.book-spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.985);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.33, 1), visibility 0.55s ease;
}

.book-spread.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  z-index: 20;
}

/* Página Izquierda */
.book-page-left {
  background: #fdfbf7;
  border-right: none;
  padding: 38px 42px 34px 44px;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image:
    radial-gradient(ellipse at 0% 50%, rgba(0, 0, 0, 0.03) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.8) 0%, rgba(250, 248, 245, 1) 100%);
}

/* Página Derecha */
.book-page-right {
  background: #fcfaf6;
  border-left: none;
  padding: 38px 44px 34px 42px;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image:
    radial-gradient(ellipse at 100% 50%, rgba(0, 0, 0, 0.03) 0%, transparent 60%),
    linear-gradient(to left, rgba(255, 255, 255, 0.8) 0%, rgba(252, 250, 246, 1) 100%);
}

/* Esquinas dobladas interactivas (Page Curl) */
.page-curl-corner {
  position: absolute;
  bottom: 0;
  width: 44px;
  height: 44px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 15;
  transition: all 0.25s ease;
}

.page-curl-left {
  left: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.03) 45%, transparent 50%);
  border-radius: 0 0 0 16px;
}

.page-curl-right {
  right: 0;
  background: linear-gradient(225deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.03) 45%, transparent 50%);
  border-radius: 0 0 16px 0;
}

.page-curl-corner:hover {
  filter: brightness(1.2);
  transform: scale(1.15);
}

/* Portada del Libro (Spread 0) */
.spread-cover {
  grid-template-columns: 1fr;
  background: linear-gradient(140deg, #06192d 0%, #003666 45%, #004785 85%, #082847 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
  position: relative;
}

.spread-cover .book-spine {
  display: none;
}

.spread-cover .book-page-cover {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 30px;
  position: relative;
  z-index: 5;
}

.cover-gold-border {
  border: 2px solid rgba(217, 119, 6, 0.55);
  box-shadow:
    inset 0 0 30px rgba(217, 119, 6, 0.15),
    0 0 30px rgba(0, 0, 0, 0.45);
  border-radius: 12px;
  padding: 44px 36px;
  width: 100%;
  max-width: 680px;
  position: relative;
  background: rgba(6, 25, 45, 0.55);
  backdrop-filter: blur(8px);
}

.cover-gold-border::before,
.cover-gold-border::after {
  content: '✦';
  position: absolute;
  color: #f59e0b;
  font-size: 16px;
}

.cover-gold-border::before {
  top: 10px;
  left: 14px;
}

.cover-gold-border::after {
  bottom: 10px;
  right: 14px;
}

.cover-logo-img {
  height: 52px;
  width: auto;
  margin-bottom: 22px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.cover-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #fbbf24;
  margin-bottom: 10px;
}

.cover-title {
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.cover-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 520px;
  margin: 0 auto 28px;
}

.cover-open-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 800;
  padding: 13px 32px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4);
  transition: all 0.25s ease;
}

.cover-open-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.55);
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

/* Contraportada (Spread 5) */
.spread-backcover {
  grid-template-columns: 1fr;
  background: linear-gradient(140deg, #082847 0%, #003666 50%, #06192d 100%);
}

.spread-backcover .book-spine {
  display: none;
}

.spread-backcover .book-page-cover {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 30px;
}

/* Contenido de Páginas del Libro */
.page-header-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.page-number-stamp {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  font-family: monospace;
}

.page-photo-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  flex-grow: 1;
  min-height: 250px;
  max-height: 330px;
  background: #0f172a;
  cursor: pointer;
}

.page-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.33, 1), filter 0.3s ease;
}

.page-photo-frame:hover img {
  transform: scale(1.04);
}

.page-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.1) 45%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #ffffff;
  transition: opacity 0.25s ease;
}

.page-photo-badge {
  align-self: flex-start;
  background: rgba(0, 71, 133, 0.88);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.page-photo-caption {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #f1f5f9;
}

.page-photo-zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-photo-zoom-btn:hover {
  background: #0079c2;
  transform: scale(1.1);
}

/* Columna de Texto / Página Derecha */
.page-text-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-heading {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 12px;
}

.page-description {
  font-size: 13.5px;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 16px;
}

.page-quote-card {
  background: #f1f5f9;
  border-left: 3px solid #0079c2;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  font-style: italic;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 16px;
}

.page-mini-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.page-mini-thumb {
  position: relative;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  background: #0f172a;
}

.page-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-mini-thumb:hover img {
  transform: scale(1.08);
}

.page-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.page-view-full-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #004785;
  color: #004785;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-view-full-btn:hover {
  background: #004785;
  color: #ffffff;
}

/* Barra de Herramientas Inferior del Libro */
.book-toolbar {
  max-width: 860px;
  margin: 24px auto 0;
  background: var(--color-white);
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.book-page-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
}

.book-page-current {
  font-size: 13px;
  font-weight: 800;
  color: #004785;
  white-space: nowrap;
}

.book-progress-track {
  flex-grow: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  max-width: 280px;
}

.book-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #004785, #0079c2);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.book-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.book-action-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.book-action-btn:hover {
  background: #004785;
  color: #ffffff;
  border-color: #004785;
}

.book-action-btn.active {
  background: #0079c2;
  color: #ffffff;
  border-color: #0079c2;
}

/* Lightbox Modal de Alta Resolución */
.book-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.book-lightbox[hidden] {
  display: none !important;
}

.book-lightbox-dialog {
  max-width: 960px;
  width: 100%;
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
}

.book-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.book-lightbox-close:hover {
  background: #ef4444;
}

.book-lightbox-img-wrap {
  width: 100%;
  max-height: 65vh;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book-lightbox-img-wrap img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}

.book-lightbox-caption {
  padding: 18px 24px;
  color: #ffffff;
  background: #0f172a;
}

.book-lightbox-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #ffffff;
}

.book-lightbox-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

/* Responsive: Tablets y Celulares */
@media (max-width: 992px) {
  .book-container {
    min-height: 640px;
  }

  .book-page-left,
  .book-page-right {
    padding: 28px 24px;
  }

  .page-heading {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .book-gallery-section {
    padding: 60px 0 70px;
  }

  .book-stage {
    padding: 10px 0 20px;
  }

  .book-arrow {
    width: 42px;
    height: 42px;
  }

  .book-arrow-prev {
    left: 4px;
  }

  .book-arrow-next {
    right: 4px;
  }

  .book-container {
    min-height: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }

  .book-spine,
  .book-ribbon-bookmark {
    display: none;
  }

  .book-spread {
    grid-template-columns: 1fr;
    position: relative;
    height: auto;
  }

  .book-spread:not(.active) {
    display: none;
  }

  .book-spread.active {
    display: flex;
    flex-direction: column;
  }

  .book-page-left {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 20px;
  }

  .book-page-right {
    border-left: none;
    padding: 24px 20px;
  }

  .page-photo-frame {
    max-height: 230px;
  }

  .cover-gold-border {
    padding: 30px 18px;
  }

  .cover-title {
    font-size: 24px;
  }

  .book-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px;
    gap: 12px;
  }

  .book-progress-track {
    max-width: 100%;
  }

  .book-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   ESTANTERÍA Y BIBLIOTECA DE LIBROS FOTOGRÁFICOS 3D (GALERÍA MULTIMEDIA)
   ========================================================================== */
.bookshelf-section {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.shelf-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 44px;
}

.shelf-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.shelf-filter-btn:hover {
  border-color: #0079c2;
  color: #004785;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 71, 133, 0.12);
}

.shelf-filter-btn.active {
  background: linear-gradient(135deg, #004785 0%, #0079c2 100%);
  color: #ffffff;
  border-color: #d4af37;
  box-shadow: 0 4px 14px rgba(0, 71, 133, 0.25);
}

.shelf-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 36px 28px;
  margin-bottom: 50px;
}

.shelf-book-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.shelf-book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
  border-color: #cbd5e1;
}

.shelf-book-cover {
  position: relative;
  height: 340px;
  border-radius: 4px 14px 14px 4px;
  overflow: hidden;
  box-shadow: -8px 0 16px rgba(0, 0, 0, 0.35), 0 14px 28px rgba(0, 0, 0, 0.25);
  margin-bottom: 18px;
  transition: transform 0.35s ease;
}

.shelf-book-card:hover .shelf-book-cover {
  transform: rotateY(-6deg) scale(1.02);
}

.shelf-book-spine {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(255,255,255,0.2) 50%, rgba(0,0,0,0.4) 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.4);
  z-index: 2;
}

.shelf-book-gold-border {
  position: absolute;
  top: 12px;
  left: 28px;
  right: 14px;
  bottom: 12px;
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  border-radius: 6px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at center, rgba(255,255,255,0.06) 0%, transparent 80%);
}

.shelf-book-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: #fce79f;
  border-radius: 4px;
}

.shelf-book-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin: 8px 0 3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.shelf-book-kicker {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 8px;
}

.shelf-book-thumb-wrap {
  position: relative;
  flex-grow: 1;
  min-height: 110px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.shelf-book-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.shelf-book-card:hover .shelf-book-thumb-wrap img {
  transform: scale(1.08);
}

.shelf-book-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.shelf-book-count {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
}

.shelf-book-open-label {
  font-size: 11px;
  font-weight: 800;
  color: #fce79f;
}

.shelf-book-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.shelf-book-info-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.shelf-book-info-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
  margin-bottom: 14px;
}

.shelf-book-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: #f1f5f9;
  color: #004785;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.shelf-book-card:hover .shelf-book-open-btn {
  background: #004785;
  color: #ffffff;
  border-color: #004785;
}

.gallery-user-tip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 820px;
  margin: 0 auto;
}

.gallery-user-tip-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.gallery-user-tip-text {
  font-size: 13px;
  color: #1e3a8a;
  line-height: 1.5;
}

.gallery-user-tip-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: #1d4ed8;
}

.gallery-user-tip-text code {
  background: #dbeafe;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-family: monospace;
}

/* Lector 3D (Viewer Section) */
.book-viewer-section {
  padding: 60px 0 90px;
  background: #07111e;
  border-top: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
}

.book-viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.book-viewer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back-shelf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back-shelf:hover {
  background: #0079c2;
  color: #ffffff;
  border-color: #0079c2;
}

.active-book-meta {
  display: flex;
  flex-direction: column;
}

.active-book-badge {
  font-size: 11px;
  font-weight: 800;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-book-heading {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.book-viewer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-switcher-label {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.book-quick-switcher {
  background: #0f172a;
  border: 1.5px solid #334155;
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.book-quick-switcher:focus {
  border-color: #0079c2;
}

/* Home Showcase Teaser */
.home-gallery-showcase {
  padding: 80px 0 90px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px solid #e2e8f0;
}

.home-shelf-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 36px 0 44px;
}

.home-shelf-preview-card {
  position: relative;
  background: #0f172a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.home-shelf-preview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0, 71, 133, 0.2);
}

.home-shelf-preview-img {
  height: 180px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.home-shelf-preview-card:hover .home-shelf-preview-img {
  transform: scale(1.06);
}

.home-shelf-preview-body {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.home-shelf-preview-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 800;
  color: #004785;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.home-shelf-preview-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.home-shelf-preview-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #0079c2;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   DISEÑO INSTITUCIONAL INSPIRADO EN CONCESIÓN (LÍNEAS AZULES VINUS)
   Autor: Mateo Jaramillo Suarez | teojaramillosuarez@gmail.com | 3157456196
   Concesión Vías del Nus - Vinus S.A.S.
   ========================================================================== */

/* ==========================================================================
   BARRA FLOTANTE DE CIFRAS Y MÉTRICAS CLAVE (BENTO GRID 4G)
   Autor: Mateo Jaramillo Suarez | teojaramillosuarez@gmail.com | 3157456196
   ========================================================================== */
.quienes-stats-strip-wrap {
  position: relative;
  z-index: 10;
  margin-top: -55px;
  margin-bottom: 24px;
}

.quienes-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(0, 121, 194, 0.24);
  border-radius: 20px;
  padding: 22px 28px;
  box-shadow: 0 16px 45px rgba(0, 71, 133, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quienes-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 12px;
  border-right: 1px solid rgba(0, 121, 194, 0.14);
  transition: transform 0.3s ease;
}

.quienes-stat-card:last-child {
  border-right: none;
}

.quienes-stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 121, 194, 0.12) 0%, rgba(0, 71, 133, 0.08) 100%);
  border: 1px solid rgba(0, 121, 194, 0.22);
  color: #0079c2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease;
}

.quienes-stat-card:hover .stat-icon-wrap {
  transform: scale(1.08);
  background: linear-gradient(135deg, #0079c2 0%, #004785 100%);
  color: #ffffff;
}

.stat-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.stat-icon-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.08) 100%);
  border-color: rgba(245, 158, 11, 0.3);
  color: #d97706;
}

.quienes-stat-card:hover .stat-icon-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #ffffff;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 26px;
  font-weight: 900;
  color: #004785;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.stat-gold {
  color: #b45309;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
  margin-top: 4px;
}

/* Fondo con líneas diagonales sutiles en azul Vinus para máximo realce de la información */
.quienes-page-wrap {
  background-color: #fafcff;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0, 121, 194, 0.014) 0,
    rgba(0, 121, 194, 0.014) 1px,
    transparent 1px,
    transparent 28px
  );
  padding: 55px 0 90px 0;
  min-height: 80vh;
  position: relative;
}

.quienes-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ==========================================================================
   SHOWCASE DE VIDEO INSTITUCIONAL DINÁMICO E INTERACTIVO
   Autor: Mateo Jaramillo Suarez | teojaramillosuarez@gmail.com | 3157456196
   ========================================================================== */
.quienes-media-container {
  float: left;
  width: 540px;
  max-width: 48%;
  margin: 4px 32px 18px 0;
  position: relative;
  z-index: 5;
}

/* Tarjeta de video compacta, sobria y pulida */
.quienes-video-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: #051a2d;
  border: 1.5px solid rgba(0, 121, 194, 0.35);
  box-shadow: 0 14px 32px rgba(9, 30, 58, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  outline: none;
}

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

.quienes-video-card:hover,
.quienes-video-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(0, 174, 239, 0.75);
  box-shadow: 0 18px 40px rgba(0, 71, 133, 0.26), 0 0 24px rgba(0, 174, 239, 0.22);
}

/* Proporción 16:9 equilibrada */
.quienes-img-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 310px;
  overflow: hidden;
  background: #082d49;
}

.quienes-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1), filter 0.4s ease;
}

.quienes-video-card:hover .quienes-img-box img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Destello de luz diagonal que viaja por el video automáticamente */
.quienes-media-sheen {
  position: absolute;
  top: -50%;
  left: -70%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 20%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.03) 80%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  z-index: 2;
  animation: videoSheenSweep 5s ease-in-out infinite;
}

@keyframes videoSheenSweep {
  0% {
    transform: translateX(-160%) rotate(25deg);
  }
  38%, 100% {
    transform: translateX(380%) rotate(25deg);
  }
}

/* Velo sutil para contraste del texto inferior sin oscurecer la imagen */
.quienes-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 55%,
    rgba(3, 20, 39, 0.85) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Barra Superior de Estado y Calidad HD */
.quienes-video-top-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}

.quienes-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(4, 24, 48, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.quienes-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: liveBeacon 1.8s ease-in-out infinite;
}

@keyframes liveBeacon {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.45);
    opacity: 0.5;
  }
}

.quienes-badge-quality {
  background: rgba(0, 71, 133, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 174, 239, 0.45);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #dbeafe;
  letter-spacing: 0.5px;
}

/* Centro: Envoltorio del botón Play con triple onda concéntrica radar */
.quienes-play-center-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quienes-radar-wave {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(0, 174, 239, 0.7);
  pointer-events: none;
  animation: radarExpand 2.8s cubic-bezier(0.1, 0.7, 0.3, 1) infinite;
}

.wave-1 {
  animation-delay: 0s;
}

.wave-2 {
  animation-delay: 0.9s;
}

.wave-3 {
  animation-delay: 1.8s;
}

@keyframes radarExpand {
  0% {
    transform: scale(1);
    opacity: 0.85;
    border-color: rgba(0, 174, 239, 0.85);
  }
  50% {
    border-color: rgba(0, 121, 194, 0.5);
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
    border-color: rgba(0, 121, 194, 0);
  }
}

/* Botón Play Circular proporcionado */
.quienes-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0079c2 0%, #004785 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 8px 24px rgba(0, 71, 133, 0.55), 0 0 18px rgba(0, 174, 239, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.2);
  outline: none;
}

.quienes-play-glow-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, #00aeef 35%, #ffca28 65%, transparent 100%);
  opacity: 0.8;
  animation: ringSpin 3.5s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
  pointer-events: none;
}

@keyframes ringSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.quienes-video-card:hover .quienes-play-btn,
.quienes-play-btn:hover {
  transform: scale(1.08);
  background: linear-gradient(135deg, #00aeef 0%, #005a9e 100%);
  border-color: #ffca28;
  box-shadow: 0 12px 32px rgba(0, 121, 194, 0.65), 0 0 28px rgba(245, 158, 11, 0.5);
}

.quienes-play-btn svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
  margin-left: 3px;
  transition: transform 0.3s ease;
}

.quienes-play-btn:hover svg {
  transform: scale(1.08);
}

/* Barra Inferior Glassmorphic con Ecualizador Animado */
.quienes-video-bottom-bar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(4, 24, 48, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  z-index: 3;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.quienes-video-card:hover .quienes-video-bottom-bar {
  background: rgba(4, 24, 48, 0.92);
  border-color: rgba(0, 174, 239, 0.45);
  box-shadow: 0 8px 24px rgba(0, 71, 133, 0.4);
}

/* Ecualizador animado de barras de audio */
.quienes-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}

.eq-bar {
  width: 3.5px;
  background: linear-gradient(180deg, #ffca28 0%, #00aeef 100%);
  border-radius: 2px;
  animation: eqBounce 1.2s ease-in-out infinite;
  transform-origin: bottom;
}

.bar-1 {
  height: 45%;
  animation-delay: 0.1s;
  animation-duration: 0.9s;
}

.bar-2 {
  height: 90%;
  animation-delay: 0.35s;
  animation-duration: 1.1s;
}

.bar-3 {
  height: 65%;
  animation-delay: 0.2s;
  animation-duration: 0.8s;
}

.bar-4 {
  height: 100%;
  animation-delay: 0.45s;
  animation-duration: 1.25s;
}

@keyframes eqBounce {
  0%, 100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

.quienes-bottom-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.quienes-video-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quienes-video-dur {
  font-size: 12.5px;
  font-weight: 500;
  color: #93c5fd;
}

.quienes-play-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 121, 194, 0.35);
  border: 1px solid rgba(0, 174, 239, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.quienes-video-card:hover .quienes-play-chip {
  background: var(--color-accent);
  color: #042448;
  border-color: #ffca28;
  transform: scale(1.1);
}

/* Kicker y Título Principal */
.quienes-kicker-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quienes-kicker-text {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #0079c2;
}

.quienes-kicker-bar {
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #0079c2, #00aeef);
  border-radius: 2px;
}

.quienes-ref-title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 900;
  color: #091e3a;
  letter-spacing: -0.5px;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

/* Narrativa Principal: tarjeta editorial pulida con video más compacto alineado arriba y texto que completa la línea abajo */
.quienes-narrative-grid {
  display: block;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 121, 194, 0.16);
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow: 0 16px 40px rgba(9, 30, 58, 0.06);
  margin-bottom: 64px;
}

.quienes-narrative-grid::after {
  content: "";
  display: table;
  clear: both;
}

.quienes-media-column {
  float: left;
  width: 48%;
  max-width: 540px;
  margin: 4px 32px 16px 0;
}

.quienes-media-column .quienes-media-container {
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.quienes-text-column {
  display: block;
}

.quienes-lead-text {
  font-size: 16px;
  font-weight: 600;
  color: #004785;
  line-height: 1.75;
  margin: 0 0 14px 0;
  text-align: justify;
}

.quienes-ref-text {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  margin: 0 0 14px 0;
  text-align: justify;
}

.quienes-ref-text strong {
  color: #091e3a;
  font-weight: 700;
}

/* Chips de Hitos de Infraestructura (barra completa e integrada en la parte inferior) */
.quienes-features-chips {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 121, 194, 0.14);
}

.chip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 121, 194, 0.22);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 700;
  color: #004785;
  box-shadow: 0 2px 6px rgba(0, 71, 133, 0.05);
  transition: all 0.25s ease;
}

.chip-item:hover {
  background: #0079c2;
  color: #ffffff;
  border-color: #0079c2;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 121, 194, 0.28);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00aeef;
  transition: background 0.25s ease;
}

.chip-item:hover .chip-dot {
  background: #ffffff;
}

/* ==========================================================================
   BENTO GRID DE DIRECCIÓN ESTRATÉGICA (MISIÓN, VISIÓN, CONTRATO APP)
   ========================================================================== */
.quienes-bento-section {
  margin-bottom: 64px;
}

.quienes-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px auto;
}

.quienes-section-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #0079c2;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.quienes-section-title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 900;
  color: #091e3a;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.quienes-section-subtitle {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.quienes-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.bento-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 121, 194, 0.18);
  border-radius: 18px;
  padding: 34px 30px;
  box-shadow: 0 10px 30px rgba(0, 71, 133, 0.06);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 174, 239, 0.6);
  box-shadow: 0 16px 40px rgba(0, 71, 133, 0.14);
}

.bento-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.bento-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bento-icon-box svg {
  width: 24px;
  height: 24px;
}

.bento-icon-blue {
  background: linear-gradient(135deg, rgba(0, 71, 133, 0.12) 0%, rgba(0, 121, 194, 0.08) 100%);
  border: 1px solid rgba(0, 71, 133, 0.22);
  color: #004785;
}

.bento-icon-cyan {
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.16) 0%, rgba(0, 121, 194, 0.08) 100%);
  border: 1px solid rgba(0, 174, 239, 0.3);
  color: #0079c2;
}

.bento-icon-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #d97706;
}

.bento-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #0079c2;
  background: rgba(0, 121, 194, 0.08);
  padding: 5px 12px;
  border-radius: 999px;
}

.bento-badge-gold {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.bento-title {
  font-size: 22px;
  font-weight: 800;
  color: #091e3a;
  margin: 0 0 12px 0;
}

.bento-text {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
  margin: 0 0 22px 0;
  flex-grow: 1;
  text-align: justify;
}

.bento-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-pill {
  font-size: 12px;
  font-weight: 700;
  color: #004785;
  background: rgba(0, 71, 133, 0.06);
  border: 1px solid rgba(0, 71, 133, 0.12);
  border-radius: 6px;
  padding: 4px 10px;
}

/* Bento Card Marco Contractual (Ancho Completo) */
.bento-contract {
  grid-column: 1 / -1;
}

.bento-contract-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: center;
}

.bento-contract-left {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.bento-contract-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 71, 133, 0.04);
  border: 1px solid rgba(0, 71, 133, 0.1);
  border-radius: 12px;
  padding: 18px 20px;
}

.contract-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(0, 71, 133, 0.15);
}

.contract-chip:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.contract-chip-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.contract-chip-val {
  font-size: 13px;
  font-weight: 800;
  color: #004785;
}

/* ==========================================================================
   GRID 3D DE VALORES CORPORATIVOS
   ========================================================================== */
.quienes-values-section {
  margin-bottom: 64px;
}

.quienes-values-3d-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Tarjeta destacada de ancho completo para armonizar el 7mo valor */
.value-card-3d.value-card-featured {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.95) 100%);
  border: 1.5px solid rgba(0, 121, 194, 0.28);
  padding: 26px 32px;
}

.value-card-featured .value-icon-circle {
  margin-bottom: 0;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.value-card-featured .value-featured-content {
  flex: 1;
}

.value-card-featured .value-badge-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #0079c2;
  background: #e0f2fe;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.value-card-featured .value-title {
  font-size: 19px;
  margin-top: 0;
  margin-bottom: 6px;
}

.value-card-featured .value-desc {
  margin: 0;
  max-width: 950px;
  line-height: 1.65;
}

.value-card-3d {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 121, 194, 0.16);
  border-radius: 18px;
  padding: 30px 24px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 71, 133, 0.05);
}

.value-card-3d::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0079c2, #00aeef);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.value-card-3d:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 174, 239, 0.6);
  box-shadow: 0 20px 45px rgba(0, 71, 133, 0.15), 0 0 25px rgba(0, 174, 239, 0.12);
}

.value-card-3d:hover::before {
  opacity: 1;
}

.value-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0079c2 0%, #004785 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(0, 71, 133, 0.3);
  transition: transform 0.3s ease;
}

.value-card-3d:hover .value-icon-circle {
  transform: scale(1.1) rotate(4deg);
  box-shadow: 0 8px 22px rgba(0, 121, 194, 0.45);
}

.value-icon-circle svg {
  width: 26px;
  height: 26px;
}

.value-title {
  font-size: 19px;
  font-weight: 800;
  color: #091e3a;
  margin: 0 0 10px 0;
}

.value-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   MÓDULO TERRITORIAL: 10 MUNICIPIOS CONECTADOS
   ========================================================================== */
.quienes-territorio-card {
  position: relative;
  background: linear-gradient(135deg, #042448 0%, #004785 50%, #002d5a 100%);
  border-radius: 20px;
  padding: 44px 40px;
  color: #ffffff;
  margin-bottom: 54px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(4, 36, 72, 0.32);
  border: 1px solid rgba(0, 174, 239, 0.3);
}

.quienes-territorio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
}

.territorio-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.territorio-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffca28;
  margin-bottom: 16px;
}

.territorio-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 12px 0;
  line-height: 1.25;
}

.territorio-desc {
  font-size: 15.5px;
  line-height: 1.75;
  color: #cbd5e1;
  margin: 0 0 26px 0;
}

.municipios-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.muni-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  transition: all 0.25s ease;
}

.muni-pill:hover {
  background: #ffca28;
  color: #042448;
  border-color: #ffca28;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.muni-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00aeef;
  transition: background 0.25s ease;
}

.muni-pill:hover .muni-dot {
  background: #042448;
}

/* ==========================================================================
   PANEL DE GOBIERNO CORPORATIVO Y DESCARGA OFICIAL
   ========================================================================== */
.quienes-data-action {
  padding: 30px 36px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 121, 194, 0.2);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 71, 133, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.quienes-data-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #0079c2;
  background: rgba(0, 121, 194, 0.1);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.quienes-data-info h4 {
  font-size: 18px;
  font-weight: 800;
  color: #004785;
  margin: 0 0 4px 0;
}

.quienes-data-info p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.quienes-data-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0079c2 0%, #004785 100%);
  color: #ffffff;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 121, 194, 0.25);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.quienes-data-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 121, 194, 0.4);
  color: #ffffff;
}

.quienes-data-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Modal de Video */
.quienes-video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 30, 51, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.quienes-video-modal.active {
  display: flex;
}

.quienes-modal-content {
  position: relative;
  width: 100%;
  max-width: 1120px;
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.quienes-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease;
}

.quienes-modal-close:hover {
  background: rgba(220, 38, 38, 0.8);
}

.quienes-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.quienes-iframe-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsividad */
@media (max-width: 992px) {
  .quienes-stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
  }
  .quienes-stat-card {
    border-right: none;
    border-bottom: 1px solid rgba(0, 121, 194, 0.12);
    padding-bottom: 12px;
  }
  .quienes-stat-card:nth-last-child(-n+2) {
    border-bottom: none;
  }
  .quienes-narrative-grid {
    margin-bottom: 48px;
  }
  .quienes-media-column {
    float: none;
    width: 100%;
    max-width: 780px;
    margin: 0 auto 28px auto;
  }
  .quienes-media-column .quienes-media-container {
    max-width: 780px;
    margin: 0 auto;
  }
  .quienes-img-box {
    height: 400px;
    min-height: 360px;
  }
  .quienes-bento-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .bento-contract-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .quienes-values-3d-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .quienes-territorio-card {
    padding: 34px 28px;
  }
}

@media (max-width: 600px) {
  .quienes-stats-strip-wrap {
    margin-top: -30px;
  }
  .quienes-stats-strip {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 16px;
  }
  .quienes-stat-card {
    border-bottom: 1px solid rgba(0, 121, 194, 0.1);
    padding: 8px 0;
  }
  .quienes-stat-card:last-child {
    border-bottom: none;
  }
  .stat-num {
    font-size: 22px;
  }
  .stat-label {
    font-size: 11.5px;
  }
  .quienes-page-wrap {
    padding: 16px 0 54px 0;
  }
  .quienes-img-box {
    height: 300px;
    min-height: 280px;
  }
  .quienes-play-btn {
    width: 66px;
    height: 66px;
  }
  .quienes-play-btn svg {
    width: 24px;
    height: 24px;
  }
  .quienes-radar-wave {
    width: 66px;
    height: 66px;
  }
  .quienes-badge-live,
  .quienes-badge-quality {
    font-size: 10px;
    padding: 4px 9px;
  }
  .quienes-video-title {
    font-size: 12px;
  }
  .quienes-video-dur {
    font-size: 10.5px;
  }
  .bento-card {
    padding: 24px 20px;
  }
  .bento-contract-left {
    flex-direction: column;
    gap: 14px;
  }
  .quienes-values-3d-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .value-card-3d {
    padding: 24px 20px;
  }
  .value-card-3d.value-card-featured {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 16px;
  }
  .value-card-featured .value-icon-circle {
    margin-bottom: 12px;
  }
  .quienes-territorio-card {
    padding: 28px 20px;
    border-radius: 16px;
  }
  .territorio-title {
    font-size: 22px;
  }
  .muni-pill {
    font-size: 12px;
    padding: 6px 12px;
  }
  .quienes-data-action {
    flex-direction: column;
    align-items: stretch;
    padding: 22px 18px;
    border-radius: 16px;
    gap: 18px;
  }
  .quienes-data-btn {
    justify-content: center;
  }
}




