/**
 * 色系取自活動主視覺（專案文件/健康不斷線A2海報_ok_v2+.jpg）：
 * 米黃底、草綠色主色（標題「健康不斷線」與路徑顏色）、
 * 橘色點綴（「完成篩檢解鎖健康好禮」與轉盤標語）。
 * 四個 --honl-tag-* 對應海報上四癌別卡片的邊框色，供小範圍點綴使用。
 */
: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;

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

* { box-sizing: border-box; }

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

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

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

.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: 16 / 9;
  max-height: 320px;
  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(79, 138, 61, 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;
}

.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 > *: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(79, 138, 61, 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; }

.honl-footer {
  text-align: center;
  color: var(--honl-text-muted);
  font-size: 0.88rem;
  padding: 20px 16px 40px;
}

@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; }
}
