/* ================================================================
   林氏毛织厂 · blog-article.css
   博客文章页专属样式 — 引入此文件即可，无需在每篇文章里重复
   依赖：base.css（变量）+ header-footer.css（页眉页脚）
   ================================================================ */

/* ── 微信浮窗 + 回顶 ── */
.wc-float {
  position: fixed; bottom: 24px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.wc-btn {
  width: 48px; height: 48px; background: var(--green);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(7,193,96,.35);
  cursor: pointer; transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.wc-btn:hover { transform: scale(1.1); }
.wc-btn svg  { width: 22px; height: 22px; fill: #fff; }
.wc-tip {
  font-size: 10px; color: var(--t2); background: #fff;
  padding: 2px 8px; border-radius: 99px; box-shadow: var(--sh); white-space: nowrap;
}
.wc-popup {
  position: fixed; bottom: 85px; right: 14px; z-index: 101;
  background: #fff; border-radius: 14px; padding: 16px;
  box-shadow: 0 10px 36px rgba(0,0,0,.14); width: 180px;
  display: none; flex-direction: column; align-items: center; gap: 8px;
}
.wc-popup.on  { display: flex; }
.wc-popup img { width: 136px; height: 136px; border-radius: 6px; }
.wc-popup strong { font-size: 13px; font-weight: 700; color: var(--t1); }
.wc-popup p   { font-size: 11px; color: var(--t2); text-align: center; line-height: 1.6; }
.wc-x { position: absolute; top: 9px; right: 11px; font-size: 16px; color: var(--t3); cursor: pointer; }
.wc-x:hover { color: var(--t1); }
.to-top {
  position: fixed; bottom: 82px; right: 16px; z-index: 100;
  width: 36px; height: 36px; background: var(--navy); color: #fff;
  border-radius: 50%; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-md); cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.to-top.on   { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }

/* ── 阅读进度条 ── */
.read-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  height: 3px; pointer-events: none;
}
.read-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  transition: width .08s linear;
}

/* ── 文章 Hero ── */
.post-hero { background: #1B3A5C; border-bottom: 1px solid rgba(255,255,255,.06); }
.post-hero-inner { max-width: 820px; margin: 0 auto; padding: 48px 40px 52px; }
@media (max-width: 768px) { .post-hero-inner { padding: 36px 20px 40px; } }

.post-crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 24px; }
.post-crumb a    { color: rgba(255,255,255,.35); transition: color .15s; }
.post-crumb a:hover { color: rgba(255,255,255,.65); }
.post-crumb .sep { color: rgba(255,255,255,.15); }
.post-crumb span { color: rgba(255,255,255,.45); }

.post-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 4px;
  background: rgba(224,107,26,.15); border: 1px solid rgba(224,107,26,.25);
  color: #f5a96a; font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  font-family: var(--fe); margin-bottom: 20px;
}
.post-cat::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #E06B1A; }

.post-title {
  font-size: clamp(24px, 4vw, 40px); font-weight: 700; color: #fff;
  line-height: 1.2; letter-spacing: -.02em; margin-bottom: 10px;
}
.post-subtitle {
  font-size: clamp(14px, 2vw, 18px); font-weight: 400;
  color: rgba(255,255,255,.5); line-height: 1.5; margin-bottom: 32px;
}

.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
}
.post-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #E06B1A;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fe); font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.post-author { font-size: 13px; color: rgba(255,255,255,.65); font-weight: 600; }
.post-dot    { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.2); }
.post-info   { font-size: 12px; color: rgba(255,255,255,.35); }

/* ── 正文 + TOC 双列布局 ── */
.page-wrap {
  max-width: 1080px; margin: 0 auto; padding: 0 40px 80px;
  display: grid; grid-template-columns: 1fr 240px; gap: 52px; align-items: start;
}
@media (max-width: 960px) {
  .page-wrap { grid-template-columns: 1fr; gap: 32px; padding: 0 20px 60px; }
}

/* ── 正文卡片 ── */
.post-card {
  background: var(--white); border: 1px solid var(--line-lt);
  border-radius: 16px; padding: 44px 48px 48px;
  max-width: 820px; margin-top: 32px;
}
@media (max-width: 768px) { .post-card { padding: 28px 20px 36px; margin-top: 24px; } }

/* 正文排版 */
.post-card p        { font-size: 16px; line-height: 1.95; color: var(--t2); margin-bottom: 22px; }
.post-card strong   { color: var(--t1); font-weight: 700; }

.post-card h2 {
  font-size: 18px; font-weight: 700; color: var(--t1);
  margin: 52px 0 18px; padding: 14px 18px 14px 22px;
  background: var(--bg); border-radius: var(--r-md);
  border-left: 4px solid var(--orange); line-height: 1.4;
  display: flex; align-items: center; gap: 12px;
}
.post-card h2 .step-badge {
  font-family: var(--fe); font-size: 11px; font-weight: 800;
  background: var(--orange); color: #fff;
  padding: 2px 8px; border-radius: 5px;
  letter-spacing: .05em; flex-shrink: 0; white-space: nowrap;
}
.post-card h2:first-child { margin-top: 0; }

.post-card h3 {
  font-size: 15px; font-weight: 700; color: var(--navy);
  margin: 28px 0 12px; padding-left: 14px; border-left: 2px solid var(--blue);
}

/* 列表 */
.post-card ul { margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.post-card ul li {
  font-size: 15px; color: var(--t2); line-height: 1.75;
  padding: 11px 16px 11px 42px; position: relative;
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--line-lt);
}
.post-card ul li::before {
  content: ''; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
}

.post-card ol { counter-reset: oli; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.post-card ol li {
  counter-increment: oli; font-size: 15px; color: var(--t2); line-height: 1.75;
  padding: 11px 16px 11px 48px; position: relative;
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--line-lt);
}
.post-card ol li::before {
  content: counter(oli); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 10px; font-weight: 800;
  font-family: var(--fe); display: flex; align-items: center; justify-content: center;
}

/* Callout */
.callout { padding: 16px 20px; border-radius: var(--r-md); margin: 24px 0; font-size: 14px; line-height: 1.8; }
.callout-info { background: var(--blue-soft); border-left: 4px solid var(--blue); color: #1a3a5c; }
.callout-tip  { background: #FFFBF0; border-left: 4px solid #f0a020; color: #5a3800; }
.callout-label { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; font-family: var(--fe); opacity: .7; }

/* 表格 */
.blog-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--line); }
.blog-table th { background: var(--navy); color: #fff; padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.blog-table td { padding: 11px 16px; border-bottom: 1px solid var(--line-lt); color: var(--t2); }
.blog-table tr:last-child td { border-bottom: none; }
.blog-table tr:nth-child(even) td { background: var(--bg); }

/* 流程卡片 */
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0 28px; }
@media (max-width: 520px) { .process-grid { grid-template-columns: 1fr; } }
.process-item {
  padding: 20px; border-radius: var(--r-md);
  background: var(--white); border: 1px solid var(--line-lt);
  box-shadow: var(--sh); transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.process-item::before {
  content: attr(data-n); position: absolute; right: 14px; top: 8px;
  font-family: var(--fe); font-size: 36px; font-weight: 800;
  color: var(--navy); opacity: .05; line-height: 1;
}
.process-item:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.process-item h3  { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 7px; border-left: none; padding-left: 0; margin-top: 0; }
.process-item p   { font-size: 12px; line-height: 1.75; color: var(--t2); margin: 0; }

/* 引用块 */
.post-card blockquote {
  margin: 24px 0; padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3f62 100%);
  border-radius: var(--r-md); color: rgba(255,255,255,.8);
  font-size: 15px; line-height: 1.85; position: relative; font-style: italic;
}
.post-card blockquote::before {
  content: '\201C'; position: absolute; top: -12px; left: 16px;
  font-size: 72px; line-height: 1; font-family: Georgia, serif;
  color: rgba(255,255,255,.08); font-style: normal;
}

.post-card hr { border: none; border-top: 1px solid var(--line); margin: 48px 0; }

/* 内嵌 CTA */
.article-cta {
  margin: 44px 0 0; padding: 30px 32px;
  background: linear-gradient(140deg, #1B3A5C 0%, #243f66 100%);
  border-radius: var(--r-lg);
}
.article-cta h3 { font-size: 18px; font-weight: 700; color: #fff !important; margin-bottom: 8px; }
.article-cta p  { font-size: 14px; color: rgba(255,255,255,.6) !important; margin-bottom: 20px; line-height: 1.7; }
.cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; font-size: 13px; font-weight: 700;
  border-radius: var(--r); border: 1.5px solid transparent;
  transition: all .2s; white-space: nowrap; cursor: pointer; font-family: var(--fn);
}
.btn-orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-orange:hover { background: var(--orange-dk); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(224,107,26,.35); }
.btn-ghost-w { background: transparent; color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.28); }
.btn-ghost-w:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); }

/* 标签 */
.post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-tag {
  padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line);
  font-size: 12px; color: var(--t2); transition: all .15s;
}
.post-tag:hover { border-color: var(--navy); color: var(--navy); background: var(--bg); }

/* ── TOC 侧边栏 ── */
.post-toc {
  position: sticky; top: calc(var(--hh) + 20px);
  background: var(--white); border-radius: var(--r-lg);
  border: 1px solid var(--line-lt); overflow: hidden; box-shadow: var(--sh-md);
}
@media (max-width: 960px) { .post-toc { position: static; order: -1; } }
.toc-header {
  padding: 14px 18px; background: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.toc-header span {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.55); font-family: var(--fe);
}
.toc-header svg { width: 14px; height: 14px; fill: rgba(255,255,255,.35); flex-shrink: 0; }
.toc-nav  { padding: 8px; list-style: none; }
.toc-nav li { margin: 1px 0; }
.toc-nav li.sub { padding-left: 10px; }
.toc-nav a {
  display: block; padding: 6px 10px; font-size: 12px; color: var(--t2);
  line-height: 1.5; border-radius: 6px; border-left: 2px solid transparent;
  transition: all .15s;
}
.toc-nav a:hover { color: var(--navy); background: var(--bg); }
.toc-nav a.active { color: var(--blue); background: var(--blue-soft); border-left-color: var(--blue); font-weight: 600; }
.toc-action { padding: 14px 14px 16px; border-top: 1px solid var(--line-lt); }
.toc-action .btn { width: 100%; justify-content: center; font-size: 13px; padding: 10px; }
.toc-note { font-size: 11px; color: var(--t3); text-align: center; margin-top: 7px; }

/* ── 相关文章 ── */
.related-sec { background: var(--bg); padding: 52px 0 60px; }
.related-wrap { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
@media (max-width: 768px) { .related-wrap { padding: 0 20px; } }
.sec-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fe); font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px;
}
.sec-eyebrow::before { content: ''; width: 16px; height: 2px; background: var(--blue); }
.sec-title { font-size: clamp(20px, 3vw, 28px); font-weight: 700; color: var(--t1); margin-bottom: 28px; line-height: 1.25; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 768px) { .rel-grid { grid-template-columns: 1fr; } }
.rel-card {
  background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--line-lt);
  padding: 22px 20px; box-shadow: var(--sh);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 9px;
}
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.rel-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-family: var(--fe);
  color: var(--blue); background: var(--blue-soft);
  padding: 2px 9px; border-radius: 99px; width: fit-content;
}
.rel-title { font-size: 14px; font-weight: 700; color: var(--t1); line-height: 1.45; flex: 1; }
.rel-desc  { font-size: 12px; color: var(--t2); line-height: 1.65; }
.rel-link  { font-size: 12px; color: var(--orange); font-weight: 700; margin-top: 2px; }


/* 文章内延伸阅读内链块 */
.article-related-links {
  margin: 32px 0 8px;
  padding: 20px 24px;
  background: var(--bg);
  border-radius: var(--r-md);
  border-left: 4px solid var(--blue);
}
.article-related-links strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.article-related-links ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.article-related-links ul li { background: none; border: none; padding: 0; }
.article-related-links ul li::before { display: none; }
.article-related-links a {
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
  transition: color .15s;
}
.article-related-links a:hover { color: var(--navy); }

/* ═══════════════════════════════════════
   文章正文配图 — post-article-img
   位置：post-card 内，正文第一段之前
   尺寸：最大宽度铺满卡片，保持原始比例
   ═══════════════════════════════════════ */
.post-article-img {
  margin: 0 0 28px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg2);
  line-height: 0;         /* 消除图片底部空隙 */
}
.post-article-img img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: var(--r-md);
}
@media (max-width: 768px) {
  .post-article-img img { max-height: 240px; }
}

/* ═══════════════════════════════════════
   正文内链样式 — 全站统一管理
   修改此处即可影响所有博客文章内链
   ═══════════════════════════════════════ */

/* 正文段落内的普通内链
   base.css 有 a { color: inherit } 会覆盖，用 !important 强制生效 */
.post-card p a,
.post-card li a,
.post-card td a {
  color: var(--blue) !important;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(59,125,216,.30);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}
.post-card p a:hover,
.post-card li a:hover,
.post-card td a:hover {
  color: var(--orange) !important;
  border-bottom-color: var(--orange);
}

/* callout 内的内链 */
.callout a {
  color: var(--navy) !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.callout a:hover { color: var(--blue) !important; }

/* 延伸阅读框升级版：每条链接加箭头+悬停背景 */
.article-related-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r);
  background: var(--white);
  border: 1px solid var(--line-lt);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy) !important;
  text-decoration: none;
  transition: all .18s;
}
.article-related-links a::before {
  content: '→';
  font-size: 13px;
  color: var(--orange);
  flex-shrink: 0;
  font-weight: 800;
  transition: transform .15s;
}
.article-related-links a:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue) !important;
  transform: translateX(3px);
}
.article-related-links a:hover::before {
  transform: translateX(3px);
}

/* FAQ 内的内链 */
.faq-a a {
  color: var(--blue) !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-a a:hover { color: var(--orange) !important; }

/* ── TOC 侧边栏样式补丁（兼容新模板类名） ── */
.toc-sidebar {
  position: sticky;
  top: calc(var(--hh) + 20px);
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--line-lt);
  overflow: hidden;
  box-shadow: var(--sh-md);
}
@media (max-width: 960px) { .toc-sidebar { position: static; order: -1; } }

.toc-inner { display: flex; flex-direction: column; }

.toc-sidebar .toc-header {
  padding: 14px 18px;
  background: var(--navy);
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.85) !important; font-family: var(--fe);
}

.toc-list {
  list-style: none; padding: 8px; margin: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.toc-link {
  display: block; padding: 7px 10px;
  font-size: 12px; color: var(--t2);
  line-height: 1.5; border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all .15s; text-decoration: none;
}
.toc-link:hover  { color: var(--navy); background: var(--bg); }
.toc-link.active { color: var(--blue); background: var(--blue-soft); border-left-color: var(--blue); font-weight: 600; }

.toc-cta {
  padding: 14px; border-top: 1px solid var(--line-lt);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.toc-cta-btn {
  display: block; width: 100%; text-align: center;
  padding: 10px 14px; border-radius: var(--r);
  background: var(--orange); color: #fff !important;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.toc-cta-btn:hover { background: var(--orange-dk); transform: translateY(-1px); color: #fff !important; }
.toc-cta p { font-size: 11px; color: var(--t3); margin: 0; }

/* CTA 按钮兼容新类名 */
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; font-size: 13px; font-weight: 700;
  border-radius: var(--r); border: 1.5px solid transparent;
  transition: all .2s; white-space: nowrap; cursor: pointer;
  font-family: var(--fn); text-decoration: none;
}
.cta-primary { background: var(--orange); color: #fff !important; border-color: var(--orange); }
.cta-primary:hover { background: var(--orange-dk); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(224,107,26,.35); color: #fff !important; }
.cta-ghost   { background: transparent; color: rgba(255,255,255,.85) !important; border-color: rgba(255,255,255,.45); }
.cta-ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.7); color: #fff !important; }

/* FAQ 折叠组件 */
.faq-item { border: 1px solid var(--line-lt); border-radius: var(--r-md); overflow: hidden; margin-bottom: 10px; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--bg);
  font-size: 15px; font-weight: 700; color: var(--t1);
  text-align: left; cursor: pointer; border: none;
  transition: background .15s;
}
.faq-q:hover { background: var(--blue-soft); }
.faq-ico { font-size: 20px; color: var(--blue); font-weight: 400; flex-shrink: 0; transition: transform .2s; }
.faq-a {
  max-height: 0; overflow: hidden;
  font-size: 14px; color: var(--t2); line-height: 1.85;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 20px; background: var(--white);
}
.faq-item.open .faq-a  { max-height: 600px; padding: 16px 20px 20px; }
.faq-item.open .faq-ico { transform: rotate(45deg); }
