/* ==========================================================================
   LinkCube (linkcube.casa) - 知识专栏与文章阅读样式表
   Pure Native CSS · 极致阅读体验与 SEO 优化排版
   ========================================================================== */

.article-page {
  padding: 50px 0 90px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

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

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

.breadcrumb-separator {
  color: var(--text-dim);
}

.breadcrumb-current {
  color: var(--emerald-primary);
  font-weight: 500;
}

/* 文章头部 */
.article-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.article-header .article-category {
  margin-bottom: 16px;
}

.article-main-title {
  font-size: clamp(2rem, 3.8vw, 2.7rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 文章双栏布局 */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 46px;
  align-items: start;
}

/* 正文样式 */
.article-body {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.85;
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin: 44px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  position: relative;
}

.article-body h2::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--brand-gradient);
}

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

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

.article-body ul, .article-body ol {
  margin: 0 0 24px 24px;
}

.article-body li {
  margin-bottom: 10px;
}

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

.article-body a {
  color: var(--cyan-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: var(--transition);
}

.article-body a:hover {
  color: var(--emerald-primary);
}

/* 警示与高亮框 */
.callout-box {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid var(--emerald-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 30px 0;
}

.callout-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 !important;
}

/* 表格样式 */
.table-wrapper {
  overflow-x: auto;
  margin: 30px 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background: var(--bg-card);
}

.article-table th {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

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

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

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

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}

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

/* 目录 (TOC) */
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.5;
  transition: var(--transition);
  display: block;
}

.toc-link:hover {
  color: var(--emerald-primary);
  transform: translateX(4px);
}

/* 侧边 CTA 推荐卡片 */
.sidebar-cta-card {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%), var(--bg-card);
  border: 1px solid var(--emerald-primary);
  text-align: center;
}

.sidebar-cta-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.sidebar-cta-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* 正文底部转化横幅 */
.article-end-cta {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 182, 212, 0.18) 100%), var(--bg-card);
  border: 1px solid var(--emerald-primary);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  text-align: center;
  margin: 50px 0 40px;
}

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

.article-end-cta p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 650px;
  margin: 0 auto 24px;
}

/* 相关文章卡片 */
.related-articles-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.related-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
}

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

@media (max-width: 992px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}
