/*
 * 2026 選戰專區（新版）改版樣式。
 * base.css 保留「投票倒數計時（含）以上」既有版塊原樣（輪播 banner、倒數計時、loading 動畫），
 * 此檔只新增/覆寫倒數計時「以下」的候選人列表／詳情／政見頁樣式。
 */
* { box-sizing: border-box; }

.e26-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  font-family: var(--font-family);
  color: var(--color-text);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 非目前分頁的候選人列表區塊：徹底從畫面與無障礙樹移除，與上面的 .visually-hidden（螢幕報讀器專用文字）用途不同 */
.e26-tab-hidden { display: none; }

/* ── 麵包屑（首頁改為可點擊連結） ───────────────────────── */
.e26-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}
.e26-breadcrumb a {
  color: var(--color-teal-dark);
  text-decoration: none;
}
.e26-breadcrumb a:hover { text-decoration: underline; }
.e26-breadcrumb .sep { color: var(--color-text-faint); }
.e26-breadcrumb b { color: var(--color-text); }

/* ── 主分類 tab（搬到候選人列表上方） ───────────────────────── */
.e26-main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.e26-main-tabs a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-chip);
  background: #fff;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: 600;
  transition: .15s;
}
.e26-main-tabs a:hover { border-color: var(--color-teal); color: var(--color-teal-dark); }
.e26-main-tabs a.active {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
}

.e26-page-title {
  font-size: 22px;
  color: var(--color-navy);
  margin: 0 0 16px;
}

/* ── 篩選工具列（地區 chip → 縣市 chip + 搜尋框） ───────────────────────── */
.e26-toolbar {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  margin-bottom: 18px;
}
.e26-search {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: var(--fs-body);
  margin-bottom: 14px;
}
.e26-search:focus { outline: none; border-color: var(--color-teal); }

.e26-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.e26-chip-row:last-child { margin-bottom: 0; }

.e26-chip {
  padding: 7px 16px;
  border-radius: var(--radius-chip);
  border: 1.5px solid var(--color-border);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  color: #33474d;
  white-space: nowrap;
}
.e26-chip:hover { border-color: var(--color-teal); }
.e26-chip.active {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff;
  font-weight: 700;
}

.e26-result-count {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

/* ── 候選人卡片（真實 HTML 姓名／選區文字，取代烘焙進圖片的作法） ───────────────────────── */
.e26-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-card-gap);
}
@media (min-width: 576px) {
  .e26-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .e26-grid { grid-template-columns: repeat(4, 1fr); }
}

.e26-card {
  background: #fff;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: block;
  position: relative;
  transition: .15s;
}
.e26-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.e26-card .e26-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.e26-card .e26-photo {
  width: 100%;
  background: #eee;
  display: block;
}
.e26-card .e26-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-teal);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  font-weight: 700;
}
.e26-card .e26-donate {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 84px;
  height: 84px;
}
.e26-card .e26-donate img { width: 100%; height: 100%; }
.e26-card .e26-info { padding: 10px 12px 14px; }
.e26-card .e26-district { font-size: var(--fs-district); color: var(--color-text-muted); }
.e26-card .e26-city { font-size: var(--fs-district); color: var(--color-text-faint); }

/* 行動裝置：職務徽章尺寸相對卡片過大會遮住候選人照片，直接隱藏；
   捐款按鈕改移到卡片右下角（貼近姓名列），不再蓋在照片正上方 */
@media (max-width: 575px) {
  .e26-card .e26-badge { display: none; }
  .e26-card .e26-donate {
    top: auto;
    bottom: 6px;
    right: 6px;
    width: 68px;
    height: 68px;
  }
  .e26-card .e26-info { padding-right: 76px; }
}
.e26-card .e26-name {
  font-size: var(--fs-name);
  font-weight: 800;
  color: var(--color-navy);
  margin: 4px 0 0;
}

.e26-section-title {
  margin: 26px 0 12px;
  font-size: 16px;
  color: var(--color-navy);
  font-weight: 800;
  border-left: 4px solid var(--color-teal);
  padding-left: 10px;
}
.e26-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--color-text-faint);
}

/* ── 共同政見列表：分類卡（圖片美術本身已內含標題文字，不再疊加 HTML 文字） ───────────────────────── */
.e26-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-card-gap);
}
.e26-policy-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  display: block;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: .15s;
}
.e26-policy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.e26-policy-card img {
  width: 100%;
  /* 素材原始比例約 561:741（長條狀），维持原比例才不會裁掉圖片頂部已美術設計好的標題文字 */
  aspect-ratio: 561 / 741;
  object-fit: cover;
  display: block;
}

/* ── 政見詳情頁 ───────────────────────── */
.e26-policy-detail-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 20px;
}
.e26-policy-section { margin-bottom: 26px; }
.e26-policy-section .e26-topic {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-teal-dark);
  margin: 0 0 8px;
}
.e26-policy-section ul { margin: 0; padding-left: 20px; }
.e26-policy-section li { margin-bottom: 6px; line-height: 1.6; }

/* ── 候選人詳情頁 ───────────────────────── */
.e26-detail {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 32px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
@media (max-width: 768px) {
  .e26-detail { grid-template-columns: 1fr; }
}
.e26-detail-photo {
  width: 100%;
  aspect-ratio: 3 / 3.6;
  object-fit: cover;
  border-radius: 12px;
  background: #eee;
  display: block;
}
.e26-detail-header { margin-bottom: 16px; }
.e26-detail-header .e26-badge {
  display: inline-block;
  background: var(--color-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-chip);
  margin-bottom: 8px;
}
.e26-detail-header .e26-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 4px;
}
.e26-detail-header .e26-district {
  font-size: 15px;
  color: var(--color-text-muted);
}

.e26-social-list { display: flex; gap: 10px; margin: 14px 0; }
.e26-social-list a img { width: 32px; height: 32px; }

.e26-detail-info-item { margin-bottom: 20px; }
.e26-detail-info-item .e26-item-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-navy);
  border-left: 4px solid var(--color-teal);
  padding-left: 10px;
  margin-bottom: 8px;
}
.e26-detail-info-item ul { margin: 0; list-style: none; }
.e26-detail-info-item li { margin-bottom: 6px; line-height: 1.6; }

.e26-area-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.e26-area-switch a {
  padding: 6px 14px;
  border-radius: var(--radius-chip);
  border: 1.5px solid var(--color-border);
  font-size: 13px;
  text-decoration: none;
  color: var(--color-text-muted);
}
.e26-area-switch a.active {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
  font-weight: 700;
}

/* ── 首頁分類入口卡片（沿用原始美術設計圖，圖片本身已內含標題文字） ───────────────────────── */
.e26-entry-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-card-gap);
  margin: 24px 0;
}
.e26-entry-card {
  display: block;
  width: 220px;
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: .15s;
}
.e26-entry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.e26-entry-card img {
  width: 100%;
  aspect-ratio: 295 / 270;
  object-fit: cover;
  display: block;
}
