/* ============================================
   News Detail Page - Specific Styles
   ============================================ */

/* Article Layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* Article Header */
.article-header {
  margin-bottom: 36px;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 20px;
  color: var(--text-primary, #1f2937);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted, #9ca3af);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta-item svg {
  width: 16px;
  height: 16px;
}

.article-meta-item .tag {
  margin-left: 4px;
}

/* Article Content */
.article-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary, #1f2937);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 18px;
  color: var(--text-primary, #1f2937);
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary, #2A7048);
  position: relative;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 14px;
  color: var(--text-primary, #1f2937);
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text-secondary, #4b5563);
}

.article-content ul,
.article-content ol {
  margin: 18px 0;
  padding-left: 28px;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 10px;
  color: var(--text-secondary, #4b5563);
  line-height: 1.8;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 24px 28px;
  background: var(--primary-bg, #edf5f0);
  border-left: 4px solid var(--primary, #2A7048);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-secondary, #4b5563);
  font-size: 1rem;
  line-height: 1.8;
}

.article-content strong {
  color: var(--text-primary, #1f2937);
  font-weight: 700;
}

/* PDF Preview */
.pdf-preview {
  margin-top: 40px;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.pdf-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--primary-bg, #edf5f0);
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.pdf-preview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
}

.pdf-preview-title svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary, #2A7048);
}

.pdf-preview-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-preview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pdf-preview-size {
  font-size: 0.85rem;
  color: var(--text-muted, #9ca3af);
}

.pdf-preview-actions .btn svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
}

.pdf-preview-body {
  height: 720px;
  background: #f5f6f7;
}

.pdf-preview-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.pdf-preview-tip {
  padding: 10px 18px;
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  border-top: 1px solid var(--gray-200, #e5e7eb);
}

.pdf-preview-tip a {
  color: var(--primary, #2A7048);
  text-decoration: underline;
}

.pdf-preview-fallback {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted, #9ca3af);
}

.pdf-preview-fallback svg {
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  color: var(--gray-300, #d1d5db);
}

.pdf-preview-fallback p {
  margin-bottom: 18px;
  font-size: 0.95rem;
}

/* Article Tags */
.article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200, #e5e7eb);
}

.article-tags-label {
  font-size: 0.9rem;
  color: var(--text-muted, #9ca3af);
  margin-right: 4px;
}

/* Share Buttons */
.share-section {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.share-label {
  font-size: 0.9rem;
  color: var(--text-muted, #9ca3af);
}

.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.share-btn:hover {
  transform: scale(1.12);
}

.share-btn svg {
  width: 20px;
  height: 20px;
}

.share-btn.wechat {
  background: #07C160;
  color: #fff;
}

.share-btn.weibo {
  background: #E6162D;
  color: #fff;
}

.share-btn.qq {
  background: #1296DB;
  color: #fff;
}

.share-btn.link {
  background: var(--gray-500, #6b7280);
  color: #fff;
}

/* Table of Contents (Sidebar) */
.toc {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  /* position: sticky; */
  top: 100px;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-bg, #edf5f0);
  color: var(--text-primary, #1f2937);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary, #2A7048);
}

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

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  display: block;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text-secondary, #4b5563);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  line-height: 1.5;
  border-left: 3px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
  background: var(--primary-bg, #edf5f0);
  color: var(--primary, #2A7048);
  border-left-color: var(--primary, #2A7048);
}

.toc-list .toc-sub {
  padding-left: 16px;
}

.toc-list .toc-sub a {
  font-size: 0.82rem;
  padding: 6px 14px;
}

/* Sidebar Widget */
.sidebar-widget {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-top: 24px;
}

.sidebar-widget h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-bg, #edf5f0);
}

.hot-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.hot-list-item:last-child {
  border-bottom: none;
}

.hot-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--gray-200, #e5e7eb);
  color: var(--text-muted, #9ca3af);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hot-list-item:nth-child(1) .hot-rank {
  background: var(--accent, #D92525);
  color: #fff;
}

.hot-list-item:nth-child(2) .hot-rank {
  background: var(--primary, #2A7048);
  color: #fff;
}

.hot-list-item:nth-child(3) .hot-rank {
  background: var(--secondary, #538CBF);
  color: #fff;
}

.hot-list-item a {
  font-size: 0.88rem;
  color: var(--text-secondary, #4b5563);
  line-height: 1.5;
  text-decoration: none;
}

.hot-list-item a:hover {
  color: var(--primary, #2A7048);
}

/* Recommend Course Card */
.recommend-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.recommend-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.recommend-cta-img {
  width: 100px;
  height: 62px;
  flex: 0 0 100px;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
}

.recommend-cta-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.recommend-cta:hover .recommend-cta-img img {
  transform: scale(1.06);
}

.recommend-cta-img svg {
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.85);
}

.recommend-cta-body {
  min-width: 0;
  flex: 1;
}

.recommend-cta-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.recommend-cta:hover .recommend-cta-title {
  color: var(--primary, #2A7048);
}

.recommend-cta-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
}

.recommend-cta-meta span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Related Articles */
.related-section {
  margin-top: 48px;
}

.related-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary-bg, #edf5f0);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.related-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.35s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.related-card-img {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-card-img svg {
  width: 40px;
  height: 40px;
  opacity: 0.6;
}

.related-card-body {
  padding: 20px;
}

.related-card-body h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 10px;
  color: var(--text-primary, #1f2937);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card:hover .related-card-body h4 {
  color: var(--primary, #2A7048);
}

.related-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #9ca3af);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-content h2 {
    font-size: 1.25rem;
  }

  .pdf-preview-body {
    height: 460px;
  }

  .pdf-preview-head {
    padding: 12px 14px;
  }

  .pdf-preview-actions {
    width: 100%;
    justify-content: space-between;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-meta {
    gap: 12px;
  }
}
.container>.btn{
    background: #fff;
    color: #2a7048;
}