/* Category List Styles */
.article-item .card-body {
  display: flex;
  gap: 20px;
}
.article-img-wrapper {
  width: 180px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
}
.article-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(37, 99, 235, 0.18),
      transparent 55%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(34, 197, 94, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.article-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.8;
}
.article-content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
@media (max-width: 768px) {
  .article-item .card-body {
    flex-direction: column;
  }
  .article-img-wrapper {
    width: 100%;
    height: 160px;
  }
}

/* Article Detail Styles */
.article-page {
  background-color: #f8fafc;
  min-height: calc(100vh - 200px);
  padding: 30px 0 60px;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 24px;
  font-size: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
}
.breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: #cbd5e1;
}
.breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--primary-color);
}
.breadcrumb .active {
  color: #0f172a;
  font-weight: 500;
}

/* Main Content Area */
.article-main {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Typography */
.article-header {
  margin-bottom: 40px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 30px;
}

.article-title {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;

  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: #64748b;
}
.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-meta-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.7;
}

/* Content Styling */
.article-summary {
  background: #f8fafc;
  border-left: 4px solid var(--primary-color);
  padding: 20px 24px;
  margin-bottom: 40px;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  line-height: 1.7;
  color: #475569;
}

/* Search Page Styles */
.search-header {
  background: #fff;
  padding: 30px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 30px;
}
.search-form {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.search-input {
  width: 100%;
  height: 50px;
  padding: 0 50px 0 20px;
  border: 1px solid #cbd5e1;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.search-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px;
  height: 34px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-result-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  transition: all 0.2s;
}
.search-result-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.search-result-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #0f172a;
  display: block;
  text-decoration: none;
}
.search-result-title:hover {
  color: var(--primary-color);
}
.search-result-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}
.search-result-summary {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.highlight {
  color: var(--primary-color);
  font-weight: 600;
}

/* Sidebar Styles */
.sidebar-widget {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.widget-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-list-item {
  margin-bottom: 16px;
}

.widget-list-item:last-child {
  margin-bottom: 0;
}

.widget-article-link {
  display: block;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 4px;
  text-decoration: none;
  transition: color 0.2s;
}

.widget-article-link:hover {
  color: var(--primary-color);
}

.widget-article-meta {
  font-size: 12px;
  color: #94a3b8;
}

/* TOC Widget */
.toc-widget {
  position: sticky;
  top: 90px; /* Header height + gap */
  color: #fff;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.toc-item {
  margin-bottom: 8px;
}

.toc-item.level-2 {
  padding-left: 0;
}

.toc-item.level-3 {
  padding-left: 16px;
}

.toc-link {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 4px 0;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  padding-left: 10px;
}

.toc-link:hover {
  color: #fff;
}

.toc-link.active {
  color: #fff;
  font-weight: 600;
  border-left-color: #fff;
}

/* Scrollbar for TOC */
.toc-list::-webkit-scrollbar {
  width: 4px;
}

.toc-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.toc-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* Article Content Typography */
.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin: 30px 0 15px;
}

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

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

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

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.article-tags {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}

.tag-item:hover {
  background: var(--primary-color);
  color: #fff;
}

.doccheck-ad-card {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.doccheck-ad-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-top: 0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 12px;
}

.doccheck-ad-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  line-height: 1.6;
}

.doccheck-ad-card .ad-btn {
  display: block;
  background: white;
  color: #2563eb;
  width: 100%;
  padding: 10px 0;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.doccheck-ad-card .ad-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
