/* 知识库页面共用布局 */
html {
  scrollbar-gutter: stable;
}

.kb-gradient {
  --kb-gradient: linear-gradient(135deg, rgba(7, 28, 48, 0.95) 0%, rgba(23, 101, 140, 0.92) 55%, rgba(180, 136, 44, 0.85) 100%);
  --kb-light: #f1f3f8;
}

.kb-page-hero {
  background: var(--kb-gradient);
  color: #fff;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.kb-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--kb-hero-bg, url("../images/banner/b2.jpg")) center/cover;
  opacity: 0.15;
}

.kb-page-hero .container {
  position: relative;
  z-index: 2;
}

.kb-main {
  background: var(--kb-light);
  padding: 48px 0 40px;
}

.kb-search-bar {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(15, 39, 71, 0.06);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.kb-search-bar label {
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  white-space: nowrap;
}

.kb-search-bar .form-control {
  flex: 1;
  min-width: 180px;
  border-radius: 8px;
}

.kb-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

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

.kb-system-nav {
  background: #fff;
  border-radius: 12px;
  padding: 16px 0;
  box-shadow: 0 4px 20px rgba(15, 39, 71, 0.06);
  border: 1px solid var(--border-color);
  position: sticky;
  top: 84px;
}

.kb-system-nav-title {
  padding: 0 20px 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
}

.kb-system-nav button {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s;
}

.kb-system-nav button:hover {
  background: var(--bg-light);
}

.kb-system-nav button.active {
  background: rgba(23, 101, 140, 0.06);
  border-left-color: var(--primary-blue);
}

.kb-system-nav button.active .sys-name {
  color: var(--primary-blue);
}

.sys-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}

.sys-desc {
  display: block;
  font-size: 12px;
  color: var(--text-gray);
  margin-top: 2px;
  line-height: 1.4;
}

.kb-panel {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 4px 20px rgba(15, 39, 71, 0.06);
  border: 1px solid var(--border-color);
  min-height: 420px;
}

@media (max-width: 575px) {
  .kb-panel {
    padding: 20px 16px;
  }
}

.kb-panel-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.kb-panel-head h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.kb-panel-head p {
  margin: 0;
  font-size: 14px;
  color: var(--text-gray);
}

.kb-no-result {
  display: none;
  padding: 48px 20px;
  text-align: center;
  color: var(--text-gray);
}

.kb-no-result.show {
  display: block;
}

.kb-footer-tip {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--bg-light);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-gray);
}

.kb-footer-tip a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
}

.kb-footer-tip a:hover {
  text-decoration: underline;
}

/* ========== 案例库（caseLibrary.html） ========== */
body.kb-case {
  --about-gradient: var(--kb-gradient);
}
body.kb-case .page-hero {
  background: var(--kb-gradient);
  margin-bottom: 0;
}
body.kb-case .page-hero::after {
  background: var(--hero-bg, url("../images/banner/b2.jpg")) center/cover;
  opacity: 0.18;
  mix-blend-mode: screen;
}
body.kb-case .kb-main { padding-bottom: 24px; }
body.kb-case #clCases { scroll-margin-top: 100px; }
body.kb-case #footer-container footer,
body.kb-case footer { margin-top: 0; }
body.kb-case .kb-footer-tip { margin-top: 16px; margin-bottom: 0; }

.cl-toolbar {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(15, 39, 71, 0.04);
}
.cl-toolbar__label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-gray);
}
.cl-cat-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cl-cat-btn {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-dark);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cl-cat-btn:hover { border-color: rgba(23, 101, 140, 0.4); color: var(--primary-blue); }
.cl-cat-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #fff;
}
.cl-cat-count { margin-left: 4px; opacity: 0.75; font-weight: 500; }
.cl-search-row { display: flex; }
.cl-search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  color: var(--text-dark);
}
.cl-search-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(23, 101, 140, 0.12);
}
.cl-result-count { margin-bottom: 14px; font-size: 13px; color: var(--text-gray); }
.cl-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-gray);
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 15px;
}
.cl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 8px;
}
.cl-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(15, 39, 71, 0.04);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  animation: clFadeInUp 0.45s ease forwards;
  opacity: 0;
  --cl-accent: var(--primary-blue);
}
.cl-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cl-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}
.cl-card:hover {
  transform: translateY(-3px);
  border-color: rgba(23, 101, 140, 0.35);
  box-shadow: 0 10px 28px rgba(15, 39, 71, 0.1);
}
.cl-card:hover::before { transform: scaleY(1); }
@keyframes clFadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.cl-card-head { display: flex; align-items: center; margin-bottom: 12px; }
.cl-business-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cl-accent);
  background: color-mix(in srgb, var(--cl-accent) 12%, #fff);
}
.cl-card-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
}
.cl-outcome-block {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  border-left: 3px solid #0f766e;
  background: rgba(15, 118, 110, 0.06);
}
.cl-outcome-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f766e;
}
.cl-outcome-text {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  color: #134e4a;
  font-weight: 600;
}
.cl-bg-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-gray);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.cl-process-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cl-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--cl-accent);
  background: color-mix(in srgb, var(--cl-accent) 12%, #fff);
}
.cl-step-more { font-size: 12px; color: var(--text-gray); font-weight: 600; }
.cl-card-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}
.cl-view-detail { font-size: 13px; font-weight: 700; color: var(--primary-blue); }

.cl-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 71, 0.48);
}
.cl-modal__content {
  position: relative;
  width: 720px;
  max-width: 100%;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 39, 71, 0.22);
  z-index: 1;
  animation: clModalIn 0.28s ease;
}
@keyframes clModalIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.cl-modal__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}
.cl-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: #fff;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cl-modal__close:hover { background: #f1f5f9; color: var(--text-dark); }
.cl-detail__biz { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cl-detail__biz-label { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--text-gray); }
.cl-detail__business {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cl-detail { flex: 1 1 auto; overflow-y: auto; padding: 24px 28px 28px; }
.cl-detail__title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
}
.cl-outcome {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.14);
}
.cl-outcome__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f766e;
}
.cl-outcome__text { margin: 0; font-size: 15px; color: var(--text-dark); line-height: 1.75; }
.cl-section { margin: 0 0 24px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.cl-section:last-child { margin-bottom: 0; }
.cl-section h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--primary-blue); }
.cl-section p { margin: 0; font-size: 14px; color: var(--text-gray); line-height: 1.8; white-space: pre-wrap; }
.cl-section ol { margin: 0; padding-left: 22px; font-size: 14px; color: var(--text-gray); line-height: 1.9; }
.cl-section ol li { margin-bottom: 10px; }
.cl-section ol li:last-child { margin-bottom: 0; }
.cl-hidden { display: none !important; }

@media (max-width: 767px) {
  .cl-grid { grid-template-columns: 1fr; }
  .cl-detail { padding: 20px 18px 22px; }
  .cl-detail__title { font-size: 20px; }
  .cl-modal__head { padding: 12px 14px; }
  .cl-cat-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
}

