:root {
  --route-past: rgba(63, 84, 104, 0.85);
  --route-future: rgba(158, 111, 118, 0.85);

  --marker-stroke: rgba(40, 48, 56, 0.9);
  --marker-fill: rgba(255, 255, 255, 0.95);

  --ui-shadow-soft: rgba(0, 0, 0, 0.08);
  --ui-shadow-medium: rgba(0, 0, 0, 0.12);
  --ui-text-muted: rgba(60, 65, 70, 0.85);
}

#travel-map {
  width: 100%;
  height: 520px;
  margin-top: 1.25em;
  border-radius: 0.5em;
  overflow: hidden;
  background: rgba(246, 246, 247, 1);
  box-shadow: 0 0.75em 2em var(--ui-shadow-soft);
  transition: box-shadow 0.25s ease;
}

#travel-map:hover {
  box-shadow: 0 1em 2.5em var(--ui-shadow-medium);
}

.leaflet-control-container .leaflet-control {
  border-radius: 0.5em;
  overflow: hidden;
  box-shadow: 0 0.5em 1.25em var(--ui-shadow-soft);
}

.leaflet-control-zoom a {
  box-shadow: none !important;
  font-weight: 500;
}

.leaflet-tooltip {
  border-radius: 0.5em;
  padding: 0.45em 0.65em;
  border: none;
  box-shadow: 0 0.5em 1.25em var(--ui-shadow-medium);
  color: rgba(35, 40, 45, 0.92);
  background: rgba(255, 255, 255, 0.97);
  font-size: 0.85em;
  line-height: 1.4;
}

.leaflet-tooltip strong {
  font-weight: 600;
}

.map-legend {
  margin-top: 0.9em;
  display: flex;
  gap: 1.25em;
  flex-wrap: wrap;
  font-size: 0.95em;
  color: var(--ui-text-muted);
}

.map-legend .item {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.map-legend .swatch {
  width: 28px;
  height: 0;
  border-top: 3px solid;
  border-radius: 2px;
}

.map-legend .swatch.past {
  border-top-color: var(--route-past);
}

.map-legend .swatch.future {
  border-top-color: var(--route-future);
  border-top-style: dashed;
}

.map-legend .swatch.click {
  border-top-color: rgba(35, 40, 45, 0.55);
  border-top-style: dotted;
}

.map-status {
  margin-top: 0.85em;
  font-size: 0.9em;
  color: var(--ui-text-muted);
  opacity: 0.85;
}

a.button.back-home {
  color: rgba(35, 40, 45, 0.85) !important;
  border-color: rgba(35, 40, 45, 0.55) !important;
  background: transparent !important;
}

a.button.back-home:hover {
  color: rgba(35, 40, 45, 1) !important;
  border-color: rgba(35, 40, 45, 0.8) !important;
}

.photo-collage {
  margin-top: 1.25em;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.9em;
}

.photo-collage figure {
  margin: 0;
  border-radius: 0.5em;
  overflow: hidden;
  box-shadow: 0 0.75em 2em var(--ui-shadow-soft);
  background: rgba(246, 246, 247, 1);
}

.photo-collage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-collage .a { grid-column: span 7; aspect-ratio: 16 / 10; }
.photo-collage .b { grid-column: span 5; aspect-ratio: 4 / 3; }
.photo-collage .c { grid-column: span 4; aspect-ratio: 1 / 1; }
.photo-collage .d { grid-column: span 8; aspect-ratio: 21 / 9; }

@media screen and (max-width: 980px) {
  #travel-map { height: 420px; }
  .photo-collage { grid-template-columns: repeat(6, 1fr); }
  .photo-collage .a,
  .photo-collage .b,
  .photo-collage .c,
  .photo-collage .d { grid-column: span 6; }
}

/* Thumbnail tooltip */
.leaflet-tooltip.thumb-tooltip {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.thumb-card {
  width: 168px;
  border-radius: 0.6em;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 0.8em 2.2em rgba(0, 0, 0, 0.16);
}

.thumb-card img {
  width: 100%;
  height: 96px;
  display: block;
  object-fit: cover;
}

.thumb-card .meta {
  padding: 0.6em 0.75em 0.7em;
  color: rgba(35, 40, 45, 0.9);
  font-size: 0.9em;
  line-height: 1.3;
}

.thumb-card .meta strong {
  font-weight: 600;
}

.thumb-card .meta span {
  display: block;
  margin-top: 0.25em;
  font-size: 0.82em;
  color: rgba(60, 65, 70, 0.75);
}

/* Make “hover points” invisible but still interactive */
.country-hover-point {
  opacity: 0;
}