/* =======================================================
   news.css — 新闻列表页 + 新闻详情页 共享样式
   依赖：global.css（Design Tokens / 导航 / 页脚 / 通用工具）
   ======================================================= */

/* ===========================
   Hero Section（内页通用）
   =========================== */
.page-hero {
  background: var(--brand-dark);
  height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: var(--nav-h);
}

.page-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(10,158,206,.22) 0%, transparent 55%),
    radial-gradient(circle at 72% 50%, rgba(4,82,151,.28) 0%, transparent 55%);
  z-index: 0;
}

/* 格点纹理 */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  padding: 0 2rem;
}

.page-hero-content .breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}

.page-hero-content .breadcrumb a {
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}

.page-hero-content .breadcrumb a:hover { color: rgba(255,255,255,.9); }
.page-hero-content .breadcrumb span { color: rgba(255,255,255,.3); }

.page-hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.page-hero-content .hero-sub {
  font-size: 1rem;
  opacity: 0.75;
}

/* ===========================
   Layout Wrapper
   =========================== */
.news-wrapper {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   Scroll Reveal
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   新闻列表页 — 筛选栏
   =========================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 2rem 0 0;
}

.filter-bar .filter-label {
  font-size: 0.85rem;
  color: var(--neutral-500);
  margin-right: 0.25rem;
}

.filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-300);
  background: white;
  color: var(--neutral-700);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--brand-primary);
  background: var(--brand-light);
  color: var(--brand-primary);
}

/* ===========================
   新闻列表页 — 精选头条
   =========================== */
.featured-section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--neutral-300);
  margin-bottom: 2rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: center;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.featured-card-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.featured-card-img-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 60%, var(--brand-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.featured-card-img-placeholder img{ height:100%;}

.featured-card-img-placeholder svg {
  width: 72px;
  height: 72px;
  opacity: 0.4;
}

.featured-card-body {
  padding: 2.5rem 2.5rem 2.5rem 0;
}

.featured-badge {
  display: inline-block;
  background: var(--brand-primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.featured-card-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--brand-dark);
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.featured-card-body p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--neutral-500);
}

.featured-meta .meta-tag {
  background: var(--brand-light);
  color: var(--brand-primary);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

/* ===========================
   新闻列表页 — 卡片网格
   =========================== */
.news-grid-section {
  padding-bottom: 3rem;
}

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

.news-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.news-card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.news-card-thumb-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.news-card-thumb-placeholder img{ height:100%;}

.news-card-thumb-placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.35;
}

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

.news-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-accent);
  background: rgba(10,158,206,.1);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.7rem;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

.news-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--brand-dark);
  margin-bottom: 0.6rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-body p.excerpt {
  font-size: 0.88rem;
  color: #777;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--neutral-500);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--neutral-100);
}

.news-card-meta .read-more {
  color: var(--brand-primary);
  font-weight: 500;
  font-size: 0.82rem;
}

/* ===========================
   分页
   =========================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0 3rem;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-300);
  background: white;
  color: var(--neutral-700);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: var(--font-sans);
  text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: white;
}

.page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.page-ellipsis {
  color: var(--neutral-500);
  font-size: 0.9rem;
  padding: 0 0.25rem;
}

/* ===========================
   新闻详情页 — 布局
   =========================== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 3rem 0 4rem;
  align-items: start;
}

/* ===========================
   新闻详情页 — 文章主体
   =========================== */
.article-header {
  margin-bottom: 2rem;
}

.article-cats {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.article-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-accent);
  background: rgba(10,158,206,.1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--brand-dark);
  line-height: 1.35;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--neutral-500);
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--brand-light);
}

.article-meta svg {
  width: 14px;
  height: 14px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.article-cover {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  display: block;
}

.article-cover-placeholder {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 60%, var(--brand-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.article-cover-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.35;
}

/* 文章正文排版 */
.article-body {
  font-size: 1rem;
  line-height: 1.9;
  color: #333;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--brand-dark);
  margin: 2.5rem 0 1rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--brand-accent);
  line-height: 1.4;
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--brand-primary);
  margin: 2rem 0 0.8rem;
}

.article-body p {
  margin-bottom: 1.4rem;
  color: #444;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.4rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  color: #444;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--brand-light);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--brand-dark);
}

.article-body strong {
  color: var(--brand-dark);
  font-weight: 700;
}

.article-body .tip-box {
  background: rgba(10,158,206,.06);
  border: 1px solid rgba(10,158,206,.25);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}

.article-body .tip-box .tip-title {
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

/* 文章标签 & 分享 */
.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 0;
  border-top: 1px solid var(--neutral-300);
  /* 覆盖 global.css 中 footer 元素的深色背景和白色文字 */
  background: white;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-tags .tag-label {
  font-size: 0.82rem;
  color: var(--neutral-500);
}

.article-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--neutral-700);
  transition: all var(--transition);
  text-decoration: none;
}

.article-tag:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
  color: var(--brand-primary);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--neutral-500);
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--neutral-300);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.share-btn:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
}

/* 上一篇 / 下一篇 */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.article-nav-item {
  padding: 1.2rem 1.5rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}

.article-nav-item:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
}

.article-nav-item .nav-dir {
  font-size: 0.75rem;
  color: var(--neutral-500);
  margin-bottom: 0.4rem;
}

.article-nav-item .nav-title {
  font-size: 0.92rem;
  color: var(--brand-dark);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-nav-item.prev { text-align: left; }
.article-nav-item.next { text-align: right; }

/* ===========================
   新闻详情页 — 侧边栏
   =========================== */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.sidebar-block {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

.sidebar-block-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  background: var(--brand-primary);
  padding: 0.8rem 1.2rem;
  letter-spacing: 0.03em;
}

.sidebar-block-body {
  padding: 1.2rem;
}

/* 相关文章 */
.related-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--neutral-100);
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition);
}

.related-item:last-child { border-bottom: none; }

.related-item:hover { opacity: 0.75; }

.related-thumb {
  width: 68px;
  height: 50px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-thumb svg {
  width: 20px;
  height: 20px;
  opacity: 0.4;
}

.related-item-body h4 {
  font-size: 0.85rem;
  color: var(--brand-dark);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.related-item-body .related-date {
  font-size: 0.75rem;
  color: var(--neutral-500);
}

/* 热门标签 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--neutral-700);
  text-decoration: none;
  transition: all var(--transition);
}

.tag-cloud a:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
  color: var(--brand-primary);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-card-img-placeholder {
    height: 220px;
  }
  .featured-card-body {
    padding: 1.5rem;
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .featured-card-img-placeholder img{ width:100%;}
  .news-card-thumb-placeholder img{width:100%;}
}

@media (max-width: 768px) {
  .page-hero {
    height: 220px;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    gap: 0.5rem;
  }
  .article-nav {
    grid-template-columns: 1fr;
  }
  
  
}

@media (max-width: 480px) {
  .page-hero-content h1 {
    font-size: 1.5rem;
  }
  .featured-card-img-placeholder {
    height: 180px;
  }
}
