/* ===== news.css — 行业资讯页样式 ===== */

/* ---- 工具栏 ---- */
.news-page { padding: 60px 0 80px; }

.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.news-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-btn {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.05);
  color: var(--text-muted, #8899aa);
  font-size: 13px;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
}
.cat-btn:hover { border-color: var(--primary,#00d4ff); color: var(--primary,#00d4ff); background: rgba(0,212,255,0.1); }
.cat-btn.active { background: var(--primary,#00d4ff); border-color: var(--primary,#00d4ff); color: #000; font-weight: 600; }

.news-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 24px;
  padding: 8px 18px;
  min-width: 220px;
}
.news-search svg { color: var(--text-muted,#8899aa); flex-shrink: 0; }
.news-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text,#e0e8f0);
  font-size: 14px;
  width: 100%;
}
.news-search input::placeholder { color: var(--text-muted,#8899aa); }

/* ---- 分类标签 ---- */
.news-cat-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.news-cat-tag.pcb      { background: rgba(0,212,255,0.15); color: #00d4ff; }
.news-cat-tag.pcba     { background: rgba(0,255,179,0.15); color: #00ffb3; }
.news-cat-tag.material { background: rgba(255,165,0,0.15);  color: #ffa500; }
.news-cat-tag.industry { background: rgba(124,58,237,0.15); color: #a78bfa; }
.news-cat-tag.standard { background: rgba(239,68,68,0.15);  color: #f87171; }
.news-cat-tag.tech     { background: rgba(16,185,129,0.15); color: #34d399; }

.news-date { font-size: 12px; color: var(--text-muted,#8899aa); }
.read-time { font-size: 12px; color: var(--text-muted,#8899aa); }

/* ---- 热门置顶卡片 ---- */
.news-featured { margin-bottom: 48px; }

.featured-card {
  position: relative;
  background: linear-gradient(135deg, rgba(0,212,255,0.06) 0%, rgba(0,255,179,0.04) 100%);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 16px;
  padding: 40px 44px;
  transition: border-color .3s;
}
.featured-card:hover { border-color: rgba(0,212,255,0.5); }

.featured-badge {
  position: absolute;
  top: -12px; left: 32px;
  background: linear-gradient(90deg,#00d4ff,#00ffb3);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.featured-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.featured-title {
  font-size: clamp(18px,2.5vw,26px);
  font-weight: 700;
  color: #e0e8f0;
  margin-bottom: 14px;
  line-height: 1.4;
}

.featured-excerpt {
  color: var(--text-muted,#8899aa);
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 24px;
}

.featured-footer { display: flex; align-items: center; justify-content: space-between; }

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary,#00d4ff);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: gap .2s;
  cursor: pointer;
  background: none;
  border: none;
}
.read-more-btn:hover { gap: 8px; }

/* ---- 文章网格 ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.news-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.news-card:hover {
  border-color: rgba(0,212,255,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,212,255,0.08);
}

.news-card-top { display: flex; align-items: center; justify-content: space-between; }

.news-title {
  font-size: 15px;
  font-weight: 600;
  color: #d0dde8;
  line-height: 1.5;
  flex: 1;
}

.news-excerpt {
  font-size: 13px;
  color: var(--text-muted,#8899aa);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.read-more {
  color: var(--primary,#00d4ff);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .2s;
}
.read-more:hover { opacity: .7; }

/* ---- 加载更多 ---- */
.news-load-more { text-align: center; margin-bottom: 60px; }
.btn-load-more {
  padding: 12px 40px;
  border-radius: 24px;
  border: 1px solid rgba(0,212,255,0.3);
  background: rgba(0,212,255,0.06);
  color: var(--primary,#00d4ff);
  font-size: 14px;
  cursor: pointer;
  transition: all .25s;
}
.btn-load-more:hover:not(:disabled) { background: rgba(0,212,255,0.15); border-color: var(--primary,#00d4ff); }

/* ---- 订阅 ---- */
.news-subscribe {
  background: linear-gradient(135deg, rgba(0,212,255,0.07) 0%, rgba(0,255,179,0.05) 100%);
  border: 1px solid rgba(0,212,255,0.18);
  border-radius: 16px;
  padding: 40px 48px;
}
.subscribe-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.subscribe-icon { flex-shrink: 0; opacity: .8; }
.subscribe-text { flex: 1; min-width: 200px; }
.subscribe-text h3 { font-size: 18px; font-weight: 700; color: #e0e8f0; margin-bottom: 6px; }
.subscribe-text p  { font-size: 14px; color: var(--text-muted,#8899aa); }
.subscribe-form { display: flex; gap: 12px; flex-wrap: wrap; }
.subscribe-form input {
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid rgba(0,212,255,0.25);
  background: rgba(255,255,255,0.04);
  color: #e0e8f0;
  font-size: 14px;
  min-width: 220px;
  outline: none;
  transition: border-color .25s;
}
.subscribe-form input:focus { border-color: var(--primary,#00d4ff); }
.btn-subscribe {
  padding: 10px 28px;
  border-radius: 24px;
  border: none;
  background: linear-gradient(90deg,#00d4ff,#00ffb3);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .25s;
  white-space: nowrap;
}
.btn-subscribe:hover { opacity: .85; }

/* ---- 文章弹窗 ---- */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.article-modal.active { opacity: 1; pointer-events: all; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
}

.modal-body {
  position: relative;
  background: #0d1a2a;
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 48px;
  transform: translateY(20px);
  transition: transform .3s;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,0.3) transparent;
}
.article-modal.active .modal-body { transform: translateY(0); }

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -16px -16px 12px 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.08);
  color: #8899aa;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  z-index: 1;
}
.modal-close:hover { background: rgba(0,212,255,0.2); color: #e0e8f0; }

.modal-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-title { font-size: clamp(18px,2.5vw,24px); font-weight: 700; color: #e0e8f0; line-height: 1.4; margin-bottom: 24px; }

.modal-article {
  color: #b0bec5;
  line-height: 1.9;
  font-size: 15px;
}
.modal-article h4 { color: #e0e8f0; font-size: 16px; font-weight: 600; margin: 24px 0 10px; }
.modal-article p { margin-bottom: 14px; }
.modal-article ul { padding-left: 20px; margin-bottom: 14px; }
.modal-article li { margin-bottom: 8px; }
.modal-article strong { color: var(--primary,#00d4ff); }

.modal-cta {
  margin-top: 36px;
  padding: 24px;
  background: rgba(0,212,255,0.06);
  border-radius: 10px;
  text-align: center;
}
.modal-cta p { color: #8899aa; margin-bottom: 16px; font-size: 14px; }

/* ---- 首页新闻预览区块 ---- */
.news-preview { padding: 80px 0; }
.news-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.news-preview-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .3s, transform .3s;
  text-decoration: none;
}
.news-preview-card:hover { border-color: rgba(0,212,255,0.4); transform: translateY(-3px); }
.npcard-top { display: flex; align-items: center; justify-content: space-between; }
.npcard-title { font-size: 15px; font-weight: 600; color: #d0dde8; line-height: 1.5; }
.npcard-excerpt { font-size: 13px; color: #7a8fa0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.npcard-more { font-size: 12px; color: var(--primary,#00d4ff); margin-top: auto; }
.news-preview-all { text-align: center; }
.btn-news-all {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px; border-radius: 24px;
  border: 1px solid rgba(0,212,255,0.35);
  color: var(--primary,#00d4ff);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: all .25s;
}
.btn-news-all:hover { background: rgba(0,212,255,0.1); border-color: var(--primary,#00d4ff); }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
  .news-grid, .news-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card { padding: 28px 24px; }
  .news-subscribe { padding: 28px 24px; }
  .modal-body { padding: 32px 24px; }
}
@media (max-width: 600px) {
  .news-grid, .news-preview-grid { grid-template-columns: 1fr; }
  .news-toolbar { flex-direction: column; align-items: stretch; }
  .news-search { min-width: unset; }
  .subscribe-inner { flex-direction: column; align-items: flex-start; }
  .subscribe-form input { min-width: unset; width: 100%; }
  .featured-title { font-size: 18px; }
}
