/* ===== 动态内容样式（data-loader.js 渲染的内容） ===== */

/* 新闻卡片 */
.news-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.news-cover {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.news-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-cat {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  width: fit-content;
}
.news-cat.cat-industry { background: #dbeafe; color: #1e40af; }
.news-cat.cat-company { background: #d1fae5; color: #065f46; }
.news-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.4;
}
.news-summary {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.news-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 16px;
}

/* 课程卡片 */
.course-card {
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.course-card .course-image {
  aspect-ratio: 16/9;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-card .course-image span {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}
.course-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-info h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: #fff;
}
.course-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 12px;
  flex: 1;
}
.course-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}
.course-link {
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
}

/* 校区卡片 */
.campus-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.campus-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.campus-image {
  aspect-ratio: 16/9;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.campus-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.campus-image span {
  color: var(--muted);
  font-size: 13px;
}
.campus-info {
  padding: 20px;
}
.campus-info h3 {
  font-size: 18px;
  margin: 0 0 6px;
}
.campus-type {
  display: inline-block;
  padding: 2px 10px;
  background: var(--amber);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  margin-bottom: 8px;
}
.campus-addr, .campus-phone, .campus-hours {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}

/* 案例卡片 */
.case-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.case-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.case-image {
  aspect-ratio: 16/9;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-image span {
  color: var(--muted);
  font-size: 13px;
}
.case-body {
  padding: 20px;
}
.case-body h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.case-client, .case-date {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.case-summary {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0;
}
.case-body details {
  margin-top: 10px;
}
.case-body details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--amber);
  font-weight: 600;
}
.case-body details p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0;
}

/* 资质卡片 */
.credential-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--amber);
  border-radius: 8px;
  overflow: hidden;
}
.cred-image {
  aspect-ratio: 16/9;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cred-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cred-image span {
  color: var(--muted);
  font-size: 13px;
}
.cred-info {
  padding: 20px;
}
.cred-info h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.cred-info p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}
.cred-info dl {
  margin: 0;
}
.cred-info dt {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 8px;
}
.cred-info dd {
  font-size: 14px;
  margin: 2px 0 0 0;
}

/* 空状态提示 */
.empty-hint {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* 响应式 */
@media (max-width: 640px) {
  .news-body { padding: 14px; }
  .news-title { font-size: 16px; }
  .campus-info, .case-body, .cred-info, .course-info { padding: 14px; }
}

/* 资讯页右侧导航 */
.news-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 52px;
  align-items: start;
}
.news-content-column { min-width: 0; }
.news-content-column .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 22px;
}
.news-sidebar > section {
  padding: 24px 22px;
  border: 1px solid #dce1e4;
  border-radius: 8px;
  background: #fff;
}
.news-sidebar h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #172b3a;
  font-size: 15px;
}
.news-sidebar h2 span { color: var(--amber, #ffb20f); }
.news-sidebar ul { margin: 0; padding: 0; list-style: none; }
.news-sidebar li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: #45545e;
  font-size: 13px;
}
.news-sidebar li b {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 14px;
  background: #edf1f3;
  color: #78848b;
  font-size: 10px;
  text-align: center;
}
.popular-news {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #172b3a;
}
.popular-news i {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: var(--amber, #ffb20f);
  color: #17191b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.popular-news strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.65;
}
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.news-tags span, .news-tags a.news-tag-link {
  padding: 5px 10px;
  border-radius: 16px;
  background: #edf1f3;
  color: #53616a;
  font-size: 11px;
}
.news-tags a.news-tag-link {
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.news-tags a.news-tag-link:hover {
  background: #ffb20f;
  color: #1b1d20;
}
.news-last-updated { margin: 0; color: #7d898f; font-size: 11px; }

@media (max-width: 900px) {
  .news-page-layout { grid-template-columns: 1fr; }
  .news-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-last-updated { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .news-content-column .card-grid, .news-sidebar { grid-template-columns: 1fr; }
  .news-last-updated { grid-column: auto; }
}

/* 资讯图片卡片与热门推荐 */
.news-content-column > .content-section:last-child { display: none; }
.news-content-column > .content-section { border-top: 0; }
.news-page-layout + .related { display: none; }
.news-cover-placeholder {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  background: linear-gradient(135deg, #eef1f2, #e1e7e9);
}
.news-cover-placeholder span,
.popular-news-placeholder { color: #89959b; font-size: 11px; }
.popular-news-list { display: grid; gap: 18px; }
.popular-news-card { display: block; color: #172b3a; }
.popular-news-image {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 9px;
  place-items: center;
  overflow: hidden;
  background: #edf1f3;
}
.popular-news-image img { width: 100%; height: 100%; object-fit: cover; }
.popular-news-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.65;
}

/* ===== 分页控件定位修复（2026-09-14）=====
   renderPager() 把 .pager append 到 .card-grid（一个 grid 容器）内，于是它成了网格子项。
   - 卡片数正好占满整行时（如首页/第 1 页 6 张卡），pager 落到下一行且独占该行 → 高度自适应，显示正常；
   - 卡片数不足一行时（如第 2 页只剩 1 张卡），pager 与卡片**落在同一行**，被网格默认的
     align-items:stretch 拉伸到与卡片等高 → 内部按钮跟着被拉成细长竖条（用户反馈的现象）。
   修法：让 pager 跨满整行并保持自身高度，同时让按钮在框内垂直居中。 */
.card-grid > .pager {
  grid-column: 1 / -1;
  align-self: start;
  align-items: center;
}
