/* ==========================================================================
   大哥云官网 - 知识库与文章教程专用样式
   ========================================================================== */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #2563eb;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-sub: #64748b;
  --border-light: #e2e8f0;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.8;
  font-size: 16px;
}

/* 顶部文章专有极简导航 */
.article-header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  height: 68px;
  display: flex;
  align-items: center;
}

.article-nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-home-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.back-home-link:hover {
  opacity: 0.8;
}

.nav-cta-btn {
  background: var(--accent-gradient);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
}

/* 主容器布局 */
.article-layout {
  max-width: 1200px;
  margin: 35px auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

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

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

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

.breadcrumb-sep {
  color: #cbd5e1;
}

/* 文章主体容器 */
.article-main-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 45px 50px;
  box-shadow: var(--shadow-sm);
}

.article-hero-meta {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 25px;
}

.article-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.article-main-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

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

/* 文章正文排版 */
.article-body {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
  position: relative;
}

.article-body h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 26px 0 12px;
}

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

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

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

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

/* 提示框 */
.callout {
  background: #f0f9ff;
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 28px 0;
  font-size: 0.98rem;
}

.callout-title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-warn {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.callout-warn .callout-title {
  color: #d97706;
}

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

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

.article-table th {
  background: #f8fafc;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  font-weight: 700;
  text-align: left;
}

.article-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

/* 文章内部 CTA 模块 */
.article-cta-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  margin: 45px 0 25px;
}

.article-cta-box h3 {
  color: #0369a1;
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.article-cta-box p {
  color: #475569;
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto 20px;
}

.article-cta-btn {
  display: inline-block;
  background: var(--accent-gradient);
  color: #fff;
  padding: 12px 30px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}

.article-cta-btn:hover {
  transform: translateY(-2px);
}

/* 上下篇导航 */
.article-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 45px;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
}

.prev-next-card {
  display: block;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.prev-next-card:hover {
  border-color: var(--primary);
  background: #ffffff;
  transform: translateY(-2px);
}

.prev-next-label {
  font-size: 0.8rem;
  color: var(--text-sub);
  display: block;
  margin-bottom: 4px;
}

.prev-next-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

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

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

.sidebar-link-list li {
  margin-bottom: 12px;
}

.sidebar-link-list a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: block;
  transition: color 0.2s ease;
}

.sidebar-link-list a:hover {
  color: var(--primary);
}

.sidebar-badge-promo {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.sidebar-badge-promo h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.sidebar-badge-promo p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 16px;
}

.sidebar-promo-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

/* 文章页脚 */
.article-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 40px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-sub);
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-main-content {
    padding: 28px 20px;
  }
  .article-main-title {
    font-size: 1.7rem;
  }
  .article-sidebar {
    position: static;
  }
  .article-prev-next {
    grid-template-columns: 1fr;
  }
}
