/* bkgp_article.css — 江炳滔律師事務所文章版式
   站上文章內文容器是 .entry-content (主題 BKGP Pro 的 article.gpb-article 內),
   舊版工具產出的 HTML 另有 #content-wrapper, 兩者都支援。
   選擇器以 :is() 包住, 特異性等同 ID, 可蓋過主題 gp-blog.css 的 .entry-content 規則。
   上載位置: wp-content/themes/bkgp-pro/bkgp_article.css */

:is(.entry-content, #content-wrapper) {
  --bkgp-primary: #002e5d;
  --bkgp-accent: #0E95D3;
  --bkgp-ink: #1f2937;
  --bkgp-line: #e2e8f0;
  --bkgp-soft: #f5f8fc;

  color: var(--bkgp-ink);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

/* ---------- 標題層級 (h1 > h2 > h3, 不跳級) ---------- */
:is(.entry-content, #content-wrapper) h1 {
  font-size: 2rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--bkgp-primary);
  margin: 0 0 0.6em;
  padding-bottom: 0.5em;
  border-bottom: 3px solid var(--bkgp-accent);
}

:is(.entry-content, #content-wrapper) h2 {
  font-size: 1.45rem;
  line-height: 1.5;
  font-weight: 700;
  color: var(--bkgp-primary);
  margin: 2.2em 0 0.9em;
  padding: 0 0 0 0.6em;
  border-left: 4px solid var(--bkgp-accent);
}

:is(.entry-content, #content-wrapper) h3 {
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 700;
  color: #0f172a;
  margin: 1.7em 0 0.6em;
  padding: 0.7em 1em;
  background: var(--bkgp-soft);
  border-left: 3px solid var(--bkgp-primary);
  border-radius: 0 6px 6px 0;
}

/* ---------- 段落與清單 ---------- */
:is(.entry-content, #content-wrapper) p {
  margin: 0 0 1.1em;
}

:is(.entry-content, #content-wrapper) p strong {
  color: var(--bkgp-primary);
  font-weight: 700;
}

:is(.entry-content, #content-wrapper) ul,
:is(.entry-content, #content-wrapper) ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

:is(.entry-content, #content-wrapper) li {
  margin-bottom: 0.5em;
}

:is(.entry-content, #content-wrapper) li::marker {
  color: var(--bkgp-accent);
}

:is(.entry-content, #content-wrapper) a {
  color: var(--bkgp-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 149, 211, 0.35);
}

:is(.entry-content, #content-wrapper) a:hover {
  border-bottom-color: var(--bkgp-accent);
}

/* ---------- 表格 (5 大法定理由等資料表) ---------- */
:is(.entry-content, #content-wrapper) table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.95rem;
  line-height: 1.7;
  border: 1px solid var(--bkgp-line);
}

:is(.entry-content, #content-wrapper) thead th {
  background: var(--bkgp-primary);
  color: #ffffff;
  text-align: left;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid var(--bkgp-primary);
}

:is(.entry-content, #content-wrapper) tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--bkgp-line);
  vertical-align: top;
}

:is(.entry-content, #content-wrapper) tbody tr:nth-child(even) {
  background: var(--bkgp-soft);
}

/* ---------- 圖片與引言 ---------- */
:is(.entry-content, #content-wrapper) img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.6em auto;
  border-radius: 10px;
}

:is(.entry-content, #content-wrapper) blockquote {
  margin: 1.6em 0;
  padding: 0.8em 1.2em;
  background: var(--bkgp-soft);
  border-left: 4px solid var(--bkgp-accent);
  color: #334155;
}

/* ---------- ASCII 流程圖 (轉換器把 │ ├ └ ─ ► 那組包成 <pre>) ---------- */
:is(.entry-content, #content-wrapper) pre.bkgp-flow {
  white-space: pre;
  overflow-x: auto;
  margin: 1.6em 0;
  padding: 14px 16px;
  background: var(--bkgp-soft);
  border-left: 4px solid var(--bkgp-accent);
  border-radius: 0 6px 6px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #334155;
}

/* ---------- 文末聯絡卡片 (contact_box_html 的 inline 樣式補強) ---------- */
:is(.entry-content, #content-wrapper) div[style*="border-left:4px solid"] {
  font-size: 0.95rem;
  line-height: 1.85;
}

:is(.entry-content, #content-wrapper) div[style*="border-left:4px solid"] p {
  margin: 0 0 6px;
}

/* ---------- 響應式 ---------- */
@media (max-width: 768px) {
  :is(.entry-content, #content-wrapper) {
    font-size: 16px;
    line-height: 1.85;
  }
  :is(.entry-content, #content-wrapper) h1 { font-size: 1.6rem; }
  :is(.entry-content, #content-wrapper) h2 { font-size: 1.25rem; margin-top: 1.8em; }
  :is(.entry-content, #content-wrapper) h3 { font-size: 1.05rem; }
  :is(.entry-content, #content-wrapper) table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
