/*
  Design philosophy: 工业高对比企业官网风格。
  本文件只负责新闻资讯页面样式：深黑导航/横幅、白色内容区、金色状态强调、左侧分类栏与右侧新闻列表。
  图片不在此处生成，仅使用 HTML 中预留的 /assets/imgs/news/... 路径，后续可自行替换。
*/

:root {
  --news-gold: #f6b900;
  --news-gold-dark: #d99a00;
  --news-black: #050608;
  --news-ink: #111827;
  --news-muted: #697282;
  --news-line: #e7e9ee;
  --news-soft: #f6f7f9;
  --news-footer: #111820;
  --news-footer-deep: #0e141b;
  --news-shadow: 0 16px 38px rgba(17, 24, 39, 0.08);
}

body {
  background: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.news-hero {
  position: relative;
  min-height: 214px;
  margin-top: var(--site-header-height, 70px);
  color: #ffffff;
  overflow: hidden;
  background: #07090d var(--news-hero-image) center center / cover no-repeat;
}

.news-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 34%, rgba(0, 0, 0, 0.18) 72%, rgba(0, 0, 0, 0.48) 100%),
    radial-gradient(circle at 82% 42%, rgba(246, 185, 0, 0.22), transparent 30%);
  z-index: 0;
}

.news-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.26));
  z-index: 1;
}

.news-hero__content {
  position: relative;
  z-index: 2;
  padding-top: 45px;
  padding-bottom: 34px;
}

.news-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.news-hero p {
  margin: 0 0 34px;
  color: rgba(255, 255, 255, 0.91);
  font-size: 1.03rem;
}

.news-breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
}

.news-breadcrumb a:hover {
  color: var(--news-gold);
}

.news-breadcrumb span[aria-hidden="true"] {
  color: rgba(255, 255, 255, 0.48);
  font-size: 1.3rem;
  line-height: 1;
}

/* Main layout */
.news-page {
  background: #ffffff;
  padding: 42px 0 58px;
}

.news-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.news-panel {
  background: #ffffff;
  border: 1px solid var(--news-line);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.news-panel h2 {
  margin: 0;
  padding: 18px 18px 10px;
  color: var(--news-ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.news-category-panel {
  padding-bottom: 10px;
}

.news-category {
  width: calc(100% - 28px);
  margin: 0 14px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #26303d;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid #f0f1f4;
  padding: 0 14px;
  text-align: left;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.news-category svg {
  width: 15px;
  height: 15px;
  color: #798393;
  transition: transform 0.18s ease, color 0.18s ease;
}

.news-category:hover {
  color: var(--news-gold-dark);
  transform: translateX(2px);
}

.news-category:hover svg {
  color: var(--news-gold-dark);
  transform: translateX(2px);
}

.news-category.active {
  color: #ffffff;
  background: var(--news-gold);
  border-bottom-color: transparent;
  font-weight: 700;
}

.news-category.active svg {
  color: #ffffff;
}

.news-subscribe-panel {
  padding-bottom: 18px;
}

.news-subscribe-panel p {
  margin: 0;
  padding: 0 18px;
  color: var(--news-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.news-subscribe-form {
  padding: 16px 18px 12px;
}

.news-subscribe-form input,
.news-search-input,
.news-sort {
  width: 100%;
  height: 42px;
  border: 1px solid var(--news-line);
  background: #ffffff;
  color: var(--news-ink);
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.news-subscribe-form input {
  padding: 0 14px;
  margin-bottom: 12px;
}

.news-subscribe-form input:focus,
.news-search-input:focus,
.news-sort:focus {
  border-color: rgba(246, 185, 0, 0.8);
  box-shadow: 0 0 0 3px rgba(246, 185, 0, 0.14);
}

.news-subscribe-form button {
  width: 100%;
  height: 42px;
  color: #ffffff;
  background: var(--news-gold);
  font-weight: 700;
  transition: background 0.18s ease, transform 0.18s ease;
}

.news-subscribe-form button:hover {
  background: var(--news-gold-dark);
  transform: translateY(-1px);
}

.news-privacy {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.8rem !important;
  color: #7b8492 !important;
}

.news-privacy svg {
  width: 15px;
  height: 15px;
  margin-top: 4px;
  color: #9aa3af;
  flex: 0 0 auto;
}

/* Toolbar */
.news-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.news-sort-wrap,
.news-search-wrap {
  position: relative;
  background: #ffffff;
}

.news-sort-wrap {
  width: 122px;
}

.news-search-wrap {
  width: min(100%, 232px);
}

.news-sort,
.news-search-input {
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.04);
}

.news-sort {
  appearance: none;
  padding: 0 34px 0 13px;
  color: #303846;
  cursor: pointer;
}

.news-search-input {
  padding: 0 38px 0 14px;
}

.news-search-wrap svg,
.news-sort-wrap svg {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

/* List */
.news-list {
  border: 1px solid var(--news-line);
  background: #ffffff;
}

.news-item {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 22px;
  padding: 0;
  min-height: 128px;
  background: #ffffff;
  border-bottom: 1px solid var(--news-line);
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.news-item:last-child {
  border-bottom: 0;
}

.news-item:hover {
  background: #fffdf6;
  box-shadow: inset 3px 0 0 var(--news-gold);
}

.news-item.is-hidden {
  display: none;
}

.news-thumb {
  display: block;
  width: 100%;
  height: 128px;
  overflow: hidden;
  background: linear-gradient(135deg, #151a21, #363b42);
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.news-item:hover .news-thumb img {
  transform: scale(1.045);
  filter: saturate(1.05) contrast(1.03);
}

.news-item__body {
  min-width: 0;
  padding: 17px 18px 13px 0;
  display: flex;
  flex-direction: column;
}

.news-tag {
  color: var(--news-gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.news-item h2 {
  margin: 0 0 8px;
  color: var(--news-ink);
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.35;
  font-weight: 800;
}

.news-item h2 a:hover {
  color: var(--news-gold-dark);
}

.news-item p {
  margin: 0;
  color: var(--news-muted);
  font-size: 0.91rem;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 11px;
}

.news-meta-row time,
.news-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
}

.news-meta-row time {
  color: #7f8794;
}

.news-meta-row time svg,
.news-more svg {
  width: 15px;
  height: 15px;
}

.news-more {
  color: #1f2937;
  font-weight: 700;
  white-space: nowrap;
}

.news-more svg {
  transition: transform 0.18s ease;
}

.news-more:hover {
  color: var(--news-gold-dark);
}

.news-more:hover svg {
  transform: translateX(4px);
}

.news-empty {
  margin: 18px 0 0;
  padding: 22px;
  color: var(--news-muted);
  text-align: center;
  border: 1px dashed #d8dce3;
  background: #fafafa;
}

.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
}

.page-btn,
.page-ellipsis {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e5eb;
  color: #1f2937;
  background: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.18s ease;
}

.page-btn svg {
  width: 16px;
  height: 16px;
}

.page-btn:hover,
.page-btn.active {
  border-color: var(--news-gold);
  background: var(--news-gold);
  color: #ffffff;
}

.page-ellipsis {
  border-color: transparent;
  color: #9aa3af;
}

@media (max-width: 1100px) {
  .news-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
  }

  .news-item {
    grid-template-columns: 220px minmax(0, 1fr);
  }

}

@media (max-width: 860px) {
  .news-page {
    padding-top: 30px;
  }

  .news-layout {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    order: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .news-toolbar {
    justify-content: stretch;
  }

  .news-sort-wrap,
  .news-search-wrap {
    width: 50%;
  }

}

@media (max-width: 640px) {
  .news-hero {
    min-height: 190px;
  }

  .news-hero__content {
    padding-top: 34px;
  }

  .news-hero p {
    margin-bottom: 24px;
  }

  .news-sidebar {
    grid-template-columns: 1fr;
  }

  .news-toolbar {
    flex-direction: column;
  }

  .news-sort-wrap,
  .news-search-wrap {
    width: 100%;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .news-thumb {
    height: 190px;
  }

  .news-item__body {
    padding: 16px;
  }

  .news-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

}
