/* ===== 磨匠机械 · 新闻中心样式（列表页 / 详情页） ===== */

/* ---------- 头部：复用首页样式，仅保留 96px 高、18px 字号 ---------- */
header {
  height: 96px;
}
header nav {
  gap: clamp(16px, 1.6vw, 30px);
}
header nav a,
header nav .nano-trigger,
header nav .news-trigger {
  font-size: 18px;
}
/* 当前页常显：品牌红文字 + 红色下划线（hover 效果由 style.css 提供） */
header nav a.is-current,
header nav .news-trigger.is-current {
  color: #b02926;
}
header nav a.is-current::after,
header nav .news-trigger.is-current::after {
  transform: scaleX(1);
}

/* ---------- 新闻 banner（静态单图，不轮播） ---------- */
.news-banner {
  position: relative;
  height: 26vw;
  min-height: 240px;
  max-height: 520px;
  overflow: hidden;
}
.news-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-banner-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.news-banner-info h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}
.news-banner-info span.banner-sub {
  font-size: clamp(14px, 1.05vw, 18px);
  letter-spacing: 8px;
  opacity: .92;
  font-family: Arial, sans-serif;
}

/* 文字逐字掉落动画 */
.drop-char {
  display: inline-block;
  opacity: 0;
  margin: 0 1px;
  animation: bannerDrop .6s ease forwards;
}
.banner-sub .drop-char {
  margin: 0;
}
.banner-sub .drop-char.is-space {
  margin: 0;
}
@keyframes bannerDrop {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .drop-char {
    animation: none;
    opacity: 1;
  }
}


/* ---------- 内页头 ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: #f5f7fa;
  border-bottom: 1px solid #ececec;
  padding: 46px 0 42px;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 88% 10%, #ffffff 0%, #f5f7fa 60%),
    linear-gradient(180deg, #f7f9fb, #f2f5f8);
  pointer-events: none;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 420px;
  height: 300px;
  border: 1px solid #e3e9ef;
  transform: rotate(-18deg);
  pointer-events: none;
}
.page-hero .wrap {
  position: relative;
  z-index: 1;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9aa3ad;
  margin: 0 0 18px;
}
.crumbs a {
  color: #9aa3ad;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.crumbs a svg {
  width: 15px;
  height: 15px;
}
.crumbs a:hover {
  color: var(--red);
}
.crumbs span.sep {
  color: #cfd6dd;
}
.page-hero h1 {
  position: relative;
  margin: 0;
  font-size: clamp(26px, 2.5vw, 40px);
  font-weight: 700;
  color: #222;
  letter-spacing: .5px;
  line-height: 1.3;
}
.page-hero h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--red);
  margin-top: 16px;
}
.page-hero .page-hero-en {
  position: absolute;
  right: 0;
  bottom: 4px;
  font: 700 clamp(24px, 4.2vw, 64px)/1 Arial, sans-serif;
  color: #e8edf2;
  letter-spacing: 2px;
  pointer-events: none;
  user-select: none;
}
.page-hero p.page-hero-desc {
  margin: 14px 0 0;
  font-size: 15px;
  color: #8a939d;
  max-width: 620px;
}

/* ---------- 分类标签 ---------- */
/* 分类导航 */
.news-catbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #fff;
  padding: 0 4.1667%;
}
.news-tabs {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
}
.news-tabs button {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-right: 1px solid #dfdfdf;
  padding: 18px clamp(20px, 2vw, 35px);
  font-size: 16px;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  transition: background .5s ease, color .5s ease;
}
.news-tabs button:hover {
  background: var(--red);
  color: #fff;
}
.news-tabs button[aria-selected="true"] {
  background: var(--red);
  color: #fff;
}
.news-tabs button[aria-selected="true"]:hover {
  color: #fff;
}
.news-catbar .crumbs {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 clamp(14px, 1.6vw, 26px);
  font-size: 14px;
  color: #888;
  white-space: nowrap;
}
.news-catbar .crumbs a {
  color: #888;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.news-catbar .crumbs a svg {
  width: 15px;
  height: 15px;
}
.news-catbar .crumbs a:hover {
  color: var(--red);
}
.news-catbar .crumbs .sep {
  margin: 0 7px;
}

/* ---------- 列表区 ---------- */
.news-list-section {
  padding: 3% 0 5%;
  background: #f4f5fa;
}
.news-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-item {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #eee;
  margin-bottom: 40px;
  transition: box-shadow .5s ease;
}
.news-item:hover {
  box-shadow: 0 23px 90px -5px rgba(29, 56, 72, .17);
}
.news-thumb {
  flex: 0 0 30%;
  position: relative;
  overflow: hidden;
}
.news-thumb a {
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 65%;
  position: relative;
}
.news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform .5s ease;
}
.news-item:hover .news-thumb img {
  transform: scale(1.1);
}
.news-body {
  flex: 1;
  min-width: 0;
  padding: 0 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.news-body h3 {
  margin: 10px 0 0;
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  color: #000;
  transition: color .5s ease;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item:hover .news-body h3 {
  color: var(--red);
}
.news-body .news-summary {
  margin: 15px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: #878787;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.news-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  color: #6e6e6e;
  line-height: 1;
}
.news-date svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.news-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 160px;
  padding: 10px 0;
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 16px;
  background: transparent;
  transition: background-color .3s ease, color .3s ease;
}
.news-more svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}
.news-item:hover .news-more {
  background: var(--red);
  color: #fff;
}
.news-cat-tag {
  display: none;
}

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pager button {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e2e2e2;
  background: #fff;
  color: #777;
  font-size: 14px;
  border-radius: 2px;
  transition: .25s ease;
}
.pager button:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
}
.pager button[aria-current="page"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.pager button:disabled {
  color: #c9c9c9;
  background: #fafafa;
  cursor: not-allowed;
}
.pager .pager-status {
  font-size: 13px;
  color: #aaa;
  margin-left: 6px;
}

/* ---------- 空态 ---------- */
.news-empty {
  padding: 60px 0;
  text-align: center;
  color: #aaa;
  font-size: 15px;
}
.news-empty[hidden] {
  display: none;
}

/* ---------- 详情页 ---------- */
.article-section {
  padding: clamp(26px, 3vw, 50px) 0 clamp(50px, 5vw, 80px);
  background: #f4f5f7;
}
.article-layout {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 1.8vw, 28px);
}
.article-main {
  flex: 0 0 72.8%;
  min-width: 0;
  background: #fff;
  padding: clamp(20px, 2.6vw, 40px);
}
.article-side {
  flex: 1 1 0;
  min-width: 0;
  position: sticky;
  top: 116px;
  background: #fff;
  padding: clamp(18px, 1.8vw, 28px);
}
/* 资讯详情色块标题 */
.article-head {
  margin: 20px 0 0;
  border-left: 4px solid var(--red);
}
.article-head-label {
  display: block;
  margin-left: 28px;
  font-size: 22px;
  color: #000;
  line-height: 1.4;
}
.article-head-line {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 12px 0 0;
  padding: 0 0 10px;
}
.article-title {
  margin: 18px 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.5;
  color: #292929;
}
/* 导语： */
.article-lede {
  margin: 18px 0 0;
  padding: 10px 14px;
  background: #f5f5f5;
  font-size: 14px;
  line-height: 1.7;
  color: #5c5c5c;
}
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin: 22px 0 0;
  font-size: 14px;
  color: #a8abb2;
}
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.article-meta svg {
  width: 15px;
  height: 15px;
}

.article-body {
  margin-top: 30px;
  font-size: 18px;
  line-height: 2;
  color: #505050;
}
.article-body p {
  margin: 0 0 20px;
  text-indent: 0;
}
.article-body p.no-indent,
.article-body li {
  text-indent: 0;
}
/* 章节标题：居中，带 01/02 序号 */
.article-body h2 {
  text-indent: 0;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 28px 0 8px;
  padding: 0;
  line-height: 1.8;
  position: static;
}
.article-body h2::before {
  content: none;
}
.article-body h3 {
  text-indent: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 22px 0 6px;
  padding: 0;
  line-height: 1.8;
  position: static;
}
.article-body h3::before {
  content: none;
}
.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding-left: 2.2em;
}
.article-body li {
  margin-bottom: 6px;
  line-height: 1.95;
}
.article-body strong {
  color: #1a1a1a;
}
.article-body figure {
  margin: 26px auto 30px;
  text-align: center;
}
.article-body figure img {
  width: auto;
  max-width: 650px;
  max-height: none;
  height: auto;
  margin: 0 auto;
  display: block;
}
.article-body img {
  max-width: 100%;
}
.article-body a {
  color: #d71920;
  text-decoration: none;
}
.article-body a:hover {
  text-decoration: underline;
}
.article-body figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: #999;
  text-indent: 0;
  line-height: 1.7;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 26px;
  font-size: 15px;
  table-layout: fixed;
}
.article-body .article-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 26px;
}
.article-body .article-table-wrap table {
  margin: 0;
}
.article-body th,
.article-body td {
  border: 1px solid #eaeaea;
  padding: 10px 12px;
  text-align: left;
  text-indent: 0;
  vertical-align: top;
}
.article-body th {
  background: #f8f9fa;
  color: #444;
  font-weight: 600;
}

/* 上下篇 */
/* 纯文字上下页 */
.article-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.article-nav .nav-prev,
.article-nav .nav-next {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  line-height: 2;
  color: #555;
}
.article-nav .nav-next {
  margin-left: auto;
  text-align: right;
}
.article-nav .nav-label {
  flex: 0 0 auto;
}
.article-nav .nav-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-nav a:hover .nav-title {
  color: var(--red);
}
.article-nav .nav-empty {
  color: #b5b5b5;
}
.article-nav .nav-empty .nav-title {
  color: #b5b5b5;
}

/* ---------- 右侧最新动态 ---------- */
.side-head {
  border-left: 4px solid var(--red);
  margin-bottom: 6px;
}
.side-head-label {
  display: block;
  margin-left: 12px;
  font-size: 20px;
  color: #000;
  line-height: 1.3;
}
.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-list li {
  border-bottom: 1px solid #f0f0f0;
}
.side-list li:last-child {
  border-bottom: 0;
}
.side-list li a {
  display: flex;
  gap: 12px;
  padding: 14px 0;
}
.side-thumb {
  flex: 0 0 104px;
  width: 104px;
  aspect-ratio: 4 / 3;
  align-self: flex-start;
  overflow: hidden;
  border-radius: 4px;
  background: #f2f3f5;
}
.side-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.side-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.article-side .side-title {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.5;
  color: #3a3a3a;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .25s ease;
}
.side-summary {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #ababab;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-list li a:hover .side-title {
  color: var(--red);
}

/* ---------- 搜索弹窗（新闻页） ---------- */
#news-search {
  border: 0;
  border-top: 3px solid var(--red);
  width: min(680px, 92vw);
  max-height: 86vh;
  padding: 40px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .22);
  color: #333;
}
#news-search::backdrop {
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(3px);
}
#news-search h2 {
  font-size: 22px;
  color: var(--red);
  margin: 0 0 16px;
}
#news-search input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #ddd;
  font-size: 16px;
  font-family: inherit;
}
#news-search input:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
#news-search .search-results {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-height: 46vh;
  overflow: auto;
}
#news-search .search-results a {
  padding: 12px 14px;
  background: #f6f6f6;
  font-size: 14px;
  color: #444;
}
#news-search .search-results a:hover {
  background: #fdecec;
  color: var(--red);
}
#news-search .search-results p {
  color: #999;
  font-size: 14px;
  margin: 0;
}
#news-search .close {
  position: absolute;
  top: 8px;
  right: 15px;
  font-size: 26px;
  background: transparent;
  color: #888;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  header {
    height: 64px;
  }
  header nav a,
  header nav .nano-trigger,
  header nav .news-trigger {
    font-size: 14px;
  }
  .news-banner {
    height: 42vw;
    min-height: 170px;
  }
  .news-banner-info h1 {
    margin-bottom: 8px;
  }
  .drop-char {
    margin: 0 2px;
  }
  .news-banner-info span {
    letter-spacing: 4px;
  }
  .page-hero {
    padding: 30px 0 28px;
  }
  .page-hero .page-hero-en {
    display: none;
  }
  .page-hero p.page-hero-desc {
    font-size: 13px;
  }
  .news-catbar {
    flex-wrap: wrap;
  }
  .news-tabs {
    flex: 1 1 100%;
    overflow-x: auto;
  }
  .news-tabs button {
    padding: 12px 18px;
    font-size: 14px;
  }
  .news-catbar .crumbs {
    display: none;
  }
  .crumbs {
    display: none;
  }
  .news-item {
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .news-thumb {
    flex: 0 0 auto;
    width: 100%;
  }
  .news-thumb a {
    padding-bottom: 65%;
  }
  .news-body {
    padding: 20px 16px;
  }
  .news-body h3 {
    font-size: 18px;
    -webkit-line-clamp: 2;
  }
  .news-body .news-summary {
    font-size: 16px;
  }
  .news-more {
    width: 140px;
    padding: 8px 0;
    font-size: 16px;
  }
  .article-head-label {
    margin-left: 16px;
    font-size: 18px;
  }
  .article-title {
    font-size: 30px;
  }
  .article-lede {
    padding: 9px 12px;
    font-size: 13px;
  }
  .article-meta {
    margin-top: 16px;
    gap: 14px;
    font-size: 13px;
  }
  .article-body {
    font-size: 16px;
    line-height: 1.95;
  }
  .article-body h2 {
    font-size: 16px;
    margin: 24px 0 6px;
  }
  .article-body h3 {
    font-size: 15px;
  }
  .article-body figure {
    margin: 20px auto 24px;
  }
  .article-body figure img {
    max-width: 100%;
  }
  .article-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .article-layout {
    flex-direction: column;
  }
  .article-main {
    flex: 0 1 auto;
    width: 100%;
  }
  .article-side {
    position: static;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }
  .article-nav {
    position: static;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 20px 0 0;
    background: none;
    box-shadow: none;
  }
  .article-nav .nav-prev,
  .article-nav .nav-next {
    width: 100%;
    min-width: 0;
  }
  .article-nav .nav-title {
    white-space: normal;
  }
  .article-nav .nav-next {
    margin-left: 0;
    text-align: left;
  }
  #news-search {
    padding: 30px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-item,
  .news-thumb img,
  .news-more,
  .news-body h3 {
    transition: none !important;
  }
  .news-item:hover {
    transform: none;
  }
  .news-item:hover .news-thumb img {
    transform: none;
  }
}

/* ---------- 与首页共用的补充样式 ---------- */
.news-item[hidden],
.pager[hidden] {
  display: none !important;
}
#news-search {
  position: relative;
}
#news-search .search-results a strong {
  font-weight: 500;
  color: #333;
}
#news-search .search-results a:hover strong {
  color: var(--red);
}
.back-top img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
@media (max-width: 900px) {
  header nav.open a.is-current {
    color: var(--red);
  }
  header .brand {
    width: 132px;
  }
  header .header-tools {
    gap: 14px;
  }
  header .header-tools .language {
    display: none;
  }
  .news-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 6px;
  }
  .news-tabs::-webkit-scrollbar {
    display: none;
  }
}
