/* ============================================================
   健康產業培訓 — 顧問式成交系統
   共用樣式表 (Design System)
   ============================================================ */

:root {
  /* 品牌色 — 醫療信任感:深青綠 + 暖金強調 */
  --color-primary: #0d7a6b;
  --color-primary-dark: #0a5e52;
  --color-primary-light: #e6f4f1;
  --color-accent: #f59e0b;
  --color-accent-dark: #d97f06;

  --color-ink: #16282e;
  --color-body: #41555c;
  --color-muted: #7a8a90;
  --color-line: #e2e9ec;
  --color-bg: #f7faf9;
  --color-white: #ffffff;
  --color-danger: #c0392b;
  --color-success: #1e8e5a;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(16, 40, 46, .06);
  --shadow: 0 10px 30px rgba(16, 40, 46, .10);
  --shadow-lg: 0 24px 60px rgba(16, 40, 46, .16);

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
          -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--color-ink); line-height: 1.3; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { margin-bottom: 1rem; }
a  { color: var(--color-primary); text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

.highlight { color: var(--color-primary); }
.accent { color: var(--color-accent-dark); }
.center { text-align: center; }
.muted { color: var(--color-muted); font-size: .92rem; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 1.1rem; font-weight: 700;
  padding: 16px 38px; border: none; border-radius: 50px;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s;
  text-align: center; line-height: 1.4;
}
.btn-primary { background: var(--color-accent); color: #3a2400; box-shadow: 0 8px 22px rgba(245,158,11,.4); }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(245,158,11,.5); }
.btn-ghost { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.2rem; padding: 18px 44px; }

/* ---------- 頂部品牌列 ---------- */
.topbar {
  background: var(--color-white); border-bottom: 1px solid var(--color-line);
  padding: 14px 0; position: sticky; top: 0; z-index: 50;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--color-ink); font-size: 1.1rem; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px; background: var(--color-primary);
  color: #fff; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800;
}
.topbar .tag { font-size: .85rem; color: var(--color-muted); }

/* ---------- 進度條 (漏斗步驟) ---------- */
.steps { display: flex; gap: 6px; justify-content: center; padding: 18px 0; flex-wrap: wrap; }
.steps .dot {
  font-size: .8rem; color: var(--color-muted); padding: 4px 14px; border-radius: 50px;
  background: var(--color-white); border: 1px solid var(--color-line);
}
.steps .dot.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-weight: 700; }
.steps .dot.done { background: var(--color-primary-light); color: var(--color-primary); border-color: var(--color-primary-light); }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 50px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .9fr; gap: 50px; align-items: center; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.hero .eyebrow {
  display: inline-block; background: var(--color-primary-light); color: var(--color-primary);
  font-weight: 700; font-size: .9rem; padding: 6px 16px; border-radius: 50px; margin-bottom: 22px;
}
.hero h1 { margin-bottom: 22px; }
.hero .lead { font-size: 1.2rem; color: var(--color-body); margin-bottom: 30px; }
.hero .lead strong { color: var(--color-ink); }

/* ---------- 區塊 ---------- */
.section { padding: 60px 0; }
.section.alt { background: var(--color-white); }
.section-title { text-align: center; margin-bottom: 14px; }
.section-sub { text-align: center; color: var(--color-muted); max-width: 640px; margin: 0 auto 44px; }

/* ---------- 卡片 ---------- */
.cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--color-white); border: 1px solid var(--color-line);
  border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm);
}
.card .ico {
  width: 52px; height: 52px; border-radius: 12px; background: var(--color-primary-light);
  color: var(--color-primary); display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: .98rem; margin-bottom: 0; }

/* ---------- 痛點清單 ---------- */
.painlist { list-style: none; max-width: 640px; margin: 0 auto; }
.painlist li {
  background: var(--color-white); border: 1px solid var(--color-line); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; display: flex; gap: 12px; align-items: flex-start;
}
.painlist li::before { content: "✗"; color: var(--color-danger); font-weight: 800; flex-shrink: 0; }

.checklist { list-style: none; max-width: 640px; margin: 0 auto; }
.checklist li { padding: 12px 0 12px 36px; position: relative; border-bottom: 1px dashed var(--color-line); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 12px; color: var(--color-success);
  font-weight: 800; background: #e7f6ef; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem;
}

/* ---------- 名單收集彈跳視窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 30, 28, .6);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 20px; opacity: 0; transition: opacity .18s;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-card {
  position: relative; max-height: 90vh; overflow-y: auto;
  transform: translateY(10px) scale(.98); transition: transform .18s;
}
.modal-overlay.open .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 12px; right: 14px; width: 32px; height: 32px;
  border: none; background: #f1f3f2; border-radius: 50%; color: var(--color-muted);
  font-size: 1.05rem; line-height: 1; cursor: pointer; transition: background .12s, color .12s;
}
.modal-close:hover { background: #e4e7e5; color: var(--color-ink); }
body.modal-open { overflow: hidden; }

/* ---------- 表單 ---------- */
.form-card {
  background: var(--color-white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 32px; max-width: 480px; margin: 0 auto;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--color-ink); margin-bottom: 7px; font-size: .98rem; }
.field .hint { font-weight: 400; color: var(--color-muted); font-size: .85rem; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--color-ink);
  padding: 13px 16px; border: 1.5px solid var(--color-line); border-radius: var(--radius-sm);
  background: #fcfdfd; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light);
}
.field textarea { min-height: 96px; resize: vertical; }

/* 選項卡 (radio 卡片式) */
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--color-line); border-radius: var(--radius-sm); cursor: pointer;
  background: #fcfdfd; transition: all .12s;
}
.option:hover { border-color: var(--color-primary); background: var(--color-primary-light); }
.option input { margin-top: 4px; accent-color: var(--color-primary); flex-shrink: 0; }
.option.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.option span { font-size: .98rem; color: var(--color-ink); }

.form-note { font-size: .85rem; color: var(--color-muted); text-align: center; margin-top: 14px; }
.error-msg { color: var(--color-danger); font-size: .88rem; margin-top: 6px; display: none; }

/* ---------- 多步驟問卷 ---------- */
.step-panel { display: none; }
.step-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.progress-bar { height: 8px; background: var(--color-line); border-radius: 50px; overflow: hidden; margin-bottom: 28px; }
.progress-bar i { display: block; height: 100%; background: var(--color-primary); width: 25%; transition: width .3s ease; border-radius: 50px; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* ---------- 影片框 ---------- */
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16/9; background: #0c1a1d;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  display: grid; place-items: center; color: #fff; text-align: center;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { padding: 30px; }
.video-placeholder .play {
  width: 76px; height: 76px; border-radius: 50%; background: var(--color-accent); color: #3a2400;
  display: grid; place-items: center; font-size: 2rem; margin: 0 auto 18px; box-shadow: 0 8px 24px rgba(245,158,11,.5);
}

/* ---------- 信任條 ---------- */
.trust { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; padding: 24px 0; color: var(--color-muted); font-size: .9rem; }
.trust span { display: flex; align-items: center; gap: 8px; }

/* ---------- 報價方案 ---------- */
.plans { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.plan {
  background: var(--color-white); border: 1.5px solid var(--color-line); border-radius: var(--radius);
  padding: 32px 28px; position: relative; display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--color-primary); box-shadow: var(--shadow); transform: scale(1.03); }
.plan .badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--color-accent); color: #3a2400; font-weight: 700; font-size: .82rem;
  padding: 5px 18px; border-radius: 50px;
}
.plan h3 { margin-bottom: 6px; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--color-primary); margin: 10px 0 4px; }
.plan .price small { font-size: .9rem; color: var(--color-muted); font-weight: 400; }
.plan ul { list-style: none; margin: 18px 0; flex-grow: 1; }
.plan li { padding: 8px 0 8px 28px; position: relative; font-size: .96rem; border-bottom: 1px dashed var(--color-line); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--color-success); font-weight: 800; }

/* ---------- 諮詢前說明 ---------- */
.prep-list { counter-reset: prep; list-style: none; max-width: 680px; margin: 0 auto; }
.prep-list li { position: relative; padding: 18px 0 18px 56px; border-bottom: 1px solid var(--color-line); }
.prep-list li::before {
  counter-increment: prep; content: counter(prep); position: absolute; left: 0; top: 16px;
  width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.prep-list strong { color: var(--color-ink); display: block; }

/* ---------- 大型 CTA 區 ---------- */
.cta-band { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; padding: 64px 0; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 560px; margin: 0 auto 28px; }

/* ---------- 結果頁 ---------- */
.result-hero { text-align: center; padding: 70px 0 40px; }
.result-hero .icon-big {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.6rem; margin: 0 auto 24px;
}
.icon-big.ok { background: #e7f6ef; color: var(--color-success); }
.icon-big.soft { background: var(--color-primary-light); color: var(--color-primary); }

/* ---------- 頁尾 ---------- */
footer { background: var(--color-ink); color: #b7c4c8; padding: 40px 0; font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer a { color: #dfe8ea; }

/* ---------- RWD ---------- */
@media (max-width: 600px) {
  .hero { padding: 44px 0 30px; }
  .section { padding: 44px 0; }
  .form-card { padding: 28px 22px; }
  .plan.featured { transform: none; }
  .btn { width: 100%; }
  .step-nav .btn { width: auto; }
  footer .wrap { flex-direction: column; text-align: center; }
}
