/* ==========================================================================
   知识库与文章详情页专属样式 (Article CSS)
   ========================================================================== */

.article-header {
  padding-top: 130px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.25) 0%, transparent 70%);
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover {
  color: var(--primary-cyan);
}
.breadcrumbs .separator {
  color: rgba(255, 255, 255, 0.2);
}

.article-headline {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--text-main);
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary-cyan);
}

/* Article Layout: Content + Sidebar TOC */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
  padding: 50px 0 90px 0;
  align-items: start;
}

.article-main {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 45px;
  color: var(--text-sub);
  line-height: 1.85;
  font-size: 1.05rem;
  box-shadow: var(--shadow-card);
}

.article-main h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 40px 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-main h2::before {
  content: '';
  width: 4px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary-cyan), var(--primary-blue));
  border-radius: 2px;
  display: inline-block;
}
.article-main h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 30px 0 14px 0;
}
.article-main p {
  margin-bottom: 20px;
  text-align: justify;
}
.article-main ul, .article-main ol {
  margin: 18px 0 24px 28px;
}
.article-main li {
  margin-bottom: 10px;
}
.article-main strong {
  color: #fff;
  font-weight: 700;
}
.article-main blockquote {
  background: rgba(0, 242, 254, 0.05);
  border-left: 4px solid var(--primary-cyan);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-sub);
  font-style: normal;
}
.article-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.95rem;
}
.article-main th, .article-main td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
}
.article-main th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-weight: 700;
}
.article-main code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-cyan);
}

/* In-article conversion banner */
.article-cta-box {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 28px;
  margin: 36px 0;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.1);
}
.article-cta-box h4 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.article-cta-box p {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-bottom: 20px;
  text-align: center;
}
.btn-article-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 1rem;
  color: #070a12;
  background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
  transition: all 0.2s;
}
.btn-article-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.55);
}

/* Sidebar Styles */
.article-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-widget h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-widget h4 svg {
  width: 18px;
  height: 18px;
  color: var(--primary-cyan);
}
.toc-list {
  list-style: none;
  font-size: 0.88rem;
}
.toc-list li {
  margin-bottom: 10px;
}
.toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  transition: color 0.2s, padding-left 0.2s;
  line-height: 1.4;
}
.toc-list a:hover {
  color: var(--primary-cyan);
  padding-left: 4px;
}

.related-articles-list {
  list-style: none;
  font-size: 0.88rem;
}
.related-articles-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.related-articles-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.related-articles-list a {
  color: var(--text-sub);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.related-articles-list a:hover {
  color: var(--primary-cyan);
}

@media (max-width: 992px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
  .article-headline {
    font-size: 2rem;
  }
  .article-main {
    padding: 24px;
  }
}
