/* ==========================================================================
   SparkCloud 花火云网 - 文章与知识库专栏独立样式表 (css/article.css)
   深度长文排版优化 | 响应式对比表格 | 代码块 | 内部链接高亮
   ========================================================================== */

.article-page-wrap {
  padding-top: 48px;
  padding-bottom: 80px;
}

/* 面包屑导航 */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.breadcrumb-nav a {
  color: var(--text-muted);
}

.breadcrumb-nav a:hover {
  color: var(--spark-primary);
}

.breadcrumb-separator {
  opacity: 0.4;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* 文章头部 */
.article-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 32px;
}

.article-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.article-category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid var(--border-spark);
  color: var(--spark-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-date, .article-readtime, .article-author {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.article-main-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.article-lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  background: rgba(15, 23, 42, 0.6);
  border-left: 4px solid var(--spark-primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* 文章布局：主文 + 侧边栏 */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

/* 文章正文排版 */
.article-content {
  color: #d1d5db;
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-content h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-content h2::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 24px;
  background: linear-gradient(180deg, var(--spark-primary), var(--spark-secondary));
  border-radius: 4px;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 32px;
  margin-bottom: 14px;
}

.article-content p {
  margin-bottom: 22px;
}

.article-content ul, .article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.article-content strong {
  color: #ffffff;
  font-weight: 700;
}

.article-content a {
  color: var(--spark-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.article-content a:hover {
  color: var(--spark-primary);
}

/* 提示警示框 (Callout Box) */
.article-callout {
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-spark);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 28px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.article-callout.info {
  border-color: rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.05);
}

.article-callout-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.article-callout-body {
  font-size: 0.96rem;
  line-height: 1.7;
}

.article-callout-body strong {
  color: var(--spark-secondary);
  display: block;
  margin-bottom: 6px;
}

/* 对比表格 (Responsive Comparison Table) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.article-table th {
  background: rgba(22, 34, 62, 0.9);
  color: #ffffff;
  padding: 16px 20px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.article-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.article-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.article-table .highlight-col {
  color: var(--spark-secondary);
  font-weight: 700;
}

/* 文章内部推广横幅 (Article CTA Banner) */
.article-cta-banner {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid var(--border-spark);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin: 48px 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.article-cta-banner h3 {
  font-size: 1.6rem;
  color: #ffffff;
  margin-bottom: 12px;
}

.article-cta-banner p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 24px;
}

/* 侧边栏 (Sidebar) */
.article-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-toc-list {
  list-style: none;
  padding: 0;
}

.sidebar-toc-list li {
  margin-bottom: 10px;
}

.sidebar-toc-list a {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: block;
  transition: color var(--transition-fast);
}

.sidebar-toc-list a:hover {
  color: var(--spark-primary);
  transform: translateX(4px);
}

.sidebar-promo-box {
  background: linear-gradient(180deg, rgba(30, 41, 68, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-spark);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: center;
}

.sidebar-promo-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--spark-primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 12px;
}

.sidebar-promo-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin: 10px 0 14px;
}

.sidebar-promo-price span {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: normal;
}

/* 底部相关文章推荐 (Related Articles) */
.related-articles-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
}

.related-articles-section h3 {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 响应式断点 */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .article-main-title {
    font-size: 1.85rem;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .article-header-meta {
    gap: 10px;
  }
  .article-cta-banner {
    padding: 24px 18px;
  }
}
