/* ==========================================================================
   Riolu 精灵学院 (riolu443.sbs) 知识库文章内页专享样式
   ========================================================================== */

.article-header {
  padding-top: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}

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

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

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

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

.article-main-title {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

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

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

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  margin-bottom: 70px;
}

/* 正文核心排版 */
.article-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #e2e8f0;
}

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

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 44px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

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

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

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

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

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

.article-callout {
  background: rgba(15, 23, 42, 0.9);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.article-callout-warning {
  border-left-color: var(--accent-gold);
  background: rgba(30, 24, 15, 0.8);
}

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

.article-body blockquote {
  border-left: 4px solid var(--accent-blue);
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(37, 99, 235, 0.08);
  color: var(--text-muted);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 30px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

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

.article-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 14px 18px;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.article-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.article-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

/* 文章内部内链高亮 */
.article-inline-link {
  color: var(--accent-cyan);
  font-weight: 600;
  border-bottom: 1px dashed var(--accent-cyan);
  transition: all var(--transition-fast);
}

.article-inline-link:hover {
  color: #ffffff;
  border-bottom-style: solid;
}

/* 文章内部转化卡片 Banner */
.article-cta-box {
  background: linear-gradient(135deg, rgba(14, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.4) 100%);
  border: 1.5px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin: 44px 0;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(56, 189, 248, 0.15);
}

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

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

/* 侧边栏布局 */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-article-list {
  list-style: none;
}

.sidebar-article-item {
  margin-bottom: 14px;
}

.sidebar-article-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: block;
  transition: color var(--transition-fast);
}

.sidebar-article-link:hover {
  color: var(--accent-cyan);
}

/* 相关阅读区域 */
.related-posts-section {
  padding-top: 50px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 50px;
}

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

@media (max-width: 991px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
