/* ============================================================
 * 思博奥网站 · 行业科普栏目样式
 * 复用 index.html 的 CSS 变量（--primary / --bg-soft / --radius 等），
 * 自动适配明暗主题。
 * ============================================================ */

/* ---------- 文章卡片网格（列表页 + 首页区块共用） ---------- */
.article-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
}
.article-card{
  display:flex;flex-direction:column;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease;
}
.article-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-hover)}

/* 封面占位图 */
.article-cover{
  position:relative;
  aspect-ratio:16/9;
  display:flex;align-items:center;justify-content:center;
}
.article-cover-ic{opacity:.85}
/* 真实封面图 */
.article-cover.has-img{display:block}
.article-cover.has-img img{width:100%;height:100%;object-fit:cover;display:block}
.article-tag{
  position:absolute;top:12px;left:12px;
  font-size:12px;font-weight:600;color:#fff;
  background:var(--primary);
  padding:3px 10px;border-radius:6px;
  letter-spacing:.3px;
}

.article-body{
  padding:18px;display:flex;flex-direction:column;gap:8px;flex:1;
}
.article-meta{font-size:12px;color:var(--muted)}
.article-body h3{
  font-size:16px;font-weight:600;line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.article-body p{
  font-size:13px;color:var(--muted);line-height:1.7;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.article-link{margin-top:auto;font-size:14px;font-weight:600;color:var(--primary);padding-top:6px}

/* ---------- 文章详情页 ---------- */
.article-detail{max-width:820px;margin:0 auto}
.article-detail-head{margin-bottom:28px;padding-bottom:22px;border-bottom:1px solid var(--border)}
.article-detail-meta{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.article-detail-meta .article-tag{position:static}
.article-detail-meta time{font-size:13px;color:var(--muted)}
.article-detail-head h1{font-size:30px;line-height:1.4;font-weight:700}

/* 详情页封面大图 */
.article-detail-cover{
  width:100%;border-radius:var(--radius);display:block;
  margin-bottom:30px;border:1px solid var(--border);
}

/* 正文示意图 */
.article-fig{margin:26px 0;text-align:center}
.article-fig img{
  max-width:100%;border-radius:10px;
  border:1px solid var(--border);background:#fff;
}
.article-fig figcaption{font-size:13px;color:var(--muted);margin-top:10px}

/* 常见问答 */
.article-faq{margin-top:40px}
.article-faq h2{
  font-size:20px;font-weight:700;margin-bottom:16px;
  padding-left:12px;border-left:4px solid var(--primary);
}
.article-faq details{
  background:var(--bg);border:1px solid var(--border);
  border-radius:10px;margin-bottom:10px;
}
.article-faq summary{
  cursor:pointer;padding:15px 18px;font-weight:600;
  color:var(--primary);list-style:none;
}
.article-faq summary::before{content:'Q：';color:var(--accent)}
.article-faq details p{
  margin:0;padding:0 18px 16px;
  font-size:14px;color:var(--muted);line-height:1.8;
}

/* 文内锚文本链接 */
.article-inline-link{
  color:var(--primary);font-weight:600;
  text-decoration:underline;text-underline-offset:3px;
}
.article-inline-link:hover{color:var(--primary-dark)}

/* 相关阅读 */
.article-relarts{margin-top:36px}
.article-relarts h2{
  font-size:20px;font-weight:700;margin-bottom:14px;
  padding-left:12px;border-left:4px solid var(--primary);
}
.article-relart{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  background:var(--bg);border:1px solid var(--border);
  border-radius:10px;padding:14px 18px;margin-bottom:10px;
  transition:border-color .2s ease, transform .2s ease;
}
.article-relart:hover{border-color:var(--primary);transform:translateX(4px)}
.article-relart-title{color:var(--primary);font-weight:600;font-size:15px;flex:1}
.article-relart time{font-size:12px;color:var(--muted);white-space:nowrap}

/* 正文排版 */
.article-content{font-size:16px;line-height:1.9;color:var(--text)}
.article-content p{margin-bottom:18px}
.article-content h3{
  font-size:20px;font-weight:700;margin:34px 0 14px;
  padding-left:12px;border-left:4px solid var(--primary);
}
.article-content h3:first-child{margin-top:0}
.article-content ul,.article-content ol{margin:0 0 18px;padding-left:24px}
.article-content li{margin-bottom:8px;line-height:1.8}
.article-content strong{color:var(--text);font-weight:700}
.article-content em{font-style:italic}

/* 正文内的对比表格 */
.article-content table{
  width:100%;border-collapse:collapse;font-size:14px;margin:6px 0 22px;
  background:var(--bg);
}
.article-content table td{
  border:1px solid var(--border);padding:11px 14px;vertical-align:top;line-height:1.7;
}
.article-content table tr:first-child td{
  background:var(--bg-soft);font-weight:700;color:var(--text);
}
.article-content table tr td:first-child{
  background:var(--gray-50);color:var(--muted);font-weight:600;white-space:nowrap;
}
.article-content table tr:first-child td:first-child{background:var(--bg-soft)}

/* 详情页底部 CTA */
.article-cta{
  margin-top:44px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;
  background:linear-gradient(135deg,var(--primary) 0%,var(--primary-dark) 100%);
  border-radius:var(--radius);
  padding:30px 34px;color:#fff;
}
.article-cta-txt h3{font-size:20px;margin-bottom:6px;color:#fff}
.article-cta-txt p{font-size:14px;color:rgba(255,255,255,.85);max-width:460px;line-height:1.7}
.article-cta .btn-primary{background:var(--accent);flex-shrink:0}
.article-cta .btn-primary:hover{background:var(--accent-dark)}

/* ---------- 响应式 ---------- */
@media(max-width:960px){
  .article-grid{grid-template-columns:repeat(2,1fr)}
  .article-detail-head h1{font-size:25px}
}
@media(max-width:680px){
  .article-grid{grid-template-columns:1fr}
  .article-detail-head h1{font-size:22px}
  .article-content{font-size:15px}
  .article-cta{padding:24px;flex-direction:column;align-items:flex-start}
  .article-cta .btn-primary{width:100%;justify-content:center}
}
