/* =============================
   Article Page Specific Styles
   ============================= */

/* Layout: main content + sidebar */
.article-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.article-main {
  flex: 1;
  min-width: 0; /* flexbox fix */
}

.article-sidebar {
  flex: 0 0 320px;
  width: 320px;
  position: sticky;
  top: calc(var(--header-h) + 24px); /* stick below header */
}

/* Article Header (inside .page-hero) */
.article-header .page-title {
  font-size: 44px;
  margin-bottom: 16px;
}

.article-header .news-meta {
  font-size: 15px;
}

/* Article Body */
.article-body {
  padding: 24px 0;
  line-height: 1.85;
  font-size: 17px;
  color: var(--text-primary);
}

.article-body h2, .article-body h3 {
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2.2em;
  margin-bottom: 1em;
  letter-spacing: -0.01em;
}

.article-body h2 {
  font-size: 28px;
}

.article-body h3 {
  font-size: 22px;
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  opacity: 0.8;
}

.article-body img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: var(--shadow-md);
}

.article-body blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 4px solid var(--brand-primary);
  background: var(--bg-light);
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5em;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 0.5em;
}

/* Sidebar styling */
.sidebar-widget {
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.sidebar-widget__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.toc a {
  display: block;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s ease;
}

.toc a:hover {
  color: var(--text-primary);
  background: rgba(0, 102, 255, 0.04);
  opacity: 1;
}

.toc a.is-active {
  color: var(--brand-primary);
  font-weight: 600;
  border-left-color: var(--brand-primary);
  background: rgba(0, 102, 255, 0.06);
}

.related-posts a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  text-decoration: none;
}

.related-posts a:last-child {
  margin-bottom: 0;
}

.related-posts__thumb {
  flex: 0 0 80px;
  width: 80px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
}

.related-posts__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-posts__title {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .article-layout {
    flex-direction: column;
  }

  .article-sidebar {
    position: static;
    width: 100%;
    margin-top: 24px;
  }

  .article-header .page-title {
    font-size: 32px;
  }
}

