/* Network map */
.route-section {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
}

.route-title {
  position: relative;
  z-index: 3;
  margin-bottom: 34px;
}

.geo-map-shell {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.geo-map-scroll {
  overflow: visible;
  background: transparent;
}

.geo-map {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  overflow: visible;
  background: transparent;
}

.geo-map > rect { fill: transparent; }
.geo-land { fill: #EEE; stroke: #fff; stroke-width: .45; vector-effect: non-scaling-stroke; }
.geo-minor { fill: #bbb8b2; }
.geo-route { fill: none; stroke: #77716a; stroke-width: 2; stroke-linecap: round; }
.geo-stop circle { fill: var(--color-white); stroke: var(--color-deep) ; stroke-width: 2.2; }
.geo-label rect { fill: rgba(255,255,255,.94); }
.geo-label text { font-size: 20px; font-weight: var(--weight-heavy); fill: var(--color-text); font-family: var(--font-heading);}
.geo-label tspan { font-weight: var(--weight-regular); }
.geo-source { display: none; }

@media (max-width: 720px) {
  .geo-map-shell { margin-inline: 0; }
}

/* =========================================================
   Network route colors / legend
   Legend 獨立於地圖，右側對齊 .container
   ========================================================= */

.geo-route-red {
  stroke: var(--color-red);
  stroke-width: 6;
}

.geo-route-green {
  stroke: #ffb855;
}

.geo-route-united {
  stroke: #36b5ff;
}

.geo-route-blue {
  stroke: #1916cb;
}

.network-legend {
  display: grid;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0 auto;
  gap: 3px;
  padding: 16px 32px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
  backdrop-filter: blur(6px);
}

.network-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.network-legend-item > span:last-child {
  min-width: 0;
}

.network-legend-line {
  display: block;
  width: 18px;
  height: 8px;
  /*flex: 0 0 16px;*/
}

.network-legend-line.red {
  background: var(--color-red);
}

.network-legend-line.green {
  background: #ffaa34;
}

.network-legend-line.united {
  background: #36b5ff;
}

.network-legend-line.blue {
  background: #1916cb;
}

/* Tablet */
@media (max-width: 1072px) {
  .network-legend {
    gap: 7px;
    padding: 11px 13px;
    font-size: 12px;
  }

  .network-legend-line {
    width: 18px;
    /*flex-basis: 24px;*/
  }
}

/* Mobile：橫式排列，整組靠右對齊 Container */
@media (max-width: 720px) {
  .network-legend {
    /*-display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    width: fit-content;
    max-width: 100%;
    margin: 18px 0 0 auto;
    gap: 10px 16px;*/
    padding: 20px 0 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 12px;
    backdrop-filter: none;
  }

  .network-legend-item {
    gap: 6px;
    white-space: nowrap;
  }

  .network-legend-line {
    width: 20px;
    flex: 0 0 20px;
  }
}


/* 航點全名與機場代碼使用一致的白色襯底 */
.geo-label text,
.geo-label tspan {
  paint-order: stroke;
  stroke: rgba(255,255,255,.94);
  stroke-width: 7px;
  stroke-linejoin: round;
}
