/* ════════════════════════════════════════
   电商将军令 - 文章页专用样式
   标题区 + 内容区一体化设计
   ════════════════════════════════════════ */

/* ===== 文章容器 ===== */
.article-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 40px;
  background: #fcfaf7;                /* 暖白纸底色 —— 与正文象牙纸呼应 */
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
  overflow: hidden;                   /* 圆角裁剪 */
}

/* ===== 标题区 (卡片头部) ===== */
.article-header {
  padding: 28px 40px 20px;            /* 左右留白使标题区有呼吸感 */
  border-bottom: none;                /* 去掉底部分割线 */
  background: linear-gradient(180deg, #fdfcfa 0%, #fcfaf7 100%);
  position: relative;
}

/* 面包屑 */
.article-breadcrumb {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.article-breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.15s;
}
.article-breadcrumb a:hover { color: var(--gold); }
.article-breadcrumb a + a::before {   /* 分隔符美化 */
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  background: var(--border);
  border-radius: 50%;
  margin: 0 10px;
  vertical-align: middle;
}

/* 文章标题 */
.article-title {
  font-size: 28px;
  line-height: 1.4;
  color: var(--navy);
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}
.article-title-icon {
  font-size: 22px;
  margin-right: 4px;
  opacity: 0.6;
}

/* 标题下方金线装饰 */
.article-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 60px, var(--border) 60px, var(--border) 100%);
}

/* ===== 元信息条 ===== */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-light);
  padding: 12px 0 0;
  margin: 0;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 2px 8px;
  background: rgba(0,0,0,0.02);
  border-radius: 4px;
}
.article-meta .article-tags {
  white-space: normal;
  background: none;
  padding: 0;
}

/* ===== 正文区 ===== */
.article-content {
  padding: 28px 40px 0;               /* 与标题区左右对齐 */
  margin-top: 0;
}

/* 首段 —— 微放大，无首字下沉（更干净） */
.article-content > .article-body > p:first-child {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-dark);
}
.article-content > .article-body > p:first-child::first-letter {
  font-size: 2.8em;
  float: left;
  line-height: 0.9;
  margin-right: 6px;
  margin-top: 4px;
  color: var(--gold);
  font-weight: 700;
  font-family: 'Noto Serif SC', serif;
}

/* ===== 导航 ===== */
.article-nav {
  display: flex;
  justify-content: space-between;
  margin: 36px 40px 0;               /* 与正文左右对齐 */
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
}
.article-nav-prev, .article-nav-next {
  max-width: 45%;
}
.article-nav a {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text) !important;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.article-nav a:hover {
  border-color: var(--gold);
  color: var(--gold) !important;
  background: #faf6ee;
}

/* ===== 返回顶部（页脚内） ===== */
.article-footer {
  text-align: right;
  padding: 12px 40px 20px;
}
.article-footer a {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: all 0.15s;
}
.article-footer a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== 反向引用面板 ===== */
.backlinks-panel {
  margin: 24px 40px 0;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.backlinks-title {
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 10px;
  font-weight: 600;
}
.backlinks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.backlink-item {
  padding: 8px 12px;
  background: var(--bg-page);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
}
.backlink-link {
  color: var(--gold) !important;
  font-weight: 500;
  text-decoration: none;
}
.backlink-link:hover { text-decoration: underline; }
.backlink-context {
  display: block;
  color: var(--text-light);
  font-size: 12px;
  margin: 2px 0;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.backlink-view {
  font-size: 11px;
  color: var(--text-light) !important;
  text-decoration: none;
}
.backlink-view:hover { color: var(--gold) !important; }

/* ===== 技能CTA卡片 ===== */
.skill-cta {
  margin: 24px 40px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--bg-card), #faf6ee);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.skill-cta:hover { border-color: var(--gold); }
.skill-cta-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.skill-cta-icon { font-size: 28px; }
.skill-cta-content div { flex: 1; }
.skill-cta-content h4 { font-size: 14px; color: var(--navy); margin: 0; }
.skill-cta-content p { font-size: 12px; color: var(--text-light); margin: 2px 0 0; }
.skill-cta-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

/* ===== 元数据卡片（标题下方，替代 article-meta） ===== */
.fm-card {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 40px 14px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
}
.fm-card span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: #f8f6f2;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .fm-card { padding-left: 20px; padding-right: 20px; }
}

/* ===== 知识体系板块锚点滚动 ===== */
.kb-block {
  scroll-margin-top: 20px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .article-header { padding: 20px 20px 16px; }
  .article-content { padding: 20px 20px 0; }
  .article-nav { margin: 28px 20px 0; }
  .article-footer { padding: 8px 20px 16px; }
  .backlinks-panel, .skill-cta { margin-left: 20px; margin-right: 20px; }
  .article-header::after { left: 20px; right: 20px; }
  .article-page { border-radius: 0; }
  .article-title { font-size: 24px; }
}
