
.articles-hero {
  background: var(--gradient-hero);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.articles-hero h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 让列表容器变成单列，从上到下排列 */
.articles-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem; /* 每篇文章卡片之间的上下间距 */
  width: 100%;
}

.articles-layout {
  display: flex !important;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-xl);
  padding: var(--spacing-xl) 0;
  min-height: 70vh;
  margin-top: -20px;
}

.articles-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  padding-right: 1rem;
}

.sidebar-nav h3 {
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

.sidebar-nav a {
  display: block;
  padding: 0.625rem 0.75rem;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: var(--transition-fast);
  margin-bottom: 2px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--accent);
  background: rgba(0,87,183,0.04);
  border-left-color: var(--accent);
}

.articles-content {
  min-height: 400px;
}

/* 修改外部容器为单列垂直排列 */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* 卡片之间的上下间距 */
}

/* 横向卡片主样式 */
.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: row; /* 左图右文的核心：横向排列 */
  align-items: stretch; /* 让左右等高 */
  text-decoration: none; /* 去除 a 标签默认下划线 */
  margin-top: 10px;
  margin-bottom:  10px;;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* 直接定位 img 标签，无需修改 HTML 添加类名 */
.article-card img {
  width: 35%; /* 图片占据左侧 35% 宽度，可根据需要调整 */
 
  height: auto;
  min-height: 200px;
  object-fit: cover;
  flex-shrink: 0; /* 防止图片被挤压变形 */
}

/* 右侧文字内容区 */
.article-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center; /* 让文字在右侧垂直居中 */
  padding: 2rem; /* 修复了之前无效的 position 和突兀的 padding-top */
  flex: 1; /* 占据剩余的所有宽度 */
}

.article-card-body h3 {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold, 600);
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-card-body p {
  font-size: var(--fs-small, 1rem);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}


.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.article-card-tag {
  font-size: var(--fs-tag);
  font-weight: var(--fw-semibold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.article-card-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.article-card-excerpt {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
}

.article-full {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.article-full h1 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-full .meta {
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.article-full .featured-img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.article-full p {
  font-size: var(--fs-body);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.article-full h2 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.article-full h3 {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-full ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-full li {
  font-size: var(--fs-body);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  list-style: disc;
}
.news-grid-layout .article-card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 960px) {
  .articles-layout {
    grid-template-columns: 1fr;
  }
  .articles-sidebar {
    position: static;
    max-height: none;
  }
}

/* 响应式设计：在移动端（手机）自动变回上下结构，防止太挤 */
@media (max-width: 960px) {
  .article-card {
    flex-direction: column; /* 手机端变为上下排列 */
  }
  
  .article-card img {
    width: 100%;
    height: 200px;
  }
  
  .article-card-body {
    padding: 1.5rem;
  }
}
/* --- 专门针对新闻列表页的独立样式 --- */

/* 1. 强制设为两列布局 */
.news-grid-layout {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important; /* 强制一排两个 */
  gap: 2rem !important;
  padding: 2rem 0;
}

/* 2. 强制卡片内部为横向排列 (左图右文) */
.news-grid-layout .article-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  height: 100% !important;
  margin-top: 0 !important; /* 覆盖之前的 margin-top: 20px */
}

/* 3. 图片宽度控制 */
.news-grid-layout .article-card-img {
  width: 40% !important;
  min-width: 140px !important;
  height: auto !important;
  flex-shrink: 0 !important;
}

.news-grid-layout .article-card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* 4. 文字内容区域控制 */
.news-grid-layout .article-card-body {
  width: 60% !important;
  padding: 1.25rem !important;
  padding-top: 1.25rem !important; /* 覆盖之前错误的 50px */
  display: flex !important;
  flex-direction: column !important;
}

/* 限制标题和描述的行数，防止两边卡片长短不一 */
.news-grid-layout .article-card-title, 
.news-grid-layout h3 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin-bottom: 0.5rem !important;
}

.news-grid-layout .article-card-excerpt,
.news-grid-layout p {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  flex-grow: 1 !important;
}

/* 5. 响应式：在窄屏幕下自动切回一排一个 */
@media (max-width: 992px) {
  .news-grid-layout {
      grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .news-grid-layout .article-card {
      flex-direction: column !important; /* 手机端图片回到上方 */
  }
  .news-grid-layout .article-card-img,
  .news-grid-layout .article-card-body {
      width: 100% !important;
  }
}

/* ======= BREADCRUMB ======= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  margin-top: 15px;
  padding-bottom: 10px;

  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--accent);
  font-weight: var(--fw-medium);
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--accent-hover); }
.breadcrumb-sep {
  color: var(--text-tertiary);
  opacity: 0.5;
  font-size: 0.75rem;
}
.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ======= ARTICLE LAYOUT WITH SIDEBAR TOC ======= */
.article-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);

  align-items: start;
}

/* Left sidebar TOC */
.article-toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  padding-right: 1rem;
}
.article-toc-sidebar::-webkit-scrollbar { width: 4px; }
.article-toc-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.article-toc-sidebar h3 {
  font-size: var(--fs-tag);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.article-toc-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.article-toc-list a:hover {
  color: var(--accent);
  background: rgba(0, 87, 183, 0.04);
  border-left-color: rgba(0, 87, 183, 0.3);
}
.article-toc-list a.active {
  color: var(--accent);
  background: rgba(0, 87, 183, 0.06);
  border-left-color: var(--accent);
  font-weight: var(--fw-semibold);
}

/* Article content area */
.article-main {
  min-width: 0;
  margin-top: -50px;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .article-main {
    margin-top: 0;
    padding-top: 5px;
  }
}

/* Mobile TOC toggle button */
.toc-mobile-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
}
.toc-mobile-toggle:hover {
  background: rgba(0, 87, 183, 0.06);
  border-color: rgba(0, 87, 183, 0.3);
}
.toc-mobile-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.toc-mobile-toggle .chevron { transition: transform 0.25s ease; margin-left: auto; }
.toc-mobile-toggle.open .chevron { transform: rotate(180deg); }

.toc-mobile-panel {
  display: none;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.toc-mobile-panel.open { display: block; }
.toc-mobile-panel h3 {
  font-size: var(--fs-tag);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}
.toc-mobile-panel ul { list-style: none; margin: 0; padding: 0; }
.toc-mobile-panel li { margin-bottom: 2px; }
.toc-mobile-panel a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all 0.2s ease;
  line-height: 1.4;
}
.toc-mobile-panel a:hover,
.toc-mobile-panel a.active {
  color: var(--accent);
  background: rgba(0, 87, 183, 0.06);
  border-left-color: var(--accent);
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
    margin-top: -20px;
  }
  .article-toc-sidebar { display: none; }
  .toc-mobile-toggle { display: flex; }
}