/**
 * 尔湾云 (erwanyun.shop) - 官方专栏文章排版样式表
 * 统一 3D 软陶拟态风格与 SEO 语义排版规范
 */

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

.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--clay-text-muted);
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--clay-primary);
  font-weight: 600;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.article-main-content {
  padding: 44px 48px;
  background: #ffffff;
}

.article-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}

.article-category-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--clay-radius-full);
  background: #eff6ff;
  color: var(--clay-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid #dbeafe;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

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

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

/* 正文排版 */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  scroll-margin-top: 100px;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 28px;
  margin-bottom: 12px;
  scroll-margin-top: 100px;
}

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

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

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

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

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

.article-callout {
  margin: 28px 0;
  padding: 20px 24px;
  background: #f8fafc;
  border-left: 4px solid var(--clay-primary);
  border-radius: 0 var(--clay-radius-sm) var(--clay-radius-sm) 0;
  box-shadow: var(--clay-shadow-sm);
  font-size: 0.9375rem;
  color: #1e293b;
}

.article-callout strong {
  color: var(--clay-primary-dark);
}

.article-table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
}

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

.article-table th {
  background: #f1f5f9;
  padding: 12px 16px;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.article-table td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.article-table tr:nth-child(even) {
  background: #fafafa;
}

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

.toc-card {
  padding: 24px;
  background: #ffffff;
}

.toc-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-item a {
  font-size: 0.875rem;
  color: var(--clay-text-muted);
  line-height: 1.4;
  transition: color 0.2s ease;
  display: block;
}

.toc-item a:hover {
  color: var(--clay-primary);
}

.sidebar-cta-card {
  padding: 24px;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  text-align: center;
}

.sidebar-cta-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.sidebar-cta-desc {
  font-size: 0.8125rem;
  color: #3b82f6;
  margin-bottom: 16px;
}

/* 相关文章推荐 */
.related-articles-section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid #e2e8f0;
}

.related-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
}

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

.related-card {
  padding: 20px;
  background: #ffffff;
}

.related-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.4;
}

.related-card-title a:hover {
  color: var(--clay-primary);
}

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

@media (max-width: 768px) {
  .article-main-content {
    padding: 28px 20px;
  }
  .article-title {
    font-size: 1.625rem;
  }
}
