/* 知识百科 kb — hub / list / view 专用样式 */

.cms-page--kb {
  padding-top: 0;
}

/* ---------- Hero ---------- */
.cms-kb-hero {
  padding: 108px 0 48px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(76, 106, 255, 0.14) 0%, transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e8edf5;
}

.cms-kb-hero .breadcrumb {
  margin-bottom: 20px;
}

.cms-kb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #4c6aff;
  background: rgba(76, 106, 255, 0.08);
  border-radius: 999px;
}

.cms-kb-hero-eyebrow::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #4c6aff;
  border-radius: 4px;
}

.cms-kb-hero h1 {
  margin: 0 0 14px;
  font-size: 36px;
  line-height: 1.25;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.cms-kb-hero-desc {
  max-width: 640px;
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #64748b;
}

/* ---------- 分类快捷入口 ---------- */
.cms-kb-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 36px 0 8px;
}

.cms-kb-cat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.cms-kb-cat-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.cms-kb-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}

.cms-kb-cat-icon--basic,
.cms-kb-section-icon.cms-kb-cat-icon--basic {
  color: #2563eb;
  background: #eff6ff;
}

.cms-kb-cat-icon--register,
.cms-kb-section-icon.cms-kb-cat-icon--register {
  color: #059669;
  background: #ecfdf5;
}

.cms-kb-cat-icon--pricing,
.cms-kb-section-icon.cms-kb-cat-icon--pricing {
  color: #d97706;
  background: #fffbeb;
}

.cms-kb-cat-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
}

.cms-kb-cat-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #64748b;
}

.cms-kb-cat-meta {
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #C41230);
}

/* ---------- 热门问答 ---------- */
.cms-hub--kb .cms-kb-hot {
  margin-top: 36px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #fff8f8 0%, #fff 55%);
  border: 1px solid #fecaca;
  border-radius: 14px;
}

.cms-hub--kb .cms-kb-hot .cms-hub-section-head {
  margin-bottom: 20px;
}

.cms-hub--kb .cms-kb-hot .cms-hub-section-head h2 {
  font-size: 20px;
}

.cms-kb-hot-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cms-kb-hot-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 18px 16px;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cms-kb-hot-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.cms-kb-hot-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
}

.cms-kb-hot-card a {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #1e293b;
  text-decoration: none;
}

.cms-kb-hot-card a:hover {
  color: var(--primary, #C41230);
}

.cms-kb-hot-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #64748b;
}

/* ---------- 分类区块 ---------- */
.cms-hub--kb .cms-kb-section {
  margin-top: 32px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  scroll-margin-top: 120px;
}

.cms-hub--kb .cms-kb-section:first-of-type {
  margin-top: 28px;
}

.cms-hub--kb .cms-kb-section .cms-hub-section-head {
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.cms-hub--kb .cms-kb-section .cms-hub-section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
}

.cms-kb-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
}

.cms-kb-qa-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cms-kb-qa-list li {
  border-bottom: 1px solid #f1f5f9;
}

.cms-kb-qa-list li:last-child {
  border-bottom: 0;
}

.cms-kb-qa-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  border-radius: 8px;
}

.cms-kb-qa-link:hover {
  background: #f8fafc;
}

.cms-kb-qa-link:hover .cms-kb-qa-title {
  color: var(--primary, #C41230);
}

.cms-kb-qa-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #4c6aff;
  background: #eff6ff;
  border-radius: 7px;
}

.cms-kb-qa-body {
  flex: 1;
  min-width: 0;
}

.cms-kb-qa-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: #1e293b;
  transition: color 0.12s;
}

.cms-kb-qa-link time {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #94a3b8;
}

.cms-kb-qa-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #cbd5e1;
  transition: color 0.12s, transform 0.12s;
}

.cms-kb-qa-link:hover .cms-kb-qa-arrow {
  color: var(--primary, #C41230);
  transform: translateX(2px);
}

/* ---------- CTA / 相关链接 ---------- */
.cms-hub--kb .cms-cta {
  margin-top: 36px;
  border-radius: 14px;
}

.cms-hub--kb .cms-related-links {
  margin-top: 32px;
  padding: 20px 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
  border-radius: 12px;
}

.cms-hub--kb .cms-related-links h2 {
  font-size: 16px;
}

.cms-hub--kb .cms-related-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.cms-hub--kb .cms-related-links li {
  padding: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cms-kb-cat-grid,
  .cms-kb-hot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cms-kb-hero {
    padding: 96px 0 32px;
  }

  .cms-kb-hero h1 {
    font-size: 28px;
  }

  .cms-hub--kb .cms-kb-section {
    padding: 18px 16px;
  }

  .cms-hub--kb .cms-kb-hot {
    padding: 20px 16px;
  }
}
