/* 新闻类页面样式（新闻中心 / 分类列表 / 首页最新动态共用） */

.news-block { padding: 44px 0; }
.news-block + .news-block { border-top: 1px solid var(--line); }

/* 分类入口卡 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.cat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-card:hover {
  border-color: #a9d9ec;
  background: #f7fbfd;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cat-card h2,
.cat-card h3 { font-size: 20px; line-height: 1.4; }
.cat-card p { margin-top: 10px; font-size: 14.5px; color: var(--muted); max-width: 380px; }
.cat-count { font-size: 12px; color: var(--brand-strong); font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; }

/* 文章卡片 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.post-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: #a9d9ec;
  box-shadow: var(--shadow-md);
}

.post-thumb { overflow: hidden; }

.post-thumb img {
  width: 100%;
  /* 必须显式 height:auto：否则 HTML 的 height 属性会把封面锁成固定像素高，
     卡片被拉长、比例失真（宽屏与手机都会） */
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.post-card:hover .post-thumb img { transform: scale(1.04); }

.post-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 18px 18px 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.post-cat { color: var(--brand-strong); font-weight: 600; letter-spacing: 0.04em; }

.post-card h3 { font-size: 18px; line-height: 1.45; }

.post-card p { font-size: 14px; color: var(--muted); }

.post-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-strong);
  transition: gap 0.2s ease;
}

.post-card:hover .post-more { gap: 10px; }

/* 列表页头信息条 */
.list-bar .sec-title { font-size: 24px; margin-top: 0; }

.list-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.list-bar .list-hint { font-size: 13px; color: var(--muted); }

/* 侧栏式分类导航（列表页顶部） */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }

.cat-tabs a {
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.cat-tabs a:hover { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }

.cat-tabs a.is-current { border-color: var(--brand); background: var(--brand); color: #fff; }

.empty-note {
  margin-top: 28px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14.5px;
  text-align: center;
}

@media (max-width: 980px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .news-block { padding: 36px 0; }
  .post-grid,
  .post-grid--two { grid-template-columns: 1fr; }
  .cat-card { padding: 22px; }
  /* 分类切换标签在触屏上补足点击高度 */
  .cat-tabs a { padding: 10px 16px; }
}

/* ---------- 头条 + 侧列（首页新闻模块） ---------- */
.news-feature-wrap {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 20px;
  margin-top: 22px;
}

.news-feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.news-feature:hover {
  transform: translateY(-3px);
  border-color: #a9d9ec;
  box-shadow: var(--shadow-md);
}

.news-feature-media { overflow: hidden; }

.news-feature-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8.4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.news-feature:hover .news-feature-media img { transform: scale(1.03); }

.news-feature-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  padding: 20px 22px 22px;
}

.news-feature-body h3 { font-size: 21px; line-height: 1.4; }
.news-feature-body p { font-size: 14.5px; color: var(--muted); }
.news-feature-body .post-more { margin-top: auto; padding-top: 6px; }

.news-side { display: flex; flex-direction: column; gap: 12px; }

.news-row {
  flex: 1;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.news-row:hover {
  border-color: #a9d9ec;
  background: #f7fbfd;
  transform: translateX(2px);
}

.news-row img {
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.news-row h3 {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-row .post-meta { font-size: 11.5px; }

/* ---------- 栏目分区（新闻中心页） ---------- */
.cat-section {
  display: grid;
  grid-template-columns: 0.78fr 1.6fr;
  gap: 34px;
  align-items: start;
}

.cat-intro .sec-title { font-size: clamp(22px, 2.4vw, 28px); }
.cat-intro p { margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.8; }

.cat-topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
  padding: 0;
}

.cat-topics li {
  padding: 4px 11px;
  font-size: 12.5px;
  color: #3f5566;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.cat-intro .link-more { margin-top: 18px; }

.news-block--surface { background: var(--surface); }

/* ---------- 新闻底部行动条 ---------- */
.news-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding: 26px 30px;
  border: 1px solid #cfe8f3;
  border-radius: 18px;
  background: var(--brand-soft);
}

.news-cta-box p { max-width: 620px; font-size: 15px; color: #3f5566; }
.news-cta-box strong { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .news-feature-wrap { grid-template-columns: 1fr; }
  .news-side { flex-direction: column; }
  .cat-section { grid-template-columns: 1fr; gap: 22px; }
  .news-row img { width: 96px; height: 72px; }
}

@media (max-width: 640px) {
  .news-feature-body h3 { font-size: 18px; }
  .news-row { grid-template-columns: 84px 1fr; }
  .news-row img { width: 84px; height: 64px; }
  .cat-section { gap: 18px; }
  .news-cta-box { padding: 20px; }
}
