/* CSS Personalizado */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
    border: solid 2px #6b777a;
  }
  100% {
    transform: scale(1);
  }
}
.banners-section {
  display: none !important;
}
.img-footer {
  max-width: 70px;
}
.btn-flotante {
  position: fixed;
  display: block;
  bottom: 20px;
  right: 20px;
  background: #00b3e6;
  z-index: 9999999;
  border-radius: 20px;
  font-size: 14px;
  padding: 5px 13px;
  color: #fff;
  font-weight: 400;
  animation: pulse 3s infinite !important;
}
.btn-flotante img {
  width: 70px;
  height: 70px;
}

/* =============================================
   MUNICIPALIDAD DE VILLA DE MERLO
   Hoja de estilos principal
   Tipografía: Montserrat (Google Fonts)
   Paleta principal: #033e8c (azul), #e60061 (rosa),
   #00b3e6 (cyan), #942cbf (púrpura),
   #ee7b00 (naranja), #49ad33 (verde)
============================================= */

/* =============================================
   1. RESET Y BASE
============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #e5e7eb;       /* gris página (gray-200) */
  color: #1f2937;
  min-width: 390px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Quitar estilos de lista */
ul, ol {
  list-style: none;
}

/* Quitar subrayado de enlaces */
a {
  text-decoration: none;
  color: inherit;
}

/* Imágenes responsivas */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Botones sin estilo base */
button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

/* =============================================
   2. VARIABLES CSS (TOKENS DE DISEÑO)
============================================= */
:root {
  /* Colores principales */
  --color-primary:        #033e8c;   /* Azul principal */
  --color-primary-dark:   #032f6b;   /* Azul oscuro (footer text) */
  --color-primary-light:  #0554c2;   /* Azul claro (hover) */
  --color-secondary:      #00b3e6;   /* Cyan (borde hero) */
  --color-secondary-light:#5cd6f5;   /* Cyan claro (nav hover) */

  /* Colores de tarjetas */
  --color-pink:    #e60061;   /* Rosa/magenta (Habilitaciones, Agenda) */
  --color-purple:  #942cbf;   /* Púrpura (ViDi, Geoportal) */
  --color-orange:  #ee7b00;   /* Naranja (Estacionamiento, Proveedores) */
  --color-green:   #49ad33;   /* Verde (Tributos, Vivienda) */

  /* Grises */
  --color-white:   #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100:#f3f4f6;
  --color-gray-200:#e5e7eb;
  --color-gray-400:#9ca3af;
  --color-gray-500:#6b7280;
  --color-black:   #000000;

  /* Espaciado */
  --space-1:   0.25rem;   /* 4px */
  --space-2:   0.5rem;    /* 8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-7:   1.75rem;   /* 28px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */

  /* Tipografía */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */

  /* Bordes */
  --radius-sm:  0.375rem; /* 6px */
  --radius-md:  0.5rem;   /* 8px */
  --radius-lg:  0.75rem;  /* 12px */
  --radius-full:9999px;

  /* Sombras */
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -2px rgba(0,0,0,.10);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.10), 0 4px 6px -4px rgba(0,0,0,.10);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.25);

  /* Transición estándar */
  --transition: all 0.15s cubic-bezier(0.4,0,0.2,1);

  /* Ancho máximo del contenido */
  --max-width: 1280px;
}

/* =============================================
   3. CONTENEDOR GENÉRICO
============================================= */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-5);  /* 20px */
}

/* =============================================
   4. HEADER / NAVEGACIÓN
============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  /* Gradiente azul → rosa */
  background-image: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 47%, rgba(14, 191, 227, 1) 100%);
}

/* Sombra al hacer scroll */
.site-header--scrolled {
  box-shadow: 0 4px 20px rgba(3,62,140,0.4);
}

.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
  height: 6rem;         /* 96px, exacto del original */
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* --- Logo --- */
.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.header-logo:hover,
.header-logo:focus {
  opacity: 0.85;
}
.header-logo:focus {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.logo-svg {
  height: 3.5rem;  /* h-14 = 56px */
  width: auto;
}

/* --- Navegación escritorio --- */
.nav-desktop {
  display: flex;
  align-items: center;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-7);  /* gap-7 = 28px */
}
.nav-item {
  position: relative;
}
.nav-link {
  color: var(--color-white);
  font-size: var(--text-sm);        /* text-sm */
  font-weight: 600;                  /* font-semibold */
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding-block: var(--space-2);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--color-secondary-light);  /* cyan claro */
  outline: none;
}

.dropdown-arrow {
  font-size: 0.65em;
  margin-left: 2px;
  transition: transform 0.2s;
}
.nav-item:hover .dropdown-arrow,
.nav-item:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

/* --- Menú desplegable escritorio --- */
.img-logo {
  max-width: 180px;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--color-gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(-4px);
  z-index: 100;
}
.dropdown-menu--open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu li a {
  display: block;
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background: var(--color-primary);
  color: var(--color-white);
  outline: none;
}

/* --- Hamburguesa --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background 0.2s;
}
.hamburger:hover {
  background: rgba(255,255,255,0.15);
}
.hamburger:focus {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
/* Animación X al abrir */
.hamburger--open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger--open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger--open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Menú móvil --- */
.nav-mobile {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-gray-100);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  padding: var(--space-4) var(--space-5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
}
.nav-mobile--open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  border-radius: var(--radius-md);
  transition: background 0.15s;
  text-align: left;
}
.mobile-nav-link:hover,
.mobile-nav-link:focus {
  background: var(--color-gray-200);
  outline: none;
}
.mobile-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: var(--space-4);
}
.mobile-item--open .mobile-dropdown {
  max-height: 300px;
}
.mobile-item--open .dropdown-arrow {
  transform: rotate(180deg);
}
.mobile-dropdown li a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.mobile-dropdown li a:hover,
.mobile-dropdown li a:focus {
  background: var(--color-gray-200);
  outline: none;
}

/* =============================================
   5. HERO / BANNER PRINCIPAL
============================================= */
.hero {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 280px;
  background-color: var(--color-primary);
  /* Borde inferior cyan de 10px */
  border-bottom: 10px solid var(--color-secondary);
  overflow: hidden;
}

/* Fondo visual (reemplaza el video) */
.hero-bg-fallback {
  position: absolute;
  inset: 0;
  background:
    /* Patrón de puntos decorativos */
    radial-gradient(ellipse at 70% 50%, rgba(0,179,230,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(230,0,97,0.15) 0%, transparent 50%),
    linear-gradient(135deg, #033e8c 0%, #042d6a 40%, #0a1f4e 100%);
  /* Patrón de ciudad estilizado con CSS */
  background-size: cover;
}
/* Silueta de ciudad decorativa */
.hero-bg-fallback::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: rgba(255,255,255,0.04);
  clip-path: polygon(
    0% 100%, 0% 60%, 3% 60%, 3% 40%, 6% 40%, 6% 55%,
    10% 55%, 10% 30%, 12% 30%, 12% 55%, 15% 55%, 15% 45%,
    18% 45%, 18% 20%, 20% 20%, 20% 18%, 22% 18%, 22% 20%,
    24% 20%, 24% 45%, 28% 45%, 28% 50%, 32% 50%, 32% 35%,
    35% 35%, 35% 50%, 40% 50%, 40% 60%, 45% 60%, 45% 40%,
    48% 40%, 48% 60%, 52% 60%, 52% 45%, 55% 45%, 55% 60%,
    60% 60%, 60% 35%, 63% 35%, 63% 25%, 65% 25%, 65% 35%,
    67% 35%, 67% 60%, 72% 60%, 72% 50%, 75% 50%, 75% 55%,
    80% 55%, 80% 40%, 83% 40%, 83% 55%, 87% 55%, 87% 45%,
    90% 45%, 90% 55%, 95% 55%, 95% 60%, 100% 60%, 100% 100%
  );
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* El fallback solo se muestra si el video falla (queda detrás) */
.hero-video-wrapper .hero-bg-fallback {
  z-index: -1;
}

/* --- Widget fecha/clima del hero --- */
.hero-widget {
  position: absolute;
  bottom: 3.5rem;    /* bottom-14 */
  /* Alinea con el logo: replica el padding-inline del header-inner */
  left: max(var(--space-5), calc((100% - var(--max-width)) / 2 + var(--space-5)));
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: rgba(255,255,255,0.5);  /* bg-white/50 */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  color: var(--color-primary);
  font-weight: 600;
}
.hero-widget-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.hero-widget-day {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-widget-num {
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: 1;
}
.hero-widget-month {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-widget-divider {
  width: 1px;
  height: 40px;
  background: var(--color-primary);
  opacity: 0.3;
}
.hero-widget-weather {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.weather-icon {
  width: 28px;
  height: 28px;
}
.weather-temp {
  font-size: var(--text-xl);
  font-weight: 700;
}

/* --- Botón play/pause del hero --- */
.hero-play-btn {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.hero-play-btn:hover {
  background: rgba(255,255,255,0.7);
}
.hero-play-btn:focus {
  outline: 3px solid rgba(255,255,255,0.7);
  outline-offset: 2px;
}
.hero-play-icon {
  width: 18px;
  height: 18px;
}

/* =============================================
   6. SECCIÓN SERVICIOS
============================================= */
.services-section {
  background: var(--color-white);
  padding-block: var(--space-10);  /* py-10 = 40px */
}

/* Título de sección reutilizable */
.section-title {
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--color-primary);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--space-10);  /* mb-10 */
  letter-spacing: 0.02em;
}
/* Versión con borde inferior (noticias) */
.section-title--bordered {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--space-5);
}

.title-accent {
  color: var(--color-secondary);  /* cyan */
}

/* --- Grid de tarjetas --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* mobile: 2 cols */
  gap: var(--space-5);
  place-items: center;
  margin-bottom: var(--space-5);
}

/* --- Tarjeta de servicio --- */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 192px;   /* xl:w-48 = 192px */
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);   /* rounded-xl */
  padding: var(--space-5);
  color: var(--color-white);
  transition: var(--transition);
  cursor: pointer;
  overflow: visible;
}
.service-card:hover,
.service-card:focus {
  transform: scale(1.04);
  outline: 3px solid rgba(255,255,255,0.5);
  outline-offset: 3px;
}

/* Variantes de color por tarjeta */
.service-card--purple { background: var(--color-purple); }
.service-card--green  { background: var(--color-green); }
.service-card--pink   { background: var(--color-pink); }
.service-card--blue   { background: var(--color-primary); }
.service-card--orange { background: var(--color-orange); }
.service-card--cyan   { background: var(--color-secondary); }

.service-card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-3);
}
.service-card-icon svg {
  width: 100%;
  height: 100%;
}
.service-card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.service-card-sub {
  font-size: var(--text-xs);
  font-weight: 400;
  opacity: 0.85;
  margin-top: var(--space-1);
  line-height: 1.4;
}

/* Badge "Nuevo" */
.service-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

/* Botón "Ver más" */
.services-more,
.news-more {
  display: flex;
  justify-content: center;
  margin-top: var(--space-8);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.625rem var(--space-5);  /* py-2.5 px-5 */
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}
.btn-outline:hover,
.btn-outline:focus {
  background: var(--color-primary);
  color: var(--color-white);
  outline: none;
}

/* Contenedor de tarjetas extra (ocultas) */
.services-extra {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.55s ease, opacity 0.45s ease;
}
.services-extra.is-open {
  max-height: 1200px;
  opacity: 1;
}

/* Flecha del botón Ver más */
.btn-ver-mas-arrow {
  display: inline-block;
  transition: transform 0.35s ease;
}
.btn-ver-mas[aria-expanded="true"] .btn-ver-mas-arrow {
  transform: rotate(180deg);
}

/* =============================================
   7. SECCIÓN BANNERS PROMOCIONALES
============================================= */
.banners-section {
  padding-block: var(--space-4) var(--space-6);
}
.banners-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.promo-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  cursor: pointer;
}
.promo-banner:hover,
.promo-banner:focus {
  transform: scale(1.01);
  outline: none;
  filter: brightness(1.08);
}
.promo-banner--blue  { background: var(--color-primary); }
.promo-banner--pink  { background: var(--color-pink); }
.promo-banner--cyan  { background: var(--color-secondary); }
.promo-banner-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}
.promo-banner-icon svg {
  width: 100%;
  height: 100%;
}
.promo-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.promo-banner-title {
  color: var(--color-white);
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.promo-banner-sub {
  color: rgba(255,255,255,0.8);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* =============================================
   8. SECCIÓN NOTICIAS
============================================= */
.news-section {
  padding-block: var(--space-10);
}

/* --- Tarjeta de noticia --- */
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);        /* rounded-xl */
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  height: 480px;                          /* h-[500px] aprox */
  transition: var(--transition);
  cursor: pointer;
}
.news-card:hover,
.news-card:focus-within {
  transform: scale(1.02);
  outline: none;
}
.news-card-img-wrapper {
  flex-shrink: 0;
  height: 200px;                          /* h-64 aprox */
  overflow: hidden;
}
.news-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-card:hover .news-card-img {
  transform: scale(1.05);
}
.news-card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
  overflow: hidden;
}
.news-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.4;
  /* Limitar a 4 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-text {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-black);
  line-height: 1.6;
  /* Limitar a 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Botones de navegación Swiper personalizados --- */
.swiper-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(3,62,140,0.7);   /* primary 70% */
  color: var(--color-white);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}
.swiper-btn:hover {
  background: var(--color-primary);
}
.swiper-btn:focus {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}
.swiper-btn--prev { left: 8px; }
.swiper-btn--next { right: 8px; }

/* Ocultar botones nativos de Swiper */
.swiper-button-prev,
.swiper-button-next {
  display: none !important;
}

/* --- Paginación Swiper personalizada --- */
.swiper-pagination-noticias {
  position: relative !important;
  bottom: auto !important;
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
  gap: var(--space-2);
}
.swiper-bullet {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-gray-400);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.swiper-bullet--active {
  background: var(--color-primary);
  transform: scale(1.25);
}

/* Contenedor Swiper: overflow hidden para recortar exactamente 4 slides */
.swiper-noticias {
  padding-block: var(--space-4) !important;
  overflow: hidden !important;
  position: relative;
}
.swiper-noticias .swiper-wrapper {
  align-items: stretch;
}
.swiper-noticias .swiper-slide {
  height: auto;
}

/* =============================================
   9. FOOTER
============================================= */
.site-footer {
  /* Gradiente de abajo (azul) hacia arriba (transparente) */
  background-image: linear-gradient(to top, var(--color-primary), transparent);
  border-top: 2px solid var(--color-primary);
  margin-top: auto;
  padding-top: var(--space-5);
  padding-bottom: 40px;  /* pb-40 = 160px (espacio para chatbot) */
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-block: var(--space-10);
}

/* --- Columna brand --- */
.footer-col--brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.footer-logo {
  display: inline-flex;
  transition: opacity 0.2s;
}
.footer-logo:hover { opacity: 0.8; }
.footer-logo:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.logo-svg--blue {
  height: 3.5rem;
  width: auto;
}

.footer-address {
  font-style: normal;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary-dark);
  line-height: 1.7;
}
.footer-address a {
  color: var(--color-primary-dark);
  transition: color 0.2s;
}
.footer-address a:hover { color: var(--color-primary-light); }

/* Redes sociales */
.footer-social {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(3,62,140,0.08);
  transition: var(--transition);
}
.social-link:hover,
.social-link:focus {
  transform: scale(1.1);
  background: rgba(3,62,140,0.15);
  outline: none;
}
.social-link svg {
  width: 22px;
  height: 22px;
}

/* --- Columnas de navegación footer --- */
.footer-col--nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-nav-title {
  font-size: var(--text-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-nav-list a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary-dark);
  transition: color 0.2s;
}
.footer-nav-list a:hover,
.footer-nav-list a:focus {
  color: var(--color-primary-light);
  outline: none;
}

/* --- Columna emergencias --- */
.footer-col--emergency {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-emergency-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.emergency-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
.emergency-number {
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  min-width: 3.5rem;
}
.emergency-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark);
}

/* Copyright */
.footer-bottom {
  border-top: 1px solid rgba(3,62,140,0.15);
  padding-top: var(--space-5);
  text-align: center;
}
.footer-copy {
  font-size: var(--text-xs);
  font-weight: 500;
  color: #bbc7da;
  letter-spacing: 0.02em;
}

/* =============================================
   10. ANIMACIONES DE SCROLL
============================================= */
.animate-hidden {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Delays escalonados para grillas */
.services-grid .service-card:nth-child(1)  { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2)  { transition-delay: 0.10s; }
.services-grid .service-card:nth-child(3)  { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(4)  { transition-delay: 0.20s; }
.services-grid .service-card:nth-child(5)  { transition-delay: 0.25s; }
.services-grid .service-card:nth-child(6)  { transition-delay: 0.30s; }
.services-grid .service-card:nth-child(7)  { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(8)  { transition-delay: 0.10s; }
.services-grid .service-card:nth-child(9)  { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(10) { transition-delay: 0.20s; }
.services-grid .service-card:nth-child(11) { transition-delay: 0.25s; }
.services-grid .service-card:nth-child(12) { transition-delay: 0.30s; }

.banners-grid .promo-banner:nth-child(1) { transition-delay: 0.05s; }
.banners-grid .promo-banner:nth-child(2) { transition-delay: 0.10s; }
.banners-grid .promo-banner:nth-child(3) { transition-delay: 0.15s; }

/* =============================================
   11. MEDIA QUERIES — RESPONSIVE
============================================= */

/* --- md: 768px --- */
@media (min-width: 768px) {

  /* Sección de servicios: 2 → 3 columnas */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Banners en 2 columnas */
  .banners-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer en 2 columnas */
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Títulos más grandes en tablet */
  .section-title {
    font-size: var(--text-3xl);
  }
}

/* --- lg: 1024px --- */
@media (min-width: 1024px) {

  /* Mostrar navegación escritorio */
  .nav-desktop {
    display: flex;
  }
  /* Ocultar hamburguesa */
  .hamburger {
    display: none;
  }
  /* Ocultar menú móvil */
  .nav-mobile {
    display: none;
  }

  /* Servicios: 3 → 4 columnas */
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Banners en 3 columnas */
  .banners-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Footer en 4 columnas */
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* --- xl: 1280px --- */
@media (min-width: 1280px) {

  /* Servicios: 6 columnas (como el original) */
  .services-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  /* Tarjeta exactamente 192×192px */
  .service-card {
    width: 192px;
    max-width: 192px;
  }

}

/* --- Solo móvil: < 768px --- */
@media (max-width: 767px) {

  /* Mostrar hamburguesa */
  .hamburger {
    display: flex;
  }

  /* Ocultar nav escritorio */
  .nav-desktop {
    display: none;
  }

  /* Hero widget centrado */
  .hero-widget {
    left: 50%;
    transform: translateX(-50%);
    bottom: var(--space-10);
    white-space: nowrap;
  }

  /* Header más compacto */
  .header-inner {
    height: 4.5rem;
  }

  /* Ajuste de hero mínimo */
  .hero {
    min-height: 220px;
  }

  /* Video hero en móvil: prioriza el centro del video */
  .hero-video {
    object-position: center center;
  }

  /* Tarjetas de servicio 2 columnas en mobile */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  /* Tarjeta de servicio cuadrada responsiva */
  .service-card {
    width: 100%;
    max-width: none;
    aspect-ratio: 1 / 1;
  }

  /* Footer compacto */
  .site-footer {
    padding-bottom: 6rem;
  }

  /* Botones swiper en mobile */
  .swiper-btn--prev { left: 4px; }
  .swiper-btn--next { right: 4px; }
}

/* --- Pantallas muy pequeñas: < 480px --- */
@media (max-width: 479px) {
  /* En pantallas muy pequeñas el video se centra verticalmente */
  .hero-video {
    object-position: 60% center;
  }

  .hero-widget {
    font-size: 0.8em;
    padding: var(--space-2) var(--space-3);
    gap: var(--space-3);
  }
  .hero-widget-num {
    font-size: var(--text-2xl);
  }
  .section-title {
    font-size: var(--text-xl);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

/* =============================================
   12. FOCUS VISIBLE (ACCESIBILIDAD)
============================================= */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Quitar outline por mouse, mantener por teclado */
:focus:not(:focus-visible) {
  outline: none;
}

/* =============================================
   13. UTILIDADES
============================================= */

/* Ocultar solo visualmente (para lectores de pantalla) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Scroll suave preferencia del sistema */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animate-hidden {
    opacity: 1;
    transform: none;
  }
}
