/* ================================================
   新希望官网 · 新闻资讯页专用样式 news.css
   包含：新闻列表页（数据条 / 筛选 / 卡片 / 分页）+ 新闻详情页（正文 / 分享 / 上下篇 / 相关推荐）
   依赖：inpage.css（设计变量 + 内页复用组件）
   ================================================ */

/* ========== 分类筛选栏 ========== */
.news-index-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 18%, rgba(162, 242, 83, 0.09), transparent 26%),
    radial-gradient(circle at 92% 62%, rgba(1, 127, 64, 0.07), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfefc 45%, #f7fbf8 100%);
}

.news-index-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  background-image: radial-gradient(rgba(1, 127, 64, 0.14) 0.7px, transparent 0.7px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, transparent 72%);
}

.news-index-section .page-content {
  position: relative;
  z-index: 1;
  max-width: 1600px;
}

.news-index-section .section-header {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== 文章列表容器 ========== */
.news-list {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  counter-reset: news-card;
}

/* ========== 文章卡片 ========== */
.news-card {
  counter-increment: news-card;
  display: flex;
  align-items: stretch;
  background: var(--bg-white);
  border: 1px solid var(--border);
  min-height: 210px;
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 34px rgba(1, 64, 32, 0.07);
}

/* hover 左侧绿色强调条 */
.news-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-green-mid), var(--brand-green));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
  z-index: 5;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(1, 127, 64, 0.18);
  box-shadow: 0 22px 54px rgba(1, 64, 32, 0.13);
}

.news-card:hover::before {
  transform: scaleY(1);
}

/* 缩略图区 */
.news-card-image {
  /* 卡片最小高度为 210px，按 5:3 比例匹配为 350×210px，避免底部出现空白 */
  width: 350px;
  min-width: 350px;
  height: auto;
  min-height: 0;
  aspect-ratio: 5 / 3;
  align-self: flex-start;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

/* 无图占位：渐变背景 + 居中 SVG 图标 + 底部文字 */
.news-card-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: linear-gradient(145deg, #059252 0%, var(--brand-green) 42%, var(--brand-green-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.news-card-placeholder::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 65%);
  border-radius: 50%;
}

.news-card-placeholder::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -15%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(162,242,83,0.16) 0%, transparent 65%);
  border-radius: 50%;
}

.news-card-image::after {
  /* 隐藏卡片左下角自动生成的序号 */
  display: none;
}

.news-card-placeholder svg {
  width: 46px;
  height: 46px;
  color: rgba(255,255,255,0.92);
  position: relative;
  z-index: 2;
}

.news-card-placeholder span {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
  letter-spacing: 3px;
  position: relative;
  z-index: 2;
}

/* 右侧内容区 */
.news-card-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

/* 标签行 */
.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-card-tag {
  display: inline-block;
  padding: 3px 9px;
  background: linear-gradient(135deg, var(--brand-green-light), var(--gold-pale));
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(1, 127, 64, 0.07);
  border-radius: 5px;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

/* 标题 */
.news-card-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.48;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover .news-card-title {
  color: var(--brand-green);
}

/* 摘要 2 行截断 */
.news-card-excerpt {
  font-size: 14px;
  color: #8A95A5;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 底部 meta 行 */
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.news-card-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.news-card-date svg {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
}

.news-card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--brand-green);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.news-card-category::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-green-mid);
}

/* 阅读更多 */
.news-card-read {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--brand-green);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: gap 0.3s ease;
}

.news-card-read svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-read {
  gap: 10px;
}

.news-card:hover .news-card-read svg {
  transform: translateX(2px);
}

/* ================================================
   新闻详情页样式
   ================================================ */

/* ========== 文章顶部 Banner ========== */
.article-hero {
  background: linear-gradient(180deg, var(--brand-green-pale) 0%, #fff 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26,148,68,0.06) 0%, transparent 65%);
  border-radius: 50%;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 面包屑 */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-14);
  color: var(--text-muted);
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  font-weight: 400;
}

.article-breadcrumb span.sep {
  opacity: 0.4;
  font-size: var(--font-size-12);
}

.article-breadcrumb a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.article-breadcrumb a:hover {
  color: var(--brand-green);
}

.article-breadcrumb .current {
  color: var(--text-dark);
  font-weight: 500;
}

/* 标签行 */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.article-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--brand-green-light);
  color: var(--brand-green);
  font-size: var(--font-size-12);
  font-weight: 500;
  border-radius: 4px;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

/* 文章标题 */
.article-title {
  font-size: var(--font-size-36);
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

/* meta 行 */
.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-12);
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.article-meta-item svg {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
}

/* ========== 正文区 ========== */
.article-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
}

.article-body p {
  font-size: var(--font-size-16);
  line-height: 2;
  color: #4A5568;
  /* margin-bottom: 24px; */
  letter-spacing: 0.3px;
}

.article-body h2 {
  font-size: var(--font-size-24);
  font-weight: 500;
  color: var(--text-dark);
  margin: 40px 0 20px;
  padding-left: 16px;
  border-left: 4px solid var(--brand-green);
  line-height: 1.4;
  letter-spacing: 1px;
}

.article-body h3 {
  font-size: var(--font-size-18);
  font-weight: 500;
  color: var(--text-dark);
  margin: 32px 0 16px;
  letter-spacing: 0.5px;
}

.article-body img {
  width: 100%;
  border-radius: 12px;
  margin: 12px 0;
}

.article-body blockquote {
  border-left: 4px solid var(--brand-green);
  background: #F0FEF7;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
  color: var(--text-body);
  font-size: var(--font-size-16);
  line-height: 1.9;
  position: relative;
}

.article-body blockquote p {
  margin-bottom: 0;
  color: var(--text-body);
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.article-body ul li,
.article-body ol li {
  margin-bottom: 8px;
  line-height: 1.8;
  color: #4A5568;
  font-size: var(--font-size-16);
}

.article-body ul li::marker {
  color: var(--brand-green);
}

.article-body ol li::marker {
  color: var(--brand-green);
  font-weight: 500;
}

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

/* ========== 文章底部 / 分享区 ========== */
.article-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-share-label {
  font-size: var(--font-size-14);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.article-share-icons {
  display: flex;
  gap: 12px;
}

.article-share-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-green-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-green);
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-share-icon svg {
  width: 18px;
  height: 18px;
}

.article-share-icon:hover {
  background: var(--brand-green);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(26, 148, 68, 0.28);
}

/* ========== 上下篇导航 ========== */
.article-pager {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.article-pager-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.article-pager-item {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: var(--bg-white);
}

.article-pager-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.article-pager-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-green-light);
}

.article-pager-item:hover::before {
  background: var(--brand-green);
}

.article-pager-item.next {
  text-align: right;
}

.article-pager-item.next .article-pager-arrow {
  margin-left: auto;
}

.article-pager-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-green-pale);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-green);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.article-pager-arrow svg {
  width: 18px;
  height: 18px;
}

.article-pager-item:hover .article-pager-arrow {
  background: var(--brand-green);
  color: #fff;
}

.article-pager-text {
  flex: 1;
  min-width: 0;
}

.article-pager-label {
  font-size: var(--font-size-12);
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 500;
}

.article-pager-text > a {
  font-size: var(--font-size-16);
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.5;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-pager-item:hover .article-pager-text > a {
  color: var(--brand-green);
}

/* ========== 相关推荐 ========== */
.article-related {
  background: var(--bg-light);
  padding: 88px 0;
}

.article-related .section-header {
  margin-bottom: 48px;
}

.related-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-green-light);
}

.related-card-image {
  overflow: hidden;
  position: relative;
}

.related-card-image .news-card-placeholder {
  border-radius: 0;
}

.related-card-body {
  padding: 16px 20px;
}

.related-card-title {
  font-size: var(--font-size-16);
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.related-card:hover .related-card-title {
  color: var(--brand-green);
}

.related-card-date {
  font-size: var(--font-size-12);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.related-card-date svg {
  width: 13px;
  height: 13px;
  color: var(--text-faint);
}


/* ================================================
   响应式
   ================================================ */
@media (max-width: 1024px) {
  .news-list {
    grid-template-columns: 1fr;
    max-width: 920px;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-title {
    font-size: var(--font-size-32);
  }
}

@media (max-width: 768px) {
  /* 新闻卡片纵向布局 */
  .news-card {
    flex-direction: column;
  }
  .news-card-image {
    width: 100%;
    min-width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .news-card-body {
    padding: 22px 24px;
  }
  .news-card-title {
    font-size: var(--font-size-18);
  }

  .news-list {
    gap: 22px;
  }

  .article-hero {
    padding: 56px 0 44px;
  }
  .article-title {
    font-size: var(--font-size-26);
    letter-spacing: 0.5px;
  }
  .article-body {
    padding: 44px 24px;
  }
  .article-body h2 {
    font-size: var(--font-size-22);
  }

  /* 上下篇单列 */
  .article-pager-grid {
    grid-template-columns: 1fr;
  }
  .article-pager-item.next {
    text-align: left;
    flex-direction: row;
  }

  .article-related {
    padding: 56px 0;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 480px) {
  .news-card-body {
    padding: 20px 18px;
  }
  .news-card-meta {
    gap: 14px;
  }
  .news-card-read {
    margin-left: 0;
  }
  .article-title {
    font-size: var(--font-size-22);
  }
  .article-body {
    padding: 36px 18px;
  }
  .article-body p {
    font-size: var(--font-size-15);
  }
  .article-body h2 {
    font-size: var(--font-size-20);
  }
  .article-body h3 {
    font-size: var(--font-size-17);
  }
  .article-body blockquote {
    padding: 16px 18px;
  }
  .article-footer {
    padding: 32px 18px;
  }
  .article-pager {
    padding: 16px 18px;
  }
  .article-pager-item {
    padding: 18px 20px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .filter-tabs.navBox {
    box-sizing: border-box;
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-tabs.navBox {
    scroll-behavior: auto;
  }
}