/*
Theme Name: Lawsite Cao
Theme URI: https://www.jtmclawyer.com/
Author: Vincent
Description: 曹孟哲律師事務所自訂WordPress主題，完整復現網頁模擬v5的視覺外型與排版。內容模型見PG工程規範文件2.1節，不使用CPT/ACF/頁面編輯器外掛。
Version: 1.0.0
Requires at least: 6.9
Requires PHP: 8.0
License: Proprietary
Text Domain: lawsite-cao
*/

/* ============================================================
   曹孟哲律師事務所 — WordPress主題共用樣式
   Port自 網頁模擬/v5/assets/css/style.css，設計token集中在 :root
   已移除demo專屬、WordPress版不建置的區塊樣式（後台審核demo/AI聊天demo/會員方案比較表），
   見 ADF/docs/site-architecture-v5-to-wordpress.md 效率與後台整潔原則一節
   ============================================================ */

:root {
  /* 色彩 —— 深藍(專業信賴) + 金銅(質感點綴) */
  --color-ink: #13233b;        /* 主色：深藍 */
  --color-ink-light: #1f3a5f;
  --color-gold: #b08d57;       /* 輔色：金銅 */
  --color-gold-light: #d8c19a;
  --color-bg: #f7f5f1;         /* 背景：暖白 */
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-border: #e5e0d8;
  --color-success: #2f7d5a;
  --color-warning: #b45309;
  --color-danger: #b3261e;

  /* 字體 —— 不外接CDN，吃系統內建中文字型 */
  --font-heading: "Noto Serif TC", "PMingLiU", "Songti TC", serif;
  --font-body: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;

  --radius: 6px;
  --shadow: 0 2px 12px rgba(19, 35, 59, 0.08);
  --shadow-lg: 0 8px 30px rgba(19, 35, 59, 0.14);
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
}
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-ink); line-height: 1.4; margin: 0 0 0.6em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--color-text); }
a { color: var(--color-ink-light); text-decoration: none; }
a:hover { color: var(--color-gold); }
img, svg { max-width: 100%; display: block; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--color-surface); }
.text-muted { color: var(--color-text-muted); }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(176, 141, 87, 0.15);
  color: var(--color-gold);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn--primary { background: var(--color-ink); color: #fff; }
.btn--primary:hover { background: var(--color-ink-light); color: #fff; }
.btn--gold { background: var(--color-gold); color: #fff; }
.btn--gold:hover { background: #9a7847; color: #fff; }
.btn--outline { background: transparent; border-color: var(--color-ink); color: var(--color-ink); }
.btn--outline:hover { background: var(--color-ink); color: #fff; }
.btn--disabled, .btn:disabled {
  background: #d9d9d9; color: #8a8a8a; cursor: not-allowed; border-color: transparent;
}
.btn--sm { padding: 6px 14px; font-size: 0.85rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--max-width); margin: 0 auto;
}
.nav__brand { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--color-ink); }
.nav__brand span { color: var(--color-gold); }
.nav__links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--color-text); font-weight: 500; font-size: 0.95rem; }
.nav__links a.active, .nav__links a.current-menu-item { color: var(--color-gold); font-weight: 700; }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-ink); }

@media (max-width: 860px) {
  .nav__links { position: absolute; top: 64px; left: 0; right: 0; background: var(--color-surface);
    flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--color-border);
    display: none; gap: 14px; box-shadow: var(--shadow); }
  .nav__links.open { display: flex; }
  .nav__toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding: 72px 0;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding: 40px 0; } }
.hero__eyebrow { color: var(--color-gold); font-weight: 700; letter-spacing: 0.05em; margin-bottom: 10px; display: block; }
.hero__actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(176,141,87,0.15); color: var(--color-gold);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 14px; font-weight: 700; }

/* 客戶評價卡片：目前首頁區塊為HTML註解暫時隱藏（待Google商家評論上線），樣式保留供之後恢復使用 */
.review-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; }
.review-card__stars { color: var(--color-gold); margin-bottom: 8px; }
.review-card__meta { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 12px; }

/* ---------- List ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { padding: 10px 0; border-bottom: 1px dashed var(--color-border); }
.info-list li:last-child { border-bottom: none; }
.info-list .dot { color: var(--color-gold); font-weight: 700; margin-right: 6px; }
.info-list .faq-a { display: block; margin-top: 6px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-ink); color: #fff; border-radius: var(--radius); padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: #cdd6e4; margin: 6px 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-ink); color: #dbe3ee; padding: 48px 0 24px; margin-top: 60px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #dbe3ee; }
.site-footer a:hover { color: var(--color-gold); }
/* 頁尾對比度修正：全站有一條 p{color:var(--color-text)} 基底規則（深色字，給淺色頁面用），
   footer裡沒有另外指定顏色的<p>會被這條規則命中，蓋過從.site-footer繼承下來的淺色文字。
   這裡統一蓋掉，讓footer內所有<p>預設走淺色（見 v4調整意見.pptx 批註、site-architecture文件）。 */
.site-footer p { color: #dbe3ee; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid p { line-height: 1.9; font-size: 0.92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 32px; padding-top: 18px;
  font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #a7b3c4; }
.footer-bottom a { color: #a7b3c4; text-decoration: underline; }

.placeholder-note {
  font-size: 0.78rem; color: var(--color-warning); background: rgba(180,83,9,0.08);
  border: 1px dashed rgba(180,83,9,0.35); border-radius: var(--radius); padding: 8px 12px; margin: 6px 0 18px;
}
.disclaimer {
  font-size: 0.82rem; color: var(--color-text-muted); background: rgba(19,35,59,0.05);
  border-left: 3px solid var(--color-gold); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0;
}
/* 頁尾「提醒事項」對比度修正：footer情境改用淺色文字＋淺色半透明底，其餘頁面內文中的.disclaimer不受影響 */
.site-footer .disclaimer {
  color: #cdd6e4; background: rgba(255,255,255,0.07);
}

/* ---------- Tabs (法律知識站) ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface);
  cursor: pointer; font-size: 0.9rem; color: var(--color-text);
}
.tab-btn.active { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 32px; }
.gap-sm { gap: 8px; }
.center { text-align: center; }

/* ---------- 曹律師形象照 ---------- */
.portrait-photo {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.portrait-frame { border-radius: var(--radius); overflow: hidden; }

/* ---------- LINE 浮動按鈕 ---------- */
.line-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #06c755; color: #fff; text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em;
  box-shadow: var(--shadow-lg); transition: transform 0.15s ease;
}
.line-float:hover { transform: scale(1.06); color: #fff; }

/* ---------- 聯絡資訊區塊（三選項 電子郵件/電話/LINE） ---------- */
.contact-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
@media (max-width: 860px) { .contact-block { grid-template-columns: 1fr; } }
.contact-block__item {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow);
}
.contact-block__icon {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(176,141,87,0.15); color: var(--color-gold);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.contact-block__label { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 2px; }
.contact-block__value { font-weight: 600; color: var(--color-ink); }
.contact-block__value a { color: inherit; }

/* ---------- Google Map 嵌入 ---------- */
.map-embed {
  position: relative; width: 100%; padding-bottom: 40%; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--color-border);
}
.map-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) { .map-embed { padding-bottom: 70%; } }

/* ---------- 服務範圍：單方塊分類呈現 ---------- */
.scope-category {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.scope-category h4 { margin: 0 0 8px; font-size: 1.05rem; }
.scope-category p { margin: 0; color: var(--color-text); }

/* ---------- 最新消息 ---------- */
.news-card {
  display: grid; grid-template-columns: 260px 1fr; gap: 24px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.news-card__img { border-radius: var(--radius); overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__date { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 6px; }
.news-card__noimg {
  display: flex; align-items: center; justify-content: center; background: rgba(19,35,59,0.04);
  border-radius: var(--radius); color: var(--color-text-muted); font-size: 0.85rem; text-align: center; padding: 20px;
}
@media (max-width: 860px) { .news-card { grid-template-columns: 1fr; } }
