/* 從 設計稿/消息列表.html 的 <style> 複製（WP 測試用） */

/* ---- 最新消息總覽 ---- */
.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.news-filter button { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 9px 18px; font: 500 15px var(--f-body); cursor: pointer; }
.news-filter button[aria-pressed="true"] { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.news-filter .n { font-family: var(--f-num); font-size: 13px; margin-left: 4px; opacity: .75; }

.post-card { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 0 14px 30px -24px rgba(0,0,0,.35); transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -24px rgba(0,0,0,.4); }
.post-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.post-card .cat { background: var(--mist); color: var(--teal-deep); padding: 3px 10px; border-radius: 999px; font-weight: 500; }
.post-card .cat.c-notice { background: var(--pink-soft); color: #a3174f; }
.post-card .src { color: var(--ink-soft); }
.post-card .src::before { content: "｜"; margin-right: 4px; color: var(--line); }
.post-card h2, .post-card h3 { font-size: 21px; line-height: 1.45; }
.post-card p { font-size: 15px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .more { margin-top: auto; font-size: 15px; color: var(--teal-deep); }

.post-feature { flex-direction: row; margin-bottom: 28px; }
.post-feature .thumb { flex: 1.2; aspect-ratio: auto; min-height: 320px; }
.post-feature .body { flex: 1; padding: 36px 40px; justify-content: center; }
.post-feature h2 { font-size: clamp(24px, 2.6vw, 32px); }
.post-feature .badge { align-self: flex-start; font-size: 13px; letter-spacing: .1em; color: var(--pink); font-weight: 700; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card[hidden] { display: none; }
.news-empty { padding: 48px 0; text-align: center; color: var(--ink-soft); }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border-radius: 999px; text-decoration: none; font: 500 15px var(--f-num); color: var(--teal-deep); border: 1.5px solid var(--line); background: var(--paper); }
.pager [aria-current] { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }

@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-feature { flex-direction: column; }
  .post-feature .thumb { min-height: 0; aspect-ratio: 16 / 10; }
  .post-feature .body { padding: 24px; }
}
@media (max-width: 767px) { .post-grid { grid-template-columns: 1fr; } }

/* WP 版：分類用連結（真的分類網址），樣式同按鈕 */
.news-filter a { border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 9px 18px; font: 500 15px var(--f-body); text-decoration: none; }
.news-filter a[aria-current] { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.post-card .thumb img { height: 100%; }


/* 衛教專區的主題標籤（WordPress 標籤） */
.news-sub { display: flex; flex-wrap: wrap; gap: 8px; margin: -20px 0 36px; padding: 16px 18px; background: var(--mist); border-radius: var(--r-md); }
.news-sub a { border: 1.5px solid transparent; background: var(--paper); color: var(--teal-deep); border-radius: 999px; padding: 7px 14px; font: 500 15px var(--f-body); text-decoration: none; }
.news-sub a + a::before { content: "#"; margin-right: 2px; opacity: .6; }
.news-sub a[aria-current="page"] { border-color: var(--teal); background: #fff; font-weight: 700; }
.news-sub .n { font-family: var(--f-num); font-size: 12px; margin-left: 4px; opacity: .7; }
