/* Homepage — Explore London boroughs (editorial discovery; MapLibre companion panel) */
.cl-home-borough-map {
  max-width: 76rem;
  margin-left: auto;
  margin-right: auto;
}

.cl-home-borough-map__head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.cl-home-borough-map__section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cl-text-muted, #64748b);
  margin-bottom: 0.5rem;
}

.cl-home-borough-map__title {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cl-navy, #0b1f3a);
  margin-bottom: 0.5rem;
}

.cl-home-borough-map__lead {
  font-size: 0.98rem;
  color: var(--cl-text-muted, #475569);
  max-width: 40rem;
  margin: 0 auto;
  line-height: 1.65;
}

.cl-home-borough-map__grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 992px) {
  .cl-home-borough-map__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
    gap: 2rem;
    align-items: start;
  }
}

.cl-home-borough-map__map-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.cl-home-borough-map__frame {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 40px -18px rgba(15, 23, 42, 0.18);
  background: linear-gradient(165deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 240px;
}

.cl-home-borough-map__canvas {
  width: 100%;
  height: min(42vh, 320px);
  min-height: 240px;
}

@media (min-width: 992px) {
  .cl-home-borough-map__canvas {
    height: min(48vh, 420px);
    min-height: 300px;
  }
}

.cl-home-borough-map__map-caption {
  font-size: 0.82rem;
  color: var(--cl-text-muted, #64748b);
  margin: 0;
  padding-left: 0.15rem;
}

/* “More areas” — full card under map (matches editorial panel weight) */
.cl-home-borough-map__more-card {
  position: relative;
  margin-top: 0.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: #fff;
  box-shadow: 0 14px 36px -22px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.cl-home-borough-map__more-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #0b1f3a 0%, #1e3a5f 42%, #0d9488 100%);
  opacity: 0.75;
}

.cl-home-borough-map__more-card-head {
  padding: 1.2rem 1.35rem 0.65rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.cl-home-borough-map__more-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cl-navy, #0b1f3a);
  margin: 0 0 0.4rem;
}

.cl-home-borough-map__more-card-hint {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  max-width: 42rem;
}

.cl-home-borough-map__more-card-body {
  padding: 1rem 1.2rem 1.25rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.cl-home-borough-map__more-card-body .cl-home-borough-map__chips {
  gap: 0.4rem 0.5rem;
  justify-content: flex-start;
}

.cl-home-borough-map--error .cl-home-borough-map__frame {
  box-shadow: none;
  background: #f1f5f9;
}

.cl-home-borough-map--error .cl-home-borough-map__canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.88rem;
  color: #64748b;
  padding: 1.25rem;
  line-height: 1.5;
}

/* Right panel */
.cl-home-borough-map__panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.cl-home-borough-map__panel-card {
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.09);
  background: #fff;
  box-shadow: 0 14px 36px -22px rgba(15, 23, 42, 0.35);
  padding: 1.35rem 1.4rem;
  position: relative;
}

.cl-home-borough-map__panel-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #0b1f3a 0%, #1e3a5f 45%, #0d9488 100%);
  opacity: 0.85;
}

.cl-home-borough-map__card-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.cl-home-borough-map__card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--cl-navy, #0b1f3a);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.cl-home-borough-map__card-title--name {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.cl-home-borough-map__card-lead,
.cl-home-borough-map__card-blurb {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 0;
}

.cl-home-borough-map__card-blurb {
  margin-bottom: 1.1rem;
}

.cl-home-borough-map__featured {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.cl-home-borough-map__featured-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}

.cl-home-borough-map__featured-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cl-home-borough-map__featured-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--cl-navy, #0b1f3a);
  text-decoration: none;
  padding: 0.35rem 0;
  border-radius: 0.35rem;
  /* Compositor-only hover (avoid animating color — Lighthouse CLS / non-composited) */
  transition: transform 0.15s ease;
}

.cl-home-borough-map__featured-link:hover {
  color: #0d9488;
  transform: translateX(2px);
}

.cl-home-borough-map__featured-link:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.45);
  outline-offset: 2px;
}

.cl-home-borough-map__featured-link.is-active {
  color: #0d9488;
}

.cl-home-borough-map__actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cl-home-borough-map__action {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--cl-navy, #0b1f3a);
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  transition: transform 0.15s ease;
}

.cl-home-borough-map__action:hover {
  border-color: rgba(13, 148, 136, 0.45);
  background: #fff;
  color: #0f766e;
  transform: translateY(-1px);
}

.cl-home-borough-map__action--primary {
  background: linear-gradient(135deg, #0b1f3a 0%, #123056 100%);
  color: #fff !important;
  border-color: transparent;
}

.cl-home-borough-map__action--primary:hover {
  background: linear-gradient(135deg, #152a45 0%, #1a3d66 100%);
  color: #fff !important;
  transform: translateY(-1px);
}

.cl-home-borough-map__reset {
  margin-top: 0.85rem;
  font-weight: 600;
  color: #64748b !important;
  text-decoration: none !important;
}

.cl-home-borough-map__reset:hover {
  color: #0b1f3a !important;
}

[data-cl-home-borough-map].cl-home-borough-map--has-selection .cl-home-borough-map__panel-card {
  box-shadow: 0 18px 42px -20px rgba(11, 31, 58, 0.45);
}

[data-cl-home-borough-map].cl-home-borough-map--has-selection [data-cl-borough-selected] {
  animation: cl-borough-card-in 0.28s ease;
}

@keyframes cl-borough-card-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Quick links — chip row (inside more-card body) */
.cl-home-borough-map__quick-block {
  padding: 0;
}

.cl-home-borough-map__quick-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

.cl-home-borough-map__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cl-home-borough-map__chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.95);
  transition: transform 0.15s ease;
}

.cl-home-borough-map__chip:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: #0f766e;
  background: #fff;
  transform: translateY(-1px);
}

.cl-home-borough-map__chip:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.45);
  outline-offset: 2px;
}

.cl-home-borough-map__chip.is-active {
  border-color: rgba(11, 31, 58, 0.35);
  background: #fff;
  color: var(--cl-navy, #0b1f3a);
  box-shadow: 0 0 0 1px rgba(11, 31, 58, 0.06);
}

.cl-home-borough-map__rail-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
  padding-top: 0.25rem;
}

.cl-home-borough-map__rail-footer a {
  color: #475569;
  text-decoration: none;
}

.cl-home-borough-map__rail-footer a:hover {
  color: #0d9488;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cl-home-borough-map__rail-sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

/* Fallback when no pins */
.cl-home-borough-map__fallback {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 0.6);
}

.cl-home-borough-map__fallback-text {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 32rem;
  margin: 0 auto 1rem;
  line-height: 1.55;
}

.cl-home-borough-map__fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .cl-home-borough-map__head {
    margin-bottom: 1.35rem;
  }

  .cl-home-borough-map__panel-card {
    padding: 1.2rem 1.15rem;
  }
}
