/* Mapa interactivo público — Patrimonio Natural (Fase 1.5) */

.pn-mapa-app {
  --pn-mapa-radius: 14px;
  --pn-mapa-control-h: 2.75rem;
  --pn-mapa-control-radius: 0.5rem;
  --pn-mapa-canvas-h: min(82vh, 790px);
  --pn-mapa-canvas-min-h: 490px;
  margin-top: 1.5rem;
}

.pn-mapa-intro__text {
  max-width: 46rem;
  color: var(--tj-color-text-body, #4a4a4a);
  font-size: 1.05rem;
  line-height: 1.55;
}

.pn-mapa-tipos[hidden],
.pn-mapa-check[hidden] {
  display: none !important;
}

.pn-mapa-app--scope-casas .pn-mapa-tipo--espacio,
.pn-mapa-app--scope-casas .pn-mapa-tipo--sendero,
.pn-mapa-app--scope-casas .pn-mapa-tipo--mirador {
  display: none !important;
}

.pn-mapa-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.pn-mapa-tipos {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.3rem;
}

.pn-mapa-tipo {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 0.2rem 0.45rem 0.2rem 0.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.12;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pn-mapa-tipo__text {
  display: block;
  text-align: left;
  line-height: 1.15;
  white-space: normal;
}

.pn-mapa-tipo:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 33, 70, 0.2);
}

.pn-mapa-tipo__pin {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.pn-mapa-tipo--espacio {
  color: #1a6b4a;
  border-color: color-mix(in srgb, #1a6b4a 40%, #fff);
  background: color-mix(in srgb, #1a6b4a 10%, #fff);
}

.pn-mapa-tipo--espacio.is-active {
  color: #145239;
  border-color: color-mix(in srgb, #1a6b4a 55%, #fff);
  background: color-mix(in srgb, #1a6b4a 22%, #fff);
}

.pn-mapa-filtros-casa {
  display: contents;
}

.pn-mapa-tipo--cat {
  color: var(--pn-cat-color, #672146);
  border-color: color-mix(in srgb, var(--pn-cat-color, #672146) 40%, #fff);
  background: color-mix(in srgb, var(--pn-cat-color, #672146) 10%, #fff);
}

.pn-mapa-tipo--cat.is-active {
  color: color-mix(in srgb, var(--pn-cat-color, #672146) 82%, #000);
  border-color: color-mix(in srgb, var(--pn-cat-color, #672146) 55%, #fff);
  background: color-mix(in srgb, var(--pn-cat-color, #672146) 22%, #fff);
}

.pn-mapa-tipo--sendero {
  color: #8a4b12;
  border-color: color-mix(in srgb, #8a4b12 40%, #fff);
  background: color-mix(in srgb, #8a4b12 10%, #fff);
}

.pn-mapa-tipo--sendero.is-active {
  color: #6b3a0e;
  border-color: color-mix(in srgb, #8a4b12 55%, #fff);
  background: color-mix(in srgb, #8a4b12 22%, #fff);
}

.pn-mapa-tipo--mirador {
  color: #2a6f97;
  border-color: color-mix(in srgb, #2a6f97 40%, #fff);
  background: color-mix(in srgb, #2a6f97 10%, #fff);
}

.pn-mapa-tipo--mirador.is-active {
  color: #1e5575;
  border-color: color-mix(in srgb, #2a6f97 55%, #fff);
  background: color-mix(in srgb, #2a6f97 22%, #fff);
}

.pn-mapa-tipo:not(.is-active) {
  opacity: 0.72;
}

.pn-mapa-toolbar__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) auto auto;
  gap: 0.75rem;
  align-items: center;
}

.pn-mapa-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  min-height: var(--pn-mapa-control-h);
  height: var(--pn-mapa-control-h);
  padding: 0 0.85rem;
  border: 1px solid rgba(103, 33, 70, 0.2);
  border-radius: var(--pn-mapa-control-radius);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  color: #4a1633;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.pn-mapa-check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--tj-color-theme-primary, #672146);
  cursor: pointer;
}

.pn-mapa-check:has(input:checked) {
  border-color: rgba(103, 33, 70, 0.45);
  background: #faf6f8;
}

.pn-mapa-field {
  position: relative;
  min-width: 0;
}

.pn-mapa-field .form-control,
.pn-mapa-field .form-select,
.pn-mapa-field .pn-mapa-select {
  min-height: var(--pn-mapa-control-h);
  height: var(--pn-mapa-control-h);
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  line-height: 1.25;
  border-radius: var(--pn-mapa-control-radius);
  border-color: rgba(103, 33, 70, 0.2);
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  box-sizing: border-box;
}

.pn-mapa-field .pn-mapa-select {
  /* Select nativo (sin nice-select): evita altura duplicada y opciones vacías */
  appearance: auto;
  -webkit-appearance: menulist;
  background-image: none;
}

.pn-mapa-field .form-control:focus,
.pn-mapa-field .form-select:focus {
  border-color: var(--tj-color-theme-primary, #672146);
  box-shadow: 0 0 0 0.2rem rgba(103, 33, 70, 0.15);
}

.pn-mapa-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pn-mapa-count {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
  color: #6b5a62;
  white-space: nowrap;
}

.pn-mapa-list-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--pn-mapa-control-h);
  height: var(--pn-mapa-control-h);
  padding: 0 0.95rem;
  border: 1px solid var(--tj-color-theme-primary, #672146);
  border-radius: var(--pn-mapa-control-radius);
  background: #fff;
  color: var(--tj-color-theme-primary, #672146);
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  box-sizing: border-box;
}

.pn-mapa-list-toggle:hover,
.pn-mapa-list-toggle:focus-visible,
.pn-mapa-list-toggle[aria-expanded='true'] {
  background: var(--tj-color-theme-primary, #672146);
  color: #fff;
  outline: none;
}

.pn-mapa-sugerencias {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 16rem;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(103, 33, 70, 0.15);
  border-radius: var(--pn-mapa-control-radius);
  box-shadow: 0 10px 28px rgba(32, 18, 26, 0.12);
}

.pn-mapa-sugerencias[hidden] {
  display: none !important;
}

.pn-mapa-sugerencias__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.pn-mapa-sugerencias__item:hover,
.pn-mapa-sugerencias__item:focus-visible,
.pn-mapa-sugerencias__item.is-active {
  background: rgba(103, 33, 70, 0.07);
  outline: none;
}

.pn-mapa-sugerencias__titulo {
  font-size: 0.92rem;
  font-weight: 650;
  color: #241018;
}

.pn-mapa-sugerencias__meta {
  font-size: 0.78rem;
  color: #6b5a62;
}

.pn-mapa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  background: #e9efea;
  border-radius: 14px;
  padding: 26px 24px;
}

.pn-mapa-layout:has(#pn-mapa-panel:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  align-items: start;
}

.pn-mapa-stage {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pn-mapa-stage__map {
  position: relative;
  min-width: 0;
}

.pn-mapa-canvas {
  width: 100%;
  height: var(--pn-mapa-canvas-h);
  min-height: var(--pn-mapa-canvas-min-h);
  border-radius: var(--pn-mapa-radius);
  overflow: hidden;
  border: 1px solid rgba(103, 33, 70, 0.12);
  background: #e8eee9;
}

.pn-mapa-ayuda {
  margin-top: 0;
}

.pn-mapa-ayuda .pagina-quote__text p {
  margin: 0;
}

.pn-mapa-status {
  position: absolute;
  z-index: 500;
  left: 0.75rem;
  bottom: 0.75rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  color: #4a4a4a;
  pointer-events: none;
}

.pn-mapa-status[hidden],
.pn-mapa-error[hidden],
.pn-mapa-list[hidden],
.pn-mapa-panel[hidden] {
  display: none !important;
}

.pn-mapa-error {
  position: absolute;
  z-index: 600;
  inset: auto 1rem 1rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--pn-mapa-control-radius);
  background: #fff;
  border: 1px solid rgba(103, 33, 70, 0.2);
  box-shadow: 0 8px 24px rgba(32, 18, 26, 0.1);
  color: #4a4a4a;
}

/* Listado lateral / overlay */
.pn-mapa-list {
  position: absolute;
  z-index: 700;
  top: 0.75rem;
  left: 0.75rem;
  bottom: 0.75rem;
  width: min(22rem, calc(100% - 1.5rem));
  display: flex;
  flex-direction: column;
  border-radius: var(--pn-mapa-radius);
  border: 1px solid rgba(103, 33, 70, 0.12);
  background: #fff;
  box-shadow: 0 12px 32px rgba(32, 18, 26, 0.14);
  overflow: hidden;
}

.pn-mapa-list__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(103, 33, 70, 0.1);
  min-height: 3.35rem;
}

.pn-mapa-list__title {
  position: absolute;
  left: 3rem;
  right: 3rem;
  margin: 0;
  text-align: center;
  font-family: var(--tj-ff-heading, 'Mona Sans', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #241018;
  pointer-events: none;
}

.pn-mapa-list__close {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 50%;
  background: rgba(103, 33, 70, 0.06);
  color: var(--tj-color-theme-primary, #672146);
  cursor: pointer;
}

.pn-mapa-list__close:hover,
.pn-mapa-list__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 33, 70, 0.2);
}

/* Con listado abierto, el zoom pasa a la derecha para no tapar «Resultados» */
@media (min-width: 992px) {
  .pn-mapa-stage__map.is-list-open .leaflet-top.leaflet-left {
    left: auto;
    right: 10px;
  }
}

.pn-mapa-list__body {
  flex: 1;
  overflow: auto;
  padding: 0.35rem;
}

.pn-mapa-list__item {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.pn-mapa-list__item:hover,
.pn-mapa-list__item:focus-visible {
  background: rgba(103, 33, 70, 0.06);
  outline: none;
}

.pn-mapa-list__item.is-selected {
  background: rgba(103, 33, 70, 0.1);
  box-shadow: inset 0 0 0 1px rgba(103, 33, 70, 0.22);
}

.pn-mapa-list__thumb {
  width: 4.25rem;
  height: 3.15rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #eef2ef;
}

.pn-mapa-list__tipo {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tj-color-theme-primary, #672146);
}

.pn-mapa-list__tipo--espacio {
  color: #1a6b4a;
}

.pn-mapa-list__tipo--casa {
  color: #672146;
}

.pn-mapa-list__tipo--sendero {
  color: #8a4b12;
}

.pn-mapa-list__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.25;
  color: #241018;
}

.pn-mapa-list__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #6b5a62;
}

.pn-mapa-list__empty {
  margin: 1rem;
  font-size: 0.9rem;
  color: #6b5a62;
}

/* Panel detalle */
.pn-mapa-panel {
  position: relative;
  height: var(--pn-mapa-canvas-h);
  min-height: var(--pn-mapa-canvas-min-h);
  border-radius: var(--pn-mapa-radius);
  border: 0;
  background: #fdfffd;
  overflow: hidden;
  box-shadow: none;
}

.pn-mapa-panel__inner {
  height: 100%;
  overflow: auto;
  padding: 1.35rem 1.25rem 1.5rem;
}

.pn-mapa-panel__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tj-color-theme-primary, #672146);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.pn-mapa-panel__close:hover,
.pn-mapa-panel__close:focus-visible {
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 33, 70, 0.2);
}

.pn-mapa-card__badge-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.pn-mapa-card__badge-fallback .pn-wave-card__tag,
.pn-mapa-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
}

.pn-mapa-card__wave .pn-wave-card__tag {
  color: #fff;
  text-transform: uppercase;
}

.pn-mapa-card__wave .pn-wave-card__tag--tipo {
  background: #672146;
}

.pn-mapa-card__badge--espacio,
.pn-mapa-card__wave .pn-wave-card__tag.pn-mapa-card__badge--espacio {
  background: #1a6b4a;
}

.pn-mapa-card__badge--casa,
.pn-mapa-card__wave .pn-wave-card__tag.pn-mapa-card__badge--casa {
  background: #672146;
}

.pn-mapa-card__badge--sendero,
.pn-mapa-card__wave .pn-wave-card__tag.pn-mapa-card__badge--sendero {
  background: #8a4b12;
}

.pn-mapa-card__badge--mirador,
.pn-mapa-card__wave .pn-wave-card__tag.pn-mapa-card__badge--mirador {
  background: #2a6f97;
}

.pn-mapa-card__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 1.75rem 0.9rem 0;
}

.pn-mapa-card__nav .pn-mapa-action {
  min-height: 2.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  width: auto;
  flex: 1 1 auto;
}

.pn-mapa-card__wave {
  height: auto;
  margin-bottom: 0.85rem;
  box-shadow: 0 6px 18px rgba(26, 40, 36, 0.08);
}

.pn-mapa-card__wave .pn-wave-card__tags {
  top: 10px;
  right: 10px;
  left: auto;
}

.pn-mapa-card__wave:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(26, 40, 36, 0.08);
}

.pn-mapa-card__wave .pn-wave-card__media {
  aspect-ratio: 4 / 3;
  margin-bottom: -24px;
  flex: none;
}

.pn-mapa-card__wave-content {
  display: block;
  padding: 4px 14px 14px;
  min-height: 0;
  height: auto;
  flex: none;
}

.pn-mapa-card__wave .pn-wave-card__wave {
  top: -40px;
  height: 56px;
}

.pn-mapa-card__wave .pn-mapa-card__title {
  position: relative;
  z-index: 1;
  margin: 0 0 0.35rem;
  padding-right: 0;
  font-size: 1.05rem;
}

.pn-mapa-card__wave .pn-mapa-card__meta {
  position: relative;
  z-index: 1;
  margin: 0;
}

.pn-mapa-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 0.85rem;
  background: #eef2ef;
  position: relative;
}

.pn-mapa-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  margin: 0;
}

.pn-mapa-card__title {
  margin: 0 0 0.45rem;
  padding-right: 2rem;
  font-family: var(--tj-ff-heading, 'Mona Sans', sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #241018;
}

.pn-mapa-card__meta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: #6b5a62;
}

.pn-mapa-card__sumario {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #3f3a3c;
}

.pn-mapa-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.95rem;
  padding: 0;
  list-style: none;
}

.pn-mapa-card__stat {
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  background: rgba(103, 33, 70, 0.06);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tj-color-theme-primary, #672146);
}

.pn-mapa-card__facts {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.95rem;
}

.pn-mapa-card__fact {
  margin: 0;
  font-size: 0.88rem;
  color: #3f3a3c;
}

.pn-mapa-card__fact strong {
  display: inline-block;
  min-width: 5.5rem;
  color: #241018;
}

.pn-mapa-card__espacio-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tj-color-theme-primary, #672146);
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.pn-mapa-card__espacio-link:hover,
.pn-mapa-card__espacio-link:focus-visible {
  outline: none;
  color: #4a1633;
}

.pn-mapa-card__actions-label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b5a62;
}

.pn-mapa-acts {
  margin: 0 0 1rem;
  padding: 0.75rem 0.8rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid rgba(103, 33, 70, 0.1);
}

.pn-mapa-acts__title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b5a62;
}

.pn-mapa-acts__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pn-mapa-acts__item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(103, 33, 70, 0.1);
}

.pn-mapa-acts__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.pn-mapa-acts__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  border-radius: 0.45rem;
  background: #fff;
  border: 1px solid rgba(103, 33, 70, 0.14);
  color: #672146;
  line-height: 1.05;
}

.pn-mapa-acts__day {
  font-size: 0.95rem;
  font-weight: 800;
}

.pn-mapa-acts__mon {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pn-mapa-acts__body {
  min-width: 0;
}

.pn-mapa-acts__link {
  display: block;
  color: #241018 !important;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.pn-mapa-acts__link:hover {
  color: #672146 !important;
  text-decoration: underline;
}

.pn-mapa-acts__hora {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #6b5a62;
}

.pn-mapa-acts__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #672146 !important;
  text-decoration: none;
}

.pn-mapa-acts__more:hover {
  text-decoration: underline;
}

.pn-mapa-list__acts {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: #672146;
}

.pn-mapa-list__acts i {
  font-size: 0.7rem;
}

.pn-mapa-tip__acts {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: #672146;
}

.pn-mapa-card__stat--acts {
  background: #faf6f8;
  color: #672146;
}

.pn-mapa-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pn-mapa-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-height: 2.6rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(103, 33, 70, 0.22);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--tj-color-theme-primary, #672146);
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.pn-mapa-action svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  fill: currentColor;
}

.pn-mapa-action:hover,
.pn-mapa-action:focus-visible {
  border-color: var(--tj-color-theme-primary, #672146);
  background: rgba(103, 33, 70, 0.05);
  outline: none;
  color: var(--tj-color-theme-primary, #672146);
}

.pn-mapa-action--primary {
  background: var(--tj-color-theme-primary, #672146);
  border-color: var(--tj-color-theme-primary, #672146);
  color: #fff;
}

.pn-mapa-action--primary:hover,
.pn-mapa-action--primary:focus-visible {
  background: #4a1633;
  border-color: #4a1633;
  color: #fff;
}

.pn-mapa-action--primary span {
  color: #fff;
}

.pn-mapa-legend {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: #6b5a62;
}

/* Marcadores con iconos PNG del sitio antiguo */
.pn-mapa-divicon {
  background: transparent;
  border: 0;
}

.pn-mapa-pin {
  display: block;
  width: 36px;
  height: 46px;
  position: relative;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
  transform-origin: 50% 100%;
}

.pn-mapa-pin img {
  display: block;
  width: 36px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.pn-mapa-pin__badge {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 2;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #672146;
  color: #fff;
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.pn-mapa-pin.is-selected {
  transform: scale(1.28);
  z-index: 700;
}

.pn-mapa-pin.is-selected img {
  filter:
    drop-shadow(0 0 0 2px #fff)
    drop-shadow(0 0 0 4px var(--tj-color-theme-primary, #672146))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.pn-mapa-pin.is-related img {
  filter: drop-shadow(0 0 0 2px rgba(26, 107, 74, 0.55)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.pn-mapa-pin.is-dimmed {
  opacity: 0.28;
  filter: grayscale(0.4);
}

.pn-mapa-app.is-focus-related .marker-cluster {
  opacity: 0.35;
}

/* Tooltip visual (hover) */
.pn-mapa-tip.leaflet-tooltip {
  padding: 0;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  box-shadow: none;
  white-space: normal;
}

.pn-mapa-tip.leaflet-tooltip::before {
  display: none;
}

.pn-mapa-tip__card {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.55rem;
  width: 15.5rem;
  padding: 0.45rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid rgba(103, 33, 70, 0.12);
  box-shadow: 0 10px 28px rgba(32, 18, 26, 0.16);
  overflow: hidden;
}

.pn-mapa-tip__img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #eef2ef;
}

.pn-mapa-tip__tipo {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tj-color-theme-primary, #672146);
}

.pn-mapa-tip__tipo--espacio {
  color: #1a6b4a;
}

.pn-mapa-tip__tipo--casa {
  color: #672146;
}

.pn-mapa-tip__tipo--sendero {
  color: #8a4b12;
}

.pn-mapa-tip__name {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  color: #241018;
}

.pn-mapa-tip__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #6b5a62;
}

/* Cluster composition tooltip */
.pn-mapa-cluster-tip.leaflet-tooltip {
  padding: 0;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  box-shadow: none;
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  white-space: normal;
  max-width: none;
}

.pn-mapa-cluster-tip.leaflet-tooltip::before {
  border-top-color: #fff;
}

.pn-mapa-cluster-tip__card {
  width: 15.5rem;
  padding: 0.7rem 0.85rem 0.75rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid rgba(103, 33, 70, 0.1);
  box-shadow: 0 10px 28px rgba(32, 18, 26, 0.14);
  color: #241018;
}

.pn-mapa-cluster-tip__total {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.pn-mapa-cluster-tip__breakdown {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-mapa-cluster-tip__row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #3f3a3c;
}

.pn-mapa-cluster-tip__dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 1px 3px rgba(26, 40, 36, 0.2);
}

.pn-mapa-cluster-tip__count {
  flex: 0 0 1.25rem;
  font-weight: 700;
}

.pn-mapa-cluster-tip__label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 650;
}

.pn-mapa-cluster-tip__names {
  margin: 0.55rem 0 0;
  padding: 0.5rem 0 0;
  list-style: none;
  border-top: 1px solid rgba(103, 33, 70, 0.1);
  display: grid;
  gap: 0.35rem;
}

.pn-mapa-cluster-tip__names li {
  font-size: 0.75rem;
  line-height: 1.3;
  color: #3f3a3c;
}

.pn-mapa-cluster-tip__name-tipo {
  display: inline;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.pn-mapa-cluster-tip__hint {
  margin: 0.55rem 0 0;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(103, 33, 70, 0.1);
  font-size: 0.72rem;
  color: #6b5a62;
  line-height: 1.35;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(103, 33, 70, 0.22);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: var(--tj-color-theme-primary, #672146);
  color: #fff;
  font-family: var(--tj-ff-body, 'Mona Sans', sans-serif);
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .pn-mapa-layout {
    grid-template-columns: 1fr;
  }

  .pn-mapa-layout:has(#pn-mapa-panel:not([hidden])) {
    grid-template-columns: 1fr;
  }

  .pn-mapa-panel {
    height: auto;
    min-height: 0;
  }

  .pn-mapa-panel:not([hidden]) {
    order: 2;
  }

  .pn-mapa-canvas {
    --pn-mapa-canvas-h: min(70vh, 570px);
    --pn-mapa-canvas-min-h: 370px;
    height: var(--pn-mapa-canvas-h);
    min-height: var(--pn-mapa-canvas-min-h);
  }

  .pn-mapa-toolbar__row {
    grid-template-columns: 1fr;
  }

  .pn-mapa-toolbar__actions {
    justify-content: flex-start;
  }

  .pn-mapa-count {
    margin-left: auto;
  }

  .pn-mapa-list {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(55vh, 26rem);
    border-radius: var(--pn-mapa-radius) var(--pn-mapa-radius) 0 0;
  }
}

@media (max-width: 991.98px) {
  .pn-mapa-tipos {
    flex-wrap: wrap;
  }

  .pn-mapa-tipo {
    flex: 1 1 calc(25% - 0.3rem);
  }
}

@media (max-width: 575.98px) {
  .pn-mapa-tipos {
    flex-wrap: wrap;
  }

  .pn-mapa-tipo {
    flex: 1 1 calc(50% - 0.3rem);
  }
}

@media (hover: none) {
  .pn-mapa-tip {
    display: none !important;
  }
}

/* Popup de prueba en marcadores: Cómo llegar / Street View */
.pn-mapa-marker-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: var(--pn-mapa-radius, 14px);
  box-shadow: 0 10px 28px rgba(26, 40, 36, 0.16);
}

.pn-mapa-marker-popup-wrap .leaflet-popup-content {
  margin: 12px 14px;
  min-width: 150px;
}

.pn-mapa-marker-popup__title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a2428;
}

.pn-mapa-marker-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pn-mapa-marker-popup__btn {
  display: block;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(103, 33, 70, 0.2);
  background: #faf6f8;
  color: #672146 !important;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  line-height: 1.2;
}

.pn-mapa-marker-popup__btn:hover {
  background: #f1e6ec;
  color: #4a1633 !important;
}

