﻿/* ==========================================================================
   OIXCloud 知识库与文章详情样式表 - 纯原生 CSS (Modern Vanilla CSS)
   深度阅读优化 · 面包屑 · 内部跳转卡片 · 目录导航
   ========================================================================== */

.article-page {
  padding: 40px 0 80px;
}

/* 面包屑导航 */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.breadcrumbs a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--accent-cyan);
}

.breadcrumbs-sep {
  opacity: 0.5;
}

.breadcrumbs .current {
  color: var(--text-main);
  font-weight: 500;
}

/* 文章容器两栏布局 */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.article-main {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 42px 48px;
  box-shadow: var(--shadow-card);
}

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

.article-post-title {
  font-size: clamp(1.8rem, 3.2vw, 2.3rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  color: #ffffff;
}

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

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

.article-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 240, 186, 0.1);
  border: 1px solid rgba(16, 240, 186, 0.3);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.78rem;
}

/* 文章正文富文本排版 */
.article-content {
  font-size: 1.04rem;
  line-height: 1.82;
  color: #cbd5e1;
}

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

.article-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  margin: 42px 0 18px;
  padding-left: 14px;
  border-left: 4px solid var(--accent-cyan);
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 28px 0 14px;
}

.article-content ul, .article-content ol {
  margin: 16px 0 24px 20px;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 10px;
  padding-left: 6px;
}

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

.article-content blockquote {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  margin: 26px 0;
  color: #cbd5e1;
  font-style: normal;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.callout-box {
  background: rgba(16, 240, 186, 0.06);
  border: 1px solid rgba(16, 240, 186, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  font-size: 1rem;
}

/* 表格排版 */
.content-table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
}

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

.content-table th, .content-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.content-table th {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-weight: 600;
}

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

/* 文章内部内链高亮 */
.article-inline-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.article-inline-link:hover {
  color: #ffffff;
}

/* 文章中 CTA 引导模块 */
.article-cta-box {
  background: radial-gradient(circle at 50% 50%, rgba(16, 240, 186, 0.12) 0%, rgba(15, 23, 42, 0.95) 80%);
  border: 1px solid rgba(16, 240, 186, 0.35);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin: 36px 0;
  text-align: center;
}

.article-cta-box h3 {
  font-size: 1.3rem;
  margin: 0 0 10px;
  color: #ffffff;
}

.article-cta-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

/* 文章底部内部跳转与相关推荐 */
.article-footer-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.related-articles-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.related-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all var(--transition-fast);
  display: block;
}

.related-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.related-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.4;
}

.related-card-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

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

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.toc-item a {
  color: var(--text-muted);
  display: block;
  transition: color var(--transition-fast);
}

.toc-item a:hover {
  color: var(--accent-cyan);
}

.sidebar-cta-card {
  background: linear-gradient(135deg, rgba(16, 240, 186, 0.12), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(16, 240, 186, 0.3);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
}

.sidebar-cta-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.sidebar-cta-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* 移动端适配 */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-main {
    padding: 28px 22px;
  }
  .article-sidebar {
    display: none;
  }
  .related-articles-grid {
    grid-template-columns: 1fr;
  }
}

