.geo-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 10%, rgba(177, 63, 75, 0.12), transparent 27%),
    radial-gradient(circle at 10% 90%, rgba(31, 58, 95, 0.1), transparent 30%),
    var(--paper);
}

.geo-map-card {
  overflow: hidden;
  border: 1px solid rgba(31, 58, 95, 0.13);
  border-radius: 22px;
  background: linear-gradient(135deg, #fbfaf6 0%, #f2f6f4 100%);
  box-shadow: 0 18px 56px rgba(17, 34, 54, 0.08);
}

.geo-map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 18px;
}

.geo-map-caption h2 {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.geo-map-caption p {
  max-width: 530px;
  margin: 0;
  color: var(--muted);
}

.geo-count {
  flex: 0 0 auto;
  min-width: 116px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--blue);
  color: var(--white);
  text-align: center;
}

.geo-count strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.geo-count span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.geo-map-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  overflow: hidden;
  padding: 0 0 14px;
}

.geo-map-crop {
  min-width: 0;
  overflow: hidden;
}

.geo-map-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 100%;
  padding: 28px 26px;
  border-left: 1px solid rgba(31, 58, 95, 0.12);
  background: linear-gradient(150deg, rgba(255, 253, 250, .94), rgba(232, 239, 237, .88));
  color: var(--muted);
}

.geo-map-side p {
  margin: 0;
  color: var(--burgundy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.geo-map-side strong {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height: .83;
}

.geo-map-side span { font-size: 13px; line-height: 1.35; }
.geo-map-side a { color: var(--blue); font-size: 13px; font-weight: 800; text-decoration: none; }
.geo-map-side a:hover { color: var(--burgundy); }
}

.russia-map {
  display: block;
  width: 100%;
  min-width: 940px;
  height: auto;
}

.map-land {
  fill: url(#landGradient);
  stroke: rgba(31, 58, 95, 0.34);
  stroke-width: 2;
}

.map-contour {
  fill: none;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
  stroke-dasharray: 4 10;
}

.map-route {
  fill: none;
  stroke: rgba(177, 63, 75, 0.38);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 2 9;
}

.map-region {
  fill: var(--blue);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.map-region--light {
  fill: #56708e;
}

.city-dot circle {
  fill: var(--burgundy);
  stroke: #fffdfa;
  stroke-width: 3;
  transition: transform 0.2s ease, fill 0.2s ease;
  transform-origin: center;
}

.city-dot:hover circle {
  fill: var(--blue);
  transform: scale(1.45);
}

.geo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 4px 28px 26px;
  color: var(--muted);
  font-size: 13px;
}

.geo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.geo-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(177, 63, 75, 0.12);
}

.russia-map[hidden] { display: none; }

.russia-real-map {
  position: relative;
  /* The crop hides the western edge together with every city marker. */
  width: calc(100% + 113px);
  min-width: 1053px;
  margin-left: -113px;
  aspect-ratio: 1092 / 630;
}

.russia-real-map__shape {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .82;
  filter: sepia(.14) saturate(.68) hue-rotate(128deg) brightness(1.05) drop-shadow(0 12px 14px rgba(31, 58, 95, .12));
}

.city-pin {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 3px solid #fffdfa;
  border-radius: 50%;
  background: var(--burgundy);
  box-shadow: 0 0 0 4px rgba(177, 63, 75, .13), 0 3px 8px rgba(31, 58, 95, .23);
  cursor: help;
  transition: transform .18s ease, background .18s ease;
}

.city-pin::after {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: 160px;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  content: attr(data-city);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .18s ease, transform .18s ease;
}

.city-pin:hover, .city-pin:focus { z-index: 3; background: var(--blue); transform: scale(1.35); outline: none; }
.city-pin:hover::after, .city-pin:focus::after { opacity: 1; transform: translate(-50%, 0); }
.geo-map-attribution { margin-left: auto; font-size: 11px; }
.geo-map-attribution a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.geo-city-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.geo-city-group {
  min-height: 142px;
  padding: 19px 20px;
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 16px;
  background: var(--white);
}

.geo-city-group h3 {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 15px;
}

.city-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.city-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f4f2;
  color: #405269;
  font-size: 12px;
  line-height: 1.1;
}

.geo-note {
  margin-top: 22px;
  padding: 17px 19px;
  border-left: 3px solid var(--burgundy);
  border-radius: 0 12px 12px 0;
  background: rgba(177, 63, 75, 0.055);
  color: var(--muted);
}

.geo-note strong {
  color: var(--blue);
}

@media (max-width: 820px) {
  .geo-map-scroll { grid-template-columns: minmax(0, 1fr) 196px; }

  .geo-map-side { padding: 22px 18px; }

  .russia-real-map {
    width: calc(100% + 72px);
    min-width: 640px;
    margin-left: -72px;
  }

  .geo-map-caption {
    align-items: flex-start;
    padding: 20px 20px 14px;
  }

  .geo-count {
    min-width: 94px;
    padding: 12px;
  }

  .geo-city-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .geo-map-caption {
    display: block;
  }

  .geo-count {
    display: inline-block;
    margin-top: 14px;
  }

  .geo-map-scroll {
    grid-template-columns: minmax(0, 1fr) 120px;
    overflow: hidden;
    padding: 0 0 10px;
  }

  .geo-map-side {
    gap: 8px;
    padding: 12px 9px;
  }

  .geo-map-side strong { font-size: 24px; letter-spacing: -.03em; }
  .geo-map-side span { font-size: 10px; }
  .geo-map-side a { font-size: 11px; }

  /* The western edge and its pins intentionally continue beyond the screen. */
  .russia-real-map {
    width: calc(100% + 52px);
    min-width: 0;
    margin-left: -52px;
  }

  .geo-city-groups {
    grid-template-columns: 1fr;
  }
}
