/* ==========================================================================
   新闻动态页 news.html —— 按《麦秸映像改版/5新闻动态.png》设计稿实现
   依赖 assets/css/style.css（基础）与 assets/css/case.css（筛选栏/留言/悬浮工具）
   仅在本页加载，不影响其他页面
   ========================================================================== */

:root {
  --mj-blue: #1677ff;
  --mj-text: #333;
  --mj-sub: #999;
  --mj-line: #e4e7ed;
  --mj-gray: #f5f6f8;
  --mj-dark: #0d1b2c;
}

body.page-news { background: #fff; }

/* ============ 顶栏（与案例页一致） ============ */
body.page-news .header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  backdrop-filter: none;
}

/* ============ 横幅（设计稿同款 NEWS 墨迹横幅，文字已含在图中） ============ */
.news-hero {
  min-height: 480px;
  background-color: #05080f;
  background-size: cover;
  background-position: center;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============ 列表区 ============ */
.news-sec { background: #f7f7f7; padding: 56px 0 64px; }
.news-wrap { max-width: 1460px; margin: 0 auto; padding: 0 24px; }

.news-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px; align-items: start;
}

/* ---- 左侧新闻列表 ---- */
.nw-list { display: grid; gap: 16px; }

.nw-item {
  background: #fff; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  transition: box-shadow .25s, transform .25s;
}
.nw-item:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .1); }
.nw-item[hidden] { display: none; }

.nw-item > a {
  display: grid; grid-template-columns: 96px 1fr; gap: 26px;
  padding: 28px 30px; color: inherit;
}

.nw-date { text-align: left; }
.nw-date b {
  display: block; font-size: 28px; font-weight: 700;
  line-height: 1.2; color: var(--mj-text); letter-spacing: .5px;
}
.nw-date span { display: block; margin-top: 2px; font-size: 13px; color: var(--mj-sub); }
.nw-date::after {
  content: ""; display: block; width: 34px; height: 2px;
  margin-top: 16px; background: var(--mj-line); border-radius: 1px;
  transition: background .2s;
}
.nw-item:hover .nw-date::after { background: var(--mj-blue); }

.nw-body h3 {
  margin: 2px 0 12px; font-size: 18px; font-weight: 600;
  color: var(--mj-text); line-height: 1.5; transition: color .2s;
}
.nw-item:hover .nw-body h3 { color: var(--mj-blue); }
.nw-body p {
  margin: 0; font-size: 14px; line-height: 1.9; color: var(--mj-sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- 右侧案例推荐 ---- */
.nw-side__card {
  padding: 26px 22px; background: #fff; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.nw-side__card h2 {
  margin: 0 0 20px; font-size: 20px; font-weight: 700; color: var(--mj-text);
}

.nw-case {
  display: block; padding: 14px 14px 16px; margin-bottom: 20px;
  border: 1px solid var(--mj-line); border-radius: 3px;
  transition: box-shadow .2s, border-color .2s;
}
.nw-case:last-child { margin-bottom: 0; }
.nw-case:hover { border-color: var(--mj-blue); box-shadow: 0 8px 20px rgba(22, 119, 255, .12); }

.nw-case__pic { aspect-ratio: 16 / 10; overflow: hidden; }
.nw-case__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.nw-case:hover .nw-case__pic img { transform: scale(1.05); }

.nw-case__titlerow {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 14px;
}
.nw-case__titlerow h3 {
  margin: 0; font-size: 16px; font-weight: 500; color: var(--mj-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s;
}
.nw-case:hover .nw-case__titlerow h3 { color: var(--mj-blue); }
.nw-case__titlerow span { flex: 0 0 auto; font-size: 14px; color: var(--mj-sub); }
.nw-case__sub { margin: 8px 0 0; font-size: 14px; color: var(--mj-sub); }

/* ============ 分页（与案例页一致） ============ */
.news-sec .pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.news-sec .pager .pager__btn,
.news-sec .pager .pager__num,
.news-sec .pager .pager__ellipsis,
.news-sec .pager .pager__jump {
  min-width: 32px; height: 32px; padding: 0;
  font-size: 14px; color: #606266;
  background: none; border: 0; border-radius: 0;
}
.news-sec .pager .pager__btn,
.news-sec .pager .pager__num {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--mj-line); border-radius: 4px; transition: .2s;
}
.news-sec .pager .pager__btn svg { width: 14px; height: 14px; }
.news-sec .pager .pager__num:hover,
.news-sec .pager .pager__btn:hover { color: var(--mj-blue); background: #fff; border-color: var(--mj-blue); }
.news-sec .pager .pager__num.is-current { color: #fff; background: var(--mj-blue); border-color: var(--mj-blue); }
.news-sec .pager .pager__btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.news-sec .pager .pager__ellipsis { letter-spacing: 2px; display: inline-flex; align-items: center; justify-content: center; }
.news-sec .pager .pager__jump { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; border: 0; background: none; }
.news-sec .pager .pager__jump input {
  width: 46px; height: 32px; padding: 0 6px; text-align: center;
  font-size: 14px; color: #606266;
  border: 1px solid var(--mj-line); border-radius: 4px; outline: none;
}
.news-sec .pager .pager__jump input:focus { border-color: var(--mj-blue); }

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  .news-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1080px) {
  body.page-news .header .container { height: 72px; }
  body.page-news .brand img { height: 42px; }
  body.page-news .header__hot-txt b { font-size: 17px; }
  .news-hero { min-height: 340px; }
  .news-layout { grid-template-columns: 1fr; }
  .nw-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
  .nw-side__card { margin: 0; }
}

@media (max-width: 900px) {
  body.page-news .header__hot { display: none; }
  body.page-news .header__search { display: none; }
}

@media (max-width: 640px) {
  .news-hero { min-height: 220px; }
  .news-sec { padding: 36px 0 40px; }
  .news-wrap { padding: 0 16px; }
  .nw-item > a { grid-template-columns: 1fr; gap: 12px; padding: 20px 18px; }
  .nw-date { display: flex; align-items: baseline; gap: 8px; }
  .nw-date b { font-size: 20px; }
  .nw-date span { margin-top: 0; }
  .nw-date::after { display: none; }
  .nw-body h3 { font-size: 16px; margin-bottom: 8px; }
  .nw-side { grid-template-columns: 1fr; }
  .pager__jump { margin-left: 0; }
}
