/* ============================================
   马英斌个人品牌网站 — 文章详情页深度美化系统 v5.2
   核心：专业阅读体验 · 信任传递 · 品牌一致性
   更新：2026-06-07 · 参考文献区半透明玻璃卡片化
   ============================================ */

/* ---------- 文章页专用变量 ---------- */
.article-page {
  --article-font-size: 17px;
  --article-line-height: 1.85;
  --article-color: #2d3748;
  --article-heading-color: #1a202c;
  --article-muted: #718096;
  --article-border: #e2e8f0;
  --article-bg-soft: #f7fafc;
  --article-gold: #c8a45c;
  --article-gold-light: #e8d4a0;
  --article-blue: #0a2463;
  --article-blue-mid: #0d47a1;
}

/* ---------- 阅读进度条 ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--article-gold), var(--article-gold-light));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ---------- 文章头部区域（配合统一Hero系统） ---------- */
.article-hero .container {
  position: relative;
  z-index: 1;
}

.article-hero .article-category-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(200,164,92,0.15);
  border: 1px solid rgba(200,164,92,0.25);
  border-radius: 100px;
  color: var(--article-gold-light);
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.article-hero h1 {
  font-size: 1.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  margin: 0 0 16px;
  letter-spacing: 0.3px;
}

.article-hero .article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}
.article-hero .article-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.article-hero .article-hero-meta i {
  color: var(--article-gold);
  font-size: 13px;
}

/* ---------- 面包屑导航 ---------- */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--article-muted);
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.article-breadcrumb a {
  color: var(--article-blue-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumb a:hover {
  color: var(--article-gold);
}
.article-breadcrumb .sep {
  color: #cbd5e0;
}
.article-breadcrumb .current {
  color: var(--article-muted);
}

/* ---------- 文章主体容器 ---------- */
.article-main {
  background: linear-gradient(135deg, #eef2f7 0%, #e8ecf5 30%, #f0ece6 70%, #f5f3ef 100%);
  padding-top: 36px;
  padding-bottom: 60px;
}

/* 覆盖 Bootstrap .container 宽度限制，让文章区域真正撑满 */
.article-main > .container {
  width: 90%;
  max-width: 1900px;
  padding-left: 20px;
  padding-right: 20px;
}

.article-body-wrap {
  width: 100%;
  margin: 0;
  padding: 40px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 40px rgba(10, 36, 99, 0.07), 0 2px 12px rgba(10, 36, 99, 0.04);
}

/* ---------- 文章内容排版 ---------- */
.article-content {
  font-size: var(--article-font-size);
  line-height: var(--article-line-height);
  color: var(--article-color);
  text-align: justify;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 首字下沉效果（仅第一段） */
.article-content > p:first-of-type::first-letter {
  font-size: 3em;
  float: left;
  line-height: 1;
  margin-right: 8px;
  margin-top: 4px;
  color: var(--article-blue);
  font-weight: 700;
}

.article-content p {
  margin: 0 0 1.4em;
  text-indent: 0;
}

/* 标题层级 */
.article-content h2 {
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--article-heading-color);
  margin: 2.2em 0 0.7em;
  padding: 0 0 10px 16px;
  border-left: 4px solid var(--article-gold);
  line-height: 1.35;
  position: relative;
}
.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--article-gold), transparent);
  border-radius: 1px;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--article-heading-color);
  margin: 1.8em 0 0.6em;
  padding-left: 12px;
  border-left: 3px solid var(--article-blue-mid);
  line-height: 1.4;
}

.article-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--article-heading-color);
  margin: 1.5em 0 0.5em;
}

.article-content h5, .article-content h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--article-heading-color);
  margin: 1.2em 0 0.5em;
}

/* 强调文字 */
.article-content strong, .article-content b {
  color: var(--article-heading-color);
  font-weight: 600;
}

/* 链接 */
.article-content a {
  color: var(--article-blue-mid);
  text-decoration: none;
  border-bottom: 1px solid rgba(13,71,161,0.3);
  transition: all 0.2s;
}
.article-content a:hover {
  color: var(--article-gold);
  border-bottom-color: var(--article-gold);
}

/* 图片 */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
  box-shadow: 0 4px 20px rgba(10,36,99,0.08);
  display: block;
}

/* 列表 */
.article-content ul, .article-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.8em;
}
.article-content ul li, .article-content ol li {
  margin-bottom: 0.5em;
  line-height: 1.75;
}
.article-content ul li::marker {
  color: var(--article-gold);
}

/* 引用块 */
.article-content blockquote {
  margin: 1.8em 0;
  padding: 20px 24px 20px 24px;
  background: linear-gradient(135deg, #fffdf5, #fff8e8);
  border-left: 4px solid var(--article-gold);
  border-radius: 0 10px 10px 0;
  color: var(--article-color);
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.8;
  position: relative;
}
.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 2.5rem;
  color: var(--article-gold);
  opacity: 0.3;
  line-height: 1;
  font-family: Georgia, serif;
}
.article-content blockquote p {
  margin: 0;
  padding-left: 20px;
}
.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 分隔线 */
.article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--article-border), transparent);
  margin: 2.5em 0;
}

/* ---------- 专业提示框组件 ---------- */
.article-content .tip-box {
  margin: 1.8em 0;
  padding: 18px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.75;
  position: relative;
}
.article-content .tip-box::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 8px;
}

/* 金色要点提示 */
.article-content .tip-key {
  background: linear-gradient(135deg, #fffdf5, #fff8e0);
  border: 1px solid rgba(212,160,23,0.2);
  border-left: 4px solid var(--article-gold);
}
.article-content .tip-key::before {
  content: '\f0a4';
  color: var(--article-gold);
}

/* 蓝色信息提示 */
.article-content .tip-info {
  background: #f0f7ff;
  border: 1px solid rgba(13,71,161,0.12);
  border-left: 4px solid var(--article-blue-mid);
}
.article-content .tip-info::before {
  content: '\f05a';
  color: var(--article-blue-mid);
}

/* 红色警示提示 */
.article-content .tip-warning {
  background: #fff5f5;
  border: 1px solid rgba(220,53,69,0.15);
  border-left: 4px solid #dc3545;
}
.article-content .tip-warning::before {
  content: '\f071';
  color: #dc3545;
}

/* 绿色合规提示 */
.article-content .tip-compliance {
  background: #f0fff4;
  border: 1px solid rgba(46,125,50,0.15);
  border-left: 4px solid #2e7d32;
}
.article-content .tip-compliance::before {
  content: '\f3ed';
  color: #2e7d32;
}

/* ---------- 专业数据表格 ---------- */
.article-content table {
  width: 100% !important;
  margin: 1.8em 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06) !important;
  font-size: 14.5px !important;
  background: #fff !important;
}
.article-content table thead,
.article-content table thead tr {
  background: linear-gradient(135deg, var(--article-blue), var(--article-blue-mid)) !important;
  color: #fff !important;
}
.article-content table th {
  padding: 13px 16px !important;
  font-weight: 600 !important;
  text-align: left !important;
  font-size: 14px !important;
  color: #fff !important;
  background: transparent !important;
  border: none !important;
}
.article-content table td {
  padding: 11px 16px !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  color: var(--article-color) !important;
  background: #fff !important;
}
.article-content table tbody tr:nth-child(even) td {
  background: #faf9f7 !important;
}
.article-content table tbody tr:hover td {
  background: #fff8e0 !important;
}
.article-content table tbody tr:last-child td {
  border-bottom: none !important;
}
/* 注意：不要给 tbody tr:first-child td 加表头样式！
   表格有 thead 时 tbody 第一行是数据，不是表头。
   编辑器输出的表格都有 thead，此降级规则会导致数据行错误显示为深蓝背景。 */

/* ---------- 来源引用区（半透明玻璃卡片） ---------- */
.article-source-section {
  margin-top: 48px;
  padding: 22px 26px;
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(180,190,210,0.25);
  box-shadow: 0 2px 16px rgba(10,36,99,0.04);
}
.article-source-section .source-title {
  font-size: 13px;
  font-weight: 600;
  color: #8a94a6;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}
.article-source-section .source-title i {
  color: var(--article-gold);
}
.article-source-section .source-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-source-section .source-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(180,190,210,0.18);
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.55;
}
.article-source-section .source-list li:last-child {
  border-bottom: none;
}
.article-source-section .source-list li a {
  color: var(--article-blue-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.article-source-section .source-list li a:hover {
  color: var(--article-blue);
  text-decoration: underline;
}

/* ---------- 免责声明 ---------- */
.article-disclaimer {
  margin-top: 30px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fffdf5, #fff8e8);
  border-radius: 10px;
  border: 1px solid rgba(212,160,23,0.15);
  font-size: 13px;
  color: var(--article-muted);
  line-height: 1.8;
  text-align: center;
}
.article-disclaimer i {
  color: var(--article-gold);
  margin-right: 6px;
}

/* ---------- 上下篇导航 ---------- */
.article-nav {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}
.article-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--article-border);
  text-decoration: none;
  transition: all 0.3s;
}
.article-nav a:hover {
  border-color: var(--article-gold);
  box-shadow: 0 4px 20px rgba(10,36,99,0.06);
  transform: translateY(-2px);
}
.article-nav .nav-label {
  font-size: 12px;
  color: var(--article-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-nav .nav-label i {
  font-size: 11px;
}
.article-nav .nav-title {
  font-size: 15px;
  color: var(--article-heading-color);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-nav .nav-next {
  text-align: right;
}
.article-nav .nav-next .nav-label {
  justify-content: flex-end;
}

/* ---------- CTA 资质卡片 ---------- */
.article-cta-card {
  margin-top: 40px;
  background: linear-gradient(135deg, #fff 0%, #faf9f7 100%);
  border: 1px solid rgba(200,164,92,0.2);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.article-cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,164,92,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.article-cta-card .cta-inner {
  position: relative;
  z-index: 1;
}
.article-cta-card .cta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.article-cta-card .cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(200,164,92,0.1);
  border: 1px solid rgba(200,164,92,0.2);
  border-radius: 100px;
  font-size: 12px;
  color: var(--article-gold);
}
.article-cta-card .cta-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--article-heading-color);
  margin-bottom: 8px;
}
.article-cta-card .cta-desc {
  font-size: 14px;
  color: var(--article-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.article-cta-card .cta-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.article-cta-card .cta-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--article-color);
}
.article-cta-card .cta-features li i {
  color: var(--article-gold);
  font-size: 13px;
}
.article-cta-card .cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.article-cta-card .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}
.article-cta-card .cta-btn-primary {
  background: linear-gradient(135deg, var(--article-blue), var(--article-blue-mid));
  color: #fff;
}
.article-cta-card .cta-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(10,36,99,0.25);
  transform: translateY(-1px);
  color: #fff;
}
.article-cta-card .cta-btn-outline {
  background: transparent;
  color: var(--article-blue-mid);
  border: 1px solid var(--article-border);
}
.article-cta-card .cta-btn-outline:hover {
  border-color: var(--article-gold);
  color: var(--article-gold);
}
.article-cta-card .cta-disclaimer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--article-border);
  font-size: 12px;
  color: var(--article-muted);
  line-height: 1.6;
  text-align: center;
}

/* ---------- 正文引用上角标 ---------- */
.article-content sup.article-ref {
  font-size: 0.72em;
  line-height: 0;
  position: relative;
  top: -0.5em;
  color: var(--article-blue-mid);
  font-weight: 600;
  margin: 0 1px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}
.article-content sup.article-ref:hover {
  color: var(--article-gold);
}

/* ---------- 尾注悬浮提示 ---------- */
.article-ref-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: 360px;
  padding: 10px 14px;
  background: rgba(10, 36, 99, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.article-ref-tooltip.show {
  opacity: 1;
}

/* ---------- 打印优化 ---------- */
@media print {
  .reading-progress, .article-cta-card, .article-nav {
    display: none !important;
  }
  .article-hero {
    background: #fff !important;
    padding: 20px 0 !important;
  }
  .article-hero h1 {
    color: #000 !important;
  }
  .article-content {
    font-size: 12pt;
    line-height: 1.6;
  }
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 767px) {
  .article-hero h1 {
    font-size: 1.4rem;
    line-height: 1.35;
  }
  .article-hero .article-hero-meta {
    gap: 12px;
    font-size: 13px;
  }
  .article-main > .container {
    width: 99%;
    padding-left: 12px;
    padding-right: 12px;
  }
  .article-body-wrap {
    width: 100%;
    padding: 20px 16px;
    border-radius: 14px;
  }
  .article-content {
    font-size: 16px;
    line-height: 1.8;
  }
  .article-content > p:first-of-type::first-letter {
    font-size: 2.5em;
  }
  .article-content h2 {
    font-size: 1.25rem;
    margin: 1.8em 0 0.6em;
  }
  .article-content h3 {
    font-size: 1.1rem;
  }
  .article-content blockquote {
    padding: 16px 18px;
    font-size: 0.9rem;
  }
  .article-content table {
    font-size: 13px;
  }
  .article-content table th,
  .article-content table td {
    padding: 9px 12px !important;
  }
  .article-nav {
    flex-direction: column;
    gap: 10px;
  }
  .article-nav .nav-next {
    text-align: left;
  }
  .article-nav .nav-next .nav-label {
    justify-content: flex-start;
  }
  .article-cta-card {
    padding: 24px 20px;
  }
  .article-cta-card .cta-features {
    grid-template-columns: 1fr;
  }
  .article-cta-card .cta-actions {
    flex-direction: column;
  }
  .article-cta-card .cta-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 479px) {
  .article-hero h1 {
    font-size: 1.25rem;
  }
  .article-content {
    font-size: 15.5px;
  }
  .article-content h2 {
    font-size: 1.15rem;
    padding-left: 12px;
  }
  .article-content h3 {
    font-size: 1rem;
    padding-left: 10px;
  }
}
