/* practice-detail.css — 案例详情页 + 文章页 统一排版 */
/* 依赖 styles.css 中的 CSS 变量 (--ink, --muted, --paper, --panel, --teal, --accent 等) */

/* ── 基础 ───────────────────────────────────────── */
:root {
  --ink: #18212b;
  --muted: #5f6b76;
  --line: #d8dedf;
  --paper: #f7f4ec;
  --panel: #ffffff;
  --accent: #8e1f2f;
  --accent-dark: #5f1722;
  --teal: #0e6f70;
  --gold: #b88936;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1,h2,h3,h4,p { margin-top: 0; }

/* ── 面包屑 ─────────────────────────────────────── */
.breadcrumb {
  max-width: 820px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 48px) 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--teal); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }

/* ══════════════════════════════════════════════════
   案例详情页 (/cases/**/)
   ══════════════════════════════════════════════════ */

/* ── practice-hero ─────────────────────────────── */
.practice-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px) 28px;
}

.practice-hero .section-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 12px;
  background: rgba(14, 111, 112, 0.08);
  color: var(--teal);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 3px;
}

.practice-hero h1 {
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.35;
  margin-bottom: 14px;
  color: var(--ink);
}

.practice-tagline {
  color: var(--muted);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ── practice-content ──────────────────────────── */
.practice-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.practice-block {
  margin-bottom: 32px;
}

.practice-block h2 {
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.35;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.practice-block h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 10px;
  margin-top: 22px;
  color: var(--accent-dark);
}

.practice-block h4 {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 8px;
  margin-top: 16px;
  color: var(--teal);
}

.practice-block p {
  margin-bottom: 16px;
  text-align: justify;
}

.practice-block p:first-of-type {
  text-indent: 0;
}

.practice-block p + p {
  text-indent: 2em;
}

.practice-block ul,
.practice-block ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.practice-block li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.practice-block blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: rgba(14, 111, 112, 0.04);
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  border-radius: 0 6px 6px 0;
}

/* ── 案例信息表格 ──────────────────────────────── */
.case-info-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 15px;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.case-info-table th,
.case-info-table td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--line);
}

.case-info-table th {
  background: var(--paper);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.case-info-table td {
  background: var(--panel);
}

/* ── FAQ 区域 ──────────────────────────────────── */
.faq-section {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 2px solid var(--line);
}

.faq-section h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--ink);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.faq-list summary:hover {
  color: var(--teal);
}

.faq-list p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}

/* ── CTA 区域 ──────────────────────────────────── */
.cta-section {
  max-width: 820px;
  margin: 32px auto 0;
  padding: 0 clamp(20px, 4vw, 48px);
  text-align: center;
}

.cta-section a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}

.cta-section a:hover {
  background: var(--accent-dark);
}

/* ── engagement-bar ────────────────────────────── */
.engagement-bar {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 2px solid var(--line);
}

.engagement-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* ── related-articles ──────────────────────────── */
.related-articles {
  margin-bottom: 0;
}

.related-articles h2 {
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--ink);
}

.article-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-links li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.5);
}

.article-links li:last-child {
  border-bottom: none;
}

.article-links a {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.article-links a:hover {
  text-decoration: underline;
}

/* ── related-categories ────────────────────────── */
.related-categories {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

.related-categories h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.related-grid a {
  display: block;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--teal);
}

.related-grid a:hover {
  border-color: var(--teal);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════
   文章页 (/articles/*.html)
   ══════════════════════════════════════════════════ */

.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.back-link {
  display: inline-block;
  margin: 24px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}
.back-link:hover { color: var(--accent); }

.article-content header {
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--ink);
}

.article-category {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 12px;
  background: rgba(14, 111, 112, 0.08);
  color: var(--teal);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 3px;
}

.article-content h1 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-subtitle {
  color: var(--muted);
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 16px;
}

.article-meta {
  color: var(--muted);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* 文章正文 */
.article-content section {
  margin-bottom: 36px;
}

.article-content h2 {
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.35;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.article-content h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 10px;
  margin-top: 20px;
  color: var(--accent-dark);
}

.article-content h4 {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 8px;
  margin-top: 16px;
  color: var(--teal);
}

.article-content p {
  margin-bottom: 16px;
  text-align: justify;
  text-indent: 2em;
}

.article-content section > p:first-child {
  text-indent: 0;
}

.article-content blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: rgba(14, 111, 112, 0.04);
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  border-radius: 0 6px 6px 0;
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.article-content strong { font-weight: 700; color: var(--ink); }
.article-content em { color: var(--muted); font-style: italic; }

.article-content code {
  padding: 2px 6px;
  background: rgba(14, 111, 112, 0.06);
  color: var(--teal);
  font-family: "Consolas", monospace;
  font-size: 0.9em;
  border-radius: 3px;
}

/* 裁判要旨特殊样式 */
.article-content section:first-of-type p {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.9;
  color: var(--ink);
  text-indent: 0;
  padding: 16px 20px;
  background: rgba(142, 31, 47, 0.04);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  margin-bottom: 0;
}

/* 延伸阅读 */
.related-reading {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 2px solid var(--line);
}

.related-reading h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--ink);
}

.related-reading ul {
  list-style: none;
  padding: 0;
}

.related-reading li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.5);
}

.related-reading li:last-child { border-bottom: none; }

.related-reading a {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.related-reading a:hover { text-decoration: underline; }

/* 底部导航 */
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.article-nav a { color: var(--teal); font-weight: 600; }
.article-nav a:hover { color: var(--accent); }

/* 页脚 */
.article-footer {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  text-align: center;
  line-height: 1.6;
}

/* 语言切换按钮 */
.language-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 100;
  min-width: 44px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.language-toggle:hover { background: var(--paper); }

/* ── 响应式 ────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .article-container,
  .practice-hero,
  .practice-content,
  .faq-section,
  .engagement-bar,
  .related-categories { padding-left: 16px; padding-right: 16px; }
  .practice-hero h1,
  .article-content h1 { font-size: 22px; }
  .practice-block h2,
  .article-content h2 { font-size: 20px; }
  .article-nav { flex-direction: column; gap: 12px; }
}
