/* ============================================================
   新闻列表页 / 新闻详情页 专属样式
   依赖根目录 style.css 的 CSS 变量与通用组件（header/footer/btn 等）
   ============================================================ */

/* ---------- 通用 ---------- */
.nav-menu a.active { color: var(--primary); font-weight: 700; }
.nav-menu a.active::after { width: 100%; }

/* 阅读进度条（详情页） */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-light));
  z-index: 2000;
  transition: width 0.1s linear;
}

/* ---------- 页头横幅 ---------- */
.news-hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.news-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.news-hero-inner { position: relative; z-index: 1; }

.news-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.news-breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.news-breadcrumb a:hover { color: var(--accent); }
.news-breadcrumb .sep { opacity: 0.55; }
.news-breadcrumb .current { color: var(--text-muted); }

.news-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  background: var(--primary-soft);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  letter-spacing: 0.05em;
}

.news-hero h1 {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.news-hero .news-hero-desc {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 640px;
}

/* ---------- 分类筛选 ---------- */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.35rem;
  background: var(--brand-soft);
  border-radius: 14px;
  max-width: 640px;
  margin: 2rem auto 0;
}

.news-filter .filter-btn {
  flex: 1 1 auto;
  justify-content: center;
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  line-height: 1;
}

.news-filter .filter-btn:hover { color: var(--primary); background: rgba(255,255,255,0.85); }
.news-filter .filter-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* ---------- 列表区 ---------- */
.news-section { padding: 3rem 0 4rem; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s, border-color 0.3s;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* 封面占位：上线后台后可替换为 <img class="news-cover-img"> */
.news-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.news-cover .cover-icon {
  width: 64px;
  height: 64px;
  color: rgba(255,255,255,0.92);
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.18));
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}

.news-card:hover .cover-icon { transform: scale(1.12) rotate(-3deg); }

.news-cover .cover-word {
  position: absolute;
  top: 0.9rem;
  left: 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}

.news-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1.6px);
  background-size: 18px 18px;
  pointer-events: none;
}

/* 分类配色（封面渐变 + 标签），.cover-* 可同时用于列表卡片与详情页封面 */
.cover-promo   { background: linear-gradient(135deg, #FF3B30 0%, #FF6A00 100%); }
.cover-company { background: linear-gradient(135deg, #1d1d1f 0%, #55555e 100%); }
.cover-industry{ background: linear-gradient(135deg, #0071e3 0%, #00c7be 100%); }
.cover-tech    { background: linear-gradient(135deg, #34C759 0%, #30B0C7 100%); }

.news-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
  padding: 1.3rem 1.3rem 1.4rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cat-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.cat-tag.cat-promo    { background: linear-gradient(135deg, #FF3B30, #FF6A00); }
.cat-tag.cat-company  { background: linear-gradient(135deg, #1d1d1f, #55555e); }
.cat-tag.cat-industry { background: linear-gradient(135deg, #0071e3, #00c7be); }
.cat-tag.cat-tech     { background: linear-gradient(135deg, #34C759, #30B0C7); }

.news-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.news-card:hover .news-body h3 { color: var(--accent); }

.news-body .news-excerpt {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-body .news-more {
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.news-body .news-more .icon { transition: transform 0.25s; }
.news-card:hover .news-more .icon { transform: translateX(4px); }

/* 列表为空 */
.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.pagination button:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- 详情页布局 ---------- */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.article-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.4rem 2.4rem;
  box-shadow: var(--shadow);
}

.article-head .news-meta { margin-bottom: 0.9rem; }

.article-head h1 {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.article-sub {
  margin-top: 0.9rem;
  padding: 0.85rem 1.1rem;
  background: var(--primary-soft);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.article-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-meta-row .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-meta-row .icon { width: 15px; height: 15px; }

.article-actions { margin-left: auto; display: inline-flex; gap: 0.5rem; }

.article-actions button,
.article-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.article-actions button:hover,
.article-actions a:hover { border-color: var(--accent); color: var(--accent); }

/* 详情页封面占位：上线后台后替换为 <img> */
.article-cover {
  position: relative;
  margin: 1.8rem 0;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-cover .cover-icon { width: 72px; height: 72px; color: rgba(255,255,255,0.92); }
.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1.6px);
  background-size: 18px 18px;
  pointer-events: none;
}

.article-cover .cover-word {
  position: absolute;
  bottom: 1rem;
  right: 1.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}

/* ---------- 正文排版 ---------- */
.article-body { font-size: 1rem; color: var(--text); line-height: 1.9; }

.article-body p { margin: 1rem 0; color: #3a3a3e; }

.article-body h2 {
  position: relative;
  margin: 2.2rem 0 1rem;
  padding-left: 0.85rem;
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 4px;
  height: 1em;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}

.article-body h3 { margin: 1.8rem 0 0.8rem; font-size: 1.08rem; font-weight: 700; }

.article-body ul, .article-body ol { margin: 1rem 0; padding-left: 1.5rem; }
.article-body ul li { margin: 0.45rem 0; list-style: none; position: relative; }
.article-body ul li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.article-body ol li { margin: 0.45rem 0; }
.article-body ol li::marker { color: var(--accent); font-weight: 700; }

.article-body strong { color: var(--text); font-weight: 700; }
.article-body a { color: var(--accent); text-decoration: none; border-bottom: 1px dashed currentColor; }

.article-body blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.3rem;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.article-body blockquote p { margin: 0.3rem 0; color: inherit; }

.article-body code {
  padding: 0.15em 0.45em;
  background: var(--primary-soft);
  border-radius: 5px;
  font-size: 0.86em;
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  color: var(--accent-dark);
}

.article-body pre {
  margin: 1.2rem 0;
  padding: 1.1rem 1.3rem;
  background: var(--primary);
  border-radius: var(--radius);
  overflow-x: auto;
}

.article-body pre code { background: none; color: #f5f5f7; padding: 0; line-height: 1.7; }

.article-body table {
  width: 100%;
  margin: 1.4rem 0;
  border-collapse: collapse;
  font-size: 0.9rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}

.article-body th, .article-body td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-body thead th {
  background: var(--primary-soft);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.article-body tbody tr:last-child td { border-bottom: none; }
.article-body tbody tr:nth-child(even) { background: #fafafc; }

/* 正文内图片占位：上线后台后替换为 <img src="..."> */
.article-body .img-placeholder {
  margin: 1.4rem 0;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.article-body .img-placeholder .icon { width: 40px; height: 40px; opacity: 0.9; }

.article-body .img-note {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: -0.6rem 0 1.2rem;
}

/* ---------- 文章页脚：标签 + 上下篇 ---------- */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}

.article-tags .tags-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.2rem;
}

.article-tags a {
  padding: 0.25rem 0.8rem;
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.article-tags a:hover { background: var(--accent-soft); color: var(--accent); }

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.25s;
  min-width: 0;
}

.article-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.article-nav a.next { text-align: right; }

.article-nav .nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-nav .nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-back { display: flex; justify-content: center; margin-top: 1.8rem; }

/* ---------- 侧边栏 ---------- */
.side-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.4rem;
}

.side-card .side-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.side-card .side-title .icon { width: 18px; height: 18px; color: var(--accent); }

.side-list { list-style: none; }

.side-list li + li { border-top: 1px dashed var(--border); margin-top: 0.8rem; padding-top: 0.8rem; }

.side-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.side-list .side-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.side-list a:hover .side-item-title { color: var(--accent); }

.side-list .side-item-meta {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.side-contact { text-align: center; }

.side-contact .side-contact-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.side-contact .btn { width: 100%; margin-top: 0.6rem; }

.side-contact .tg-icon { width: 16px; height: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-layout { grid-template-columns: 1fr; }
  .side-card { margin-bottom: 0; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; }
}

@media (max-width: 768px) {
  .news-hero { padding: 2.4rem 0 2.2rem; }
  .news-hero h1 { font-size: 1.6rem; }
  .news-filter { margin-top: 1.5rem; }
  .news-filter .filter-btn { padding: 0.55rem 0.8rem; font-size: 0.82rem; min-width: 0; flex: 1 1 40%; }
  .news-section { padding: 2.2rem 0 3rem; }
  .news-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .article-card { padding: 1.5rem 1.2rem 1.8rem; }
  .article-head h1 { font-size: 1.3rem; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav a.next { text-align: left; }
  .side-col { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .news-hero h1 { font-size: 1.4rem; }
  .pagination button { min-width: 34px; height: 36px; font-size: 0.8rem; }
}
