@font-face {
  font-family: 'Averia Serif Libre';
  src: url("https://staging.gea-gestionterritorial.org/wp-content/uploads/et-fonts/AveriaSerifLibre-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.rita-map-embed,
.tj-mapa-seccion {
  --gea-verde: #1F3A2E;
  --gea-verde2: #2d5240;
  --gea-verde3: #2E5B4A;
  --gea-salvia: #A8B39D;
  --gea-mostaza: #B68A2E;
  --gea-papel: #F4F0E7;
  --gea-grafito: #2B2A28;
  --gea-suave: #5C5E58;
  --gea-alerta: #B64232;
  --tj-map-height: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: auto;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: inherit;
  line-height: 1.6;
  color: #333;
  background: #fff;
}
.taapa-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem 0 0;
  box-sizing: border-box;
}
.taapa-lorem,
.taapa-map-section-title,
.taapa-map-intro {
  padding-left: 5%;
  padding-right: 5%;
  box-sizing: border-box;
}
.taapa-lorem {
  font-size: 1rem;
  color: #444;
  margin-bottom: 1.5rem;
}
.taapa-lorem p { margin: 0 0 1rem; }
.taapa-map-section-title {
  font-size: 1.75rem;
  font-weight: 500;
  color: #333;
  margin: 0 0 1rem;
  line-height: 1.2;
}
.taapa-map-intro {
  text-align: center;
  margin: 0 0 1.25rem;
  color: #444;
}
.tj-mapa-titulo {
  font-family: 'Averia Serif Libre', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--gea-papel);
  margin: 0 0 8px;
  line-height: 1.15;
}
.tj-mapa-titulo em {
  color: var(--gea-mostaza);
  font-style: italic;
}
.tj-mapa-sub {
  font-family: 'Averia Serif Libre', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  font-weight: 300;
  color: rgba(244,240,231,0.92);
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 760px;
}
.tj-mapa-sub strong { color: var(--gea-mostaza); font-weight: 600; font-style: italic; }
.tj-mapa-wave {
  margin: 12px 0 32px;
  line-height: 0;
}
.tj-mapa-wave svg {
  display: block;
  width: 100%;
  max-width: 520px;
}
.rita-map-embed.tj-mapa-seccion {
  background: var(--gea-verde);
  margin: 72px 0 0;
  padding: 64px 48px;
  width: 100%;
  max-width: 100%;
}
.rita-map-embed {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  overflow: hidden;
  z-index: 10;
  isolation: isolate;
}
.rita-map-embed.tj-mapa-seccion {
  width: 100%;
  max-width: none;
}
/* Let full-bleed map escape narrow Divi/WordPress columns */
body.rita-map-has-embed #page-container,
body.rita-map-has-embed #main-content,
body.rita-map-has-embed .entry-content,
body.rita-map-has-embed .et_builder_inner_content,
body.rita-map-has-embed .et_pb_row,
body.rita-map-has-embed .et_pb_column,
body.rita-map-has-embed .container,
body.rita-map-has-embed .taapa-content {
  overflow-x: visible;
}
.tj-mapa-wrap {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  background: var(--gea-papel);
  padding: var(--tj-mapa-inset, 16px);
}
#map,
.tj-map {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: var(--tj-map-height, 720px);
  min-height: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: var(--gea-salvia);
  z-index: 10;
}
#map .leaflet-container {
  width: 100% !important;
  max-width: 100%;
  z-index: 1;
}
#map .leaflet-pane,
#map .leaflet-top,
#map .leaflet-bottom {
  z-index: 2 !important;
}
#map .leaflet-tooltip,
#map .leaflet-popup,
.rita-map-embed .leaflet-popup-pane {
  z-index: 10050 !important;
}
#map.rita-map-awaiting-focus .leaflet-marker-pane,
#map.rita-map-awaiting-focus .leaflet-tooltip-pane {
  pointer-events: none !important;
}
#map.rita-map-awaiting-focus .leaflet-tooltip-pane {
  visibility: hidden !important;
}
.map-focus-hint {
  position: absolute;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.45);
  color: #2d5a2d;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
@media (max-width: 767px), (pointer: coarse) {
  #map.rita-map-awaiting-focus .map-focus-hint {
    pointer-events: auto;
    cursor: pointer;
    z-index: 10060;
    -webkit-tap-highlight-color: transparent;
  }
}
#map.rita-map-focused .map-focus-hint {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 980px) {
  .rita-map-embed,
  .tj-mapa-seccion {
    --tj-map-height: 640px;
  }
  #map, .tj-map { min-height: 300px; }
}
@media (max-width: 768px) {
  .rita-map-embed.tj-mapa-seccion { padding: 48px 24px; }
  .rita-map-embed,
  .tj-mapa-seccion {
    --tj-map-height: 400px;
  }
  .rita-map-embed .filter-sidebar.tj-filtros-panel {
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    margin-bottom: 12px;
    box-shadow: none;
  }
  .rita-map-embed .tj-filtros { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .rita-map-embed .tj-filtro-btn { width: auto; }
/* 1. Aseguramos que el footer ocupe toda la anchura del grid */
.tj-mapa-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px var(--tj-mapa-inset, 16px);
  background: var(--gea-verde);
  box-sizing: border-box;
}
/* 2. Aseguramos que el botón no crezca ni se encoja */
.tj-mapa-footer .tj-btn-aniadir {
  flex-shrink: 0; /* Evita que el botón se aplaste */
  margin-left: auto; /* Empuja el botón a la derecha si space-between no es suficiente */
}
/* 3. Aseguramos que la nota no bloquee al botón */
.tj-mapa-nota {
  flex: 1; /* Permite que la nota ocupe el espacio sobrante */
  margin-right: 15px; /* Espacio mínimo entre nota y botón */
}

#map, .tj-map { min-height: 280px; }
}
@media (max-width: 767px) {
  .taapa-content { padding: 1.25rem 0 0; }
}
body.rita-map-embed-only .taapa-content {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
}
body.rita-map-embed-only [data-embed-hide="true"] { display: none !important; }
body.rita-map-embed-only .rita-map-embed.tj-mapa-seccion {
  margin-top: 0;
  padding: 16px;
}
.popup-title { margin: 0 0 0.6em; font-size: 1.1em; color: #1a1a1a; line-height: 1.3; }
.popup-body { border-top: 1px solid #eee; padding-top: 0.5em; }
.popup-row { margin: 0.35em 0; padding-bottom: 0.35em; border-bottom: 1px solid #eee; }
.popup-row:last-child { border-bottom: none; }
.popup-row-inline { display: flex; justify-content: space-between; gap: 0.75em; align-items: baseline; margin: 0.25em 0; padding-bottom: 0.25em; border-bottom: 1px solid #eee; }
.popup-row-inline .popup-label { flex: 1 1 auto; min-width: 0; }
.popup-row-inline .popup-value {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: normal;
  text-align: right;
}
.popup-label { font-weight: 600; color: #333; font-size: 0.85em; }
.popup-value { color: #555; font-size: 0.9em; word-break: break-word; }
.popup-tags { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0.2em 0; }
.popup-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.2em 0.5em;
  font-size: 0.8em;
  background: #e8f0e8;
  color: #2d5a2d;
  border-radius: 4px;
}
.popup-tag-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.popup-tag-icon svg {
  width: 1.15em;
  height: 1.15em;
  display: block;
}
.popup-value a { color: #1663c7; text-decoration: none; }
.popup-value a:hover { text-decoration: underline; }
.popup-value-links a { display: inline-block; margin-right: 0.5em; }
.popup-rrss-icon { width: 1.25em; height: 1.25em; vertical-align: middle; }
.popup-rrss-emoji { font-size: 1.25em; vertical-align: middle; }
.popup-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 0.75rem;
}
.popup-logo {
  max-width: 100%;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f5f5;
}

#map .leaflet-eje-marker-icon,
.rita-map-embed .leaflet-eje-marker-icon {
  width: 30px !important;
  height: 40px !important;
  max-width: 100px !important;
  max-height: 100px !important;
  background: transparent !important;
  border: none !important;
  object-fit: contain !important;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35));
}
#map .leaflet-tooltip-initiative.leaflet-tooltip-top {
  margin-top: 0;
  margin-bottom: 0;
}

#map .add-point-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10025;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: var(--gea-verde);
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
#map .add-point-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transform: scale(1.02);
}
#map .add-point-btn-text {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.25s ease, opacity 0.2s ease;
}
#map .add-point-btn:hover .add-point-btn-text {
  max-width: 14em;
  opacity: 1;
}
#map .add-point-btn-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--gea-mostaza);
  color: var(--gea-verde);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.rita-map-embed .tj-btn-aniadir {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gea-verde) !important;
  background: var(--gea-mostaza);
  text-decoration: none;
  padding: 14px 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: background 0.2s;
}
.rita-map-embed .tj-btn-aniadir:hover {
  background: #9a7326;
  color: var(--gea-verde) !important;
  box-shadow: none;
}
.rita-map-embed .tj-btn-aniadir svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  stroke: var(--gea-verde);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tj-mapa-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px var(--tj-mapa-inset, 16px);
  background: var(--gea-verde);
  box-sizing: border-box;
}
.tj-mapa-footer:has(.tj-btn-aniadir):not(:has(.tj-mapa-nota)) {
  justify-content: flex-end;
}
.tj-mapa-footer p {
  margin: 0;
}
.tj-mapa-footer > p:has(.tj-btn-aniadir) {
  flex: 0 0 auto;
}
.tj-mapa-nota {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gea-papel);
  margin: 0;
  margin-right: 0;
  flex: 1;
  font-style: italic;
}
.tj-mapa-nota--top { flex: none; margin: 6px 0 26px; max-width: 760px; }
.rita-map-embed .tj-mapa-footer .tj-btn-aniadir {
  margin-left: auto;
  flex-shrink: 0;
}

.rita-map-embed .filter-sidebar.tj-filtros-panel {
  position: absolute;
  top: var(--tj-mapa-inset, 16px);
  left: var(--tj-mapa-inset, 16px);
  bottom: auto;
  height: var(--tj-map-height, 720px);
  max-height: var(--tj-map-height, 720px);
  z-index: 10030;
  width: 260px;
  max-width: calc(100% - 32px);
  background: #fff;
  box-shadow: 4px 0 14px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rita-map-embed .filter-sidebar.tj-filtros-panel .filter-sidebar-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.filter-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10030;
  background: #fff;
  box-shadow: 4px 0 14px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  overflow: hidden;
}
.filter-sidebar.filter-sidebar--portaled {
  position: fixed;
  top: var(--rita-filter-top, 0);
  left: var(--rita-filter-left, 0);
  bottom: auto;
  height: var(--rita-filter-max-height, 100vh);
  max-height: var(--rita-filter-max-height, 100vh);
  z-index: 2147482000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.filter-sidebar.filter-sidebar--portaled.collapsed {
  height: auto;
  max-height: none;
  display: flex;
}
.filter-sidebar.filter-sidebar--portaled.filter-sidebar--hidden {
  display: none !important;
}
.filter-sidebar.collapsed {
  width: 48px;
  background: transparent;
  box-shadow: none;
}
.filter-sidebar:not(.collapsed) {
  width: 300px;
}
.filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #2d5a2d;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
  flex-shrink: 0;
  width: fit-content;
  border-radius: 0 0 8px 0;
}
.filter-sidebar.collapsed .filter-sidebar-header {
  padding: 0.6rem;
  border-radius: 0 0 8px 0;
}
.filter-sidebar.collapsed .filter-sidebar-header-text {
  display: none;
}
.filter-sidebar.collapsed .filter-sidebar-body {
  display: none;
}
.filter-sidebar-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-sidebar-header-icon svg {
  display: block;
}
.filter-sidebar-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.active-filters {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e0e0e0;
}
.active-filters-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: #e8f5e9;
  color: #2d5a2d;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-filter-tag .aft-label {
  font-weight: 600;
}
.reset-filters-btn {
  display: block;
  width: 100%;
  background: none;
  border: 1px solid #c62828;
  color: #c62828;
  border-radius: 5px;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}
.reset-filters-btn:hover {
  background: #c62828;
  color: #fff;
}
.filter-search {
  width: 100%;
  padding: 0.5rem 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gea-salvia);
  border-radius: 0;
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 0.9rem;
  background: var(--gea-papel);
  color: var(--gea-grafito);
}
.filter-search:focus {
  outline: none;
  border-color: var(--gea-mostaza);
}
.rita-map-embed .tj-filtros {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: none;
  overflow: visible;
}
.rita-map-embed .tj-filtros-label {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gea-suave);
  margin: 4px 0 8px;
}
.rita-map-embed .tj-filtros-label--spaced {
  margin-top: 16px;
}
.rita-map-embed .tj-filtro-btn {
  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  padding: 9px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gea-grafito);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
  width: 100%;
  border-radius: 0;
}
.rita-map-embed .tj-filtro-btn:hover {
  background: rgba(168, 179, 157, 0.2);
}
.rita-map-embed .tj-filtro-btn.activo {
  background: var(--gea-verde);
  color: var(--gea-papel);
}
.rita-map-embed .tj-filtro-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rita-map-embed .tj-filtro-eje-icon {
  width: 22px !important;
  max-width: 22px !important;
  height: auto !important;
  max-height: 30px !important;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.rita-map-embed .leaflet-popup-content {
  font-family: 'Barlow', system-ui, sans-serif;
}
.rita-map-embed .tj-popup-nombre {
  font-family: 'Averia Serif Libre', Georgia, serif;
  font-size: 1.1rem;
  color: var(--gea-verde);
  margin: 0 0 4px;
}
.rita-map-embed .tj-popup-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gea-mostaza);
  margin: 0 0 8px;
}
.rita-map-embed .tj-popup-desc {
  font-size: 0.9rem;
  color: var(--gea-suave);
  margin: 0;
  line-height: 1.5;
}
.search-results {
  margin-bottom: 1rem;
  display: none;
}
.search-results.visible {
  display: block;
}
.search-results-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.35rem;
}
.search-results-list {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
}
.search-results-item {
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.search-results-item:last-child { border-bottom: none; }
.search-results-item:hover {
  background: #e8f0e8;
  color: #2d5a2d;
}
.map-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10025;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  color: #555;
  background: rgba(255,255,255,0.9);
  text-align: center;
}
.map-footer a {
  color: #2d5a2d;
  text-decoration: none;
}
.map-footer a:hover { text-decoration: underline; }

html.rita-detail-modal-open,
body.rita-detail-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
.detail-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  overscroll-behavior: contain;
}
.detail-modal-overlay.visible {
  display: flex;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.detail-modal.ficha-modal {
  background: transparent;
  border-radius: 0;
  max-width: 400px;
  width: 100%;
  max-height: min(90vh, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  position: relative;
  z-index: 2147483001;
  font-family: 'Barlow', sans-serif;
  overscroll-behavior: contain;
}
.detail-modal.ficha-modal .detail-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(244,240,231,0.35);
  border-radius: 0;
  background: #B68A2E;
  color: #F4F0E7;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.detail-modal.ficha-modal .detail-modal-close:hover {
  background: #1F3A2E;
}
.detail-modal.ficha-modal > p:has(.detail-modal-close) {
  margin: 0;
  padding: 0;
}
.detail-modal.ficha-modal .detail-modal-content {
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.ficha-card {
  background: #fff;
  border: 1.5px solid #d0cac0;
  overflow: hidden;
  font-family: 'Barlow', sans-serif;
}
.ficha-eje-banda {
  position: relative;
  background: #1F3A2E;
  padding: 14px 54px 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ficha-eje-banda .detail-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(244,240,231,0.35);
  border-radius: 0;
  background: #B68A2E;
  color: #F4F0E7;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.ficha-eje-banda .detail-modal-close:hover {
  background: #1F3A2E;
}
.ficha-eje-marker { width: 38px; height: auto; flex-shrink: 0; }
.ficha-eje-num {
  font-family: 'Barlow', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #B68A2E;
  margin-bottom: 2px;
}
.ficha-eje-nombre {
  font-family: 'Averia Serif Libre', serif;
  font-size: 17px;
  font-weight: 400;
  color: #F4F0E7;
  line-height: 1.15;
}
.ficha-subcats {
  background: #2E5B4A;
  padding: 8px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ficha-sub {
  font-size: 11px;
  font-weight: 600;
  color: #F4F0E7;
  background: rgba(255,255,255,0.12);
  padding: 3px 9px;
  border: 1px solid rgba(255,255,255,0.18);
}
.ficha-body { padding: 18px 18px 0; }
.ficha-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ficha-logo-box {
  width: 48px;
  height: 48px;
  border: 1.5px solid #d0cac0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #A8B39D;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}
.ficha-logo-spinner {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #d0cac0;
  border-top-color: #1F3A2E;
  border-radius: 50%;
  animation: ficha-logo-spin 0.7s linear infinite;
  z-index: 1;
  pointer-events: none;
}
.ficha-logo-box--loading .ficha-logo-spinner {
  display: block;
}
.ficha-logo-box--loading .ficha-logo-img {
  opacity: 0;
}
.ficha-logo-img--loaded {
  opacity: 1;
}
@keyframes ficha-logo-spin {
  to { transform: rotate(360deg); }
}
.ficha-logo-box a.ficha-logo-link,
.ficha-logo-box button.ficha-logo-link {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}
.ficha-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ficha-init-nombre {
  font-family: 'Averia Serif Libre', serif;
  font-size: 20px;
  font-weight: 400;
  color: #2B2A28;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ficha-init-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ficha-init-loc {
  font-size: 13px;
  color: #5C5E58;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ficha-pin-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.ficha-init-org {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1F3A2E;
  background: rgba(31,58,46,0.07);
  border: 1px solid rgba(31,58,46,0.18);
  padding: 2px 7px;
}
.ficha-desc {
  font-family: 'Averia Serif Libre', serif;
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
  color: #2B2A28;
  line-height: 1.7;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e3d9;
}
.ficha-fields { padding: 4px 0; }
.ficha-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  border-bottom: 1px solid #f0ebe2;
}
.ficha-row:last-child { border-bottom: none; }
.ficha-lbl {
  font-size: 13px;
  font-weight: 600;
  color: #2B2A28;
  flex-shrink: 0;
  padding-top: 1px;
  min-width: 130px;
}
.ficha-val {
  font-size: 13px;
  color: #5C5E58;
  text-align: right;
  flex: 1;
  line-height: 1.5;
}
.ficha-val a {
  color: #B68A2E;
  text-decoration: none;
}
.ficha-val a:hover { text-decoration: underline; }
.ficha-val-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.ficha-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1px solid;
  display: inline-block;
}
.ficha-pill-si  { color: #2E5B4A; border-color: rgba(46,91,74,0.35); background: rgba(46,91,74,0.07); }
.ficha-pill-no  { color: #888780; border-color: rgba(168,179,157,0.5); background: rgba(168,179,157,0.08); }
.ficha-pill-rrss { color: #5C5E58; border-color: #d0cac0; background: transparent; text-decoration: none; }
.ficha-pill-rrss:hover { text-decoration: underline; }
.ficha-cta-wrap {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1.5px solid #1F3A2E;
  margin-top: 4px;
}
.ficha-cta-nodo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ficha-cta-nodo img { width: 52px; height: auto; }
.ficha-cta-nodo-txt {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A8B39D;
  line-height: 1.4;
}
.ficha-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #1F3A2E;
  color: #F4F0E7;
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.ficha-cta-btn:hover { background: #B68A2E; color: #F4F0E7; }
.ficha-cta-arrow {
  width: 13px;
  height: 13px;
  stroke: rgba(255,255,255,0.7);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 767px), (pointer: coarse) {
  .detail-modal-overlay.visible {
    padding: 0;
    align-items: stretch;
  }
  .detail-modal-overlay.rita-detail-modal-open-mobile {
    overflow: hidden;
    touch-action: none;
  }
  .detail-modal-overlay.rita-detail-modal-open-mobile .detail-modal.ficha-modal {
    touch-action: none;
  }
  .detail-modal-overlay.rita-detail-modal-open-mobile .detail-modal.ficha-modal .detail-modal-content {
    touch-action: pan-y;
  }
  .detail-modal.ficha-modal {
    max-width: none;
    width: 100%;
    max-height: none;
    height: 100%;
  }
  .detail-modal.ficha-modal .detail-modal-content {
    overflow-y: scroll;
  }
  html.rita-detail-modal-open body.rita-detail-modal-open {
    touch-action: none;
  }
}
.detail-modal .popup-label { font-size: clamp(0.9em, 2.5vw, 1em); }
.detail-modal .popup-value { font-size: clamp(0.95em, 2.5vw, 1.05em); }
.detail-modal .popup-tag { font-size: clamp(0.85em, 2vw, 0.95em); padding: 0.3em 0.6em; }

.logo-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147484000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.logo-modal-overlay.visible {
  display: flex;
}
.logo-modal-close {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2147484001;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.logo-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.logo-modal-image {
  display: block;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  padding: 1rem;
  box-sizing: border-box;
}

/* === GEA fix — layout móvil ===
   La regla de escritorio de .filter-sidebar (position:absolute, panel flotante)
   está definida más abajo en el archivo que el media query de móvil, así que en
   móvil ganaba y el panel de filtros tapaba el mapa. Este override va al final
   para ganar por orden: el panel se apila arriba a todo el ancho y el mapa debajo.
   Breakpoint a 1024px para cubrir también tablets y ventanas medianas. */
@media (max-width: 1024px) {
  .rita-map-embed .tj-mapa-wrap { display: block; }
  .rita-map-embed .filter-sidebar.tj-filtros-panel {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 320px;
    margin: 0 0 12px;
    box-shadow: none;
    border: 1px solid var(--gea-salvia);
  }
  .rita-map-embed #map,
  .rita-map-embed .tj-map { width: 100%; height: var(--tj-map-height, 400px); }
}
