/* SoTrip route map prototype: enabled only on the South Africa tour. */
.tour-program-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.tour-program-heading .title { margin: 0; }

.tour-program-modes {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(32, 59, 48, .16);
  border-radius: 999px;
  background: rgba(255, 252, 245, .86);
  box-shadow: 0 10px 34px rgba(21, 47, 39, .07);
}

.tour-program-mode {
  min-width: 132px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #203b30;
  font: 600 12px/1.2 Montserrat, Arial, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tour-program-mode:hover { background: rgba(8, 120, 120, .09); }
.tour-program-mode.is-active {
  color: #fffaf0;
  background: #087878;
  box-shadow: 0 8px 20px rgba(8, 120, 120, .22);
}

.services_section.is-map-mode .tab_content { display: none; }

.tour-route-map[hidden] { display: none !important; }
.tour-route-map {
  position: relative;
  min-height: 720px;
  margin-top: 28px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: #17372f;
  box-shadow: 0 22px 62px rgba(18, 43, 35, .18);
}

.tour-route-map__canvas,
.tour-route-map__shade,
.tour-route-map__route,
.tour-route-map__points { position: absolute; inset: 0; }

.tour-route-map__canvas {
  width: 100%;
  height: 100%;
  border: 0;
  transform: scale(1.25);
  transform-origin: 50% 50%;
  filter: saturate(.88) contrast(1.04) brightness(.84);
  pointer-events: none;
}

.tour-route-map__shade {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(9, 31, 27, .38), transparent 30%, transparent 72%, rgba(9, 31, 27, .26)),
    linear-gradient(0deg, rgba(7, 27, 24, .45), transparent 34%, rgba(7, 27, 24, .14));
}

.tour-route-map__route {
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tour-route-map__route .route-road,
.tour-route-map__route .route-flight {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tour-route-map__route .route-road {
  stroke: rgba(239, 201, 150, .9);
  stroke-width: 2.5;
  stroke-dasharray: 2 8;
}

.tour-route-map__route .route-flight {
  stroke: rgba(255, 250, 240, .9);
  stroke-width: 2;
  stroke-dasharray: 10 10;
}

.tour-route-map__route .route-progress {
  stroke: #20b7ae;
  stroke-width: 4;
  stroke-dasharray: none;
  opacity: .96;
  transition: stroke-dashoffset .45s ease;
}

.tour-route-map__route .route-pin-leader {
  vector-effect: non-scaling-stroke;
  stroke: rgba(255, 250, 240, .72);
  stroke-width: 1.4;
  stroke-dasharray: 2 4;
}

.tour-route-map__points { z-index: 4; pointer-events: none; }

.tour-route-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fffaf0;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  transition: transform .24s ease, filter .24s ease;
}

.tour-route-marker:hover,
.tour-route-marker:focus-visible,
.tour-route-marker.is-active {
  z-index: 6;
  transform: translate(-50%, -100%) scale(1.12);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .34));
}

.tour-route-marker__pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 46px;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .3));
}

.tour-route-marker__pin svg { width: 100%; height: 100%; overflow: visible; }
.tour-route-marker__pin .pin-body { fill: #087878; stroke: #fffaf0; stroke-width: 1.7; }
.tour-route-marker__pin .pin-route { display: none; }
.tour-route-marker.is-active .pin-body { fill: #00a49d; stroke: #efc996; stroke-width: 2.4; }

.tour-route-marker__day {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fffaf0;
  font: 700 11px/1 Montserrat, Arial, sans-serif;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
  pointer-events: none;
}

.tour-route-marker.is-active .tour-route-marker__day {
  color: #fffaf0;
}

.tour-route-card {
  position: absolute;
  z-index: 8;
  left: 28px;
  top: 74px;
  width: min(360px, calc(100% - 56px));
  padding: 24px 26px 22px;
  border: 1px solid rgba(255, 250, 240, .18);
  border-radius: 16px;
  background: rgba(14, 39, 32, .91);
  color: #fffaf0;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
  backdrop-filter: blur(15px);
}

.tour-route-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  color: #efc996;
  font: 700 10px/1.2 Montserrat, Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tour-route-card h3 {
  margin: 0 0 10px;
  color: #fffaf0;
  font: 400 clamp(25px, 2.3vw, 34px)/1.08 Georgia, serif;
  letter-spacing: -.025em;
}

.tour-route-card p {
  margin: 0;
  color: rgba(255, 250, 240, .82);
  font: 400 12px/1.7 Montserrat, Arial, sans-serif;
}

.tour-route-map__caption {
  position: absolute;
  z-index: 7;
  top: 22px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 250, 240, .18);
  border-radius: 999px;
  background: rgba(14, 39, 32, .72);
  color: #fffaf0;
  font: 600 10px/1 Montserrat, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.tour-route-map__caption::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20b7ae;
  box-shadow: 0 0 0 4px rgba(32, 183, 174, .2);
}

.tour-route-map__hint {
  position: absolute;
  z-index: 7;
  right: 22px;
  bottom: 20px;
  margin: 0;
  color: rgba(255, 250, 240, .7);
  font: 500 10px/1.4 Montserrat, Arial, sans-serif;
}

.tour-route-map__flight-icon {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 45%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 240, .75);
  border-radius: 50%;
  background: #17372f;
  color: #efc996;
  font: 20px/1 Arial, sans-serif;
  transform: translate(-50%, -50%) rotate(-18deg);
  box-shadow: 0 0 0 7px rgba(23, 55, 47, .88), 0 7px 18px rgba(0, 0, 0, .25);
}

.services_section.is-map-mode .tab_btn.active {
  background: #087878;
  border-color: #087878;
  color: #fffaf0;
  box-shadow: 0 8px 19px rgba(8, 120, 120, .19);
}

@media (max-width: 1024px) {
  .tour-route-map { min-height: 945px; }
  .tour-route-map__canvas,
  .tour-route-map__shade,
  .tour-route-map__route,
  .tour-route-map__points { bottom: auto; height: 720px; }
  .tour-route-map__flight-icon { top: 324px; }
  .tour-route-map__hint { top: 690px; bottom: auto; }
  .tour-route-card {
    left: 28px;
    right: 28px;
    top: 740px;
    bottom: auto;
    width: auto;
  }
}

@media (max-width: 767px) {
  .tour-program-heading { align-items: stretch; flex-direction: column; gap: 19px; margin-bottom: 24px; }
  .tour-program-modes { align-self: flex-start; width: 100%; }
  .tour-program-mode { flex: 1; min-width: 0; padding-inline: 12px; }
  .tour-route-map { min-height: 875px; margin-top: 20px; border-radius: 16px; }
  .tour-route-map__canvas { transform: none; }
  .tour-route-map__canvas,
  .tour-route-map__shade,
  .tour-route-map__route,
  .tour-route-map__points { bottom: auto; height: 650px; }
  .tour-route-map__caption { top: 14px; left: 14px; }
  .tour-route-map__hint { display: none; }
  .tour-route-map__flight-icon { top: 305px; }
  .tour-route-card { left: 14px; right: 14px; top: 665px; bottom: auto; width: auto; padding: 19px 20px; }
  .tour-route-card h3 { font-size: 25px; }
  .tour-route-marker__pin { width: 31px; height: 39px; }
  .tour-route-marker__day { top: 9px; width: 31px; height: 20px; font-size: 9px; }

}

@media (prefers-reduced-motion: reduce) {
  .tour-program-mode, .tour-route-marker { transition: none; }
}
