/* ------------------------------------------------------------- */
/* 针对 .inner 元素 display:none 问题的覆盖样式 (保留，因为它解决了关键问题) */
/* 优先级更高的选择器，确保覆盖 style.css 中的 display: none; */
/* ------------------------------------------------------------- */
#container .inner {
  display: block !important; /* 强制显示 inner 元素 */
  position: static !important; /* 恢复默认的静态定位，避免绝对定位带来的布局问题 */
  z-index: auto !important; /* 恢复默认的z-index */
  /*top: auto !important;*/
  left: auto !important;
  /* 移除诊断性边框 */
  border: none !important;
  /* min-height: 500px !important; /* 您可以根据实际内容高度调整这个值，确保它比内容高 */
   margin-top: 20px;
}
/* 新增的清除浮动类 */
.clearfix::after {
  content: "" !important;
  display: block !important;
  clear: both !important;
  visibility: hidden !important;
  height: 500px !important;
}


/* 页面整体容器 */
#container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background-color: #f8f8f8;
  box-sizing: border-box; /* 保持盒模型一致 */
  /* 移除诊断性边框和最小高度 */
  border: none;
  min-height: auto;
}

.inner {
  width: 100%;
  box-sizing: border-box;
}

/* 主内容区域 */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 80px; /* 文章卡片之间的间距 */
  /* 移除诊断性边框、背景色和最小高度 */
  border: none;
  background-color: transparent;
  min-height: auto;
}

/* 文章卡片样式 */
.article-card {
  display: flex;
  flex-direction: row; /* 默认横向布局 */
  align-items: stretch;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
  /* 移除诊断性 outline 和最小高度 */
  outline: none;
  min-height: auto;
}
.article-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* 缩略图区域 */
.card-thumb {
  width: 280px;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: #eee; /* 占位背景色 */
  box-sizing: border-box;
  /* 移除诊断性边框 */
  border: none;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.article-card:hover .card-thumb img {
  transform: scale(1.05);
}

/* 内容区域 */
.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  /* 移除诊断性边框和背景色 */
  border: none;
  background-color: transparent;
}
.card-body h2 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #333;
  line-height: 1.4; /* 调整行高使标题更易读 */
  /* 移除诊断性背景色 */
  background-color: transparent;
}
.card-body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.card-body h2 a:hover {
  color: #007bff; /* 鼠标悬停时标题变色 */
}
.card-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  line-height: 1.2;
  /* 移除诊断性背景色 */
  background-color: transparent;
}
.card-meta span {
  margin-right: 20px;
}
.card-meta span i {
  margin-right: 5px;
  color: #999; /* 图标颜色 */
}
.card-description {
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  max-height: 75px; /* 限制描述高度，防止过长 */
  overflow: hidden; /* 隐藏超出部分 */
  text-overflow: ellipsis; /* 显示省略号 */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* 限制显示3行 */
  -webkit-box-orient: vertical;
  /* 移除诊断性背景色和最小高度 */
  background-color: transparent;
  min-height: auto;
}

/* 分页栏 */
.pagination-bar {
  text-align: center;
  margin-top: 30px;
  /* 移除诊断性边框和最小高度 */
  border: none;
  min-height: auto;
}
.pagination {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination .page-item {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pagination .page-item:hover {
  background: #007bff; /* 悬停背景色 */
  border-color: #007bff;
  color: #fff;
}
.pagination .page-num-current {
  background: #f8f8f8;
  color: black;
  border-color: #333;
  padding-top: 10px;
}
.pagination .page-num-current:hover {
  background: #333; /* 当前页悬停保持不变 */
  border-color: #333;
  color: #fff;
}


/* 无数据提示 */
.no-data {
  text-align: center;
  color: #999;
  font-size: 16px;
  padding: 40px 0;
  /* 移除诊断性背景色和边框 */
  background-color: transparent;
  border: none;
}

/* ------------------------------------------------------------- */
/* 媒体查询 - 响应式布局优化 */
/* ------------------------------------------------------------- */

/* 当屏幕宽度小于等于 768px 时，文章卡片变为垂直堆叠 */
@media (max-width: 768px) {
  .article-card {
    flex-direction: column; /* 垂直堆叠 */
    align-items: center; /* 内容居中对齐 */
    text-align: center; /* 文本居中 */
  }
  .card-thumb {
    width: 100%; /* 缩略图全宽 */
    height: 200px; /* 增加移动端缩略图高度 */
    border-radius: 10px 10px 0 0; /* 调整圆角 */
  }
  .card-body {
    padding: 15px; /* 调整内边距 */
  }
  .card-description {
    max-height: none; /* 在移动端取消行数限制，让内容自由显示 */
    -webkit-line-clamp: unset;
  }
  .card-meta span {
    margin: 0 10px; /* 调整元数据间距 */
  }
  .pagination .page-item {
    padding: 6px 12px; /* 调整分页项内边距 */
  }
}

/* 当屏幕宽度小于等于 480px 时，进一步调整样式 */
@media (max-width: 480px) {
  #container {
    padding: 20px 10px; /* 缩小容器内边距 */
  }
  .main-content {
    gap: 20px; /* 缩小文章卡片间距 */
  }
  .card-body h2 {
    font-size: 18px; /* 缩小标题字体 */
  }
  .card-description {
    font-size: 14px; /* 缩小描述字体 */
  }
}