/* ==========================================================================
   红杏云知识库与实战教程中心 - 敏捷白板与技术文档样式
   ========================================================================== */

.knowledge-header-hero {
  max-width: 1320px;
  margin: 40px auto 30px;
  padding: 40px 30px;
  background: #ffffff;
  border: 3px solid #2a2e3d;
  box-shadow: 8px 8px 0px #2a2e3d;
  border-radius: 16px;
  position: relative;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: #5e687e;
  margin-bottom: 20px;
  font-weight: 600;
}

.breadcrumb-nav a {
  color: #2e86de;
  text-decoration: underline;
}

.breadcrumb-nav a:hover {
  color: #ff4757;
}

.knowledge-title {
  font-size: 2.6rem;
  font-weight: 900;
  color: #1e2432;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.knowledge-subtitle {
  font-size: 1.12rem;
  color: #5e687e;
  max-width: 860px;
  line-height: 1.6;
}

/* 知识库检索与分类标签 */
.kb-controls-bar {
  max-width: 1320px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 10px;
}

.kb-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #2a2e3d;
  box-shadow: 3px 3px 0px #2a2e3d;
  border-radius: 8px;
  padding: 8px 16px;
  min-width: 320px;
}

.kb-search-box input {
  border: none;
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  font-family: inherit;
  background: transparent;
}

.kb-tag-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kb-tag-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #2a2e3d;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.kb-tag-btn.active, .kb-tag-btn:hover {
  background: #1e2432;
  color: #ffffff;
}

/* 文章网格卡片 (Article Cards in Whiteboard Canvas) */
.kb-articles-grid {
  max-width: 1320px;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 28px;
  padding: 0 10px;
}

.article-card {
  background: #ffffff;
  border: 2.5px solid #2a2e3d;
  box-shadow: 6px 6px 0px #2a2e3d;
  border-radius: 12px;
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0px #2a2e3d;
}

.card-tape {
  position: absolute;
  top: -10px;
  left: 30px;
  width: 70px;
  height: 20px;
  background: rgba(255, 235, 59, 0.75);
  border: 1px dashed rgba(0,0,0,0.15);
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #8a94a6;
  margin-bottom: 14px;
}

.article-category {
  background: #f0f3fa;
  color: #2e86de;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #d4ecff;
}

.article-card-h3 {
  font-size: 1.28rem;
  font-weight: 800;
  color: #1e2432;
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-card-desc {
  font-size: 0.92rem;
  color: #5e687e;
  line-height: 1.6;
  margin-bottom: 20px;
}

.article-keywords-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.keyword-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
}

.kw-yellow { background: #fff7b2; color: #594a00; }
.kw-pink   { background: #ffd6e0; color: #6b142d; }
.kw-mint   { background: #d1f4e0; color: #0e5630; }
.kw-blue   { background: #d4ecff; color: #0b4372; }
.kw-purple { background: #ebd9ff; color: #451b75; }

.article-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #e2e6f0;
  padding-top: 14px;
}

.btn-read-article {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #ff4757;
  transition: gap 0.2s;
}

.btn-read-article:hover {
  gap: 10px;
  color: #e0283b;
}

/* ==========================================================================
   单篇文章详情页排版 (Article Detail Page)
   ========================================================================== */
.article-detail-container {
  max-width: 980px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

.article-detail-canvas {
  background: #ffffff;
  border: 3px solid #2a2e3d;
  box-shadow: 10px 10px 0px #2a2e3d;
  border-radius: 16px;
  padding: 50px 48px;
  position: relative;
}

.article-header-section {
  border-bottom: 2px dashed #d8dce6;
  padding-bottom: 30px;
  margin-bottom: 36px;
}

.article-main-title {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.3;
  color: #1e2432;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.article-info-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: #6b7280;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.article-keywords-focus {
  background: #fbfbfc;
  border: 1.5px solid #2a2e3d;
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.article-content-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2c3444;
}

.article-content-body h2 {
  font-size: 1.65rem;
  font-weight: 900;
  color: #1e2432;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2a2e3d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-content-body h3 {
  font-size: 1.28rem;
  font-weight: 800;
  color: #1e2432;
  margin: 28px 0 12px;
}

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

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

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

/* 便签引用与重点框 */
.callout-sticky {
  background: var(--sticky-yellow);
  border: 1.5px solid var(--sticky-yellow-border);
  box-shadow: var(--shadow-paper);
  border-radius: 8px;
  padding: 20px 22px;
  margin: 26px 0;
  position: relative;
  font-size: 0.96rem;
  color: #4a3e00;
}

.callout-mint {
  background: var(--sticky-mint);
  border-color: var(--sticky-mint-border);
  color: var(--sticky-mint-text);
}

.callout-pink {
  background: var(--sticky-pink);
  border-color: var(--sticky-pink-border);
  color: var(--sticky-pink-text);
}

/* 表格样式 */
.custom-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
}

.table-agile {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 2px solid #2a2e3d;
  box-shadow: 4px 4px 0px #2a2e3d;
  border-radius: 8px;
  overflow: hidden;
}

.table-agile th, .table-agile td {
  padding: 12px 16px;
  border: 1px solid #dce1eb;
  font-size: 0.92rem;
  text-align: left;
}

.table-agile th {
  background: #f1f3f9;
  font-weight: 800;
  color: #1e2432;
}

.table-agile tr:hover {
  background: #fbfbfc;
}

/* 代码块 */
.code-block-wrap {
  background: #1e2432;
  color: #f8f9fb;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
  border: 2px solid #2a2e3d;
}

/* 文章底部转化与作者卡片 */
.article-footer-cta {
  margin-top: 50px;
  padding: 30px;
  background: #fffdf5;
  border: 2px dashed #ff4757;
  border-radius: 12px;
  text-align: center;
}

.article-nav-links {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px dashed #d8dce6;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .knowledge-header-hero {
    padding: 30px 20px;
  }
  .knowledge-title {
    font-size: 2rem;
  }
  .article-detail-canvas {
    padding: 30px 20px;
  }
  .article-main-title {
    font-size: 1.8rem;
  }
  .kb-articles-grid {
    grid-template-columns: 1fr;
  }
}
