/*
 * Página Mapas ([forulege_mapas], src/Front/Mapas.php). Colores del tema (variables de Impreza):
 * granate = --color-content-primary, rosa = --color-content-bg-alt; títulos = --h1-font-family.
 */
.fmapas { --fm-linea: #e2d4d4; --fm-suave: var(--color-content-faded-text, #5f5656); --fm-panel: #faf6f6; display: grid; gap: 2.2rem; }

.fmapas-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 2rem; align-items: start; }
.fmapas-intro p { margin: 0 0 0.8rem; max-width: 65ch; }
.fmapas-cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; border: 1px solid var(--fm-linea); padding: 1rem; background: var(--fm-panel); }
.fmapas-cifras div { display: grid; align-content: start; }
.fmapas-cifras b { font-family: var(--h1-font-family); font-size: 1.6rem; color: var(--color-content-primary); font-variant-numeric: tabular-nums; line-height: 1.15; }
.fmapas-cifras span { font-size: 0.82rem; color: var(--fm-suave); line-height: 1.35; }
.fmapas-cifras a { grid-column: 1 / -1; color: var(--color-content-primary); font-weight: 700; font-size: 0.92rem; }

.fmapas h2 { font-family: var(--h1-font-family); font-weight: 700; font-size: 1.25rem; margin: 0; padding: 0; }

/* Mapa + ficha */
.fmapas-explorador { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.fmapas-mapa { position: relative; border: 1px solid var(--fm-linea); background: #fff; }
.fmapas-lienzo { position: relative; }
.fmapas-mapa img { display: block; width: 100%; height: auto; }
.fmapas-leyenda { position: absolute; left: 0.8rem; top: 0.8rem; background: rgba(255,255,255,0.92); font-size: 0.8rem; padding: 0.35rem 0.6rem; display: flex; gap: 0.45rem; align-items: center; border: 1px solid var(--fm-linea); }
.fmapas-leyenda i { width: 14px; height: 10px; background: #6cc3e0; display: inline-block; }
.fmapas-punto { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); border: 0; padding: 0; margin: 0; min-width: 0; background: transparent !important; box-shadow: none !important; cursor: pointer; }
.fmapas-punto::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--color-content-primary); box-shadow: 0 0 0 3px #fff; transition: transform 0.15s; }
.fmapas-punto::after { content: attr(data-nombre); position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); white-space: nowrap; background: var(--color-content-primary); color: #fff; font-size: 0.8rem; font-weight: 700; line-height: 1.5; padding: 0.1rem 0.5rem; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.fmapas-punto:hover::before, .fmapas-punto:focus-visible::before { transform: scale(1.3); }
.fmapas-punto:hover::after, .fmapas-punto:focus-visible::after, .fmapas-punto[aria-pressed="true"]::after { opacity: 1; }
.fmapas-punto[aria-pressed="true"]::before { background: #fff; box-shadow: 0 0 0 4px var(--color-content-primary); }
.fmapas-punto:focus-visible { outline: none; }

.fmapas-ficha { border: 1px solid var(--fm-linea); background: var(--fm-panel); padding: 1.2rem; display: grid; gap: 0.9rem; position: sticky; top: calc(var(--header-sticky-height, 0px) + 1rem); }
.fmapas-ficha-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.fmapas-ficha-cab small { color: var(--fm-suave); font-size: 0.85rem; }
.fmapas-pestanas { display: flex; border-bottom: 1px solid var(--fm-linea); }
.fmapas-pestanas button { font-size: 0.95rem; font-weight: 700; color: var(--fm-suave); background: none !important; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 0.4rem 0.9rem; margin: 0 0 -1px; cursor: pointer; line-height: 1.5; }
.fmapas-pestanas button[aria-selected="true"] { color: var(--color-content-primary); border-bottom-color: var(--color-content-primary); }
.fmapas-vista { display: block; background: #fff; border: 1px solid var(--fm-linea); height: min(24rem, 70vw); overflow: hidden; }
.fmapas-vista img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fmapas-boton { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--color-content-primary); color: #fff !important; text-decoration: none; font-weight: 700; padding: 0.75rem 1rem; }
.fmapas-boton:hover, .fmapas-boton:focus-visible { opacity: 0.9; }
.fmapas-boton small { font-weight: 400; opacity: 0.85; font-variant-numeric: tabular-nums; }
.fmapas-navegar { display: flex; justify-content: space-between; gap: 0.5rem; }
.fmapas-navegar button { font-size: 0.9rem; font-weight: 700; color: var(--color-content-primary); background: none !important; border: 1px solid var(--fm-linea); border-radius: 0; padding: 0.35rem 0.7rem; cursor: pointer; line-height: 1.5; }
.fmapas-navegar button:hover, .fmapas-navegar button:focus-visible { border-color: var(--color-content-primary); }

/* Lista */
.fmapas-lista-cab { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.fmapas-lista-cab input { width: 16rem; max-width: 100%; }
.fmapas-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.fmapas-municipio { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 0.75rem; align-items: center; border: 1px solid var(--fm-linea); border-radius: 0; padding: 0.5rem; background: #fff !important; color: inherit; cursor: pointer; text-align: left; font: inherit; line-height: 1.35; margin: 0; }
.fmapas-municipio:hover, .fmapas-municipio:focus-visible, .fmapas-municipio[aria-current="true"] { border-color: var(--color-content-primary); outline: none; }
.fmapas-municipio img { width: 54px; height: 76px; object-fit: cover; display: block; border: 1px solid var(--fm-linea); }
.fmapas-municipio b { font-family: var(--h1-font-family); display: block; }
.fmapas-municipio span span { font-size: 0.82rem; color: var(--fm-suave); }
.fmapas-vacio { color: var(--fm-suave); }

@media (max-width: 899px) {
	.fmapas-intro, .fmapas-explorador { grid-template-columns: minmax(0, 1fr); }
	.fmapas-ficha { position: static; }
	.fmapas-punto { width: 24px; height: 24px; }
	.fmapas-punto::before { inset: 6px; }
}
@media (prefers-reduced-motion: reduce) { .fmapas * { transition: none !important; } }
.fmapas-boton small { white-space: nowrap; }
@media (max-width: 599px) {
	/* En el móvil la leyenda tapaba los puntos: va debajo del mapa */
	.fmapas-leyenda { position: static; border: 0; border-top: 1px solid var(--fm-linea); }
}
