
 
:root {
  --honl-primary: #4f8a3d;
  --honl-primary-dark: #375f2a;
  --honl-primary-light: #eaf4e2;
  --honl-accent: #e8762a;
  --honl-accent-dark: #c65f1c;
  --honl-danger: #d9364a;
  --honl-bg: #fbf6de;
  --honl-card-bg: #ffffff;
  --honl-text: #2c3a24;
  --honl-text-muted: #66755a;
  --honl-border: #e6ddb0;
  --honl-radius: 14px;
  --honl-max-width: 640px;
  /* 主色的 RGB 分量，給需要半透明的陰影／focus 外框使用 */
  --honl-primary-rgb: 79, 138, 61;
  /* 轉盤中獎彈窗「恭喜中獎」標題色 */
  --honl-win: #2e7d32;

  --honl-tag-cervical: #f2a93c;
  --honl-tag-oral: #6ba85a;
  --honl-tag-breast: #e0567a;
  --honl-tag-colorectal: #9b7cc0;
}

/*
 * 【陽性追蹤】色系：layout_header.php 在 <html> 加上 data-campaign="pt" 時套用，
 * 讓使用者一眼就能分辨目前在哪個活動。健康不斷線維持上面的預設色系。
 * 目前為中明度藍色系：主色 #3b82c4（白字對比約 4.1:1），標題／hover 用 #2c6aa6（約 5.6:1）。
 */
:root[data-campaign="pt"] {
  --honl-primary: #3b82c4;
  --honl-primary-dark: #2c6aa6;
  --honl-primary-light: #e3eef9;
  --honl-primary-rgb: 59, 130, 196;
  --honl-bg: #eef4fb;
  --honl-text: #22303d;
  --honl-text-muted: #5a6b7c;
  --honl-border: #c9dcef;
  --honl-win: #2c6aa6;
  /* 小標題（h3、展開區塊內的 h4）的強調色：預設是橘色，藍色系下改用深藍才協調 */
  --honl-accent: #2c6aa6;
  --honl-accent-dark: #1f4f80;
}

/*
 * 備用：【陽性追蹤】粉紅色系（主色 #ea6eaa）。要換回來時，把上面整段
 * :root[data-campaign="pt"] 的內容換成下面這組即可。
 * （#ea6eaa 對白底約 2.9:1，所以標題／hover 用加深一階的 #d4518f，約 3.9:1）
 *   --honl-primary: #ea6eaa;
 *   --honl-primary-dark: #d4518f;
 *   --honl-primary-light: #fde6f1;
 *   --honl-primary-rgb: 234, 110, 170;
 *   --honl-bg: #fdf1f6;
 *   --honl-text: #3b2a33;
 *   --honl-text-muted: #7a5f6c;
 *   --honl-border: #f4cfe0;
 *   --honl-win: #d4518f;
 */

/* 電腦版加寬內容區（斷點與轉盤放大的桌機斷點一致） */
@media (min-width: 768px) {
  :root { --honl-max-width: 960px; }
}

* { box-sizing: border-box; }

html {
  /* 基準字級調大（約18px），照顧年長使用者的閱讀需求 */
  font-size: 112.5%;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fffdd7;
  color: var(--honl-text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.75;
}

body{
  padding: 5% 0;
}

/* ------------------------------------------------------------------ */
/* 頂部導覽列 + 漢堡選單                                                */
/* ------------------------------------------------------------------ */

.honl-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--honl-primary), var(--honl-primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.honl-topbar-inner {
  max-width: var(--honl-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.honl-brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.honl-hamburger {
  background: none;
  border: none;
  width: 46px;
  height: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.honl-hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.honl-hamburger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.honl-hamburger.is-open span:nth-child(2) { opacity: 0; }
.honl-hamburger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.honl-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 78%;
  max-width: 320px;
  background: #fff;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 70;
  padding-top: 74px;
  overflow-y: auto;
}

.honl-drawer.is-open { transform: translateX(0); }

.honl-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.honl-drawer a {
  display: block;
  padding: 18px 24px;
  color: var(--honl-text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--honl-border);
}

.honl-drawer a:hover,
.honl-drawer a:active { background: var(--honl-primary-light); }

.honl-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 15, 0.4);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.honl-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ------------------------------------------------------------------ */
/* 首頁主視覺 banner（目前為佔位樣式，正式圖出來後直接換成 <img>）        */
/* ------------------------------------------------------------------ */

.honl-hero-banner {
  position: relative;
  aspect-ratio: 12 / 9;
  max-height: 640px;
  overflow: hidden;
  /* background: linear-gradient(135deg, var(--honl-primary-light), var(--honl-bg) 60%); */
  /* border-bottom: 3px solid var(--honl-accent); */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin:0 auto;
}

.honl-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.honl-hero-banner-placeholder {
  padding: 20px;
}

.honl-hero-banner-placeholder .kicker {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--honl-primary-dark);
  letter-spacing: 0.1em;
}

.honl-hero-banner-placeholder h2 {
  margin: 6px 0 0;
  font-size: 1.6rem;
  color: var(--honl-accent-dark);
  font-weight: 800;
}

/* ------------------------------------------------------------------ */
/* 版面容器與卡片                                                       */
/* ------------------------------------------------------------------ */

.honl-container {
  max-width: var(--honl-max-width);
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.honl-card {
  background: var(--honl-card-bg);
  /* border: 1px solid var(--honl-border); */
  border-radius: var(--honl-radius);
  padding: 24px;
  /* margin-bottom: 20px; */
  box-shadow: 0 2px 10px rgba(var(--honl-primary-rgb), 0.08);
}

.honl-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--honl-primary-dark);
}

.honl-card h3 {
  margin: 20px 0 8px;
  font-size: 1.05rem;
  color: var(--honl-accent-dark);
}

.honl-eligibility-list {
  margin: 0;
  padding-left: 20px;
}

.honl-eligibility-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.honl-eligibility-list li:last-child {
  margin-bottom: 0;
}

.honl-step-list {
  margin: 0 0 4px;
  padding-left: 20px;
}

.honl-step-list > li {
  margin-bottom: 14px;
  font-size: .8rem;
}

.honl-step-list > li:last-child {
  margin-bottom: 0;
}

.honl-step-list > li > strong {
  color: var(--honl-primary-dark);
}

.honl-step-list > li > p {
  margin: 4px 0 6px;
}

.honl-step-list .honl-eligibility-list {
  margin-top: 6px;
}

.honl-accordion {
  border: 1px solid var(--honl-border);
  border-radius: 10px;
  margin-top: 14px;
  overflow: hidden;
}

.honl-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: var(--honl-primary-light);
  color: var(--honl-primary-dark);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.honl-accordion-toggle::after {
  content: '+';
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.honl-accordion-toggle[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.honl-accordion-panel {
  padding: 16px;
  border-top: 1px solid var(--honl-border);
}

.honl-accordion-panel h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: var(--honl-accent-dark);
}

.honl-accordion-panel h4 + .honl-eligibility-list {
  margin-bottom: 16px;
}

/* 展開區塊內的表格（活動獎項的獎項分配）。外層已經有展開區塊的框，表格本身不再加外框、
   圓角和底色，只用橫線分隔，避免看起來像框中框。顏色用活動色系變數，會自動跟著切換。 */
.honl-accordion-panel table {
  width: 100%;
  margin: 8px 0 18px;
  border-collapse: collapse;
  font-size: .9rem;
}

.honl-accordion-panel th,
.honl-accordion-panel td {
  padding: 10px 2px;
  text-align: left;
  vertical-align: middle;
}

/* 表頭：不填色，用主色文字加一條較粗的底線 */
.honl-accordion-panel th {
  color: var(--honl-primary-dark);
  font-weight: 700;
  border-bottom: 2px solid var(--honl-primary);
}

.honl-accordion-panel td {
  border-bottom: 1px solid var(--honl-border);
}

/* 第二欄（數量）置中、不換行 */
.honl-accordion-panel th:last-child,
.honl-accordion-panel td:last-child {
  width: 5.5em;
  text-align: center;
  white-space: nowrap;
}

/* 金額用強調色（健康不斷線是橘色、陽性追蹤是深藍），跟表頭的主色區分開 */
.honl-accordion-panel td b {
  color: red;
  font-size: 1rem;
}

/* 獎項表格上方的小標（例如健康不斷線的「第一波抽獎」「第二波抽獎」）：
   淡色底加左側色條，讓上下兩組不同的獎項分配一眼就能分開。 */
.honl-accordion-panel .honl-prize-wave {
  margin: 20px 0 4px;
  padding: 9px 14px;
  background:#fdecbc;
  /* background: var(--honl-primary-light); */
  /* border-left: 4px solid var(--honl-primary); */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.honl-accordion-panel .honl-prize-wave b {
  color: var(--honl-primary-dark);
}

.honl-accordion-panel > *:last-child {
  margin-bottom: 0;
}

.honl-field {
  margin-bottom: 20px;
}

.honl-field label {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
  font-size: 1.05rem;
}

.honl-address-widget {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.honl-address-widget > span {
  flex: 1;
  min-width: 0;
}

.honl-field input[type="text"],
.honl-field input[type="tel"],
.honl-field input[type="email"],
.honl-field input[type="date"],
.honl-field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--honl-border);
  border-radius: 8px;
  font-size: 1.1rem;
  background: #fff;
  color: var(--honl-text);
}

.honl-field input:focus,
.honl-field select:focus {
  outline: none;
  border-color: var(--honl-primary);
  box-shadow: 0 0 0 3px rgba(var(--honl-primary-rgb), 0.18);
}

.honl-error-text {
  color: var(--honl-danger);
  font-size: 0.95rem;
  margin-top: 6px;
  min-height: 1.3em;
  font-weight: 600;
}

.honl-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--honl-primary-light);
  border: 1px solid var(--honl-border);
  border-radius: 10px;
}

.honl-checkbox-row label {
  font-size: 1.08rem;
  font-weight: 600;
}

.honl-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.honl-captcha-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.honl-captcha-row input {
  flex: 1;
  min-width: 120px;
}

.honl-captcha-row img {
  border-radius: 8px;
  border: 1px solid var(--honl-border);
  cursor: pointer;
}

.honl-captcha-refresh {
  font-size: 0.9rem;
  color: var(--honl-primary-dark);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  margin-top: 8px;
}

.honl-btn {
  display: inline-block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: var(--honl-primary);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  text-align: center;
  text-decoration: none;
}

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

.honl-btn:disabled,
.honl-btn.is-disabled {
  background: #c3c9b9;
  cursor: not-allowed;
}

.honl-btn-secondary {
  background: #fff;
  color: var(--honl-primary-dark);
  border: 1px solid var(--honl-primary);
}

.honl-btn-secondary:hover { background: var(--honl-primary-light); }

.honl-btn-accent { background: var(--honl-accent); }
.honl-btn-accent:hover { background: var(--honl-accent-dark); }

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

.honl-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--honl-border);
}

.honl-list li:last-child { border-bottom: none; }

.honl-list .honl-item-name { font-weight: 700; font-size: 1.08rem; }
.honl-list .honl-item-meta { font-size: 0.92rem; color: var(--honl-text-muted); margin-top: 3px; }

.honl-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.honl-badge-done { background: var(--honl-primary-light); color: var(--honl-primary-dark); }
.honl-badge-pending { background: #fdecd9; color: var(--honl-accent-dark); }
.honl-badge-none { background: #e5e5e5; color: #1f1f1f; }

/* 「此項目尚未抽獎，立即前往抽獎」是可點擊的連結，文字比一般徽章長，
   取消 nowrap 讓它能換行、加底線提示可點擊，並保留跟徽章一致的圓角底色。 */
.honl-badge-link {
  white-space: normal;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
}
.honl-badge-link:hover { background: #fbdfc0; }

.honl-note {
  font-size: 0.95rem;
  color: var(--honl-text-muted);
}

.honl-share-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.honl-share-btn {
  flex: 1;
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: #fff;
}

.honl-share-line { background: #06c755; }
.honl-share-fb { background: #1877f2; }

/* 頁尾：「主辦單位」小字＋logo，整組置中（跟首頁 index.php 的頁尾一致） */
.honl-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--honl-text-muted);
  font-size: 0.88rem;
  padding: 20px 16px 40px;
}

.honl-footer img {
  display: block;
  max-height: 60px;
  width: auto;
}

/* 主辦／委辦各一組：「單位」小字＋logo；電腦版左右並排，手機版上下置中 */
.honl-footer-unit {
  display: flex;
  align-items: center;
  gap: 12px;
}

.honl-footer-unit--sub img { max-height: 42px; }

@media (min-width: 600px) {
  .honl-footer { gap: 40px; }
}

@media (max-width: 599px) {
  .honl-footer {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 420px) {
  .honl-brand { font-size: 1.05rem; }
  .honl-card { padding: 18px; }
}

/* 手機上「已登錄篩檢項目」改成類別在上、中獎結果在下，避免擠在同一行 */
@media (max-width: 600px) {
  .honl-list li {
    flex-direction: column;
    align-items: flex-start;
  }
  .honl-list .honl-badge { margin-top: 4px; }
}

/* ------------------------------------------------------------------ */
/* 首頁：選擇活動（陽性追蹤／健康不斷線）                                */
/* ------------------------------------------------------------------ */

.honl-campaign-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 600px) {
  .honl-campaign-picker { grid-template-columns: 1fr 1fr; }
}

.honl-campaign-option {
  display: flex;
  flex-direction: column;
  /* border: 1px solid var(--honl-border); */
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  color: var(--honl-primary-dark);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.honl-campaign-option:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.honl-campaign-option img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* 活動名稱做成按鈕樣式（比照 .honl-btn），整張卡片仍是同一個連結 */
.honl-campaign-option span {
  display: block;
  margin: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--honl-primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  transition: background 0.15s ease;
}

.honl-campaign-option:hover span,
.honl-campaign-option:focus-visible span {
  background: var(--honl-primary-dark);
}

/* 手機版（單欄）：改成置中、依文字寬度的膠囊按鈕，不再整排滿版 */
@media (max-width: 599px) {
  .honl-campaign-option span {
    align-self: center;
    margin: 12px auto 14px;
    padding: 8px 28px;
    border-radius: 999px;
    font-size: 1.05rem;
  }
}

/* ------------------------------------------------------------------ */
/* 登錄表單：篩檢年月（陽性追蹤）、戶籍地址「同聯絡地址」勾選             */
/* ------------------------------------------------------------------ */

.honl-inline-selects {
  display: flex;
  gap: 8px;
}

.honl-inline-selects > select {
  flex: 1;
  min-width: 0;
}

.honl-field .honl-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
  cursor: pointer;
}

.honl-inline-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.honl-field input:disabled,
.honl-field select:disabled {
  background: #f2f2ee;
  color: #6b6b6b;
}

/* 郵遞區號為依縣市／行政區自動帶出的唯讀欄位 */
.honl-address-widget input[readonly] {
  background: #f2f2ee;
  color: #6b6b6b;
}

/* ------------------------------------------------------------------ */
/* 我的篩檢狀態（dashboard.php）：單一卡片，區塊間以分隔線區分           */
/* ------------------------------------------------------------------ */

.honl-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.honl-dashboard-head h2 {
  margin-bottom: 4px;
}

.honl-dashboard-head .honl-note {
  margin: 0;
}

.honl-btn.honl-btn-small {
  width: auto;
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 1rem;
}

/* .honl-card-section：同一張卡片內用分隔線區分的區塊（result.php 等其他頁面共用） */
.honl-dashboard-section,
.honl-card-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--honl-border);
}
