
/* =============================================
   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;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #e5e7eb;       /* gris página (gray-200) */
  color: #1f2937;
  line-height: 1.5;
  overflow-x: hidden;
  -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 */
  --space-16:  4rem;      /* 64px */

  /* 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: 4.5rem;       /* Mobile-first: header compacto en móvil, 6rem desde 768px */
  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);
}

/* --- Navegación escritorio --- */
.nav-desktop {
  display: none;       /* Mobile-first: oculta en móvil/tablet, visible desde 1024px */
  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 {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}
.nav-item:hover .dropdown-arrow,
.nav-item:focus-within .dropdown-arrow {
  transform: rotate(180deg);
}

/* --- Menú desplegable escritorio --- */
.img-logo {
  max-width: 180px;
}
.img-footer {
  max-width: 70px;
}
.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: flex;        /* Mobile-first: visible en móvil/tablet, se oculta desde 1024px */
  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: 220px;    /* Mobile-first: hero más bajo en móvil, 280px desde 768px */
  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: 60% center;  /* Mobile-first: encuadre para pantallas muy chicas, "center" desde 480px */
  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 ---
   Mobile-first: en móvil queda centrado, compacto y con texto más chico;
   desde 480px recupera tamaño normal y desde 768px se alinea con el logo. */
.hero-widget {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  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-3);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.8em;
}
.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-2xl);  /* Mobile-first: número más chico en móvil, text-3xl desde 480px */
  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
   Mobile-first: text-xl en móvil, text-2xl desde 480px, text-3xl desde 768px */
.section-title {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--color-primary);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--space-10);  /* mb-10 */
  letter-spacing: 0.02em;
}
/* Bajada/intro debajo del título de sección */
.section-intro {
  max-width: 640px;
  margin: calc(var(--space-10) * -1 + var(--space-2)) auto var(--space-10);
  text-align: center;
  color: #444;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.4;
}
/* Breadcrumb (migas de pan) */
.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-500);
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: 999px;
  padding: var(--space-2) var(--space-5);
  margin-bottom: var(--space-6);
}
.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb-link:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}
.breadcrumb-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.breadcrumb-sep {
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--color-gray-400);
  border-right: 2px solid var(--color-gray-400);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.breadcrumb-current {
  color: var(--color-primary-dark);
  font-weight: 700;
}
/* 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 ---
   Mobile-first: 2 columnas con gap chico; el gap crece en 480px/768px
   y la cantidad de columnas aumenta en 768px/1024px/1280px (ver sección 11) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* mobile: 2 cols */
  gap: var(--space-3);
  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;
  aspect-ratio: 1 / 1;
  border-radius: 1.25rem;
  padding: var(--space-5);
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  overflow: visible;
  border: solid 1px #ccc;
}
.service-card:hover,
.service-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.13);
  outline: none;
}

/* Íconos intercalados naranja / cyan */
.services-grid .service-card:nth-child(odd)  .service-card-icon { background: #cba967; }
.services-grid .service-card:nth-child(even) .service-card-icon { background: linear-gradient(135deg, #4dd0f0, #00b3e6); }

.service-card-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: var(--space-3);
  padding: 14px;
}
.service-card-icon svg {
  width: 100%;
  height: 100%;
}
.service-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #1a2e4a;
}
.service-card-sub {
  font-size: var(--text-xs);
  font-weight: 500;
  margin-top: 0.3rem;
  line-height: 1.4;
  color: #6b7280;
}
.service-card-icon svg path,
.service-card-icon svg rect,
.service-card-icon svg line,
.service-card-icon svg polyline,
.service-card-icon svg circle {
  stroke: #ffffff;
}

/* 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-10);
}

.btn-ver-mas-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  color: #033e8c;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 2rem;
  border-radius: 3rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(3, 62, 140, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  position: relative;
  overflow: hidden;
}
.btn-ver-mas-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0557c2 0%, var(--color-primary) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.btn-ver-mas-link:hover,
.btn-ver-mas-link:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(3, 62, 140, 0.38);
  outline: none;
}
.btn-ver-mas-link:hover::before,
.btn-ver-mas-link:focus::before {
  opacity: 1;
}
.btn-ver-mas-link:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(3, 62, 140, 0.28);
}
.btn-ver-mas-text,
.btn-ver-mas-icon {
  position: relative;
  z-index: 1;
}
.btn-ver-mas-icon {
  display: flex;
  align-items: center;
  transition: transform 0.22s ease;
}
.btn-ver-mas-link:hover .btn-ver-mas-icon,
.btn-ver-mas-link:focus .btn-ver-mas-icon {
  transform: translateX(4px);
}
.btn-ver-mas-link:hover * {
  color: white !important;
}

/* 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 (toggle legacy) */
.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);
}

/* btn-outline legacy (por si se usa en otro lado) */
.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);
  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;
}

/* =============================================
   7. SECCIÓN BANNERS PROMOCIONALES
============================================= */
.banners-section {
  display: block;
  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);
  background-color: #d3e9f9;
  background-image:
    radial-gradient(circle at 30% 30%, #d3e9f9 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, #999 0%, transparent 60%),
    linear-gradient(135deg, #d3e9f9, #00b3e6);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  background-repeat: no-repeat;
  animation: newsLavaLamp 5s ease-in-out infinite;
}

@keyframes newsLavaLamp {
  0%, 100% {
    background-position: 20% 20%, 80% 80%, 0% 0%;
  }
  50% {
    background-position: 80% 60%, 20% 40%, 100% 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-section {
    animation: none;
    background-position: 20% 20%, 80% 80%, 0% 0%;
  }
}

/* --- 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: 16px;
  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;
}
/* Mobile-first: más pegados al borde en móvil, separados desde 768px */
.swiper-btn--prev { left: 4px; }
.swiper-btn--next { right: 4px; }

/* 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;
}

/* =============================================
   8.1 SECCIÓN OFICINAS MUNICIPALES
============================================= */
.offices-section {
  background-color: var(--color-gray-50);
  padding-block: var(--space-10);
}

.offices-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.offices-map {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.offices-list {
  display: grid;
  gap: var(--space-3);
}

.office-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
}
.office-item:hover,
.office-item:focus-visible {
  transform: translateX(4px);
  outline: none;
  box-shadow: var(--shadow-lg);
}

.office-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-orange);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.office-item-icon svg {
  width: 20px;
  height: 20px;
}

.office-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.office-item-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: var(--text-base);
}

.office-item-address {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

/* =============================================
   9. FOOTER
============================================= */
.site-footer {
  background: #e5e7eb;
  border-top: 3px solid var(--color-primary);
  margin-top: auto;
  padding-bottom: 5px;
}

/* -- Zona superior: blanca con columnas --
   Mobile-first: 1 columna en móvil, 2 columnas desde 480px
   y las 4 columnas originales desde 1024px (ver sección 11) */
.footer-body {
  padding: 2.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand-name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.35;
  display: block;
  margin-bottom: var(--space-2);
}
.footer-col--brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-address {
  font-style: normal;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #374151;
  line-height: 1.7;
}
.footer-address a {
  color: #374151;
  transition: color 0.2s;
}
.footer-address a:hover { color: var(--color-primary); }

/* -- Columnas de navegación -- */
.footer-col--nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-nav-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--color-secondary);
  display: inline-block;
  margin-bottom: var(--space-1);
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-list a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #374151;
  transition: color 0.18s, padding-left 0.18s;
}
.footer-nav-list a:hover,
.footer-nav-list a:focus {
  color: var(--color-primary);
  padding-left: 4px;
  outline: none;
}

/* -- Columna emergencias -- */
.footer-col--emergency {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-emergency-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.emergency-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.emergency-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  border-radius: 0.5rem;
  padding: 3px 12px;
  min-width: 3.2rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.emergency-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}

/* -- Zona inferior: franja azul --
   Mobile-first: en móvil queda en columna y con espacio extra abajo
   (para el botón flotante de WhatsApp); desde 768px vuelve a una fila */
.footer-bottom {
  background: transparent;
  padding: 0.85rem 0 15px;
}
.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.footer-copy {
  font-size: 13px;
  font-weight: 500;
  color: #033e8c !important;
  letter-spacing: 0.02em;
}

/* Redes sociales (en franja azul) */
.footer-social {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: transparent;
  transition: var(--transition);
}
.social-link:hover,
.social-link:focus {
  transform: scale(1.1);
  background: #fff;
  outline: none;
}
.social-link svg {
  width: 20px;
  height: 20px;
}

/* =============================================
   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 (MOBILE FIRST)
   Los estilos base (fuera de cualquier @media) están
   pensados para el móvil más chico (< 480px).
   A partir de acá se van "agregando" mejoras progresivas
   para pantallas más grandes, sin tocar el diseño de
   escritorio original.
   Breakpoints: 480px (móvil grande), 768px (tablet),
   1024px (escritorio). 1280px queda como mejora extra
   para escritorios grandes (igual que el diseño original).
============================================= */

/* =============================================
   Mobile (< 768px) — Tarjetas de servicios
   Todas las tarjetas de una misma fila ocupan el
   mismo alto, sin importar la longitud del texto.
============================================= */
@media (max-width: 767px) {
  .services-grid {
    align-items: stretch;
  }
  .service-card {
    aspect-ratio: auto;
    height: 100%;
  }

  /* Título "Todo lo que buscás, está acá": la parte
     "está acá" pasa a una línea aparte en mobile */
  #twAccent {
    display: block;
  }
}

/* =============================================
   480px — Móvil grande
   Recupera tamaños "normales" de texto/espaciados que
   en el móvil más chico se redujeron, y pasa el footer
   y la grilla de servicios a 2 columnas.
============================================= */
@media (min-width: 480px) {

  /* Hero: a partir de acá el video se centra normalmente */
  .hero-video {
    object-position: center;
  }

  /* Widget fecha/clima: tamaño y espaciados normales (sigue centrado) */
  .hero-widget {
    font-size: 1em;
    padding: var(--space-2) var(--space-4);
    gap: var(--space-4);
  }
  .hero-widget-num {
    font-size: var(--text-3xl);
  }

  /* Título de sección: un poco más grande */
  .section-title {
    font-size: var(--text-2xl);
  }

  /* Servicios: más separación entre tarjetas */
  .services-grid {
    gap: var(--space-4);
  }

  /* Footer: de 1 a 2 columnas */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================
   768px — Tablet
   El header recupera su altura completa, el hero crece,
   el widget se reubica junto al logo y las grillas pasan
   a 3 columnas (servicios) / 2 columnas (banners).
============================================= */
@media (min-width: 768px) {

  /* Header a su altura completa */
  .header-inner {
    height: 6rem;
  }

  /* Hero recupera su alto mínimo de escritorio */
  .hero {
    min-height: 280px;
  }

  /* Widget fecha/clima: vuelve a su posición alineada con el logo */
  .hero-widget {
    left: max(var(--space-5), calc((100% - var(--max-width)) / 2 + var(--space-5)));
    bottom: 3.5rem;
    transform: none;
    white-space: normal;
  }

  /* Botones del carrusel de noticias, más separados del borde */
  .swiper-btn--prev { left: 8px; }
  .swiper-btn--next { right: 8px; }

  /* Footer: padding inferior normal (ya no hace falta lugar para WhatsApp) */
  .footer-bottom {
    padding-bottom: 0.85rem;
  }
  .footer-bottom-inner {
    flex-direction: row;
    align-items: center;
  }

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

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

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

/* =============================================
   1024px — Escritorio
   Muestra la navegación de escritorio (oculta el menú
   hamburguesa/móvil), pasa servicios a 4 columnas,
   banners a 3 columnas, footer a 4 columnas y acomoda
   el mapa de oficinas junto al listado.
============================================= */
@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: recupera las 4 columnas y separación originales */
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
  }

  /* Oficinas municipales: mapa y listado lado a lado */
  .offices-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }
  .offices-map {
    height: 100%;
    min-height: 420px;
  }
  .offices-list {
    max-height: 420px;
    overflow-y: auto;
    padding-right: var(--space-2);
  }
}

/* =============================================
   1280px — Escritorio grande (mejora extra)
   Servicios en 6 columnas con tarjetas de tamaño fijo,
   igual que el diseño original.
============================================= */
@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;
  }

}

/* =============================================
   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;
  }
}

/* Chatbot: oculto en móvil, visible desde 768px */
@media (max-width: 767px) {
  #cbw-widget { display: none !important; }
}

/* =============================================
   14. SPLASH SCREEN
============================================= */
#splashScreen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(135deg, #022b6b 0%, #033e8c 50%, #0271b6 75%, #022b6b 100%);
  background-size: 300% 300%;
  animation: splashGradientMove 6s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 1.5rem;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
@keyframes splashGradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
#splashScreen.splash--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.is-loading #cbw-widget {
  display: none;
}
#splashLogo {
  width: 180px;
  max-width: 50vw;
  animation: splashZoomIn 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.4));
}
@keyframes splashZoomIn {
  0%   { opacity: 0; transform: scale(0.15) translateZ(-400px); }
  40%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1) translateZ(0); }
}
#splashSlogan {
  margin-top: 1.25rem;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
  animation: splashSloganFade 1.2s ease forwards 0.6s;
}
@keyframes splashSloganFade {
  to { opacity: 1; }
}

/* Splash screen: ajuste para pantallas chicas */
@media (max-width: 480px) {
  #splashLogo {
    width: 140px;
    max-width: 55vw;
  }
  #splashSlogan {
    margin-top: 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    max-width: 90%;
  }
}

