/* =========================================================
   think4public.com 全站樣式
   視覺目標：貼近 Facebook 粉專版面（封面＋圓形頭像＋左側簡介＋右側貼文卡片），
   但以公革力品牌色取代 Facebook 藍。
   要改顏色、字級、圓角：只改下方 :root 變數即可。
   ========================================================= */
:root {
  --brand-dark: #221715;      /* 標誌深色（取自粉專頭像） */
  --brand-coral: #EA5F40;     /* 標誌珊瑚紅（取自粉專頭像） */
  --brand-coral-dark: #C94A2E;/* 按鈕 hover */
  --bg: #F0F2F5;              /* Facebook 背景灰 */
  --card: #FFFFFF;
  --text: #050505;
  --text-muted: #65676B;
  --border: #E4E6EB;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.12);
  --max: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.7; }
a { color: var(--brand-coral); }
img { max-width: 100%; display: block; }

/* ---------- 頂部列 ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 16px; background: var(--card); box-shadow: var(--shadow); }
.topbar-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.topbar-brand img { width: 36px; height: 30px; }
.topbar-fb { font-size: 14px; color: var(--text-muted); text-decoration: none; padding: 6px 12px; border-radius: 6px; background: var(--bg); }
.topbar-fb:hover { background: var(--border); }

/* ---------- 粉專頭部（封面＋頭像） ---------- */
.profile { background: var(--card); box-shadow: var(--shadow); }
.cover { max-width: var(--max); margin: 0 auto; aspect-ratio: 1640 / 624; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); background: var(--brand-dark); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-inner { max-width: calc(var(--max) - 64px); margin: 0 auto; padding: 0 16px 16px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.avatar { width: 168px; height: 168px; border-radius: 50%; border: 4px solid var(--card); margin-top: -84px; background: #fff; box-shadow: var(--shadow); }
.profile-text { flex: 1; min-width: 220px; padding-bottom: 6px; }
.profile-text h1 { margin: 0; font-size: 32px; line-height: 1.25; }
.profile-meta { margin: 4px 0 0; color: var(--text-muted); font-size: 15px; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn-primary { background: var(--brand-coral); color: #fff; }
.btn-primary:hover { background: var(--brand-coral-dark); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #D8DADF; }

/* ---------- 版面 ---------- */
.layout { max-width: calc(var(--max) - 64px); margin: 16px auto; padding: 0 16px; display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 680px); justify-content: center; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 20px; }
.sidebar { position: sticky; top: 72px; }
.intro p { margin: 0 0 10px; font-size: 15px; }
.info { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); font-size: 15px; }
.info li { display: flex; gap: 10px; padding: 4px 0; word-break: break-all; }
.info .ico { width: 20px; text-align: center; color: var(--text-muted); }
.feed { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.feed-head { display: flex; justify-content: space-between; align-items: center; }
.feed-head h2 { margin: 0; }
.feed-head .count { color: var(--text-muted); font-size: 14px; }

/* ---------- 貼文卡片 ---------- */
.post-author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-author img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); }
.author-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.post-author time { font-size: 13px; color: var(--text-muted); }
.post-title { margin: 0 0 6px; font-size: 17px; line-height: 1.5; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.post-excerpt { margin: 0; color: #1c1e21; font-size: 15px; }
.post-actions { display: flex; gap: 4px; margin-top: 12px; padding-top: 6px; border-top: 1px solid var(--border); }
.post-actions a { flex: 1; text-align: center; padding: 6px; border-radius: 6px; color: var(--text-muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.post-actions a:hover { background: var(--bg); }

/* ---------- 文章內頁 ---------- */
.post-full .post-title { font-size: 22px; margin-bottom: 14px; }
.post-body p { margin: 0 0 1.1em; font-size: 17px; line-height: 1.85; word-break: break-word; }
.post-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; }
.post-nav a { color: var(--text-muted); text-decoration: none; max-width: 48%; }
.post-nav a:hover { color: var(--brand-coral); }

/* ---------- 頁尾 ---------- */
.site-footer { max-width: calc(var(--max) - 64px); margin: 32px auto 0; padding: 24px 16px 48px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--text-muted); }

/* ---------- 手機 ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .profile-inner { flex-direction: column; align-items: center; text-align: center; }
  .avatar { width: 128px; height: 128px; margin-top: -64px; }
  .profile-text h1 { font-size: 24px; }
  .profile-actions { justify-content: center; }
  .topbar-brand span { display: none; }
}
