:root {
  --teal: #20B2AA;
  --teal-dark: #178f89;
  --teal-light: #D2F0EE;
  --orange: #FF8C00;
  --text: #424242;
  --text-2: rgba(66, 66, 66, .6);
  --border: #E5E7EB;
  --bg: #F7F8F8;
  --card-bg: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; }
a { color: var(--teal); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header / Nav ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); }

.header-inner { display: flex; justify-content: center; padding: 18px 16px; }

.site-logo { display: inline-block; line-height: 0; }
.site-logo img { height: 34px; width: auto; }

.site-nav { background: var(--teal); }

.nav-inner { display: flex; justify-content: center; flex-wrap: wrap; padding: 0 12px; }

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav-link:hover { background: rgba(0, 0, 0, .12); color: #fff; }
.nav-link.is-active { background: rgba(0, 0, 0, .12); border-bottom-color: #fff; }

.nav-empty { color: rgba(255, 255, 255, .9); padding: 12px 0; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, #F2FCFB 0%, #ffffff 70%); border-bottom: 1px solid var(--border); }

.hero-inner { display: flex; gap: 32px; align-items: center; padding: 40px 16px; }

.hero-media { flex: 0 0 44%; max-width: 460px; }
.hero-media img { width: 100%; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }

.hero-copy { flex: 1; min-width: 0; }

.hero-title { font-size: 30px; line-height: 1.4; margin: 0 0 14px; position: relative; padding-bottom: 14px; }
.hero-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 2px; background: var(--teal); }

.hero-intro { color: var(--text-2); font-size: 16px; line-height: 1.9; margin: 0 0 14px; }

.hero-bullets { margin: 0 0 0 20px; padding: 0; }
.hero-bullets li { margin: 5px 0; }

/* ---------- Blocks ---------- */
.block { padding: 38px 0 8px; }

.block-title {
  text-align: center;
  font-size: 24px;
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 22px;
  position: relative;
  padding-bottom: 14px;
}
.block-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
}

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, .10); }

.card-link { display: block; height: 100%; text-decoration: none; color: inherit; }

.card-cover {
  aspect-ratio: 16 / 10;
  background: var(--teal);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--teal); }
.card-logo-white { width: 52%; height: auto; }

.card-body { padding: 14px; }

.card-title {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 8px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Article page ---------- */
.article-main { max-width: 800px; padding: 36px 16px 16px; }

.article-title { font-size: 30px; line-height: 1.45; margin: 0 0 14px; }

.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text-2);
  font-size: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.article-meta a { color: var(--teal); text-decoration: none; font-weight: 500; }
.article-meta a:hover { color: var(--orange); }
.meta-item + .meta-item::before { content: '｜'; margin-right: 16px; color: var(--border); }

.article-cover { margin: 0 0 26px; text-align: center; }
.article-cover img { max-width: 760px; width: 100%; border-radius: var(--radius); }

.article-body { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.9; color: var(--text); }
.article-body p { margin: 0 0 18px; }
.article-body h2 { font-size: 24px; line-height: 1.5; margin: 30px 0 14px; }
.article-body h3 { font-size: 20px; line-height: 1.5; margin: 26px 0 12px; }
.article-body a { color: var(--teal); }
.article-body a:hover { color: var(--orange); }
.article-body img { display: block; max-width: 100%; height: auto; margin: 22px auto; border-radius: 6px; }
.article-body figure { margin: 22px 0; text-align: center; }
.article-body figure img { margin: 0 auto; }
.article-body figcaption { color: var(--text-2); font-size: 13px; margin-top: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--teal);
  background: #f0fbfa;
  margin: 20px 0;
  padding: 10px 18px;
  color: var(--text-2);
}
.article-body ul, .article-body ol { padding-left: 26px; margin: 0 0 18px; }
.article-body li { margin: 4px 0; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 26px 0; }
.article-body .ql-align-center { text-align: center; }
.article-body .ql-align-right { text-align: right; }
.article-body .ql-indent-1 { padding-left: 2.5em; }
.article-body .ql-indent-2 { padding-left: 5em; }

/* ---------- Related ---------- */
.related { padding: 34px 0 8px; }

/* ---------- Footer ---------- */
.site-footer { background: #0f3533; color: rgba(255, 255, 255, .88); text-align: center; padding: 28px 16px; margin-top: 52px; }
.footer-text { margin: 0; font-size: 13px; line-height: 1.8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 34px 0 10px; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.page-link:hover { border-color: var(--teal); color: var(--teal); }
.page-link.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Empty / 404 ---------- */
.empty { text-align: center; color: var(--text-2); padding: 64px 0; }

.notfound { text-align: center; padding: 80px 16px; }
.notfound-code { font-size: 76px; font-weight: 900; color: var(--teal); line-height: 1; }
.notfound-title { font-size: 24px; margin: 10px 0 10px; }
.notfound-desc { color: var(--text-2); margin: 0 0 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 22px; padding: 28px 16px; }
  .hero-media { flex: 1 1 auto; max-width: none; width: 100%; }
  .hero-title { font-size: 24px; }
  .article-title { font-size: 24px; }
  .article-body { font-size: 16px; }
  .block-title { font-size: 20px; }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 380px) {
  .card-grid { grid-template-columns: 1fr; }
  .nav-link { padding: 11px 12px; font-size: 14px; }
}