/* 知识库 / 问答 列表与文章样式（加喜招商） */

/* ---------- 列表区 ---------- */
.kb-sec { padding: 56px 0 76px; background: #EFF4F8; }
.kb-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.kb-hd h2 { font-size: 26px; letter-spacing: -.5px; }
.kb-hd h2 b { color: var(--accent, #0E6E7E); }
.kb-hd p { font-size: 14px; color: #6C818A; }

.kb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }

.kb-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid #D5E2EA;
  border-radius: 14px; overflow: hidden; transition: transform .45s, box-shadow .45s, border-color .45s;
}
.kb-card:hover { transform: translateY(-5px); border-color: #9FD8E5; box-shadow: 0 18px 40px rgba(12, 45, 70, .1); }

/* 缩略图：16:9 + 流动渐变边框（循环动效） */
.kb-thumb {
  display: block; position: relative; margin: 0; padding: 2px; border: 1px solid #CFE3EC; border-radius: 12px;
  background: linear-gradient(120deg, #9FD8E5, #EFF4F8, #7FD3DF, #EFF4F8, #9FD8E5);
  background-size: 300% 300%;
  animation: kbFlow 7s linear infinite;
  overflow: hidden;
}
.kb-thumb img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 10px; background: #E7F2F7; transition: transform .6s;
}
.kb-card:hover .kb-thumb img { transform: scale(1.05); }
@keyframes kbFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .kb-thumb { animation: none; }
}

.kb-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.kb-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #6C818A; }
.kb-sort {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border: 1px solid #CFE3EC; border-radius: 999px; color: #0E6E7E; background: #F4FAFC;
  font-size: 12px; transition: background .3s, color .3s;
}
.kb-sort:hover { background: #0E6E7E; color: #fff; border-color: #0E6E7E; }
.kb-meta time { color: #6C818A; }
.kb-views { display: inline-flex; align-items: center; gap: 3px; }

.kb-card h3 { font-size: 16px; line-height: 1.5; letter-spacing: -.2px; }
.kb-card h3 a { color: #12222B; transition: color .3s; }
.kb-card h3 a:hover { color: #0E6E7E; }

.kb-desc {
  font-size: 13.5px; line-height: 1.8; color: #5A6F78; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.6em;
}

.kb-more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #0E6E7E; font-weight: 600;
}
.kb-more em { font-style: normal; transition: transform .3s; }
.kb-card:hover .kb-more em { transform: translateX(5px); }

/* 知识库/问答 按钮文案切换（按栏目编码） */
.b-ask { display: none; }
.sc-160 .b-know { display: none; }
.sc-160 .b-ask { display: inline; }

.kb-empty { padding: 60px 0; text-align: center; color: #6C818A; font-size: 14px; }

/* ---------- 分页 ---------- */
.kb-page { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 42px; }
.kb-page .page-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
  padding: 0 10px; border: 1px solid #D5E2EA; border-radius: 8px; background: #fff;
  color: #26404D; font-size: 13px; transition: all .3s;
}
.kb-page .page-num:hover { border-color: #0E6E7E; color: #0E6E7E; }
.kb-page .page-num-current { background: #0E6E7E; border-color: #0E6E7E; color: #fff; }

/* ---------- 文章详情 ---------- */
.ar-sec { padding: 34px 0 60px; background: #EFF4F8; }
.ar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 26px; align-items: start; max-width: 1240px; margin: 0 auto; }
.ar-layout > * { min-width: 0; }
.ar-wrap { max-width: none; margin: 0; background: #fff; border: 1px solid #D5E2EA; border-radius: 16px; padding: 42px 46px 52px; }
.ar-head { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid #E4EDF2; }
.ar-head h1 { font-size: 30px; line-height: 1.34; letter-spacing: -.8px; color: #0A2438; }
.ar-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: #6C818A; }
.ar-meta a { color: #0E6E7E; }

/* 正文全标签 */
.ar-body { font-size: 16px; line-height: 1.95; color: #33474F; word-break: break-word; }
.ar-body p { margin: 0 0 18px; }
.ar-body br { line-height: 0; }
.ar-body h2 { font-size: 21px; line-height: 1.5; margin: 34px 0 14px; padding-left: 12px; border-left: 4px solid #0E6E7E; color: #0A2438; letter-spacing: -.4px; }
.ar-body h3 { font-size: 18px; margin: 26px 0 10px; color: #123A55; }
.ar-body h4 { font-size: 16px; margin: 20px 0 8px; color: #123A55; }
.ar-body strong, .ar-body b { color: #0A2438; font-weight: 700; }
.ar-body a { color: #0E6E7E; border-bottom: 1px solid #BFE3EC; }
.ar-body a:hover { border-bottom-color: #0E6E7E; }
.ar-body ul, .ar-body ol { margin: 0 0 18px; padding-left: 22px; }
.ar-body ul { list-style: disc; }
.ar-body ol { list-style: decimal; }
.ar-body li { margin: 6px 0; }
.ar-body blockquote { margin: 20px 0; padding: 14px 18px; background: #F4FAFC; border-left: 3px solid #9FD8E5; color: #4A6068; }
.ar-body img { display: block; max-width: 100%; height: auto; margin: 22px auto; border-radius: 10px; border: 1px solid #E4EDF2; }
.ar-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.ar-body th, .ar-body td { border: 1px solid #D5E2EA; padding: 10px 12px; text-align: left; line-height: 1.7; }
.ar-body th { background: #F4FAFC; color: #0A2438; font-weight: 700; }
.ar-body tr:nth-child(even) td { background: #FAFDFE; }
.ar-body hr { border: 0; border-top: 1px solid #E4EDF2; margin: 26px 0; }
.ar-body pre, .ar-body code { background: #F4FAFC; border: 1px solid #E4EDF2; border-radius: 6px; padding: 2px 6px; font-size: 14px; }

/* 上下篇 */
.ar-nav { display: flex; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid #E4EDF2; flex-wrap: wrap; }
.ar-nav a { flex: 1 1 260px; padding: 14px 16px; border: 1px solid #D5E2EA; border-radius: 10px; font-size: 13.5px; color: #26404D; background: #FAFDFE; transition: all .3s; }
.ar-nav a:hover { border-color: #0E6E7E; color: #0E6E7E; }
.ar-nav small { display: block; color: #93A7AF; font-size: 12px; margin-bottom: 4px; }

/* 相关推荐 */
.ar-rel { max-width: 920px; margin: 34px auto 0; }
.ar-rel h3 { font-size: 17px; margin-bottom: 14px; color: #0A2438; }
.ar-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ar-rel-grid a { display: block; padding: 14px 16px; background: #fff; border: 1px solid #D5E2EA; border-radius: 10px; font-size: 13.5px; line-height: 1.7; color: #26404D; transition: all .3s; }
.ar-rel-grid a:hover { border-color: #9FD8E5; color: #0E6E7E; transform: translateY(-3px); }

@media (max-width: 1100px) {
  .kb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .kb-grid { grid-template-columns: 1fr; gap: 20px; }
  .ar-rel-grid { grid-template-columns: 1fr; }
  .kb-sec { padding: 34px 0 50px; }
  .ar-wrap { padding: 26px 20px 34px; }
  .ar-head h1 { font-size: 22px; }
  .ar-body { font-size: 15px; }
  .ar-body h2 { font-size: 18px; }
  .ar-body table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ================= 问答型文章页（按《问答库文章写作万能指令》重构） ================= */

/* 顶部阅读进度 */
.ar-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 999; background: transparent; pointer-events: none; }
.ar-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0E6E7E, #7FD3DF); transition: width .12s linear; }

/* 题头 */
.ar-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ar-sort { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid #CFE3EC; border-radius: 999px; background: #F4FAFC; color: #0E6E7E; font-size: 12.5px; }
.ar-sort:hover { background: #0E6E7E; color: #fff; border-color: #0E6E7E; }
.ar-badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; background: #EAF4F8; color: #123A55; font-size: 12.5px; }

/* 问题目录 */
.ar-toc { margin-top: 22px; padding: 16px 18px; background: #F6FBFD; border: 1px solid #E1EEF4; border-radius: 10px; }
.ar-toc[hidden] { display: none; }
.ar-toc b { display: block; font-size: 13px; color: #0E6E7E; margin-bottom: 8px; letter-spacing: .5px; }
.ar-toc ol { margin: 0; padding-left: 18px; list-style: decimal; }
.ar-toc li { margin: 4px 0; font-size: 13.5px; line-height: 1.7; }
.ar-toc a { color: #33474F; }
.ar-toc a:hover { color: #0E6E7E; }

/* 正文：问题即标题，Q 序号自动编号 */
.ar-body { counter-reset: q; }
.ar-body > p:first-of-type {
  padding: 16px 18px; background: #F4FAFC; border-left: 3px solid #0E6E7E;
  border-radius: 0 8px 8px 0; font-size: 16px; color: #1D3944;
}
.ar-body h2 {
  counter-increment: q; position: relative;
  padding: 0 0 0 46px; border-left: 0;
  margin: 38px 0 16px; font-size: 20px; line-height: 1.55;
}
.ar-body h2::before {
  content: "Q" counter(q); position: absolute; left: 0; top: 1px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0E6E7E, #123A55); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .5px; font-family: var(--sans, sans-serif);
}
.ar-body h3 { position: relative; padding-left: 16px; border-left: 3px solid #9FD8E5; font-size: 17px; margin: 26px 0 10px; }
.ar-body h4 { font-size: 15.5px; color: #123A55; }

/* 表格：字段清晰、可横向滚动 */
.ar-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; border: 1px solid #D5E2EA; }
.ar-body table caption { caption-side: top; font-size: 13px; color: #6C818A; padding-bottom: 8px; text-align: left; }

/* SEO 片段标签：description 显示为摘要卡，keywords 显示为关键词行 */
.ar-body description {
  display: block; margin: 30px 0 0; padding: 16px 18px;
  background: #F4FAFC; border: 1px dashed #CFE3EC; border-radius: 10px;
  font-size: 14px; line-height: 1.85; color: #4A6068;
}
.ar-body description::before { content: "内容摘要"; display: block; font-size: 12.5px; font-weight: 700; color: #0E6E7E; margin-bottom: 6px; }
.ar-body keywords {
  display: block; margin: 14px 0 0; font-size: 12.5px; line-height: 1.9; color: #6C818A;
}
.ar-body keywords::before { content: "关键词："; color: #123A55; font-weight: 600; }

/* 合规提示 */
.ar-notice { margin-top: 36px; padding: 18px 20px; background: #FAFDFE; border: 1px solid #E1EEF4; border-radius: 10px; }
.ar-notice b { display: block; font-size: 13px; color: #0E6E7E; margin-bottom: 6px; }
.ar-notice p { font-size: 13px; line-height: 1.85; color: #5A6F78; }

/* 侧栏 */
.ar-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.as-card { background: #fff; border: 1px solid #D5E2EA; border-radius: 14px; padding: 20px 20px 22px; }
.as-card h3 { font-size: 15px; color: #0A2438; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.as-card h3 i { color: #0E6E7E; }
.as-list a { display: block; padding: 10px 0; border-bottom: 1px dashed #E4EDF2; font-size: 13.5px; line-height: 1.65; color: #33474F; transition: color .3s; }
.as-list a:last-child { border-bottom: 0; }
.as-list a:hover { color: #0E6E7E; }
.as-list a span { display: block; }
.as-list a em { display: block; font-style: normal; font-size: 12px; color: #93A7AF; margin-top: 3px; }
.as-cta { background: linear-gradient(160deg, #0A2438, #123A55); border-color: #123A55; }
.as-cta h3 { color: #fff; }
.as-cta p { font-size: 13px; line-height: 1.8; color: #B9D4E0; margin-bottom: 14px; }
.as-cta .btn { width: 100%; margin-top: 8px; }
.as-cta .btn.solid { background: #7FD3DF; color: #08203A; border-color: #7FD3DF; }
.as-cta .btn.btn-ghost { color: #DCEBF2; border-color: #3E6C82; }
.as-svc a { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed #E4EDF2; font-size: 13.5px; color: #33474F; }
.as-svc a:last-child { border-bottom: 0; }
.as-svc a:hover { color: #0E6E7E; }
.as-svc a em { font-style: normal; color: #0E6E7E; }

/* 延伸阅读区 */
.ar-rel-sec { padding: 6px 0 70px; background: #EFF4F8; }
.ar-rel-sec .ar-rel { max-width: 1240px; margin: 0 auto; background: #fff; border: 1px solid #D5E2EA; border-radius: 14px; padding: 26px 30px 30px; }
.mt26 { margin-top: 26px !important; }

@media (max-width: 1100px) {
  .ar-layout { grid-template-columns: minmax(0, 1fr); }
  .ar-side { position: static; }
}
@media (max-width: 720px) {
  .ar-wrap { padding: 24px 18px 32px; }
  .ar-body h2 { font-size: 17.5px; padding-left: 40px; }
  .ar-body h2::before { width: 30px; height: 30px; font-size: 12px; }
  .ar-body description, .ar-body keywords { font-size: 13px; }
  .ar-rel-sec .ar-rel { padding: 18px 16px 22px; }
}

/* 问答卡片（无缩略图，平铺列表） */
.kb-qa-grid { margin-top: 4px; }
.kb-qa .kb-body { padding: 18px 20px 16px; gap: 9px; }
.kb-qa h3 { font-size: 15px; }
.kb-qa .kb-desc { min-height: 0; -webkit-line-clamp: 3; font-size: 13px; }
.kb-qa .kb-card:hover { transform: translateY(-4px); }

/* 首页板块底部按钮 */
.smore { margin-top: 28px; text-align: center; }
