/* =========================================================
   2026 新北好茶－新版首頁樣式
   檔案：inc/home.css
   說明：色彩與版面沿用舊版視覺（主色 #4A6741），
         但移除重複規則，改以共用元件呈現。
   ========================================================= */

:root {
  --primary: #4a6741;
  --primary-dark: #37502f;
  --secondary: #8ba888;
  --accent: #6daca7;
  --ink: #333333;
  --muted: #666666;
  --light: #f5f5f5;
  --line: #e3e8de;
  --paper: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.05);
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft JhengHei", "微軟正黑體", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.container {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

/* ---------------------------------------------------------
   導覽列
   --------------------------------------------------------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 14px 20px;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.site-nav.is-scrolled,
.site-nav.is-open {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  padding-block: 10px;
}

.nav-inner {
  width: min(1280px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 2px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  transition: color 0.2s ease;
}

.site-nav.is-scrolled .nav-links a {
  color: var(--ink);
  text-shadow: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #d8f0cf;
}

.site-nav.is-scrolled .nav-links a:hover,
.site-nav.is-scrolled .nav-links a:focus-visible {
  color: var(--primary);
}

/* 下拉選單 */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 190px;
  margin: 8px 0 0;
  padding: 8px;
  list-style: none;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-links > li:hover > .nav-dropdown,
.nav-links > li:focus-within > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  color: var(--ink) !important;
  text-shadow: none;
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
  padding: 9px 12px;
  border-radius: 8px;
}

.nav-dropdown a:hover {
  background: #f1f6ec;
  color: var(--primary) !important;
}

/* 漢堡選單 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #ffffff;
}

.site-nav.is-scrolled .nav-toggle,
.site-nav.is-open .nav-toggle {
  color: var(--primary);
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.site-nav.is-open .nav-toggle span {
  background: transparent;
}

.site-nav.is-open .nav-toggle span::before {
  transform: translateY(7px) rotate(45deg);
}

.site-nav.is-open .nav-toggle span::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* 內頁選單：預設就是白底深字
   內頁主視覺上緣是淺色，白字會看不清楚，因此內頁選單
   直接沿用「滾動後」的白底樣式，其餘外觀與首頁完全相同。 */
.site-nav.is-solid {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
  padding-block: 10px;
}

.site-nav.is-solid .nav-links a {
  color: var(--ink);
  text-shadow: none;
}

.site-nav.is-solid .nav-links a:hover,
.site-nav.is-solid .nav-links a:focus-visible {
  color: var(--primary);
}

.site-nav.is-solid .nav-toggle {
  color: var(--primary);
}

/* 內頁：選單為 fixed，先預留高度，避免蓋住主視覺上緣 */
.eb-shell,
.lookup-page {
  padding-top: 52px;
}

.lookup-page.is-embedded {
  padding-top: 0;
}

/* ---------------------------------------------------------
   主視覺
   --------------------------------------------------------- */
.hero {
  position: relative;
  margin: 0;
  line-height: 0;
  /* 選單為 fixed（白底），先預留高度，避免蓋住主視覺上緣 */
  padding-top: 46px;
  background: var(--paper);
}

.hero picture {
  display: block;
}

/* 主視覺改用淺色扁平橫幅後，選單同步改為白底深字（is-solid），
   原本壓在深色大圖上的暗色漸層已不需要，留著反而會在橫幅上緣形成暗帶。 */
.hero::before {
  display: none;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* 手機改用高版（直式）主視覺，完整呈現、不再裁切 */
@media (max-width: 780px) {
  .hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
  }
}

/* 內頁主視覺橫幅
   內頁（報名流程、報名查詢、保險資料）沿用同一張主視覺。
   與首頁相同，維持原圖比例完整呈現，不做裁切，
   避免標題文字被切掉。 */
.hero--page {
  background: #eef2e8;
  padding-top: 0;
}

.hero--page::before {
  display: none;
}

.hero--page img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------
   區塊
   --------------------------------------------------------- */
.section {
  position: relative;
  padding: 76px 0;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section--tint {
  background: #f7f9f4;
}

.section--tight {
  padding-top: 40px;
}

/* 舊站錨點相容：#teaarea（交通資訊）、#evevtmapp（活動散策圖） */
.anchor-alias {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.section-title {
  position: relative;
  z-index: 2;
  margin: 0 0 42px;
  text-align: center;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--primary);
  border-radius: 2px;
}

.section-icon {
  position: absolute;
  top: 34px;
  width: 150px;
  max-width: 14vw;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.section-icon--left {
  left: clamp(60px, 6vw, 150px);
}

.section-icon--right {
  right: clamp(60px, 6vw, 150px);
}

/* ---------------------------------------------------------
   分頁（活動／旅遊／好禮／交通／店家共用）
   --------------------------------------------------------- */
.tabs {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin-inline: auto;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--primary);
}

.tab-btn {
  appearance: none;
  border: 2px solid transparent;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: transparent;
  color: #5b5b5b;
  padding: 12px 30px;
  font: inherit;
  font-size: 1.08rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover {
  color: var(--primary);
  background: #f1f6ec;
}

.tab-btn.is-active {
  background: var(--paper);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.tab-pane {
  display: none;
}

.tab-pane.is-active {
  display: block;
  animation: fade-up 0.35s ease both;
}

/* 子分頁：膠囊樣式 */
.tabs--sub {
  margin-top: 6px;
}

.tabs--sub .tab-buttons {
  gap: 10px;
  margin-bottom: 28px;
  border-bottom: 0;
}

.tabs--sub .tab-btn {
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: var(--paper);
  color: var(--primary);
  padding: 8px 22px;
  font-size: 1rem;
}

.tabs--sub .tab-btn:hover {
  background: #eef4e9;
}

.tabs--sub .tab-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* ---------------------------------------------------------
   活動卡片
   --------------------------------------------------------- */
.theme-card {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 30px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.theme-card--wide {
  display: block;
}

.theme-body {
  flex: 1;
  min-width: 0;
}

.theme-media {
  flex: 0 0 40%;
  width: 40%;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: var(--light);
}

.theme-media img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* 直式／橫式大圖：放在內容下方，不裁切 */
.theme-media--full {
  flex: none;
  width: 100%;
  margin-top: 26px;
}

/* 主圖放在標題正下方（橫幅，不放大失真） */
.theme-hero {
  margin: 14px 0 22px;
  text-align: center;
}

.theme-hero img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

/* 直式海報型主視覺（如坪林主場活動海報）：
   桌機限制高度，避免 2:3 直圖把版面拉得過長；手機則改為整寬顯示。 */
.theme-hero--poster img {
  max-height: 620px;
  width: auto;
}

@media (max-width: 780px) {
  .theme-hero--poster img {
    width: 100%;
    max-height: none;
  }
}

.theme-media--full img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: cover;
}

.theme-title {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.3;
}

.theme-title a {
  text-decoration: none;
}

.theme-title a:hover {
  text-decoration: underline;
}

.theme-desc {
  margin: 0 0 16px;
  color: var(--muted);
}

.meta-list,
.info-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: #444444;
}

.meta-list li,
.info-list li {
  position: relative;
  margin: 6px 0;
  padding-left: 1.15em;
}

.meta-list li::before,
.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
}

/* 市集攤位配置圖（坪林主場）
   圖片本身是白底表格，加細框與圓角，並標示可點擊放大 */
.venue-map {
  margin: 0 0 22px;
  text-align: center;
}

.venue-map__link {
  display: block;
  cursor: zoom-in;
}

.venue-map img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e2e8dd;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(24, 48, 30, 0.08);
}

.venue-map figcaption {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
}

@media (max-width: 560px) {
  .venue-map figcaption {
    font-size: 0.88rem;
  }
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 3px 13px;
  border-radius: 999px;
  background: #eef4e9;
  color: var(--primary);
  font-size: 0.9rem;
}

.price {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 14px;
  border-radius: 8px;
  background: #f0f6ec;
  color: var(--primary);
  font-weight: 700;
}

.callout {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--secondary);
  border-radius: 0 10px 10px 0;
  background: #f7f9f4;
  color: #4f5a4b;
  font-size: 0.95rem;
}

/* 按鈕 */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: var(--paper);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 1px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--solid {
  background: var(--primary);
  color: #ffffff;
}

.btn--solid:hover {
  background: var(--primary-dark);
}

/* 兩顆按鈕：置中排列，各佔一半寬度 */
.btn-row--half {
  justify-content: center;
  flex-wrap: nowrap;
}

.btn-row--half .btn {
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(50% - 5px);
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
}

/* ---------------------------------------------------------
   資料表
   --------------------------------------------------------- */
.table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.data-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.95rem;
}

.data-table caption {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #f3f7ef;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.data-table thead th {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.data-table tbody tr:nth-child(even) {
  background: #fafcf8;
}

/* 時刻表收合 */
.timetable {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}

.timetable summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f3f7ef;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.timetable summary::-webkit-details-marker {
  display: none;
}

.timetable summary::after {
  content: "＋";
  font-weight: 400;
}

.timetable[open] summary::after {
  content: "－";
}

/* 班表標題區（標題 + 紅色備註） */
.timetable__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
}

.timetable__note {
  color: #c0392b;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.timetable .table-wrap {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ---------------------------------------------------------
   演出節目
   --------------------------------------------------------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.program-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.program-card img {
  width: 100%;
  height: 170px;
  margin-bottom: 12px;
  border-radius: 10px;
  object-fit: cover;
}

.program-card h4 {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 1.05rem;
}

.program-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 直式活動海報（如：缺席舞團演出海報）
   完整顯示不裁切，點圖另開原始尺寸 */
.program-poster {
  position: relative;
  display: table;
  margin: 0 auto 12px;
}

.program-card .program-poster img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 330px;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.program-poster__zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}

/* ---------------------------------------------------------
   精選好禮
   --------------------------------------------------------- */
.gift-card {
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 30px;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.gift-media {
  flex: 0 0 38%;
  width: 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-radius: 16px;
  background: #f7f7f2;
}

.gift-media img {
  width: auto;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}

/* --- 好禮多圖相簿（一張大圖 + 小圖，點擊放大） --- */
.gift-media--gallery {
  flex: 0 0 40%;
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.gift-gallery__main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gift-gallery__main img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.gift-gallery__main:hover img {
  transform: scale(1.03);
}

.gift-gallery__main:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.gift-gallery__zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gift-gallery__main:hover .gift-gallery__zoom,
.gift-gallery__main:focus-visible .gift-gallery__zoom {
  opacity: 1;
}

.gift-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.gift-gallery__thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.7;
}

.gift-gallery__thumb img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.gift-gallery__thumb:hover,
.gift-gallery__thumb:focus-visible {
  opacity: 1;
  outline: none;
  border-color: var(--secondary);
}

.gift-gallery__thumb.is-active {
  opacity: 1;
  border-color: var(--primary);
}

/* --- 放大檢視 Lightbox --- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: rgba(12, 20, 14, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(1100px, 94vw);
  max-height: 82vh;
}

.gallery-lightbox__figure img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.gallery-lightbox__caption {
  margin: 0;
  color: #e7efe4;
  font-size: 0.92rem;
  text-align: center;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.32);
}

.gallery-lightbox__close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
}

.gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.7rem;
}

.gallery-lightbox__nav--prev {
  left: 16px;
}

.gallery-lightbox__nav--next {
  right: 16px;
}

.gallery-lightbox__nav[hidden] {
  display: none;
}

body.is-lightbox-open {
  overflow: hidden;
}

@media (max-width: 780px) {
  .gift-media--gallery {
    flex: 1 1 auto;
    width: 100%;
  }

  .gallery-lightbox__close {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }

  .gallery-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
}

.gift-body {
  flex: 1;
  min-width: 0;
}

.gift-body h3 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
}

.gift-quote {
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 1.08rem;
  font-weight: 700;
}

.gift-body h4 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1.05rem;
}

.gift-body p,
.gift-body li {
  color: #4f4f4f;
  font-size: 0.96rem;
}

.gift-body ul {
  margin: 0 0 12px;
  padding-left: 1.2em;
}

.gift-note {
  margin: 0;
  color: #7a7a7a;
  font-size: 0.86rem;
  line-height: 1.9;
}

/* 純文字好禮（例如：新北幣）：無圖片時整張卡片全寬 */
.gift-card--text {
  display: block;
}

.gift-desc {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.8;
}

.gift-links {
  margin-top: 8px;
}

.gift-links a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.gift-links a:hover {
  color: var(--primary);
}

/* ---------------------------------------------------------
   交通資訊
   --------------------------------------------------------- */
.traffic-panel {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.traffic-panel h3 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 1.45rem;
}

.traffic-panel h4 {
  margin: 24px 0 10px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #d3f8e2;
  color: var(--primary);
  font-size: 1.05rem;
}

.traffic-panel h4:first-child {
  margin-top: 0;
}

.note {
  color: #a40002;
  font-size: 0.88rem;
}

.map-frame {
  display: block;
  width: 100%;
  height: 430px;
  margin-top: 20px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

/* ---------------------------------------------------------
   特約店家
   --------------------------------------------------------- */
.shop-panel {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.shop-panel > h3 {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 1.45rem;
  text-align: center;
}

.shop-hint {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* 優惠期間（例：商圈優惠特約店家） */
.shop-period {
  display: table;
  margin: 0 auto 10px;
  padding: 6px 16px;
  border: 1px solid rgba(74, 103, 65, 0.22);
  border-radius: 999px;
  background: rgba(74, 103, 65, 0.08);
  color: var(--primary-dark);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 18px 0 0;
  align-items: start;
}

.shop-card {
  border-radius: 12px;
  background: #eff4e1;
  overflow: hidden;
}

.shop-card[open] {
  background: #e7efd6;
  box-shadow: var(--shadow-soft);
}

.shop-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
}

.shop-card__head::-webkit-details-marker {
  display: none;
}

.shop-card__head:hover {
  color: var(--primary);
}

.shop-card--plain .shop-card__head:not(.shop-card__head--link) {
  cursor: default;
}

.shop-card__head--link {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.shop-card__ext {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 0.9rem;
}

.shop-card__name {
  flex: 1;
  min-width: 0;
}

.shop-card__toggle {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.shop-card__toggle::before,
.shop-card__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.shop-card__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.shop-card[open] .shop-card__toggle::after {
  opacity: 0;
}

.shop-card__body {
  padding: 0 16px 14px;
  border-top: 1px dashed rgba(74, 103, 65, 0.3);
  margin-top: 2px;
  padding-top: 12px;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.shop-info {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

.shop-info dt {
  color: var(--primary);
  font-weight: 700;
}

.shop-info dd {
  margin: 0;
  color: #4f4f4f;
  overflow-wrap: anywhere;
}

.shop-info dd a {
  color: var(--primary);
  text-decoration: none;
}

.shop-info dd a:hover {
  text-decoration: underline;
}

.shop-info dd.shop-offer {
  color: #a40002;
  font-weight: 600;
}

.shop-card__link {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
}

.shop-card__link:hover {
  background: var(--primary-dark);
}

/* 特約店家（四欄表格） */
.shop-table-wrap {
  margin: 18px 0 0;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.shop-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.92rem;
}

.shop-table thead th {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(74, 103, 65, 0.25);
  background: #eff4e1;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
  text-align: left;
  white-space: nowrap;
}

.shop-table thead th:nth-child(1) {
  width: 17%;
}

.shop-table thead th:nth-child(2) {
  width: 14%;
}

.shop-table thead th:nth-child(3) {
  width: 29%;
}

.shop-table thead th:nth-child(4) {
  width: 40%;
}

.shop-table tbody th,
.shop-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.shop-table tbody tr:nth-child(even) {
  background: #fafcf8;
}

.shop-table tbody tr:hover {
  background: #f2f7ea;
}

.shop-table tbody tr:last-child th,
.shop-table tbody tr:last-child td {
  border-bottom: 0;
}

.shop-table__name {
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.shop-table__name a {
  color: inherit;
  text-decoration: none;
}

.shop-table__name a:hover {
  text-decoration: underline;
}

.shop-table__ext {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.8em;
}

.shop-table tbody td a {
  color: var(--primary);
  text-decoration: none;
}

.shop-table tbody td a:hover {
  text-decoration: underline;
}

.shop-table__offer {
  color: #a40002;
  font-weight: 600;
}

@media (max-width: 820px) {
  .shop-table-wrap {
    overflow-x: visible;
    background: transparent;
    box-shadow: none;
  }

  .shop-table {
    display: block;
    min-width: 0;
  }

  .shop-table thead {
    display: none;
  }

  .shop-table tbody {
    display: block;
  }

  .shop-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #eff4e1;
    overflow: hidden;
  }

  .shop-table tbody tr:nth-child(even),
  .shop-table tbody tr:hover {
    background: #eff4e1;
  }

  .shop-table tbody th,
  .shop-table tbody td {
    display: block;
    padding: 8px 16px;
    border-bottom: 0;
  }

  .shop-table tbody th.shop-table__name {
    padding: 11px 16px;
    background: #e7efd6;
  }

  .shop-table tbody td:not(:empty) {
    display: grid;
    grid-template-columns: 4.6em minmax(0, 1fr);
    gap: 10px;
  }

  .shop-table tbody td:not(:empty)::before {
    content: attr(data-label);
    color: var(--primary);
    font-weight: 700;
  }

  .shop-table tbody td:empty {
    display: none;
  }

  .shop-table tbody td:not(:empty):last-child {
    padding-bottom: 13px;
  }
}

/* ---------------------------------------------------------
   散步地圖
   --------------------------------------------------------- */
.map-figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-figure img {
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------
   頁尾
   --------------------------------------------------------- */
.site-footer {
  padding: 26px 20px;
  background: var(--primary);
  color: #ffffff;
  text-align: center;
  font-size: 0.95rem;
}

.site-footer p {
  margin: 6px 0;
}

.site-footer a {
  color: #ffffff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   動畫
   --------------------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------
   響應式
   --------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
    letter-spacing: 1px;
  }

  .section-icon {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --nav-h: 64px;
  }

  .site-nav {
    padding: 10px 16px;
  }

  /* 首頁主視覺同步預留手機選單高度 */
  .hero:not(.hero--page) {
    padding-top: 64px;
  }

  /* 手機版選單高度較高（漢堡按鈕 44px），內頁預留高度同步調整 */
  .eb-shell,
  .lookup-page {
    padding-top: 64px;
  }

  .lookup-page.is-embedded {
    padding-top: 0;
  }

  .nav-inner {
    justify-content: flex-end;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--ink);
    text-shadow: none;
    font-size: 15px;
  }

  .nav-links a:hover {
    background: #f1f6ec;
    color: var(--primary);
  }

  .nav-dropdown {
    position: static;
    transform: none;
    min-width: 0;
    margin: 0;
    padding: 0 0 4px 14px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    display: block;
  }

  .nav-dropdown a {
    padding: 9px 14px;
    font-size: 14px;
    color: #666666 !important;
  }

  .nav-dropdown a:hover {
    color: var(--primary) !important;
  }

  .nav-links > li:hover > .nav-dropdown,
  .nav-links > li:focus-within > .nav-dropdown {
    transform: none;
    display: block;
  }

  .section {
    padding: 56px 0;
  }

  .theme-card,
  .gift-card {
    flex-direction: column;
    gap: 22px;
    padding: 22px;
  }

  .theme-media,
  .gift-media {
    flex: none;
    width: 100%;
  }

  .theme-media img {
    max-height: 300px;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .program-card img {
    height: 220px;
  }

  .program-card .program-poster img {
    height: 460px;
  }

  .traffic-panel,
  .shop-panel {
    padding: 22px;
  }

  .map-frame {
    height: 320px;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 28px);
  }

  .tab-buttons {
    gap: 4px;
  }

  .tab-btn {
    padding: 10px 16px;
    font-size: 1rem;
  }

  .tabs--sub .tab-btn {
    padding: 7px 16px;
    font-size: 0.92rem;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .theme-title {
    font-size: 1.4rem;
  }

  .gift-media img {
    max-height: 240px;
  }

  .map-frame {
    height: 260px;
  }
}

/* ---------------------------------------------------------
   報名場次（資料來自 inc/eb.php）
   --------------------------------------------------------- */
.session-box {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafcf8;
}

.session-box__title {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.session-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}

.session-item:last-child {
  border-bottom: 0;
}

.session-date {
  flex: 1 1 auto;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 1px;
}

.session-time {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.session-state {
  flex: 0 0 auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(74, 103, 65, 0.1);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.session-state.is-off {
  background: #f0f0f0;
  color: var(--muted);
}

.session-action {
  flex: 0 0 auto;
  padding: 5px 16px;
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.session-action:hover {
  background: var(--primary);
  color: #ffffff;
}

.session-action.is-disabled {
  border-color: var(--line);
  color: var(--muted);
  background: #f5f5f5;
  cursor: not-allowed;
}

.session-more {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.session-more a {
  margin-left: 4px;
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 560px) {
  .session-box {
    padding: 14px 16px;
  }

  .session-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .session-date {
    flex: 1 1 100%;
  }
}
