/* ============ 基礎設定:深藍 + 白,Apple 風格簡約 ============ */
:root {
  --navy-900: #0a1a33;
  --navy-800: #10254a;
  --navy-700: #16336b;
  --navy-600: #1d4488;
  --blue-500: #2f6fd0;
  --blue-400: #5b8fe0;
  --blue-100: #e8f0fb;
  --ink: #1d1d1f;
  --ink-secondary: #4b5563;
  --ink-muted: #8a94a6;
  --surface: #ffffff;
  --surface-alt: #f5f7fa;
  --line: #e5e9f0;
  --good: #1a7f4b;
  --warn: #b45309;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(10, 26, 51, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro TC", "PingFang TC",
    "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ============ 導覽列 ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 26, 51, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-brand {
  color: #fff; font-weight: 700; font-size: 16px; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 10px;
}
.nav-brand .logo-dot {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500));
  display: inline-block; flex: none;
}
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  color: rgba(255, 255, 255, 0.75); font-size: 14px;
  padding: 8px 14px; border-radius: 10px; transition: 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-links a.active { color: #fff; background: rgba(255, 255, 255, 0.16); }

.nav-toggle {
  display: none; background: none; border: 0; color: #fff;
  font-size: 22px; cursor: pointer; padding: 6px 10px;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: rgba(10, 26, 51, 0.96);
    backdrop-filter: blur(20px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
}

/* ============ 主視覺 Hero(科技感深色 + 青綠光網絡) ============ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 460px at 85% 20%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(700px 400px at 8% 90%, rgba(29, 68, 136, 0.5), transparent 65%),
    linear-gradient(115deg, #050d18 0%, #071a2b 45%, #073039 100%);
  color: #fff;
  text-align: center;
  padding: 100px 24px 110px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 235, 225, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 235, 225, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-net {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.55;
}
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none;
}
.hero-glow.g1 { width: 260px; height: 260px; right: 6%; top: 10%; background: rgba(70, 227, 212, 0.18); }
.hero-glow.g2 { width: 300px; height: 300px; left: -60px; bottom: -80px; background: rgba(47, 111, 208, 0.22); }
.hero > *:not(.hero-net):not(.hero-glow) { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; font-size: 13px; letter-spacing: 0.12em;
  color: #63e8db; border: 1px solid rgba(70, 227, 212, 0.45);
  border-radius: 999px; padding: 6px 16px; margin-bottom: 26px;
  background: rgba(70, 227, 212, 0.08);
}
.hero h1 {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap;
  column-gap: 14px; letter-spacing: 0.02em; line-height: 1.2; margin-bottom: 18px;
}
.hero h1 .line1 {
  font-size: clamp(24px, 4vw, 42px); font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.6);
}
.hero h1 .grad {
  font-size: clamp(40px, 7.5vw, 78px); font-weight: 800;
  background: linear-gradient(100deg, #ffffff 30%, #7deee4 75%, #46e3d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 46px rgba(70, 227, 212, 0.35);
}
.hero p {
  font-size: clamp(15px, 2vw, 19px); color: rgba(255, 255, 255, 0.72);
  max-width: 620px; margin: 0 auto 32px;
}
/* 六角形標籤列 */
.hex-row {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-bottom: 40px;
}
.hex {
  width: 84px; height: 94px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 700; line-height: 1.35; text-align: center;
}
.hex.c1 { background: linear-gradient(160deg, #46e3d4, #14899d); color: #04222b; }
.hex.c2 { background: linear-gradient(160deg, #2f6fd0, #1d4488); color: #fff; }
.hex-x { color: rgba(255, 255, 255, 0.55); font-size: 12px; font-weight: 700; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-size: 15px; font-weight: 600; transition: 0.2s;
}
.btn-primary { background: linear-gradient(95deg, #46e3d4, #2fa8d0); color: #04222b; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ============ 區塊通用 ============ */
.section { padding: 84px 0; }
.section.alt { background: var(--surface-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--blue-500); text-transform: uppercase; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: 0.01em; }
.section-head p { color: var(--ink-secondary); margin-top: 12px; font-size: 16px; }

/* 頁面頂部橫幅(內頁) */
.page-hero {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-700));
  color: #fff; text-align: center; padding: 64px 24px;
}
.page-hero h1 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 700; }
.page-hero p { color: rgba(255, 255, 255, 0.7); margin-top: 10px; font-size: 16px; }

/* ============ 卡片格線 ============ */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  transition: 0.25s; box-shadow: 0 2px 10px rgba(10, 26, 51, 0.04);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--blue-100); color: var(--blue-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
}
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--ink-secondary); }
.card .card-link {
  display: inline-block; margin-top: 16px; font-size: 14px;
  font-weight: 600; color: var(--blue-500);
}
.card .card-link:hover { text-decoration: underline; }

/* ============ 儀表板 ============ */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff8e6; border: 1px solid #f0dfae; color: #7a5b09;
  border-radius: 12px; padding: 14px 18px; font-size: 14px; margin-bottom: 34px;
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 44px; }
@media (max-width: 820px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}
.stat-tile .label { font-size: 13px; color: var(--ink-muted); font-weight: 600; }
.stat-tile .value { font-size: clamp(26px, 3.5vw, 34px); font-weight: 700; letter-spacing: 0.01em; margin-top: 4px; }
.stat-tile .value small { font-size: 0.55em; font-weight: 600; color: var(--ink-muted); margin-left: 2px; }

/* 指針儀表卡片 */
.gauge-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 1000px) { .gauge-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .gauge-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .gauge-grid { grid-template-columns: 1fr; } }
.gauge-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 16px 18px;
  text-align: center; transition: 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.gauge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gauge { width: 116px; height: 71px; }
.gauge-value {
  font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums;
  margin-top: 2px; line-height: 1;
}
.gauge-value small { font-size: 0.6em; font-weight: 600; }
.gauge-value.na-text { color: var(--ink-muted); }
.gauge-name { font-size: 14.5px; font-weight: 700; margin-top: 10px; line-height: 1.4; }
.gauge-nums { font-size: 12.5px; color: var(--ink-secondary); }
.gauge-card .rate-badge { font-size: 12.5px; padding: 4px 12px; margin-top: 4px; }

.clinic-list { display: flex; flex-direction: column; gap: 16px; }
.clinic-row {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 26px;
  display: grid; grid-template-columns: 1.4fr 2.2fr auto; gap: 20px; align-items: center;
}
@media (max-width: 720px) { .clinic-row { grid-template-columns: 1fr; gap: 12px; } }
.clinic-row .name { font-weight: 700; font-size: 16px; }
.clinic-row .meta { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.progress-wrap { min-width: 0; }
.progress-nums {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--ink-secondary); margin-bottom: 7px;
}
.progress-track {
  height: 10px; background: var(--blue-100); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-500));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.rate-badge {
  font-size: 14px; font-weight: 700; padding: 7px 16px; border-radius: 999px;
  white-space: nowrap; justify-self: end;
}
@media (max-width: 720px) { .rate-badge { justify-self: start; } }
.rate-badge.done { background: #e7f5ec; color: var(--good); }
.rate-badge.ongoing { background: var(--blue-100); color: var(--navy-600); }
.rate-badge.behind { background: #fdf0e2; color: var(--warn); }
.rate-badge.na { background: #eef1f5; color: var(--ink-muted); }
.notice.error { background: #fdecec; border-color: #f2c2c2; color: #8a1f1f; }

/* 資料表格版 */
.table-scroll { overflow-x: auto; margin-top: 40px; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
table.data th, table.data td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { background: var(--surface-alt); color: var(--ink-secondary); font-weight: 600; font-size: 13px; white-space: nowrap; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }

/* ============ 公告列表(課程) ============ */
.post-list { display: flex; flex-direction: column; gap: 18px; max-width: 780px; margin: 0 auto; }
.post {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 30px; transition: 0.2s;
}
.post:hover { box-shadow: var(--shadow); }
.post .post-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.post .date { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.tag {
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}
.tag.open { background: #e7f5ec; color: var(--good); }
.tag.closed { background: #eef1f5; color: var(--ink-muted); }
.tag.info { background: var(--blue-100); color: var(--navy-600); }
.post h3 { font-size: 17.5px; font-weight: 700; }
.post p { font-size: 14.5px; color: var(--ink-secondary); margin-top: 6px; }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-sm {
  display: inline-block; padding: 8px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; transition: 0.2s;
}
.btn-sm.outline { border: 1.5px solid var(--blue-500); color: var(--blue-500); }
.btn-sm.outline:hover { background: var(--blue-100); }
.btn-sm.solid { background: var(--blue-500); color: #fff; }
.btn-sm.solid:hover { background: var(--blue-400); }

/* ============ 下載清單(教學手冊) ============ */
.download-list { display: flex; flex-direction: column; gap: 14px; max-width: 780px; margin: 0 auto; }
.download-item {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 24px; transition: 0.2s;
}
.download-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.download-item .file-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--blue-100); color: var(--blue-500);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.download-item .info { flex: 1; min-width: 0; }
.download-item .info h3 { font-size: 15.5px; font-weight: 700; }
.download-item .info p { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.download-item .dl {
  font-size: 14px; font-weight: 600; color: var(--blue-500); white-space: nowrap;
}

/* ============ 合作診所 ============ */
.map-embed {
  width: 100%; height: 420px; border: 0; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 44px;
}
.clinic-card h3 { display: flex; align-items: center; gap: 8px; }
.clinic-card .addr { font-size: 14px; color: var(--ink-secondary); margin-top: 6px; }

/* ============ 活動花絮 ============ */
.gallery-section-title {
  font-size: 21px; font-weight: 700; margin: 44px 0 18px;
  display: flex; align-items: baseline; gap: 10px;
}
.gallery-section-title:first-child { margin-top: 0; }
.gallery-date { font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.gallery-item img.photo {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  background: var(--surface-alt);
}
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item {
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); transition: 0.25s;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-item .ph {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.85); font-size: 15px; font-weight: 600; letter-spacing: 0.05em;
}
.gallery-item .cap { padding: 14px 18px; }
.gallery-item .cap h3 { font-size: 15px; font-weight: 700; }
.gallery-item .cap p { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }

/* ============ 密碼鎖定畫面(會議紀錄) ============ */
.lock-panel {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 48px 36px; box-shadow: var(--shadow);
}
.lock-panel .lock-icon { font-size: 40px; margin-bottom: 14px; }
.lock-panel h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.lock-panel p { font-size: 14px; color: var(--ink-secondary); }
.lock-panel form { display: flex; gap: 10px; margin-top: 22px; }
.lock-panel input {
  flex: 1; min-width: 0; padding: 12px 16px; font-size: 15px;
  border: 1.5px solid var(--line); border-radius: 12px; outline: none;
  font-family: inherit;
}
.lock-panel input:focus { border-color: var(--blue-500); }
.btn-unlock {
  background: var(--blue-500); color: #fff; border: 0; cursor: pointer;
  padding: 12px 26px; border-radius: 12px; font-size: 15px; font-weight: 600;
  font-family: inherit; transition: 0.2s;
}
.btn-unlock:hover { background: var(--blue-400); }
.lock-error { color: #b3261e; font-size: 13.5px; margin-top: 14px; }

/* ============ 頁尾 ============ */
.footer {
  background: var(--navy-900); color: rgba(255, 255, 255, 0.55);
  text-align: center; padding: 40px 24px; font-size: 13.5px;
}
.footer a { color: rgba(255, 255, 255, 0.8); }
.footer .foot-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
