/* ==========================================================================
   Tema «Sede oficial» (opción A del comparador, con más imagen aérea).
   Se carga DESPUÉS de styles.css: reasigna los tokens de color y letra y añade
   los bloques nuevos (franja oficial, portada con foto, barrios, bandas de foto).
   Movimiento: solo tokens de MOTION.md (var(--dur-*) y var(--ease-standard)).
   ========================================================================== */
:root {
  --cobre: #13527D;      /* acción y acento: azul institucional */
  --cobre-dk: #0B3B5C;
  --cobre-lt: #3F7BA6;
  --mar: #0B3B5C;
  --mar-dk: #072A42;
  --mar-lt: #13527D;
  --arena: #F1D08A;
  --arena-lt: #F8E7BF;
  --arena-dk: #9A5B00;
  --fondo: #F5F7F9;
  --paper: #FFFFFF;
  --paper-warm: #EEF2F5;
  --ink: #111C24;
  --ink-soft: #2E3B45;
  --gris: #51606B;
  --gris-lt: #8A98A3;
  --line: #DCE3E8;
  --line-strong: #C3CED6;
  --success: #17734A;
  --warning: #9A5B00;
  --danger: #B42318;
  --azul-t: #EAF1F6;
  --verde-t: #E6F3EC;
  --ambar-t: #FBF0DC;
  --foco: #17734A;
  --header-bg: rgba(255, 255, 255, .94);
  --font-display: 'Public Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Public Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(17, 28, 36, .05), 0 2px 8px rgba(17, 28, 36, .04);
  --shadow: 0 1px 2px rgba(17, 28, 36, .05), 0 8px 24px rgba(17, 28, 36, .07);
  --shadow-lg: 0 4px 16px rgba(17, 28, 36, .08), 0 24px 56px rgba(17, 28, 36, .14);
}
:root[data-theme="dark"] {
  --cobre: #7DB4E0;
  --cobre-dk: #A5CBEA;
  --cobre-lt: #7DB4E0;
  --mar: #0B3B5C;
  --mar-lt: #7DB4E0;
  --fondo: #0B151C;
  --paper: #111E27;
  --paper-warm: #172733;
  --ink: #E8EEF2;
  --ink-soft: #C6D1D8;
  --gris: #98A7B2;
  --gris-lt: #6F7F8A;
  --line: rgba(232, 238, 242, .10);
  --line-strong: rgba(232, 238, 242, .20);
  --success: #4CB383;
  --warning: #E0A23B;
  --azul-t: #132A3B;
  --verde-t: #11301F;
  --ambar-t: #33270F;
  --foco: #4CB383;
  --header-bg: rgba(11, 21, 28, .94);
}

body { background: var(--fondo); color: var(--ink); font-family: var(--font-body); }

/* --- Iconos del banco CLOTITEC (iconos.js) -------------------------------- */
[data-ico] { display: inline-block; flex: none; line-height: 0; }
[data-ico] svg { display: block; width: 100%; height: 100%; }
.foco { stroke: var(--foco); }
.ico-dibuja svg [pathLength] {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: ico-trazo var(--dur-data) var(--ease-standard) var(--ico-retardo, 0ms) forwards;
}
@keyframes ico-trazo { to { stroke-dashoffset: 0; } }

/* --- Tipografía: sobria, sin cursivas ni monoespaciada de adorno ----------- */
.h-hero, .h-section, .h-card, .live-section h2, .audience-card h3, .mag-card h3, .eco-card h3, .dir-card h3 {
  font-family: var(--font-display); font-weight: 800; font-style: normal; letter-spacing: -.02em;
}
.h-section { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; }
.h-hero em, .h-section em, .h-card em, .audience-card h3 em, .mag-card h3 em, .eco-card h3 em,
.live-section h2 em, .prox-title em, .walk-title em {
  font-style: normal; font-weight: 800; color: var(--cobre);
}
.live-section h2 { font-size: clamp(30px, 3.6vw, 44px); }
.eyebrow, .eti, .tag {
  font-family: var(--font-body); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; color: var(--cobre);
}
.eti { margin: 0 0 8px; }
.btn { border-radius: 8px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; text-transform: none; }
.btn-primary { background: var(--mar); color: #fff; }
.btn-primary:hover { background: var(--cobre); color: #fff; }
.btn-cobre { background: var(--cobre); color: #fff; }
:root[data-theme="dark"] .btn-cobre { color: #0B151C; }

/* --- Franja oficial + cabecera --------------------------------------------- */
.oficial-strip {
  display: flex; align-items: center; gap: 10px; padding: 7px 28px;
  background: var(--mar); color: #fff; font-size: 13px; font-weight: 500;
}
.oficial-strip [data-ico] { width: 20px; height: 20px; --foco: #9FD8B9; }
.app-header { background: var(--header-bg); border-bottom: 1px solid var(--line); padding: 10px 28px; }
.brand-sede { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-sede:hover { color: var(--ink); }
.brand-ico { width: 36px; height: 36px; color: var(--mar); }
:root[data-theme="dark"] .brand-ico { color: var(--cobre); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-sede .conecta { font-family: var(--font-display); font-style: normal; font-weight: 800; font-size: 17px; letter-spacing: -.01em; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--gris); font-weight: 500; }
.app-header .nav button {
  font-family: var(--font-body); font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 600;
  color: var(--ink-soft); border-radius: 8px;
}
.app-header .nav button:hover { background: var(--azul-t); color: var(--ink); }
.app-header .nav button.active { background: var(--mar); color: #fff; }

/* Selector de idioma: bandera redonda; el menú lista bandera + nombre en su lengua */
.app-header .lang { display: flex; align-items: center; gap: 6px; font-family: var(--font-body); letter-spacing: 0; }
.lang-sel { position: relative; }
.app-header .lang .lang-btn {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--paper);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.app-header .lang .lang-btn:hover, .app-header .lang .lang-btn[aria-expanded="true"] { border-color: var(--cobre); box-shadow: 0 0 0 3px var(--azul-t); }
.lang-btn .flag { width: 26px; height: 26px; display: block; }
.flag svg { display: block; width: 100%; height: 100%; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 120; min-width: 180px; margin: 0; padding: 6px;
  list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.lang-menu[hidden] { display: none; }
.app-header .lang .lang-menu button {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left;
}
.app-header .lang .lang-menu button:hover { background: var(--azul-t); }
.app-header .lang .lang-menu button.active { color: var(--cobre); background: var(--azul-t); }
.lang-menu .flag { width: 24px; height: 24px; flex: none; }
#theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); }

/* --- Portada: foto aérea a sangre con buscador y sello -------------------- */
.hero-sede { position: relative; min-height: clamp(540px, 76vh, 760px); display: flex; align-items: center; overflow: hidden; background: var(--mar); }
.hero-sede-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-sede-velo {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 30, 46, .90) 0%, rgba(7, 30, 46, .70) 40%, rgba(7, 30, 46, .15) 78%, rgba(7, 30, 46, 0) 100%),
    linear-gradient(0deg, rgba(7, 30, 46, .45) 0%, rgba(7, 30, 46, 0) 35%);
}
.hero-sede-in { position: relative; z-index: 1; width: 100%; max-width: 1500px; margin: 0 auto; padding: 64px 28px 96px; color: #fff; }
.hero-sede-in .eti { color: #9FD8B9; }
.hero-sede-h { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 3.8vw, 52px); line-height: 1.06; letter-spacing: -.025em; max-width: 19ch; margin: 0; }
.hero-sede-lede { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; max-width: 54ch; margin: 18px 0 26px; color: rgba(255, 255, 255, .88); }
.busca-sede {
  display: flex; max-width: 620px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}
.busca-sede label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: #51606B; }
.busca-sede [data-ico] { width: 24px; height: 24px; --foco: #13527D; }
.busca-sede input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #111C24; font-size: 16px; height: 46px; }
.busca-sede button {
  background: #13527D; color: #fff; font-weight: 700; padding: 0 24px; border-radius: 8px; min-height: 46px;
  transition: background var(--dur-fast) var(--ease-standard);
}
.busca-sede button:hover { background: #0B3B5C; }
.rapidos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rapidos a {
  color: #fff; font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08);
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.rapidos a:hover { background: rgba(255, 255, 255, .2); border-color: #fff; color: #fff; }
.hero-sede-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; }
.hero-sede-links a, .hero-sede-links button {
  color: rgba(255, 255, 255, .86); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, .4); padding: 4px 0;
}
.hero-sede-links a:hover, .hero-sede-links button:hover { color: #fff; text-decoration-color: #fff; }
.sello-sede {
  position: absolute; z-index: 2; right: max(28px, calc((100% - 1444px) / 2)); bottom: 32px; max-width: 360px;
  display: flex; gap: 12px; align-items: flex-start; background: #fff; color: #111C24; border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25); border-left: 4px solid #17734A;
}
.sello-sede [data-ico] { width: 40px; height: 40px; color: #17734A; --foco: #13527D; }
.sello-sede strong { display: block; font-size: 15px; margin-bottom: 4px; }
.sello-sede span { font-size: 13px; line-height: 1.45; color: #51606B; }
.credito-aerea { position: absolute; z-index: 1; left: 12px; bottom: 8px; font-size: 11px; color: rgba(255, 255, 255, .7); }

.banda-datos { background: var(--paper); border-bottom: 1px solid var(--line); }
.banda-in { max-width: 1500px; margin: 0 auto; padding: 22px 28px 26px; }
.banda-datos .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.banda-datos .stat { border-top: 0; border-left: 3px solid var(--cobre); padding: 2px 0 2px 14px; background: none; border-radius: 0; box-shadow: none; }
.banda-datos .hero-stats { background: none; padding: 0; border: 0; box-shadow: none; }
.banda-datos .stat .num { font-family: var(--font-display); font-size: 32px; font-weight: 800; font-style: normal; line-height: 1.1; color: var(--ink); letter-spacing: -.02em; }
.banda-datos .stat .label { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.banda-datos .stat .src { font-size: 11px; letter-spacing: 0; }

.bloque-sede { padding: 56px max(28px, calc((100% - 1444px) / 2)); }
.bloque-gris { background: var(--paper-warm); }
.cab-sede { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.h2-sede { font-family: var(--font-display); font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.sub-sede { margin: 8px 0 0; color: var(--gris); font-size: 15px; max-width: 64ch; }
.enl-sede { font-weight: 700; color: var(--cobre); }
.cats-sede { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-sede {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.cat-sede:hover { border-color: var(--cobre); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.cat-sede [data-ico] { width: 44px; height: 44px; color: var(--cobre); margin-bottom: 6px; }
.cat-sede strong { font-size: 15px; line-height: 1.25; }
.cat-sede span { font-size: 13px; color: var(--gris); font-weight: 600; }

.barrios-sede { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 230px 230px; gap: 14px; }
.barrio-sede { position: relative; overflow: hidden; border-radius: 12px; color: #fff; background: var(--mar); }
.barrio-sede.b-grande { grid-row: span 2; }
.barrio-sede img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow) var(--ease-standard); }
.barrio-sede:hover img { transform: scale(1.04); }
.barrio-sede > span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(0deg, rgba(7, 30, 46, .85), rgba(7, 30, 46, 0));
}
.barrio-sede strong { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.barrio-sede.b-grande strong { font-size: 24px; }
.barrio-sede em { font-style: normal; font-size: 13px; opacity: .88; }
.barrio-sede:hover, .barrio-sede:hover em { color: #fff; }

/* --- Bandas fotográficas al inicio de cada vista --------------------------- */
.banda-foto { position: relative; margin: 0 0 32px; height: clamp(170px, 24vw, 290px); border-radius: 14px; overflow: hidden; background: var(--mar); }
.banda-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banda-foto figcaption {
  position: absolute; inset: auto 0 0 0; padding: 48px 22px 18px; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  background: linear-gradient(0deg, rgba(7, 30, 46, .82), rgba(7, 30, 46, 0));
}
.banda-foto figcaption span { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.02em; }
.banda-foto figcaption small { font-size: 11px; opacity: .75; white-space: nowrap; }

/* --- Piezas existentes con iconos y aire de sede -------------------------- */
.radio-step-ico { width: 34px; height: 34px; color: var(--cobre); margin-top: -1px; }
.radio-step-n { flex-basis: 26px; width: 26px; height: 26px; font-family: var(--font-body); font-size: 12px; }
.bridge-card { border-radius: 12px; overflow: hidden; }
.bridge-puerto { padding-top: 0; }
.bridge-foto { display: block; width: calc(100% + 40px); margin: 0 -20px 6px; height: 150px; object-fit: cover; }
.eco-glyph[data-ico] { width: 42px; height: 42px; border: 0; border-radius: 0; color: var(--cobre); font-size: 0; }
.dir-mono[data-ico] { padding: 6px; color: #fff; --foco: rgba(255, 255, 255, .7); }
.dir-card { border-radius: 12px; }
.dir-card:hover { border-color: var(--cobre); }
.audience-card h3 em { color: var(--cobre); }
.sources-strip { background: var(--mar); }
.sources-strip .src-list { font-family: var(--font-body); letter-spacing: 0; font-size: 12.5px; }
.app-footer { background: var(--mar); color: #fff; border-top: 0; margin-top: 64px; padding: 44px 28px; }
.app-footer .brand-sede { justify-content: center; }
.app-footer .brand-sede .conecta, .app-footer .brand-ico { color: #fff; }
.app-footer .brand-ico { --foco: #9FD8B9; }
.app-footer .brand-sub { color: rgba(255, 255, 255, .7); }
.app-footer .tagline { font-family: var(--font-display); font-style: normal; font-weight: 700; color: var(--arena); }
.app-footer p { font-family: var(--font-body); letter-spacing: 0; font-size: 13px; color: rgba(255, 255, 255, .72); }

/* --- Móvil --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .cats-sede { grid-template-columns: repeat(3, 1fr); }
  .sello-sede { position: relative; right: auto; bottom: auto; margin: -64px 28px 28px; }
  .hero-sede { flex-direction: column; align-items: stretch; }
  .hero-sede-in { padding-bottom: 88px; }
}
@media (max-width: 760px) {
  .oficial-strip { padding: 6px 16px; font-size: 12px; }
  .app-header { padding: 8px 16px; }
  .brand-sub { display: none; }
  .app-header .lang .lang-btn, #theme-toggle { width: 44px; height: 44px; }
  .hero-sede { min-height: 0; }
  .hero-sede-in { padding: 40px 16px 84px; }
  .hero-sede-velo { background: linear-gradient(180deg, rgba(7, 30, 46, .80) 0%, rgba(7, 30, 46, .72) 60%, rgba(7, 30, 46, .55) 100%); }
  .busca-sede button { padding: 0 16px; }
  .sello-sede { margin: -56px 16px 20px; }
  .banda-in { padding: 18px 16px 22px; }
  .banda-datos .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .bloque-sede { padding: 40px 16px; }
  .cats-sede { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-sede { padding: 14px; }
  .barrios-sede { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 150px 150px; gap: 10px; }
  .barrio-sede.b-grande { grid-row: auto; grid-column: span 2; }
  .barrio-sede strong { font-size: 15px; }
  .barrio-sede em { font-size: 12px; }
  .banda-foto { border-radius: 10px; margin-bottom: 24px; }
  .banda-foto figcaption { padding: 36px 14px 12px; flex-direction: column; align-items: flex-start; gap: 2px; }
}
.live-num { font-style: normal; font-family: var(--font-display); font-weight: 800; }
.dir-toolbar { background: var(--header-bg); border-radius: 12px; top: 66px; }
.pill, .pill-live { background: var(--header-bg); }
@media (max-width: 1100px) { .credito-aerea { top: 8px; bottom: auto; left: auto; right: 12px; } }
.hero-sede-links a.hero-verificar { color: #9FD8B9; text-decoration-color: rgba(159, 216, 185, .6); }
.btn-verde-sede { background: var(--success); color: #fff; }
.btn-verde-sede:hover { color: #fff; filter: brightness(1.08); }
.dir-mine { color: var(--success); font-weight: 700; }

/* ==========================================================================
   Filtros con icono: familias de actividad + zonas (data/familias.json).
   Directorio y mapa comparten estado (app.js: setFiltroDir). Colores por familia en --fam,
   todos ≥ 4,5:1 con blanco para el chip activo.
   ========================================================================== */
.dir-toolbar { align-items: end; }
.dir-toolbar .fam-strip { grid-column: 1 / -1; flex-basis: 100%; }
.dir-field { display: grid; gap: 4px; min-width: 0; }
.dir-field > span { font: 600 11px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.fam-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 2px 2px 4px; }
.fam-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; padding: 5px 14px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink);
  font: 600 14px/1.15 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.fam-chip i[data-ico] {
  width: 34px; height: 34px; padding: 5px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--fam) 13%, transparent); color: var(--fam); --foco: var(--fam);
}
.fam-chip i[data-ico] svg { width: 100%; height: 100%; display: block; }
.fam-chip b { font: 500 12px/1 var(--font-mono); color: var(--gris); }
.fam-chip:hover { border-color: var(--fam); }
.fam-chip.activa { background: var(--fam); border-color: var(--fam); color: #fff; }
.fam-chip.activa i[data-ico] { background: rgba(255, 255, 255, .18); color: #fff; --foco: #fff; }
.fam-chip.activa b { color: rgba(255, 255, 255, .88); }
.fam-chip:disabled { opacity: .45; cursor: default; }
.fam-chip:focus-visible { outline: 3px solid var(--cobre); outline-offset: 2px; }

/* Bloque de filtros del mapa */
.map-filtros { display: grid; gap: 12px; margin: 0 0 8px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-warm); }
.map-filtros h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gris); }
.map-filtros > * { min-width: 0; }
.fam-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: visible; padding: 0; }
.fam-rejilla .fam-chip { min-width: 0; }
.fam-rejilla .fam-chip {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; align-items: center;
  border-radius: 12px; white-space: normal; text-align: left; font-size: 13px; padding: 6px 10px 6px 6px;
}
.fam-rejilla .fam-chip i[data-ico] { grid-row: 1 / 3; width: 30px; height: 30px; padding: 4px; }
.fam-rejilla .fam-chip b { grid-column: 2; font-size: 11px; }
.fam-rejilla .fam-chip[data-fam=""] { grid-column: 1 / -1; }
.map-filtros-meta { display: grid; gap: 2px; }
.map-filtros-meta b { font: 600 13px var(--font-mono); color: var(--ink); }
.map-filtros-meta small { font-size: 11px; color: var(--gris); }

/* Escritorio: el mapa ocupa la pantalla y el lateral hace scroll (antes el mapa crecía hasta el alto del lateral, ~1.400 px,
   y la mitad quedaba fuera de la vista: los encuadres salían descentrados) */
@media (min-width: 1025px) {
  .map-shell { height: calc(100vh - 95px); min-height: 560px; }
  .map-shell #map { min-height: 0; }
}

/* Tableta y móvil: el lateral del mapa vuelve como banda de filtros encima del mapa (antes desaparecía) */
@media (max-width: 1024px) {
  .map-shell { grid-template-rows: auto 1fr; }
  .sidebar { display: block; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; overflow: visible; }
  .sidebar > :not(.map-filtros) { display: none; }
  .map-filtros { margin: 0; padding: 0; border: 0; background: none; gap: 8px; }
  .map-filtros h4, .map-filtros-meta small { display: none; }
  .fam-rejilla { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .fam-rejilla .fam-chip { display: inline-flex; border-radius: 999px; white-space: nowrap; padding: 5px 14px 5px 5px; }
  .fam-rejilla .fam-chip b { font-size: 12px; }
  .map-filtros .dir-field { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
  .map-filtros-meta { display: none; }
  #map { min-height: 64vh; }
}

/* Enlace a las páginas por zona (zona/index.html) desde el directorio y el lateral del mapa */
.dir-zonas-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 14px; color: var(--cobre); text-decoration: none; }
.dir-zonas-link:hover { text-decoration: underline; }
@media (max-width: 1024px) { .map-filtros .dir-zonas-link { display: none; } }
