/* ============================
   Map / Sidebar (Brazil Tours)
   ============================ */

:root{
  --brand-bg:     #F0F6F5;
  --brand-accent: #FF8C00;
  --brand-teal:   #52968B;
  --brand-label:  #233A37;
}

/* Section wrapper */
.map-section{
  max-width: 1180px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
}

.map-section.map-section--cities{
  background-color: rgba(239,239,236,0.6);
  border-radius: 36px;
  overflow: hidden;
  padding: 2rem;
  max-width: 1236px;
  width: calc(100% + 2 * var(--page-gutter, 16px));
  margin-top: 2rem;
  margin-bottom: 3rem;
  margin-left: calc(-1 * var(--page-gutter, 16px));
  margin-right: calc(-1 * var(--page-gutter, 16px));
}

#city-map-section{
  background-color: rgba(239,239,236,0.6);
  border-radius: 36px;
  overflow: hidden;
  padding: 2rem;
  max-width: 1236px;
  width: calc(100% + 2 * var(--page-gutter, 16px));
  margin-top: 2rem;
  margin-bottom: 3rem;
  margin-left: calc(-1 * var(--page-gutter, 16px));
  margin-right: calc(-1 * var(--page-gutter, 16px));
}

.map-section.map-section--cities .map-title{
  font-family: 'Fira Sans', system-ui, -apple-system, sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: baseline;
}

.map-section.map-section--cities .map-title-strong{
  font-weight: 800;
}

.map-title-thin{
  font-weight: 300;
}
.map-section.map-section--cities .map-title-thin{
  font-weight: 800;
}
.map-section.map-section--cities .map-title-chip{
  background: transparent;
  color: #000;
  font-weight: 800;
  box-shadow: none;
  border-bottom: none;
}

.map-section.map-section--cities .map-subhead{
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 1.75rem;
  color: #3b3b3b;
}
.map-title{
  font-family: 'Fira Sans', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  margin: 0 0 .75rem;
}

#city-map-section .map-section-header{
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

#city-map-section .map-section-title-wrap{
  min-width: 0;
}

#city-map-section .map-kicker{
  margin: 0 0 10px;
  width: fit-content;
  border-radius: 100px;
  padding: 4px 12px;
  background: #C5EF14;
  color: #000;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

#city-map-section .map-title{
  margin: 0;
  color: #000;
  font-family: 'Fira Sans', system-ui, -apple-system, sans-serif;
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

#city-map-section .map-title .map-title-last{
  display: block;
}

#city-map-section .map-subhead{
  margin: 0;
  max-width: 280px;
  color: #444;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

/* ============================
   Layout: full-width map by default
   ============================ */
.map-and-panel{
  display: grid;
  grid-template-columns: 260px minmax(0,1fr);
  gap: 12px;
  align-items: start;
  position: relative;
}

.map-and-panel.with-panel{
  grid-template-columns: 260px minmax(0,1fr) 360px;
}

@media (max-width: 900px){
  #city-map-section .map-section-header{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
  }

  #city-map-section .map-subhead{
    max-width: none;
  }

  .map-section.map-section--cities .map-and-panel{
    position: relative;
    grid-template-columns: minmax(0,1fr);
  }

  .map-section.map-section--cities .map-and-panel .legend-panel{
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 22;
    width: auto;
    margin: 0;
    padding: 0;
    height: auto;
    max-height: min(52vh, 360px);
    border-radius: 14px;
    overflow: hidden;
  }

  .map-section.map-section--cities .map-and-panel .legend-mobile-toggle{
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: none;
    background: #fff;
    color: #1d2a27;
    padding: 12px 14px;
    font: 700 .95rem "Glacial Indifference","Fira Sans",sans-serif;
    cursor: pointer;
  }

  .map-section.map-section--cities .map-and-panel .legend-panel-body{
    max-height: 260px;
    overflow: auto;
    padding: 0 14px 12px;
  }

  .map-section.map-section--cities .map-and-panel .legend-panel.is-collapsed .legend-panel-body{
    display: none;
  }
}

.legend-panel{
  grid-column: 1;
  width: 260px;
  background: #fff;
  border-right: 1.5px solid #e0e0de;
  height: 520px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.legend-panel .legend-panel-body{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.legend-panel .legend-mobile-toggle{
  display: none;
}

.legend-panel .legend-title{
  margin: 0;
  position: relative;
  padding: 14px 18px 14px 34px;
  border-bottom: 1px solid #e0e0de;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #000;
}

.legend-panel .legend-title::before{
  content: none;
}

.legend-panel .legend-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.legend-panel .legend-back{
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: auto;
  height: auto;
  justify-content: flex-start;
  color: #111;
  cursor: pointer;
  box-shadow: none;
}

.legend-panel .legend-back.legend-back-inline{
  display: none;
  gap: 6px;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-label);
  padding: 6px 10px;
  border-radius: 999px;
  background: #f6f7f5;
  border: 1px solid rgba(0,0,0,.08);
  align-self: flex-start;
}

.legend-panel.is-city .legend-back.legend-back-inline{
  display: inline-flex;
}

.legend-panel .legend-back-icon{
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

.legend-panel .legend-back:hover{
  background: #C5EF14;
  border-color: #b7e40f;
}

.legend-panel .legend-back:focus-visible{
  outline: 2px solid rgba(82,150,139,.4);
  outline-offset: 2px;
}

.legend-panel .legend-list{
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.legend-panel .legend-list.legend-list--cities{
  padding: 10px 12px 14px;
}

.legend-panel .legend-region{
  display: grid;
  gap: 0.35rem;
}

.legend-panel .legend-region-title{
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
}

.legend-panel .legend-city-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.legend-panel .legend-city{
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0,0,0,.08);
  background: #f6f7f5;
  border-radius: 999px;
  padding: 6px 10px;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d2a27;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.legend-panel .legend-city:hover{
  background: #C5EF14;
  border-color: #b7e40f;
  transform: translateY(-1px);
}

.legend-panel .legend-city:focus-visible{
  outline: 2px solid rgba(82,150,139,.4);
  outline-offset: 2px;
}

.legend-panel .legend-group{
  border-bottom: none;
}

.legend-panel .legend-group:last-child{
  border-bottom: none;
}

.legend-panel .legend-group-header{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: #fff;
  position: relative;
}

.legend-panel .legend-group-header::after{
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: #e0e0de;
}

.legend-panel .legend-group-label{
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
}

.legend-panel .legend-group-icon{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: 0 0 24px;
}

.legend-panel .legend-icon{
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.legend-panel .legend-group-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF4D4D;
  flex: 0 0 8px;
}

.legend-panel .legend-group-items{
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.legend-panel .legend-item{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 28px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  background: transparent;
  cursor: pointer;
  transition: background-color .2s ease;
}

.legend-panel .legend-item:last-child{
  border-bottom: none;
}

.legend-panel .legend-item-text{
  min-width: 0;
}

.legend-panel .legend-item-name{
  margin: 0 0 1px;
  font-family: 'Fira Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #000;
  line-height: 1.25;
}

.legend-panel .legend-item-sub{
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  line-height: 1.2;
}

.legend-panel .legend-item-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C5EF14;
  margin-left: auto;
  opacity: 0;
  transition: opacity .2s ease;
}

.legend-panel .legend-item:hover{
  background: #f7f7f5;
}

.legend-panel .legend-item.active{
  background: rgba(197,239,20,0.13);
}

.legend-panel .legend-item.active .legend-item-dot{
  opacity: 1;
}

.legend-panel .legend-item:focus-visible{
  outline: 2px solid rgba(82,150,139,.35);
  outline-offset: -2px;
}

.legend-panel .legend-empty{
  margin: 0;
  padding: 12px 18px;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-label);
  opacity: 0.75;
}

#mapLegend{
  position: absolute;
  top: 75px;        /* fixed safe distance below the dropdown */
  left: calc(260px + 16px);
  transform: none;  /* remove vertical centering trick */
  z-index: 36;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  pointer-events: auto;
}

.map-and-panel.with-panel #mapLegend{
  left: calc(260px + 16px);
}

.legend-toggle{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-label);
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.legend-toggle:focus{
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.legend-body{
  width: 220px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 16px;
  border: 0 solid rgba(0,0,0,0.1);
  box-shadow: none;
  background: transparent;
  padding: 0;
  transform: translateX(-8px);
  transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.legend-open .legend-body{
  max-height: 60vh;
  opacity: 1;
  pointer-events: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 0.75rem 0.9rem;
  transform: translateX(0);
}

.legend-items{
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.legend-item{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--brand-label);
}

.legend-icon-wrap{
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legend-icon{
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.legend-label{
  font-weight: 600;
}

@media (max-width: 900px){
  #mapLegend{
    position: fixed;
    top: auto;
    bottom: 1rem;
    left: 1rem;
    transform: none;
  }
  .legend-body{
    width: min(80vw, 320px);
    position: fixed;
    left: 1rem;
    bottom: 4.4rem;
    max-width: 80vw;
  }
}

/* ============================
   Map canvas
   ============================ */
#ml-map{
  grid-column: 2;
  height: 520px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  background: var(--brand-bg);
}

/* MapLibre controls polish */
.maplibregl-ctrl-group{
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.maplibregl-ctrl button{
  width: 34px; height: 34px;
}

/* ============================
   Sidebar panel (left)
   ============================ */
.place-panel{
  display: none;                   /* hidden until open */
  background: #fff;
  grid-column: 3;
  border-left: 1.5px solid #e0e0de;
  min-height: 520px;
  max-height: 520px;
  overflow-y: auto;
  border-radius: 0;
}
.place-panel::-webkit-scrollbar{
  width: 3px;
}
.place-panel::-webkit-scrollbar-thumb{
  background: #e0e0de;
  border-radius: 999px;
}

/* show panel either via explicit .open or when wrapper has .with-panel */
.place-panel.open,
.map-and-panel.with-panel .place-panel{
  display: block;
}

/* Panel content */
.place-panel .panel-head{
  padding: 14px 16px 12px;
  border-bottom: 1px solid #e0e0de;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  flex-shrink:0;
}
.place-panel .panel-title{
  font-family: 'Fira Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
  color: #000;
}
.place-panel .panel-close{
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f0f0ee;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s ease;
}
.place-panel .panel-close:hover{
  background: #e0e0de;
}
.place-panel .panel-close svg{
  width: 12px;
  height: 12px;
  display: block;
  color: #000;
}

.place-panel .panel-img{
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  margin: 0;
}
.place-panel .panel-credit{
  margin: 0;
  padding: 5px 16px;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 9px;
  color: #999;
  letter-spacing: .06em;
}
.place-panel .desc{
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #e0e0de;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.75;
  color: #444;
}

/* Tours section */
.place-panel .tour-section{
  margin: 0;
  padding: 14px 16px 0;
}
.place-panel .tour-title{
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #000;
}
.place-panel .tour-title::before{
  content: "";
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: #C5EF14;
}
.place-panel .tour-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.place-panel .tour-link{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border: 1.5px solid #e0e0de;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.place-panel .tour-link:hover{
  border-color: #0a0a0a;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.place-panel .tour-thumb{
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0ee;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.place-panel .tour-meta{
  flex: 1;
  min-width: 0;
}
.place-panel .tour-label{
  display: block;
  margin: 0 0 3px;
  color: #000;
  font-family: 'Fira Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.place-panel .tour-meta-sub{
  display: block;
  color: #999;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: .04em;
}
.place-panel .tour-cta{
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 10px;
  background: #000;
  color: #fff;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .18s ease;
}
.place-panel .tour-link:hover .tour-cta{
  background: #ff4d4d;
}

/* Link groups */
.place-panel .links h5{
  margin: 0 0 8px;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .15em;
}
.place-panel .links{
  padding: 14px 16px;
}
.place-panel .link-list{ display: grid; gap: 0; }
.place-panel .link-list a{
  display: block;
  text-decoration: none;
  color: #000;
  font-family: 'Fira Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid #e0e0de;
}
.place-panel .link-list a:hover{
  color: #ff4d4d;
}

/* ============================
   Popups (if used anywhere)
   ============================ */
.leaflet-popup-content,
.maplibregl-popup-content{ margin: 0 !important; }
.map-popup{
  display: grid; grid-template-columns: 120px 1fr; gap: .75rem;
  align-items: center; padding: .5rem;
}
.map-popup img{
  width: 120px; height: 80px; object-fit: cover; border-radius: 8px;
}
.map-popup h4{
  margin: 0 0 .25rem;
  font-family: 'Fira Sans', system-ui, sans-serif; font-weight: 700;
}
.map-popup p{ margin: 0; font-size: .9rem; line-height: 1.3; }
.map-popup .muted{ opacity: .7; }

/* ============================
   Responsive
   ============================ */
@media (max-width: 900px){
  .map-section.map-section--cities #ml-map .maplibregl-ctrl-bottom-right{
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .map-and-panel{ grid-template-columns: 1fr; }
  .map-and-panel.with-panel{ grid-template-columns: 1fr; } /* keep map full width; panel overlays */
  #ml-map{
    grid-column: 1;
    height: 480px;
  }

  .place-panel{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 25;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.18);
    min-height: auto; max-height: 70vh; overflow:auto;
    display: none;
  }
  .place-panel.open{ display: block; } /* mobile opens as slide-over */

  .legend-panel{
    position: static;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0 0 12px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    padding: 16px 18px;
  }
  .legend-panel .legend-list{
    max-height: 42vh;
  }

  #mapLegend{
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    margin: 0 0 12px;
  }
  .legend-body{
    width: 100%;
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

/* Slight extra pop without touching style JSON */
/* City name pill under overview dots */
.city-pill{
  appearance: none;
  font-family: 'Glacial Indifference', 'Fira Sans', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;

  background: #C5EF14;
  color: #000;

  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
  transform: translateY(0);
  pointer-events: auto;
  user-select: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.city-pill::before{
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='16' y='28' width='10' height='18' fill='%23000'/%3E%3Crect x='28' y='16' width='12' height='30' fill='%23000'/%3E%3Crect x='44' y='32' width='6' height='14' fill='%23000'/%3E%3Crect x='16' y='24' width='36' height='6' fill='%23000'/%3E%3Crect x='22' y='30' width='4' height='4' fill='%23fff'/%3E%3Crect x='30' y='30' width='4' height='4' fill='%23fff'/%3E%3Crect x='38' y='30' width='4' height='4' fill='%23fff'/%3E%3Crect x='22' y='38' width='4' height='4' fill='%23fff'/%3E%3Crect x='30' y='38' width='4' height='4' fill='%23fff'/%3E%3Crect x='38' y='38' width='4' height='4' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: scale(1.35);
  transform-origin: center;
}

/* City Switcher control */
.map-switcher {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
}

.map-switcher__all {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.map-switcher__select-wrap {
  display: grid;
  align-items: center;
}

.map-switcher__select {
  font-family: 'Fira Sans', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;

  padding: 8px 14px;
  border-radius: 999px;

  border: 1.5px solid #000;   /* black border */
  background: #f2f2f2;        /* light grey interior */
  color: #000;

  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* keep select readable atop raster */
.map-switcher__select:focus {
  outline: 2px solid rgba(82,150,139,.35);
  outline-offset: 2px;
}

/* All-Brazil button: light green circle */
.map-switcher__all {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #eaf3f1;            /* light green */
  color: var(--brand-teal);        /* teal icon */
  border: 1px solid #52968B1A;     /* subtle teal border (10% alpha) */
  display: grid;
  place-items: center;
  cursor: pointer;
}

.map-switcher__all:hover { filter: brightness(0.98); }
.map-switcher__all:focus {
  outline: 2px solid rgba(82,150,139,.35);
  outline-offset: 2px;
}

/* Reset button: teal circle, smaller, no hover effect */
.map-reset .maplibregl-ctrl-icon {
  width: 34px;            /* was 40px */
  height: 34px;           /* was 40px */
  border-radius: 999px;
  background: #C5EF14;
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,.16), inset 0 0 0 1px rgba(0,0,0,.15);
  /* optional: tighten internal alignment */
  display: grid;
  place-items: center;
}

/* remove any hover brightening */
.map-reset .maplibregl-ctrl-icon:hover {
  filter: none;
}

/* keep a subtle focus ring for accessibility (or remove if you prefer) */
.map-reset .maplibregl-ctrl-icon:focus {
  outline: 2px solid rgba(0,0,0,.25);
  outline-offset: 2px;
}

.map-switcher__all {
  display: none !important;
}

/* Hide the MapLibre-injected reset button entirely */
.maplibregl-ctrl.map-reset {
  display: none !important;
}

.map-switcher {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

/* Reset circle inside the map switcher */
.map-switcher__reset {
  background: #000;                 /* black circle */
  background-image: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1.5px solid #000;         /* clean edge */
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  padding: 0;
}

/* Arrow inside reset button */
.map-switcher__reset svg path {
  fill: #C5EF14;                    /* neon lime arrow */
}

/* Force custom reset button to use black background */
.map-switcher .maplibregl-ctrl-icon.map-switcher__reset {
  background: #000 !important;      /* override MapLibre */
  background-image: none !important;
  border-color: #000 !important;
  width: 34px !important;
  height: 34px !important;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

/* Destinations map style refresh */
.map-section.map-section--cities{
  background:#fff;
  padding:80px 48px;
  border-radius:0;
  width:100%;
  margin:2rem 0 3rem;
  max-width:none;
}
.map-section.map-section--cities .map-kicker{
  margin:0 0 10px;
  width:fit-content;
  padding:4px 12px;
  border-radius:100px;
  background:#C5EF14;
  color:#000;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.18em;
}
.map-section.map-section--cities .map-title{
  margin:0 0 6px;
  color:#000;
  font-family:'Fira Sans',sans-serif;
  font-weight:800;
  font-size:clamp(22px,2.8vw,36px);
  letter-spacing:-.02em;
  line-height:1.1;
}
.map-section.map-section--cities .map-subhead{
  margin:0 0 24px;
  max-width:480px;
  color:#444;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:13px;
  line-height:1.7;
}
.map-section.map-section--cities .map-and-panel{
  position:relative;
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:0;
  height:540px;
  border-radius:20px;
  overflow:hidden;
  border:1.5px solid #e0e0de;
  box-shadow:0 8px 40px rgba(0,0,0,.07);
}
.map-section.map-section--cities .map-and-panel.with-panel{
  grid-template-columns:260px minmax(0,1fr) 360px;
}
.map-section.map-section--cities .legend-panel{
  width:100%;
  height:100%;
  max-height:none;
  margin:0;
  border-right:1.5px solid #e0e0de;
  background:#fff;
  box-shadow:none;
  border-radius:0;
  overflow-y:auto;
}
.map-section.map-section--cities .legend-panel::-webkit-scrollbar{
  width:3px;
}
.map-section.map-section--cities .legend-panel::-webkit-scrollbar-thumb{
  background:#e0e0de;
  border-radius:999px;
}
.map-section.map-section--cities .legend-panel .legend-title{
  margin:0;
  padding:14px 18px;
  border-bottom:1px solid #e0e0de;
  display:flex;
  align-items:center;
  gap:8px;
  color:#000;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.15em;
}
.map-section.map-section--cities .legend-panel .legend-title::before{
  content:none;
}
.map-section.map-section--cities .legend-group{
  border-bottom:none;
}
.map-section.map-section--cities .legend-group:last-child{
  border-bottom:none;
}
.map-section.map-section--cities .legend-group-header{
  padding:9px 18px;
  background:#fff;
  display:flex;
  align-items:center;
  gap:10px;
  position:relative;
}
.map-section.map-section--cities .legend-group-header::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:0;
  height:1px;
  background:#e0e0de;
}
.map-section.map-section--cities .legend-group-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#FF4D4D;
  flex:0 0 8px;
}
.map-section.map-section--cities .legend-group-label{
  color:#000;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.map-section.map-section--cities .legend-group-items{
  margin:0;
  padding:0;
}
.map-section.map-section--cities .legend-item{
  padding:8px 16px 8px 28px;
  gap:8px;
}
.map-section.map-section--cities .legend-item-name{
  margin:0 0 1px;
  color:#000;
  font-family:'Fira Sans',sans-serif;
  font-size:11px;
  font-weight:600;
}
.map-section.map-section--cities .legend-item-sub{
  color:#999;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.map-section.map-section--cities .legend-item:hover{
  background:#f7f7f5;
}
.map-section.map-section--cities .legend-item.active{
  background:rgba(197,239,20,.13);
}
.map-section.map-section--cities .legend-item-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#C5EF14;
  opacity:0;
  transition:opacity .2s ease;
  flex-shrink:0;
  margin-left:auto;
}
.map-section.map-section--cities .legend-item.active .legend-item-dot{
  opacity:1;
}
.map-section.map-section--cities #ml-map{
  position:relative;
  height:100%;
  border-radius:0;
  box-shadow:none;
  background:#0d1117;
}
.map-section.map-section--cities #ml-map::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(to right, transparent 149px, rgba(255,255,255,.04) 150px, transparent 151px),
    linear-gradient(to right, transparent 299px, rgba(255,255,255,.04) 300px, transparent 301px),
    linear-gradient(to right, transparent 449px, rgba(255,255,255,.04) 450px, transparent 451px),
    linear-gradient(to bottom, transparent 169px, rgba(255,255,255,.04) 170px, transparent 171px),
    linear-gradient(to bottom, transparent 339px, rgba(255,255,255,.04) 340px, transparent 341px),
    linear-gradient(to bottom, transparent 509px, rgba(255,255,255,.04) 510px, transparent 511px);
  z-index:1;
}
.map-section.map-section--cities .overview-pin{
  cursor:pointer;
  transform-origin:center;
  transition:transform .2s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  background:transparent;
  border:none;
  padding:0;
}
.map-section.map-section--cities .overview-pin:hover{
  transform:scale(1.3);
}
.map-section.map-section--cities .overview-pin-core{
  width:28px;
  height:28px;
  border-radius:50%;
  border:none;
  background:rgba(255,77,77,.18);
  display:grid;
  place-items:center;
  box-shadow:0 3px 10px rgba(0,0,0,.22);
}
.map-section.map-section--cities .overview-pin-inner{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#ff4d4d;
}
.map-section.map-section--cities .overview-pin-label{
  color:#000;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:8px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.map-section.map-section--cities .overview-pin.active .overview-pin-core{
  background:rgba(255,77,77,.26);
  box-shadow:0 4px 14px rgba(153,31,31,.34);
}
.map-section.map-section--cities .overview-pin.active .overview-pin-inner{
  background:#ff4d4d;
}
.map-section.map-section--cities .overview-pin.active .overview-pin-label{
  color:#000;
}
.map-pin-tooltip{
  position:absolute;
  z-index:30;
  width:220px;
  overflow:hidden;
  pointer-events:none;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .18s ease, transform .18s ease;
  background:#fff;
  border:1.5px solid #e0e0de;
  border-radius:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.16);
}
.map-pin-tooltip.is-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.map-pin-tooltip-image{
  width:100%;
  height:120px;
  object-fit:cover;
  display:block;
}
.map-pin-tooltip-body{
  padding:13px 14px 14px;
}
.map-pin-tooltip-name{
  margin:0 0 2px;
  color:#000;
  font-family:'Fira Sans',sans-serif;
  font-size:14px;
  font-weight:700;
  letter-spacing:-.01em;
}
.map-pin-tooltip-region{
  margin:0 0 5px;
  color:#ff4d4d;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:9px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.map-pin-tooltip-state{
  margin:0 0 10px;
  color:#999;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:9px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.map-pin-tooltip-meta{
  padding-top:10px;
  border-top:1px solid #e0e0de;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.map-pin-tooltip-tours{
  margin:0;
  display:flex;
  align-items:center;
  gap:5px;
  color:#000;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.map-pin-tooltip-tours::before{
  content:"";
  width:8px;
  height:2px;
  border-radius:999px;
  background:#C5EF14;
}
.map-pin-tooltip-cta{
  pointer-events:all;
  appearance:none;
  border:none;
  border-radius:100px;
  padding:5px 11px;
  background:#000;
  color:#fff;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:9px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .18s ease;
}
.map-pin-tooltip-cta:hover{
  background:#ff4d4d;
}

/* Custom map controls */
#ml-map canvas.is-grab{
  cursor: grab;
}
#ml-map canvas.is-grabbing{
  cursor: grabbing;
}
.map-zoom-controls{
  position:absolute;
  right:16px;
  bottom:12px;
  z-index:20;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.map-zoom-btn{
  width:32px;
  height:32px;
  border-radius:8px;
  background:#fff;
  border:1.5px solid #e0e0de;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0a0a0a;
  font-size:18px;
  font-weight:300;
  line-height:1;
  cursor:pointer;
  transition:border-color .15s ease;
  padding:0;
}
.map-zoom-btn:hover{
  border-color:#0a0a0a;
}
.map-reset-view{
  position:absolute;
  left:12px;
  bottom:12px;
  z-index:20;
  display:flex;
  align-items:center;
  gap:7px;
  border-radius:100px;
  border:1.5px solid #e0e0de;
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.14);
  padding:8px 14px;
  color:#000;
  font-family:'Glacial Indifference','Fira Sans',sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  cursor:pointer;
  opacity:.45;
  transition:border-color .2s ease, opacity .2s ease;
}
.map-reset-view svg{
  width:12px;
  height:12px;
  display:block;
  flex:0 0 12px;
}
.map-reset-view.visible{
  opacity:1;
}
.map-reset-view:hover{
  border-color:#0a0a0a;
  opacity:1;
}
@media (max-width: 900px){
  .map-section.map-section--cities{
    padding:56px 16px;
  }
  .map-section.map-section--cities .map-and-panel{
    grid-template-columns:minmax(0,1fr);
    height:auto;
    min-height:540px;
  }
  .map-section.map-section--cities .map-and-panel.with-panel{
    grid-template-columns:minmax(0,1fr);
  }
  .map-section.map-section--cities #ml-map{
    min-height:540px;
  }
}
