/* =========================================================
   VARIABLES DE TEMA (equivalente a theme.css / :root de Tailwind)
   ========================================================= */
  /* Inter */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('fonts/inter-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('fonts/inter-v20-latin-600.woff2') format('woff2');
}

/* Plus Jakarta Sans */
@font-face {
  font-display: swap;
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/plus-jakarta-sans-v12-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  src: url('fonts/plus-jakarta-sans-v12-latin-500.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  src: url('fonts/plus-jakarta-sans-v12-latin-600.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/plus-jakarta-sans-v12-latin-700.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  src: url('fonts/plus-jakarta-sans-v12-latin-800.woff2') format('woff2');
}
:root {
  --background: #f1f0f9;
  --foreground: #164a3b;
  --card: #ffffff;
  --card-foreground: #1e1b4b;
  --primary: #3730a3;
  --primary-foreground: #ffffff;
  --secondary: #e0e7ff;
  --secondary-foreground: #312e81;
  --muted: #e0e7ff;
  --muted-foreground: #6366f1;
  --accent: #dc2626;
  --accent-foreground: #ffffff;
  --destructive: #b91c1c;
  --border: rgba(55, 48, 163, 0.15);
  --radius: 0.625rem;
  --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;

  /* FIX: altura del navbar centralizada. Antes estaba "hardcodeada"
     (64px / 80px) repetida en 4 lugares distintos, lo que causaba que
     el layout de #page-ubicaciones se desincronizara del alto real
     del header fijo. */
  --navbar-h: 64px;
  --navbar-h-desktop: 80px;
}

/* =========================================================
   RESET BÁSICO
   ========================================================= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.icon, .icon-sm, .icon-xs { display: inline-block; }
.icon { width: 16px; height: 16px; }
.icon-sm { width: 14px; height: 14px; }
.icon-xs { width: 12px; height: 12px; }

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  /* FIX bug 3: el navbar crea su propio stacking context (position +
     z-index). Con z-index:50 perdía contra las capas internas de
     Leaflet (markerPane/popupPane llegan hasta 600-700), aunque el
     .emergency-panel interno tuviera z-index:60 — ese valor solo
     compite DENTRO del navbar, no contra el resto de la página.
     Subiendo el z-index del navbar, todo su contenido (incluido el
     panel de emergencias) queda por encima de todo lo demás. */
  z-index: 9999;
  background: #164a3b;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.navbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 640px) {
  .navbar-inner { padding: 0 1.5rem; height: var(--navbar-h-desktop); }
}
.navbar-logo { flex-shrink: 0; }
.navbar-logo img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
@media (min-width: 640px) {
  .navbar-logo img { width: 64px; height: 64px; }
}

.navbar-links { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 768px) { .navbar-links { display: flex; } }
.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #c7d2fe;
  transition: background-color .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.1); }
.nav-link.is-active { background: #fff; color: var(--primary); }

.navbar-emergency { display: none; position: relative; }
@media (min-width: 768px) { .navbar-emergency { display: block; } }
.emergency-btn {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  transition: background-color .15s;
  box-shadow: 0 6px 16px rgba(220,38,38,.4);
}
.emergency-btn:hover { background: #b91c1c; }
.icon-chevron { transition: transform .2s; }
.icon-chevron.is-open { transform: rotate(180deg); }

.emergency-panel {
  position: absolute; right: 0; top: 100%; margin-top: 0.5rem;
  width: 18rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(0,0,0,.25);
  border: 1px solid var(--border);
  overflow: hidden;
  /* FIX bug 1: antes tenía el mismo z-index (50) que .navbar. Al ser
     hijo directo del navbar ya ganaba por jerarquía del DOM, pero se
     deja explícito y por encima para que nunca dependa de ese empate. */
  z-index: 60;
}
.emergency-panel-header { padding: 0.75rem 1rem; background: rgba(220,38,38,.1); border-bottom: 1px solid var(--border); }
.emergency-panel-header p { margin:0; font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.emergency-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color .15s;
}
.emergency-row:last-child { border-bottom: none; }
.emergency-row:hover { background: rgba(224,231,255,.6); }
.emergency-row .emoji { font-size: 1.25rem; }
.emergency-row .num { margin:0; font-size: 0.875rem; font-weight: 700; color: var(--foreground); }
.emergency-row .label { margin:0; font-size: 0.75rem; color: var(--muted-foreground); }

.hamburger-btn { display: block; padding: 0.5rem; border-radius: 0.5rem; color: #fff; }
.hamburger-btn:hover { background: rgba(255,255,255,.1); }
@media (min-width: 768px) { .hamburger-btn { display: none; } }
.hamburger-btn .icon { width: 24px; height: 24px; }

.mobile-drawer { background: #0f3528; border-top: 1px solid rgba(255,255,255,.1); padding: 0.5rem 1rem 1.25rem; }
@media (min-width: 768px) { .mobile-drawer { display: none !important; } }
.mobile-link {
  display: block; width: 100%; text-align: left;
  padding: 0.75rem 1rem; border-radius: 0.75rem;
  font-size: 0.875rem; font-weight: 500;
  color: #c7d2fe; margin: 0.25rem 0;
  transition: background-color .15s, color .15s;
}
.mobile-link:hover { background: rgba(255,255,255,.1); }
.mobile-link.is-active { background: #fff; color: var(--primary); }
.mobile-emergency { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,.1); }
.mobile-emergency-title { font-size: 0.75rem; font-weight: 700; color: #fca5a5; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 0.5rem 0.25rem; }
.mobile-emergency-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 1rem; border-radius: 0.75rem;
  margin: 0.125rem 0;
  transition: background-color .15s;
}
.mobile-emergency-row:hover { background: rgba(255,255,255,.1); }
.mobile-emergency-row .emoji { font-size: 1.125rem; }
.mobile-emergency-row .num { margin:0; font-size: 0.875rem; font-weight: 700; color: #fff; }
.mobile-emergency-row .label { margin:0; font-size: 0.75rem; color: #a5b4fc; }

/* =========================================================
   BOTONES GENERALES
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 700; padding: 0.875rem 1.5rem; border-radius: 0.75rem;
  transition: background-color .15s;
  font-size: 0.9375rem;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 25px rgba(220,38,38,.4); }
.btn-accent:hover { background: #b91c1c; }
.btn-ghost-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); font-weight: 600; }
.btn-ghost-light:hover { background: rgba(255,255,255,.2); }

/* =========================================================
   PÁGINAS (control de visibilidad)
   ========================================================= */
.page { padding-top: var(--navbar-h); }
@media (min-width: 640px) { .page { padding-top: var(--navbar-h-desktop); } }

/* =========================================================
   HERO (INICIO)
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  min-height: 85vh;
  display: flex;
  align-items: center;
}
@media (min-width: 640px) { .hero { min-height: 88vh; } }
.hero-bg {
  position: absolute; inset: 0; opacity: .1;
  background-image:
    radial-gradient(circle at 20% 50%, #dc2626 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, #6366f1 0%, transparent 50%);
}
.hero-inner {
  position: relative; max-width: 72rem; margin: 0 auto; width: 100%;
  padding: 4rem 1rem;
  display: grid; gap: 2.5rem; align-items: center;
}
@media (min-width: 640px) { .hero-inner { padding: 6rem 1.5rem; } }
@media (min-width: 768px) { .hero-inner { grid-template-columns: 1fr 1fr; } }

.badge-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(220,38,38,.2); border: 1px solid rgba(220,38,38,.4);
  color: #fecaca; font-size: 0.75rem; font-weight: 600;
  padding: 0.375rem 0.75rem; border-radius: 9999px; margin-bottom: 1.25rem;
}
.hero-title { font-size: 2.25rem; font-weight: 800; color: #fff; line-height: 1.1; margin: 0 0 1.25rem; letter-spacing: -0.02em; }
@media (min-width: 640px) { .hero-title { font-size: 3rem; } }
@media (min-width: 768px) { .hero-title { font-size: 3.75rem; } }
.hero-title-accent { color: #4ade80; }
.hero-desc { color: #c7d2fe; font-size: 1rem; line-height: 1.6; margin: 0 0 2rem; max-width: 28rem; }
@media (min-width: 640px) { .hero-desc { font-size: 1.125rem; } }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }

.hero-media { display: none; }
@media (min-width: 768px) { .hero-media { display: block; } }
.hero-media-frame {
  position: relative; width: 100%; max-width: 24rem; margin-left: auto;
  aspect-ratio: 1 / 1;
  border-radius: 1.5rem; overflow: hidden;
  background: rgba(55,48,163,.4); border: 1px solid rgba(99,102,241,.3);
}
.hero-media-img { width: 100%; height: 100%; object-fit: cover; opacity: .3; filter: grayscale(1); }
.hero-pin { position: absolute; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); }
.hero-pin .dot { width: 16px; height: 16px; background: var(--accent); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); display: block; animation: pulse 2s infinite; }
.hero-pin .pin-label { margin-top: 0.25rem; font-size: 10px; color: #fff; font-weight: 600; background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* =========================================================
   ESTADÍSTICAS
   ========================================================= */
.stats-section { background: #fff; border-bottom: 1px solid var(--border); }
.stats-grid {
  max-width: 72rem; margin: 0 auto; padding: 2.5rem 1rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; text-align: center;
}
@media (min-width: 640px) { .stats-grid { padding: 3rem 1.5rem; } }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.stat-icon-wrap { display: flex; justify-content: center; margin-bottom: 0.75rem; }
.stat-icon-box { width: 2.5rem; height: 2.5rem; border-radius: 1rem; background: var(--secondary); display: flex; align-items: center; justify-content: center; }
@media (min-width: 640px) { .stat-icon-box { width: 3rem; height: 3rem; } }
.stat-icon-box svg { width: 20px; height: 20px; color: var(--primary); }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: 0.25rem; }
@media (min-width: 640px) { .stat-value { font-size: 1.875rem; } }
.stat-label { font-size: 0.75rem; color: var(--muted-foreground); font-weight: 500; }
@media (min-width: 640px) { .stat-label { font-size: 0.875rem; } }

/* =========================================================
   SERVICIOS
   ========================================================= */
.services-section { padding: 3.5rem 1rem; background: var(--background); }
@media (min-width: 640px) { .services-section { padding: 5rem 1.5rem; } }
.section-inner { max-width: 72rem; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
@media (min-width: 640px) { .section-header { margin-bottom: 3rem; } }
.eyebrow { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; }
@media (min-width: 640px) { .eyebrow { font-size: 0.875rem; } }
.eyebrow-accent { color: var(--accent); }
.eyebrow-light { color: #fca5a5; }
.section-title { font-size: 1.875rem; font-weight: 800; color: var(--primary); margin-top: 0.5rem; }
@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }

.services-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .services-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.service-card {
  position: relative; overflow: hidden; border-radius: 1.25rem;
  padding: 1.5rem; cursor: pointer;
}
@media (min-width: 640px) { .service-card { border-radius: 1.5rem; padding: 2rem; } }
.service-card.pharmacy { background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%); }
.service-card.hospital { background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%); }
.service-card-icon-bg { position: absolute; top: 1rem; right: 1rem; opacity: .1; transition: opacity .2s; }
.service-card:hover .service-card-icon-bg { opacity: .2; }
.service-card-icon-bg svg { width: 96px; height: 96px; color: #fff; }
@media (min-width: 640px) { .service-card-icon-bg svg { width: 128px; height: 128px; } }
.service-card-icon {
  width: 3rem; height: 3rem; background: rgba(255,255,255,.2); border-radius: 1rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
@media (min-width: 640px) { .service-card-icon { width: 3.5rem; height: 3.5rem; margin-bottom: 1.25rem; } }
.service-card-icon svg { width: 24px; height: 24px; color: #fff; }
.service-card-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
@media (min-width: 640px) { .service-card-title { font-size: 1.5rem; } }
.service-card-desc { font-size: 0.875rem; line-height: 1.6; margin-bottom: 1.25rem; }
.service-card.pharmacy .service-card-desc { color: #c7d2fe; }
.service-card.hospital .service-card-desc { color: #fee2e2; }
.service-card-link { display: inline-flex; align-items: center; gap: 0.375rem; color: #fff; font-size: 0.875rem; font-weight: 600; transition: gap .2s; }
.service-card:hover .service-card-link { gap: 0.75rem; }
.service-card-link svg { width: 16px; height: 16px; }

/* =========================================================
   ACERCA DE NOSOTROS
   ========================================================= */
.about-hero { background: var(--primary); padding: 3.5rem 1rem; }
@media (min-width: 640px) { .about-hero { padding: 5rem 1.5rem; } }
.about-hero-inner { max-width: 56rem; margin: 0 auto; text-align: center; }
.about-hero-title { font-size: 1.875rem; font-weight: 800; color: #fff; margin: 0.75rem 0 1.25rem; }
@media (min-width: 640px) { .about-hero-title { font-size: 3rem; } }
.about-hero-title-accent { color: #fca5a5; }
.about-hero-desc { color: #c7d2fe; font-size: 1rem; line-height: 1.6; max-width: 42rem; margin: 0 auto; }
@media (min-width: 640px) { .about-hero-desc { font-size: 1.125rem; } }

.mission-section { padding: 3.5rem 1rem; background: var(--background); }
@media (min-width: 640px) { .mission-section { padding: 5rem 1.5rem; } }
.mission-grid { max-width: 72rem; margin: 0 auto; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) { .mission-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.mission-img { border-radius: 1.5rem; width: 100%; object-fit: cover; max-height: 400px; box-shadow: 0 20px 45px rgba(30,27,75,.1); }
.mission-title { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin: 0.5rem 0 1rem; }
@media (min-width: 640px) { .mission-title { font-size: 1.875rem; } }
.mission-text { color: rgba(22,74,59,.7); line-height: 1.7; margin-bottom: 1rem; font-size: 0.9375rem; }
.mission-callout { display: flex; align-items: center; gap: 0.75rem; background: var(--secondary); border-radius: 1rem; padding: 1rem; }
.mission-callout svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.mission-callout p { margin:0; font-size: 0.8125rem; color: var(--secondary-foreground); font-weight: 500; }

.values-section { padding: 3.5rem 1rem; background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .values-section { padding: 5rem 1.5rem; } }
.values-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .values-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.value-card { padding: 1.5rem; border-radius: 1.25rem; background: var(--background); border: 1px solid var(--border); transition: border-color .3s, box-shadow .3s; }
@media (min-width: 640px) { .value-card { padding: 2rem; border-radius: 1.5rem; } }
.value-card:hover { border-color: rgba(55,48,163,.3); box-shadow: 0 15px 35px rgba(55,48,163,.1); }
.value-icon { width: 3rem; height: 3rem; border-radius: 1rem; background: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; transition: background-color .3s; }
@media (min-width: 640px) { .value-icon { width: 3.5rem; height: 3.5rem; margin-bottom: 1.25rem; } }
.value-card:hover .value-icon { background: var(--accent); }
.value-icon svg { width: 24px; height: 24px; color: #fff; }
.value-title { font-size: 1.125rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
@media (min-width: 640px) { .value-title { font-size: 1.25rem; } }
.value-desc { color: rgba(22,74,59,.7); font-size: 0.875rem; line-height: 1.6; }

.historia-section { padding: 3.5rem 1rem; background: var(--primary); }
@media (min-width: 640px) { .historia-section { padding: 5rem 1.5rem; } }
.historia-inner { max-width: 56rem; margin: 0 auto; text-align: center; }
.historia-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin: 0.5rem 0 2rem; }
@media (min-width: 640px) { .historia-title { font-size: 1.875rem; } }
.historia-grid { display: flex; justify-content: center; gap: 1.25rem; text-align: center; }
.historia-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 1rem; padding: 1.25rem 1.5rem; max-width: 42rem; }
.historia-year { color: #fca5a5; font-size: 1.5rem; font-weight: 800; display: block; margin-bottom: 0.5rem; }
@media (min-width: 640px) { .historia-year { font-size: 1.875rem; } }
.historia-event { color: #c7d2fe; font-size: 0.875rem; line-height: 1.6; }

/* =========================================================
   UBICACIONES / MAPA
   ========================================================= */
#page-ubicaciones.page { padding-top: var(--navbar-h); }
@media (min-width: 640px) { #page-ubicaciones.page { padding-top: var(--navbar-h-desktop); } }

/* FIX bug 2 (la causa raíz): .ubicaciones-wrap pedía 100dvh completo,
   pero #page-ubicaciones YA está desplazado hacia abajo por el
   padding-top del navbar fijo. Eso hacía que el documento midiera
   100dvh + navbar-h de alto, generando scroll extra y que el navbar
   (fixed) terminara tapando el mapa/sidebar al hacer scroll.
   Ahora se resta la altura del navbar para que todo calce exacto. */
.ubicaciones-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--navbar-h));
}
@media (min-width: 640px) {
  .ubicaciones-wrap { height: calc(100dvh - var(--navbar-h-desktop)); }
}

.filter-bar { background: #f3f4f6; border-bottom: 1px solid var(--border); padding: 0.625rem 0.75rem; flex-shrink: 0; }
.filter-bar-inner { max-width: 80rem; margin: 0 auto; display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem; }
@media (min-width: 640px) { .filter-bar-inner { gap: 1.5rem; } }
.filter-btn {
  display: flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 1rem; border-radius: 0.5rem;
  font-size: 0.75rem; font-weight: 600;
  background: var(--secondary); color: var(--foreground);
  transition: background-color .15s, color .15s;
}
@media (min-width: 640px) { .filter-btn { padding: 0.5rem 2rem; } }
.filter-btn:hover { background: rgba(55,48,163,.1); }
.filter-btn.is-active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.15); }

.ubicaciones-main { display: flex; flex: 1; overflow: hidden; position: relative; }

.sidebar-desktop { display: none; width: 18rem; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border); overflow-y: auto; flex-direction: column; }
@media (min-width: 768px) { .sidebar-desktop { display: flex; } }
.sidebar-header { padding: 0.75rem 1rem; background: var(--background); border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.sidebar-header p { margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); }

.location-item { width: 100%; text-align: left; padding: 1rem; border-bottom: 1px solid var(--border); transition: background-color .15s; display: flex; gap: 0.75rem; align-items: flex-start; }
.location-item:hover { background: rgba(224,231,255,.6); }
.location-item.is-selected { background: var(--secondary); border-left: 4px solid var(--primary); padding-left: calc(1rem - 4px); }
.location-icon { width: 2rem; height: 2rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 0.125rem; }
.location-icon.pharmacy { background: #eef2ff; color: var(--primary); }
.location-icon.hospital { background: #fef2f2; color: var(--accent); }
.location-icon svg { width: 16px; height: 16px; }
.location-body { min-width: 0; flex: 1; }
.location-name { font-size: 0.75rem; font-weight: 700; color: var(--foreground); line-height: 1.4; margin: 0; }
.location-address { font-size: 0.75rem; color: var(--muted-foreground); margin: 0.125rem 0 0; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.location-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; flex-wrap: wrap; }
.location-rating { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; }
.location-rating svg { width: 12px; height: 12px; fill: #fbbf24; color: #fbbf24; }
.badge-24h { font-size: 9px; font-weight: 700; background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 9999px; }
.location-sub { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.25rem; color: var(--muted-foreground); font-size: 10px; }
.location-sub svg { width: 12px; height: 12px; }

.map-column { flex: 1; display: flex; flex-direction: column; position: relative; }
.map-el { flex: 1; min-height: 300px; position: relative; }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--secondary); flex-direction: column; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--primary); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-loading p { font-size: 0.875rem; font-weight: 500; color: var(--primary); }

.map-legend {
  position: absolute; bottom: 4rem; right: 0.75rem; z-index: 1000;
  background: rgba(255,255,255,.95); backdrop-filter: blur(4px);
  border-radius: 0.75rem; box-shadow: 0 20px 40px rgba(0,0,0,.2); border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
}
@media (min-width: 640px) { .map-legend { bottom: 1.25rem; right: 0.75rem; border-radius: 1rem; padding: 0.75rem 1rem; } }
.map-legend-title { font-size: 9px; font-weight: 700; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 0.375rem; }
@media (min-width: 640px) { .map-legend-title { font-size: 10px; } }
.map-legend-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; font-size: 10px; font-weight: 500; }
@media (min-width: 640px) { .map-legend-row { font-size: 0.75rem; } }
.map-legend-row-border { padding-top: 0.375rem; border-top: 1px solid var(--border); margin-bottom: 0; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
@media (min-width: 640px) { .legend-dot { width: 12px; height: 12px; } }

.mobile-sheet { display: block; position: absolute; bottom: 0; left: 0; right: 0; z-index: 1001; }
@media (min-width: 768px) { .mobile-sheet { display: none; } }
.mobile-sheet-toggle { width: 100%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; font-weight: 600; font-size: 0.875rem; box-shadow: 0 -6px 20px rgba(0,0,0,.2); }
.mobile-sheet-list { background: #fff; border-top: 1px solid var(--border); overflow-y: auto; max-height: 55vh; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--foreground); color: #c7d2fe; padding: 2rem 1rem; }
@media (min-width: 640px) { .site-footer { padding: 2.5rem 1.5rem; } }
.footer-inner { max-width: 72rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; text-align: center; }
@media (min-width: 640px) { .footer-inner { flex-direction: row; text-align: left; } }
.footer-logo img { width: 48px; height: 48px; object-fit: contain; }
@media (min-width: 640px) { .footer-logo img { width: 56px; height: 56px; } }
.footer-text { font-size: 0.8125rem; margin: 0; }
@media (min-width: 640px) { .footer-text { font-size: 0.875rem; } }
.footer-copy { font-size: 0.75rem; opacity: .5; margin: 0; }

.footer-privacy-link {
  margin-left: 0.5rem;
  text-decoration: underline;
  color: inherit;
  opacity: 1; /* anula el opacity:.5 heredado de .footer-copy para que se vea clickeable */
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.footer-privacy-link:hover { opacity: .7; }

/* =========================================================
   MODAL: AVISO DE PRIVACIDAD
   ========================================================= */
.modal-overlay {
  display: none; /* El JS lo cambia a 'flex' para mostrarlo y centrar */
  position: fixed;
  z-index: 99999; /* Por encima de todo, incluido el navbar (9999) */
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center; /* centrado horizontal */
  align-items: center;     /* centrado vertical */
}
.modal-content {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 8px;
  width: 90%;
  max-width: 1100px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
  color: var(--foreground);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted-foreground);
}
.modal-close:hover { color: var(--foreground); }

.modal-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 1rem;
  padding-right: 2rem; /* deja espacio para que el botón de cerrar no se encime */
}
.modal-content h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 0.5rem;
}
.modal-content p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--foreground);
  margin: 0 0 0.75rem;
}
.modal-content ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}
.modal-content li {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.modal-updated {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem !important;
  color: var(--muted-foreground);
}

/* =========================================================
   LEAFLET: estilos de popup (idénticos al App.tsx original)
   ========================================================= */
.leaflet-popup-content-wrapper { border-radius: 16px !important; box-shadow: 0 8px 32px rgba(30,27,75,.18) !important; border: 1px solid rgba(55,48,163,.12) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 14px 16px !important; }
.leaflet-popup-tip { background: white !important; }
.leaflet-popup-close-button { color: #6366f1 !important; font-size: 18px !important; top: 8px !important; right: 10px !important; }
