/* Mapa interactivo de Bogotá (patrón aio/mapa-top10). Todo bajo .aio-mapa; colores del manual de AIO en su versión oscura,
   la del sitio. Origen: pagina_web/mapa-top10-bogota/styles.css. */

.aio-mapa {
  --fg: #F4F7FD; --muted: #A9B8DE; --surface: #0E1A3D; --soft: #142452; --line: #22336E; --bg: #0A1330;
  --accent: #337EFF; --on-accent: #FFFFFF; --active: #2DD4A0; --on-active: #0A1330;
  --map-bg: #0B1636; --map-forest: #0F2638; --map-park: #112B3A; --map-water: #1B3B86; --map-path: #15224B;
  --map-street: #22346B; --map-major: #2D4483; --map-trunk: #3556AC; --map-busway: #2D4A98; --map-label: #8193C6;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); height: 680px;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg); color: var(--fg);
  font: 15px/1.5 var(--f-body); color-scheme: dark;
}
.aio-mapa *, .aio-mapa *::before, .aio-mapa *::after { box-sizing: border-box; }
.aio-mapa :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.aio-mapa-eyebrow { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.aio-mapa-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
/* isolation: los z-index internos de Leaflet (hasta 1000) no se cruzan con la cabecera fija del sitio. */
.aio-mapa-mapa { position: relative; isolation: isolate; min-width: 0; min-height: 0; }

.aio-mapa-head { display: grid; gap: 10px; padding: 22px 20px 14px; }
.aio-mapa-titulo { margin: 0; font: 700 30px/1.05 var(--f-display); letter-spacing: -.02em; color: var(--fg); }
.aio-mapa-titulo em { font-style: normal; color: var(--accent); }
.aio-mapa-lede { margin: 0; color: var(--muted); }

.aio-mapa-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 20px 14px; border-bottom: 1px solid var(--line); }
.aio-mapa-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: 500 14px var(--f-body); cursor: pointer; transition: background .15s, border-color .15s; }
.aio-mapa-tab svg { width: 16px; height: 16px; flex: none; }
.aio-mapa-tab:hover { border-color: var(--accent); }
.aio-mapa-tab[aria-pressed="true"] { background: var(--active); border-color: var(--active); color: var(--on-active); }

.aio-mapa-lista { list-style: none; margin: 0; padding: 10px 12px 12px; display: grid; align-content: start; gap: 6px; overflow-y: auto;
  min-height: 0; flex: 1; scrollbar-color: var(--line) transparent; }
.aio-mapa-aviso { padding: 10px; color: var(--muted); font-size: 14px; }
.aio-mapa-item { display: grid; grid-template-columns: 28px 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.aio-mapa-item:hover { background: var(--surface); }
.aio-mapa-item.is-active { background: var(--surface); border-color: var(--accent); box-shadow: var(--shadow); }
.aio-mapa-rank { font: 700 22px/1 var(--f-display); color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
.aio-mapa-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; color: var(--accent); }
.aio-mapa-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aio-mapa-thumb svg { width: 26px; height: 26px; opacity: .8; }
.aio-mapa-info { min-width: 0; display: grid; gap: 3px; }
.aio-mapa-nombre { margin: 0; font: 700 16px/1.2 var(--f-display); letter-spacing: -.01em; color: var(--fg); overflow-wrap: anywhere; }
.aio-mapa-barrio { font: 500 11px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.aio-mapa-desc { margin: 0; font-size: 13.5px; color: var(--muted); }
.aio-mapa-item.is-active .aio-mapa-desc { color: var(--fg); }
.aio-mapa-acciones { display: none; margin-top: 6px; }
.aio-mapa-item.is-active .aio-mapa-acciones { display: flex; }
.aio-mapa-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px; font: 500 13px var(--f-body);
  text-decoration: none; background: var(--active); color: var(--on-active); }
.aio-mapa-btn svg { width: 14px; height: 14px; }

.aio-mapa-pie { display: grid; gap: 4px; padding: 12px 20px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.aio-mapa-pie p { margin: 0; }
.aio-mapa-pie summary { cursor: pointer; color: var(--accent); }
.aio-mapa-pie details p { margin-top: 6px; max-height: 96px; overflow-y: auto; }

.aio-mapa-lienzo { position: absolute; inset: 0; background: var(--map-bg); font-family: var(--f-body); }
.aio-mapa .leaflet-container { background: var(--map-bg); font-family: var(--f-body); }
.aio-mapa .leaflet-control-zoom a { background: var(--surface); color: var(--fg); border-color: var(--line); }
.aio-mapa .leaflet-control-attribution { background: rgba(14, 26, 61, .85); color: var(--muted); font: 11px var(--f-body); }
.aio-mapa .leaflet-control-attribution a { color: var(--accent); }
.aio-mapa-leyenda { position: absolute; z-index: 500; top: 14px; right: 14px; display: grid; gap: 2px; padding: 10px 14px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.aio-mapa-leyenda .aio-mapa-eyebrow { font-size: 10px; }
.aio-mapa-leyenda strong { font: 700 18px var(--f-display); }

.aio-mapa-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--accent); border: 2px solid var(--surface);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45); display: grid; place-items: center; transition: transform .15s, background .15s; }
.aio-mapa-pin span { transform: rotate(45deg); font: 700 13px/1 var(--f-display); color: var(--on-accent); }
.aio-mapa-pin.is-active { background: var(--active); transform: rotate(-45deg) scale(1.25); }
.aio-mapa-pin.is-active span { color: var(--on-active); }
.aio-mapa-hood { font: 500 10px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--map-label); white-space: nowrap;
  text-shadow: 0 0 3px var(--map-bg), 0 0 3px var(--map-bg); }

.aio-mapa .leaflet-popup-content-wrapper, .aio-mapa .leaflet-popup-tip { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.aio-mapa .leaflet-popup-content-wrapper { border-radius: 12px; }
.aio-mapa .leaflet-popup-content { margin: 12px 14px; font: 13px/1.4 var(--f-body); }
.aio-mapa-pop b { display: block; font: 700 15px/1.2 var(--f-display); }
.aio-mapa-pop a { color: var(--accent); font-weight: 500; }
.aio-mapa .leaflet-container a.leaflet-popup-close-button { color: var(--muted); }

/* Celular y tableta: encabezado y categorías, el mapa y la lista debajo, sin scroll interno. */
@media (max-width: 860px) {
  .aio-mapa { display: flex; flex-direction: column; height: auto; }
  .aio-mapa-panel { display: contents; }
  .aio-mapa-head { order: 1; padding: 18px 16px 12px; }
  .aio-mapa-titulo { font-size: 26px; }
  .aio-mapa-tabs { order: 2; padding: 2px 16px 12px; }
  .aio-mapa-mapa { order: 3; height: 56vh; min-height: 320px; max-height: 520px; }
  .aio-mapa-lista { order: 4; overflow: visible; padding: 12px 8px 8px; }
  .aio-mapa-pie { order: 5; padding: 12px 16px 14px; }
  .aio-mapa-item { grid-template-columns: 26px 60px minmax(0, 1fr); gap: 10px; }
  .aio-mapa-thumb { width: 60px; height: 60px; }
  .aio-mapa-tab { font-size: 13.5px; padding: 0 11px; }
}
/* Celulares angostos: sin íconos, las cinco categorías caben en dos filas. */
@media (max-width: 380px) { .aio-mapa-tab svg { display: none; } }
@media (prefers-reduced-motion: reduce) { .aio-mapa * { transition: none !important; } }
