.ch-map-page {
  --map-ink: #171412;
  --map-paper: var(--bg, #fbf9ef);
  --map-muted: #8e7770;
  color: var(--map-ink);
  background: var(--map-paper);
}

/* El mapa permanece claro hasta el límite exacto del cierre. */
body .ch-map-page {
  width: 100%;
  background-color: #fbf9ef !important;
  color: #171412 !important;
}

.ch-map-page * {
  box-sizing: border-box;
}

.ch-map-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 43rem;
  padding: clamp(8rem, 12vw, 13rem) clamp(9rem, 13vw, 15rem)
    clamp(5rem, 7vw, 7rem);
}

.ch-map-hero-inner,
.ch-map-content-inner {
  width: min(100%, 100rem);
  margin-inline: auto;
}

.ch-map-title {
  margin: 0;
  font-family: "PP Neue Montreal", Arial, sans-serif;
  font-size: clamp(5rem, 9vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.065em;
  text-align: center;
}

.ch-map-content {
  padding: 0 clamp(7rem, 9vw, 11rem) clamp(8rem, 12vw, 13rem)
    clamp(11rem, 14vw, 16rem);
}

.ch-map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(6rem, 9vw, 10rem) clamp(2.5rem, 5vw, 5.5rem);
}

.ch-map-group {
  min-width: 0;
}
.ch-map-group.is-wide {
  grid-column: span 2;
}

.ch-map-group-title {
  margin: 0 0 2rem;
  color: var(--map-ink);
  font-family: "PP Neue Montreal", Arial, sans-serif;
  font-size: clamp(1.65rem, 2vw, 2.35rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.ch-map-list {
  display: grid;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ch-map-group.is-wide .ch-map-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 6vw, 7rem);
}

.ch-map-link,
.ch-map-text {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--map-muted);
  font-family: "PP Neue Montreal", Arial, sans-serif;
  font-size: clamp(0.98rem, 1.15vw, 1.28rem);
  font-weight: 400;
  line-height: 1.22;
  text-decoration: none;
}

.ch-map-link::after {
  content: "↗";
  color: var(--orange, #ff7003);
  opacity: 0;
  transform: translate(-0.25rem, 0.08rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.ch-map-link:hover,
.ch-map-link:focus-visible {
  color: var(--blue, #0171d1);
}

.ch-map-link:hover::after,
.ch-map-link:focus-visible::after {
  opacity: 1;
  transform: translate(0, 0.08rem);
}

/* La navegación, el panel derecho, WhatsApp, el CTA y el footer son los
   componentes originales compartidos por el resto del sitio. */
.ch-map-page + .ch-prefooter-cta {
  margin-top: 0;
}

main[data-swup-container="sitemap"]
  .ch-map-page
  + section.ch-prefooter-cta[data-color] {
  background-color: var(--base, #171412) !important;
  color: var(--white, #fbf9ef) !important;
}

@media (max-width: 1100px) {
  .ch-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ch-map-group.is-wide {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .ch-map-hero {
    min-height: 62vh;
    padding: 8rem 1.25rem 4rem;
  }

  .ch-map-title {
    font-size: clamp(4rem, 18vw, 6.4rem);
  }

  .ch-map-content {
    padding: 1rem 1.25rem 6rem;
  }

  .ch-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem 1.25rem;
  }

  .ch-map-group.is-wide {
    grid-column: 1 / -1;
  }
  .ch-map-group.is-wide .ch-map-list {
    grid-template-columns: 1fr;
  }
  .ch-map-group-title {
    margin-bottom: 1.35rem;
    font-size: clamp(1.4rem, 6vw, 1.9rem);
  }
  .ch-map-list {
    gap: 0.8rem;
  }
  .ch-map-link,
  .ch-map-text {
    font-size: clamp(0.88rem, 3.5vw, 1.05rem);
  }
}

@media (max-width: 420px) {
  .ch-map-grid {
    grid-template-columns: 1fr;
  }
  .ch-map-group.is-wide {
    grid-column: 1;
  }
}
