/* =========================================================================
   GoEurope 歐洲循環巴士遊 — 頁面樣式
   沿用 goeurope 主題設計系統（酒紅＋金），變數皆附 fallback 以便脫離主題預覽。
   Prefix: .ge-bt-
   ========================================================================= */

.ge-bustour {
  --bt-accent: var(--c-accent, #7A2733);
  --bt-accent-700: var(--c-accent-700, #591A24);
  --bt-accent-100: var(--c-accent-100, #F4E7E9);
  --bt-gold: var(--c-secondary, #C9A24B);
  --bt-gold-700: var(--c-secondary-700, #8A6A24);
  --bt-sand: var(--c-sand-100, #F8F3E7);
  --bt-text: var(--c-text, #241318);
  --bt-gray: var(--c-gray, #6A5A5E);
  --bt-gray-300: var(--c-gray-300, #E7E0E2);
}

body.ge-header-transparent .ge-main:has(.ge-bustour) {
  margin-top: calc(var(--header-h, 76px) * -1);
}

/* --- Hero 帶狀區 --- */
.ge-bt-hero {
  background:
    linear-gradient(90deg, rgba(31, 9, 14, .88) 0%, rgba(89, 26, 36, .68) 38%, rgba(89, 26, 36, .22) 68%, rgba(89, 26, 36, .08) 100%),
    linear-gradient(180deg, rgba(36, 19, 24, .08) 0%, rgba(36, 19, 24, .38) 100%),
    url("../img/hero-bus.jpg") center 48% / cover no-repeat,
    var(--bt-accent-700, #591A24);
  color: #fff;
  padding-block: clamp(4.5rem, 4rem + 4vw, 7.5rem) clamp(3rem, 2.5rem + 2.5vw, 4.5rem);
}

@media (max-width: 640px) {
  .ge-bt-hero {
    background:
      linear-gradient(90deg, rgba(31, 9, 14, .86) 0%, rgba(89, 26, 36, .72) 62%, rgba(89, 26, 36, .52) 100%),
      linear-gradient(180deg, rgba(36, 19, 24, .12) 0%, rgba(36, 19, 24, .48) 100%),
      url("../img/hero-bus.jpg") 47% center / cover no-repeat,
      var(--bt-accent-700, #591A24);
  }
}
.ge-bt-hero .ge-eyebrow { color: var(--bt-gold); letter-spacing: .22em; text-transform: uppercase; font-size: var(--fs-sm, .9375rem); font-weight: 600; }
.ge-bt-hero h1 {
  color: #fff;
  margin-top: .5rem;
  font-family: var(--f-display, Georgia, serif);
  font-weight: 600;
  letter-spacing: .01em;
}
.ge-bt-hero__sub { max-width: 620px; margin-top: 1.2rem; font-size: var(--fs-lg, 1.2rem); line-height: 1.9; color: rgba(255,255,255,.88); }
.ge-bt-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; }
.ge-bt-chips span {
  border: 1px solid rgba(201,162,75,.65);
  color: #fff;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  padding: .35rem 1.1rem;
  font-size: var(--fs-sm, .9375rem);
  font-weight: 600;
  letter-spacing: .06em;
}

/* --- 數據列 --- */
.ge-bt-statsband { background: var(--bt-sand); padding-block: var(--sp-60, 4rem); }
.ge-stats.ge-bt-stats { grid-template-columns: repeat(5, 1fr); gap: var(--sp-40, 1.5rem); }

/* --- 主區：路線清單 + 地圖 --- */
.ge-bt-main .ge-section-head { margin-bottom: var(--sp-50, 2.5rem); }
.ge-bt-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: var(--sp-50, 2.5rem);
  align-items: start;
}

/* 路線卡片（accordion） */
.ge-bt-list { display: flex; flex-direction: column; gap: .8rem; }
.ge-bt-card {
  background: #fff;
  border: 1px solid var(--bt-gray-300);
  border-radius: var(--r-sm, 12px);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.ge-bt-card.is-active { border-color: var(--bt-accent); box-shadow: var(--sh-card, 0 8px 30px rgba(30,42,48,.08)); }
.ge-bt-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.2rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.ge-bt-card__head:hover .ge-bt-card__name { color: var(--bt-accent-700); }
.ge-bt-card__idx {
  font-family: var(--f-display, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bt-gold-700);
  min-width: 2.2rem;
}
.ge-bt-card.is-active .ge-bt-card__idx { color: var(--bt-accent); }
.ge-bt-card__title { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.ge-bt-card__name { font-size: var(--fs-lg, 1.125rem); font-weight: 700; line-height: 1.4; transition: color .2s ease; }
.ge-bt-card__countries { font-size: var(--fs-xs, .8125rem); color: var(--bt-gray); letter-spacing: .02em; }
.ge-bt-card__toggle { position: relative; width: 1.1rem; height: 1.1rem; flex: none; }
.ge-bt-card__toggle::before,
.ge-bt-card__toggle::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%;
  height: 2px;
  background: var(--bt-gold-700);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: transform .25s ease;
}
.ge-bt-card__toggle::after { transform: translateY(-50%) rotate(90deg); }
.ge-bt-card__head[aria-expanded="true"] .ge-bt-card__toggle::after { transform: translateY(-50%) rotate(0deg); }

.ge-bt-card__body { padding: 0 1.2rem 1.3rem; border-top: 1px dashed var(--bt-gray-300); }
.ge-bt-days { list-style: none; padding: 1rem 0 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.ge-bt-days li { display: flex; gap: .8rem; align-items: baseline; }
.ge-bt-days .d {
  flex: none;
  min-width: 3.6rem;
  text-align: center;
  background: var(--bt-accent-100);
  color: var(--bt-accent-700);
  border-radius: 999px;
  font-size: var(--fs-xs, .8125rem);
  font-weight: 700;
  padding: .1rem .5rem;
  letter-spacing: .04em;
}
.ge-bt-days .t { font-size: var(--fs-sm, .9375rem); color: var(--bt-text); line-height: 1.7; }

/* 地圖 */
.ge-bt-mapwrap { position: sticky; top: calc(var(--header-h, 76px) + 1rem); }
.ge-bt-map {
  position: relative;
  background: #fff;
  border: 1px solid var(--bt-gray-300);
  border-radius: var(--r-sm, 12px);
  box-shadow: var(--sh-soft, 0 2px 8px rgba(30,42,48,.06));
  overflow: hidden;
}
.ge-bt-mapviewport {
  cursor: grab;
  overflow: hidden;
  padding: .45rem;
  touch-action: none;
  user-select: none;
}
.ge-bt-mapviewport.is-dragging { cursor: grabbing; }
.ge-bt-map svg {
  width: 100%;
  height: auto;
  display: block;
}
.ge-bt-mapcontrols {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(89, 26, 36, .18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(36, 19, 24, .14);
}
.ge-bt-mapcontrols button {
  min-width: 2.35rem;
  height: 2.15rem;
  border: 0;
  border-bottom: 1px solid var(--bt-gray-300);
  background: #fff;
  color: var(--bt-accent-700);
  cursor: pointer;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 .55rem;
}
.ge-bt-mapcontrols button:last-child {
  min-width: 3.3rem;
  border-bottom: 0;
  font-size: .78rem;
}
.ge-bt-mapcontrols button:hover,
.ge-bt-mapcontrols button:focus-visible {
  background: var(--bt-accent);
  color: #fff;
  outline: none;
}
.ge-bt-maptools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: .8rem;
}
.ge-bt-mapnote { margin: 0; color: var(--bt-gray); font-size: var(--fs-xs, .8125rem); }

/* 地圖底色調成暖色調（覆寫 SVG defs 內的 cls-*；以 ID 提高權重） */
#ge-bus-map .cls-1 { fill: #FBF7F3; }        /* 海面 */
#ge-bus-map .cls-2 { fill: #EDE3DE; }        /* 國家色塊 */
#ge-bus-map .cls-4 { fill: #F7F0EA; }        /* 淺色國家 */
#ge-bus-map .cls-5, #ge-bus-map .cls-6, #ge-bus-map .cls-7 { fill: #B9A9A1; } /* 國名 */
#ge-bus-map text {
  font-family: var(--f-body, "Microsoft JhengHei", sans-serif);
  paint-order: stroke fill;
  stroke: rgba(255,255,255,.64);
  stroke-width: .45px;
  text-rendering: geometricPrecision;
}

/* 路線高亮連動 */
#ge-bus-map .ge-map-route { cursor: pointer; transition: none; }
.ge-bt-map.has-active .ge-map-route:not(.is-on) > path,
.ge-bt-map.has-active .ge-map-route:not(.is-on) > rect,
.ge-bt-map.has-active .ge-map-route:not(.is-on) > circle {
  opacity: .28;
}
.ge-bt-map.has-active .ge-map-route.is-on > path,
.ge-bt-map.has-active .ge-map-route.is-on > rect,
.ge-bt-map.has-active .ge-map-route.is-on > circle {
  opacity: 1;
}

/* --- 無主題時的 CTA fallback --- */
.ge-bt-fallback-cta { background: var(--bt-sand); }

/* --- RWD --- */
@media (max-width: 1024px) {
  .ge-bt-layout { grid-template-columns: 1fr; }
  .ge-bt-mapwrap { position: static; order: -1; }
  .ge-stats.ge-bt-stats { grid-template-columns: repeat(3, 1fr); gap: var(--sp-50, 2.5rem) var(--sp-40, 1.5rem); }
}
@media (max-width: 640px) {
  .ge-stats.ge-bt-stats { grid-template-columns: repeat(2, 1fr); }
  .ge-bt-card__head { padding: .9rem 1rem; }
  .ge-bt-card__body { padding: 0 1rem 1.1rem; }
  .ge-bt-days .t { font-size: var(--fs-xs, .8125rem); }
  .ge-bt-maptools { align-items: center; flex-direction: column; }
  .ge-bt-mapnote { text-align: center; }
  .ge-bt-mapcontrols { top: .55rem; right: .55rem; }
}
