#mapa {
  --map-ink: var(--brand-ink);
  --map-paper: var(--paper, #f7f5ef);
  --map-surface: #fffefa;
  --map-secondary: #505e68;
  --map-line: #cfcec6;
  --map-active: var(--brand-blue);
  padding: clamp(58px, 7vw, 116px) 6vw;
  color: var(--map-ink);
  background: var(--map-paper);
  scroll-margin-top: 76px;
}
.pm-head, [data-interactive-map] { max-width: 1536px; margin-inline: auto; }
.pm-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px 48px;
}
.pm-head h2 {
  margin: 0;
  font: 500 clamp(41px, 5.1vw, 85px)/1.01 var(--sans, Arial, sans-serif);
  letter-spacing: -.069em;
  text-wrap: balance;
}
.pm-head h2 em {
  font-family: var(--serif, Georgia, serif);
  font-weight: 400;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.pm-head > p { max-width: 29ch; margin: 0 0 .15em; color: var(--map-secondary); font-size: clamp(14px, 1.05vw, 17px); line-height: 1.5; }
.pm-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  margin-block: clamp(24px, 3vw, 45px) 0;
}
.pm-search { position: relative; flex: 1; min-width: 0; }
.pm-field {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 3px 5px 3px 18px;
  gap: 11px;
  background: var(--map-surface);
  border: 1px solid #b9c1c0;
  border-radius: 14px;
  box-shadow: 0 2px 4px #13283b05;
}
.pm-field:focus-within { border-color: var(--map-active); box-shadow: 0 0 0 3px var(--brand-tint); }
.pm-field .pm-search-icon { flex: 0 0 20px; width: 20px; height: 20px; color: var(--map-secondary); }
#pm-query {
  appearance: none;
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--map-ink);
  font: 450 16px/1.4 var(--sans, Arial, sans-serif);
}
#pm-query:focus { outline: 0; }
#pm-query::placeholder { color: #626b71; opacity: 1; }
#pm-query::-webkit-search-cancel-button { display: none; }
.pm-erase, .pm-prev, .pm-next {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--map-ink);
  background: transparent;
  border-radius: 50%;
  font-size: 20px;
}
.pm-erase:is(:hover, :focus-visible) { background: var(--brand-tint); }
.pm-filters {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  gap: 2px;
  padding: 3px;
  background: #eae9e2;
  border: 1px solid #dfdfd6;
  border-radius: 30px;
}
.pm-filters button {
  flex: 1;
  min-height: 44px;
  padding: 0 clamp(12px, 1.5vw, 25px);
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #4b565a;
  font: 550 14px/1 var(--sans, Arial, sans-serif);
}
.pm-filters button:hover { color: var(--map-ink); }
.pm-filters button[aria-pressed=true] {
  background: var(--map-active);
  color: white;
}
#mapa :is(a,button):focus-visible { outline: 2px solid var(--map-active); outline-offset: 3px; }
.pm-popover {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 6px) 0 auto;
  padding: 6px;
  border: 1px solid #d9dcd5;
  border-radius: 16px;
  box-shadow: 0 13px 35px #152d4226, 0 3px 8px #152d4209;
  background: var(--map-surface);
}
.pm-options { max-height: min(335px, 41dvh); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; }
.pm-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  line-height: 1.3;
  cursor: pointer;
}
.pm-option[aria-selected=true] {
  background: var(--brand-tint);
  box-shadow: inset 0 0 0 1px var(--brand-line);
}
.pm-option-media {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 7px;
  background: #efece5;
  color: #526575;
}
.pm-option-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pm-option-media svg { display: block; width: 19px; height: 19px; }
.pm-option-copy { display: grid; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.pm-option-title { font-size: 14px; font-weight: 600; color: var(--map-ink); }
.pm-option-meta, .pm-hint { color: var(--map-secondary); font-size: 12px; }
.pm-hint { padding: 13px 14px; margin: 0; line-height: 1.45; }
.pm-results-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; min-height: 47px; }
.pm-total { margin: 0; color: var(--map-secondary); font-size: 13px; line-height: 1.4; }
.pm-clear { min-height: 44px; padding: 0; color: var(--map-active); background: transparent; border: 0; text-decoration: underline; text-underline-offset: .23em; font: 550 13px/1.3 var(--sans, Arial, sans-serif); }
.pm-layout {
  display: grid;
  grid-template-columns: minmax(0,1.53fr) minmax(265px,1fr);
  align-items: start;
  gap: clamp(22px, 2.8vw, 48px);
}
.pm-map-column, .pm-feature { min-width: 0; }
.pm-map {
  position: relative;
  isolation: isolate;
  aspect-ratio: 760 / 395;
  border-radius: 18px;
  background: #c5d9da url('media/map/el-salvador.svg') center / 100% 100% no-repeat;
}
.pm-map:lang(en) { background-image: url('media/map/el-salvador.svg#en'); }
.pm-map::after {
  position: absolute;
  inset: 0;
  content: '';
  border: 1px solid #12274017;
  border-radius: inherit;
  pointer-events: none;
}
.pm-markers { position: absolute; inset: 0; }
.pm-pin {
  position: absolute;
  isolation: isolate;
  transform: translate(-50%, -50%);
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font: 650 12px/1 var(--sans, Arial, sans-serif);
  font-variant-numeric: tabular-nums;
}
.pm-pin::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 27px;
  height: 27px;
  content: '';
  border: 2px solid #fffef9;
  border-radius: 50%;
  background: var(--brand-ink);
  box-shadow: 0 1px 4px #16334530;
}
.pm-pin:empty::before { width: 17px; height: 17px; }
.pm-pin[aria-pressed=true]::before { background: var(--map-active); box-shadow: 0 0 0 4px color-mix(in srgb, var(--map-active) 19%, transparent), 0 1px 4px #16334530; }
.pm-pin:is(:hover, :focus-visible) { z-index: 2; }
.pm-pin::after {
  position: absolute;
  left: 50%;
  bottom: 94%;
  display: none;
  width: max-content;
  max-width: 146px;
  padding: 6px 9px;
  transform: translateX(-50%);
  content: attr(data-hint);
  border-radius: 6px;
  background: var(--map-ink);
  color: white;
  font: 550 11px/1.25 var(--sans, Arial, sans-serif);
}
.pm-pin:focus-visible::after { display: block; }
.pm-credit { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; margin-top: 10px; color: var(--map-secondary); font-size: 11px; line-height: 1.5; }
.pm-credit a { text-decoration: underline; text-underline-offset: 3px; }
.pm-feature { overflow: hidden; border: 1px solid #dbdcd3; border-radius: 18px; background: var(--map-surface); }
.pm-card { display: grid; align-content: start; min-width: 0; }
.pm-photo { position: relative; aspect-ratio: 1.94; overflow: hidden; background: #e4e2da; }
.pm-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pm-photo .pm-previous { display: none; }
.pm-details { padding: clamp(17px, 1.7vw, 26px) clamp(17px, 1.8vw, 30px) 14px; }
.pm-zone { margin: 0 0 7px; font-size: 12px; line-height: 1.45; color: var(--map-secondary); }
.pm-details h3 { margin: 0; font: 500 clamp(22px, 2.1vw, 34px)/1.08 var(--sans, Arial, sans-serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.pm-price { margin: 9px 0 0; font-size: clamp(18px, 1.45vw, 24px); line-height: 1.2; font-weight: 550; letter-spacing: -.03em; }
.pm-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 16px;
  padding: 9px 18px;
  border: 0;
  border-radius: 30px;
  background: var(--map-active);
  color: white;
  font-size: 13px;
  font-weight: 600;
}
.pm-link span { font-size: 15px; line-height: 1; }
.pm-source { margin: 12px 0 0; color: var(--map-secondary); font-size: 11px; line-height: 1.5; }
.pm-card > .pm-empty { margin: 22px 22px 0; }
.pm-card > .pm-empty:only-child { margin-bottom: 22px; }
.pm-card > .pm-link { margin: 14px 22px 22px; justify-self: start; }
.pm-pager { display: flex; align-items: center; gap: 5px; padding: 4px clamp(13px,1.45vw,24px); border-top: 1px solid #e9e7df; }
.pm-position { margin-right: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--map-secondary); }
.pm-prev, .pm-next { font-size: 20px; }
.pm-pager button:disabled { opacity: .32; cursor: default; }
#mapa .source-picks { max-width: 1536px; margin: 24px auto 0; color: var(--map-ink); }
#mapa .source-picks summary { cursor: pointer; }
#mapa .source-picks li { margin-block: .6em; }
#mapa .source-picks a { text-decoration: underline; text-underline-offset: .2em; }
#mapa [hidden], [data-interactive-map]:has(.pm-toolbar) + .source-picks { display: none; }

@media (hover:hover) {
  .pm-pin:hover::after { display: block; }
  .pm-option:hover, .pm-pager button:enabled:hover { background: var(--brand-tint); }
  .pm-link:hover { background: var(--brand-blue-hover); }
}
@media (max-width: 900px) {
  .pm-head { align-items: start; flex-direction: column; gap: 10px; }
  .pm-head > p { max-width: 46ch; }
  .pm-layout { gap: 18px; grid-template-columns: minmax(0,1.28fr) minmax(235px,1fr); }
  .pm-filters button { padding-inline: 13px; }
}
@media (max-width: 700px) {
  #mapa { padding: 55px 5vw; scroll-margin-top: 62px; }
  .pm-head h2 { font-size: clamp(38px,7.4vw,51px); }
  .pm-toolbar { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 21px; }
  .pm-field { min-height: 51px; padding-inline-start: 14px; }
  .pm-filters { align-self: start; }
  .pm-results-bar { min-height: 40px; }
  .pm-layout { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .pm-feature, .pm-map { border-radius: 14px; }
  .pm-photo { aspect-ratio: 2.05; }
  .pm-credit { margin-top: 7px; }
  .pm-options { max-height: min(282px, 41dvh); }
}
@media (max-width: 430px) {
  .pm-filters { align-self: stretch; }
  .pm-filters button { min-width: 0; padding-inline: 5px; font-size: 13px; }
}
@media (prefers-reduced-motion: no-preference) {
  .pm-field, .pm-filters button, .pm-pin::before, .pm-pager button, .pm-link { transition: color .18s, background-color .18s, border-color .18s, box-shadow .18s; }
  .pm-popover:not([hidden]) { animation: pm-suggest .16s cubic-bezier(.22,.68,.25,1) both; }
  .pm-photo .pm-previous { display: block; position: absolute; inset: 0; z-index: 1; background-position: center; background-size: cover; }
  .pm-previous.pm-uncover { animation: pm-crossfade .32s ease-out both; }
}
@keyframes pm-suggest { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@keyframes pm-crossfade { from { opacity: 1; } to { opacity: 0; } }
