/* Knowledge Base Styles */

/* Hero Section */
.kb-hero {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  background: linear-gradient(135deg, #172554 0%, #1e40af 100%);
  border-radius: 15px;
  padding: 40px 0;
  margin-bottom: 30px;
  border-bottom: 1px solid #e2e8f0;
}
.kb-hero__title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}
.kb-hero__desc {
  font-size: 16px;
  color: #aec4e2;
  max-width: 600px;
  margin-bottom: 24px;
}
.kb-search {
  max-width: 500px;
  position: relative;
}
.kb-search-input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 20px;
  border: 1px solid #cbd5e1;
  border-radius: 24px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.kb-search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.kb-search-btn {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.kb-search-btn:hover {
  background: #1d4ed8;
}

/* Sticky Sidebar */
.sidebar-sticky {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Section Styles */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Column Cards */
.kb-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.kb-column-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.kb-column-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}
.kb-column-icon {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-color);
}
.kb-column-card:nth-child(2n) .kb-column-icon {
  background: #f0fdf4;
  color: #16a34a;
}
.kb-column-card:nth-child(3n) .kb-column-icon {
  background: #fefce8;
  color: #ca8a04;
}
.kb-column-card:nth-child(4n) .kb-column-icon {
  background: #fef2f2;
  color: #dc2626;
}

.kb-column-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.kb-column-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article List */
.article-list-item {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px dashed #e2e8f0;
  transition: background 0.2s;
}
.article-list-item:hover {
  background: #f8fafc;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 4px;
  margin: 0 -10px;
}
.article-list-item:last-child {
  border-bottom: none;
}
.article-item-content {
  flex: 1;
  min-width: 0;
}
.article-item-title {
  font-size: 16px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 6px;
  display: block;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-item-title:hover {
  color: var(--primary-color);
}
.article-item-meta {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-tag {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #64748b;
}

/* Sidebar Widget */
.sidebar-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.hot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hot-item {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hot-index {
  width: 20px;
  height: 20px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.hot-item:nth-child(1) .hot-index {
  background: #fee2e2;
  color: #dc2626;
}
.hot-item:nth-child(2) .hot-index {
  background: #ffedd5;
  color: #ea580c;
}
.hot-item:nth-child(3) .hot-index {
  background: #fef9c3;
  color: #ca8a04;
}

.hot-link {
  font-size: 14px;
  color: #475569;
  text-decoration: none;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hot-link:hover {
  color: var(--primary-color);
}

@media (max-width: 992px) {
  .kb-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .kb-columns {
    grid-template-columns: 1fr;
  }
}

/* DocCheck Ad Widget */
.doccheck-ad {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
}
.doccheck-ad .sidebar-title {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}
.doccheck-ad p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}
.doccheck-ad .btn {
  background: white;
  color: #2563eb;
  width: 100%;
  display: block;
  text-align: center;
}
