/* =========================================================
   新闻页 v2 —— 参考派能公司动态版式
   浅色横幅 + 胶囊双标签 + 置顶大卡 + 三列卡片网格
   全部动效在 prefers-reduced-motion 下自动停用
   ========================================================= */

.news-v2 {
  background: linear-gradient(180deg, #f4f8f5 0%, #ffffff 340px);
  /* 覆盖通用 .section 的 96px 大留白：大卡改为上提叠压横幅，衔接更紧凑 */
  padding: 0 0 84px;
}

/* ---------- 1. 横幅：流光背景 + 大标题 + 胶囊标签 ---------- */
.news-hero {
  position: relative;
  overflow: hidden;
  /* 读报照片直接铺满，不加蒙版 */
  background: url("../images/news-reading.webp") center 35% / cover no-repeat;
  padding: clamp(64px, 9vw, 110px) 0 clamp(88px, 9vw, 126px);
}
/* 照片上不加蒙版，标题改白字 + 轻描影保证可读（选择器加权，压过后面的深色规则） */
.news-hero .news-hero-copy h1 { color: #fff; }
.news-hero .news-hero-sub { color: rgba(255, 255, 255, .92); }
.news-hero .news-hero-kicker { color: #9be8c4; }
.news-hero .news-hero-copy h1,
.news-hero .news-hero-sub,
.news-hero .news-hero-kicker {
  text-shadow: 0 1px 4px rgba(18, 49, 42, .45), 0 0 18px rgba(18, 49, 42, .25);
}
.news-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: .32;
  display: none; /* 照片直接铺满后光斑不再需要 */
}
.news-hero-glow.g1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(23,161,95,.30), transparent 65%);
  top: -180px; inset-inline-start: -120px;
  animation: nvGlow1 14s ease-in-out infinite;
}
.news-hero-glow.g2 {
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(15,122,74,.22), transparent 65%);
  bottom: -320px; inset-inline-end: -160px;
  animation: nvGlow2 17s ease-in-out infinite;
}
@keyframes nvGlow1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 40px) scale(1.12); }
}
@keyframes nvGlow2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, -36px) scale(1.08); }
}

.news-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.news-hero-copy { max-width: 640px; }
.news-hero-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .34em;
  font-weight: 700;
  color: #17a15f;
  opacity: 0;
  animation: nvRise .8s cubic-bezier(.22,1,.36,1) .1s forwards;
}
.news-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.12;
  color: var(--navy, #12312a);
  letter-spacing: .01em;
  opacity: 0;
  transform: translateY(26px);
  animation: nvRise .9s cubic-bezier(.22,1,.36,1) .22s forwards;
}
.news-hero-sub {
  margin: 0;
  font-size: clamp(15px, 1.6vw, 18px);
  color: #5d7268;
  opacity: 0;
  animation: nvRise .9s cubic-bezier(.22,1,.36,1) .36s forwards;
}
@keyframes nvRise {
  to { opacity: 1; transform: translateY(0); }
}

/* 胶囊标签 */
.news-tabs {
  position: relative;
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(18, 49, 42, .10), inset 0 0 0 1px rgba(18,49,42,.06);
  opacity: 0;
  animation: nvRise .9s cubic-bezier(.22,1,.36,1) .5s forwards;
}
.news-tab-thumb {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  border-radius: 999px;
  background: linear-gradient(135deg, #0f7a4a, #17a15f);
  box-shadow: 0 8px 20px rgba(23, 161, 95, .35);
  transition: transform .45s cubic-bezier(.22,1,.36,1), width .45s cubic-bezier(.22,1,.36,1);
  will-change: transform, width;
}
.news-tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #40544b;
  transition: color .35s ease;
}
.news-tab span { display: inline-block; }
.news-tab.is-active { color: #fff; }

/* ---------- 2. 置顶大卡 ---------- */
.nv-feature {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(18, 49, 42, .10);
  /* 上提叠压横幅底部，形成层次感 */
  margin: -58px 0 34px;
  z-index: 2;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
}
.nv-feature.is-on { opacity: 1; transform: none; }
.nv-feature.is-leaving { opacity: 0; transform: translateY(-16px) scale(.985); }
/* hidden 属性必须真正生效：display:grid 会盖掉浏览器默认的 [hidden]{display:none} */
.nv-feature[hidden] { display: none; }

.nv-feature-media {
  position: relative;
  min-height: 320px;
  max-height: 430px;
  overflow: hidden;
}
.nv-feature-media.m-photo { background: #10312a; }
.nv-feature-media.m-photo .nf-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.nv-feature-media.m-product {
  background:
    radial-gradient(120% 120% at 20% 10%, #f2f8f4 0%, #dfeae3 60%, #cfe0d5 100%);
}
.nv-feature-media.m-product .nf-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 18px;
}
.nf-img {
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(.22,1,.36,1);
}
.nv-feature:hover .nf-img { transform: scale(1.08); }

/* 揭幕遮罩：加载时从左向右擦出图片 */
.nv-feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #f2f8f4, #d8e6dc);
  transform-origin: left center;
  animation: nvWipe 1.1s cubic-bezier(.6,.05,.2,1) .25s both;
  pointer-events: none;
  z-index: 2;
}
[dir="rtl"] .nv-feature-media::after { transform-origin: right center; }
@keyframes nvWipe {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); visibility: hidden; }
}

.nv-badge {
  position: absolute;
  z-index: 3;
  top: 18px;
  inset-inline-start: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #0f7a4a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: 0 6px 16px rgba(18,49,42,.18);
  animation: nvRise .7s cubic-bezier(.22,1,.36,1) .9s backwards;
}
.nv-badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #17a15f;
  animation: nvPulse 1.8s ease-in-out infinite;
}
@keyframes nvPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(23,161,95,.5); }
  55% { box-shadow: 0 0 0 7px rgba(23,161,95,0); }
}
.nv-cover-tag {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  inset-inline-start: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 42, 34, .55);
  color: #eafff3;
  font-size: 12.5px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  animation: nvRise .7s cubic-bezier(.22,1,.36,1) 1.05s backwards;
}

.nv-feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}
.nv-feature-body time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #17a15f;
  letter-spacing: .05em;
  animation: nvRise .7s cubic-bezier(.22,1,.36,1) .5s backwards;
}
.nv-feature-body time::before {
  content: "";
  width: 26px; height: 2px;
  background: #17a15f;
  border-radius: 2px;
}
.nv-feature-body h3 {
  margin: 14px 0 12px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  color: var(--navy, #12312a);
  animation: nvRise .7s cubic-bezier(.22,1,.36,1) .62s backwards;
}
.nv-feature-body > p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.75;
  color: #5d7268;
  animation: nvRise .7s cubic-bezier(.22,1,.36,1) .74s backwards;
}
.nv-feature-body .news-full { animation: nvRise .7s cubic-bezier(.22,1,.36,1) .82s backwards; }
.nv-more {
  align-self: flex-start;
  margin-top: 22px;
  padding: 12px 26px;
  border: 1.5px solid #17a15f;
  border-radius: 999px;
  background: transparent;
  color: #0f7a4a;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color .35s ease, box-shadow .35s ease;
  animation: nvRise .7s cubic-bezier(.22,1,.36,1) .88s backwards;
  z-index: 1;
}
.nv-more::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f7a4a, #17a15f);
  transform: translateX(-101%);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
  z-index: -1;
}
[dir="rtl"] .nv-more::before { transform: translateX(101%); }
.nv-more:hover { color: #fff; box-shadow: 0 10px 24px rgba(23,161,95,.35); }
.nv-more:hover::before { transform: translateX(0); }

/* 大卡展开全文高度放宽 */
.nv-feature.open .news-full { max-height: 800px; opacity: 1; margin-top: 12px; }

/* ---------- 3. 卡片网格 ---------- */
.news-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.nv-card {
  position: relative;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(18, 49, 42, .08);
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s cubic-bezier(.22,1,.36,1);
}
.nv-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 56px rgba(18, 49, 42, .16);
}

/* 悬停流光描边 */
.nv-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1.6px;
  background: conic-gradient(from var(--beam, 0deg),
    transparent 0deg, transparent 250deg,
    rgba(23,161,95,.95) 300deg, rgba(122,227,176,.95) 330deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
.nv-card:hover::after { opacity: 1; animation: nvBeam 3s linear infinite; }
@property --beam {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes nvBeam { to { --beam: 360deg; } }

/* 滚动入场：交错上浮 */
.nv-card.nv-enter, .nv-feature.nv-enter {
  opacity: 0;
  transform: translateY(34px) scale(.98);
}
.nv-card.nv-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
/* tab 切换新进入的卡 */
.nv-card.nv-pop {
  animation: nvPop .65s cubic-bezier(.22,1,.36,1) both;
  animation-delay: var(--pop-delay, 0s);
}
@keyframes nvPop {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* 封面：图片缩放 + 无图卡大月份数字 */
.nv-card .news-cover { position: relative; overflow: hidden; }
.nv-card .cover-img {
  transition: transform .9s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}
.nv-card:hover .cover-img { transform: scale(1.07); }
.nv-cover { height: 176px; }
.nv-cover-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 96px;
  font-weight: 800;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .30);
  text-shadow: 0 4px 22px rgba(0, 0, 0, .18);
  transform: translateY(12px);
  transition: transform .7s cubic-bezier(.22,1,.36,1), color .7s ease;
}
.nv-card:hover .nv-cover-num {
  transform: translateY(0);
  color: rgba(255, 255, 255, .42);
}
/* 无图卡封面流光 */
.nv-cover::before { z-index: 1; }
.nv-cover span { z-index: 2; }

/* 卡片正文微调 */
.nv-card .news-body { padding: 24px 24px 26px; }
.nv-card .news-body h3 {
  transition: color .35s ease;
}
.nv-card:hover .news-body h3 { color: #0f7a4a; }
.nv-card .nv-more {
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #0f7a4a;
  font-size: 14px;
  font-weight: 600;
  overflow: visible;
}
.nv-card .nv-more::before { content: none; }
.nv-card .nv-more:hover { color: #17a15f; box-shadow: none; }
.nv-card .nv-more::after {
  content: "";
  display: inline-block;
  width: 0; height: 2px;
  margin-inline-start: 8px;
  background: #17a15f;
  vertical-align: middle;
  transition: width .4s cubic-bezier(.22,1,.36,1);
}
.nv-card .nv-more:hover::after { width: 26px; }
.nv-card .news-photos img {
  border-radius: 10px;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.nv-card .news-photos img:hover { transform: scale(1.04); }

/* FLIP 重排时卡片由 JS 控制 transform，关闭 hover 上浮避免打架 */
.nv-grid-flipping .nv-card { transition: none; }
.nv-grid-flipping .nv-card:hover { transform: none; box-shadow: 0 14px 36px rgba(18,49,42,.08); }

/* ---------- 4. 响应式 ---------- */
@media (max-width: 1200px) {
  .news-grid-v2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .news-hero-inner { flex-direction: column; align-items: center; text-align: center; }
  .news-hero-copy { max-width: none; }
  .nv-feature { grid-template-columns: 1fr; margin-top: -44px; }
  .nv-feature-media { max-height: 300px; }
  .nv-feature-media.m-product .nf-img { padding: 22px; }
}
@media (max-width: 760px) {
  .news-grid-v2 { grid-template-columns: 1fr; }
  .news-tab { padding: 10px 20px; font-size: 14px; }
  .nv-cover-num { font-size: 72px; }
}

/* ---------- 5. 无动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .news-hero-glow,
  .nv-feature-media::after,
  .nv-badge::before { animation: none !important; }
  .news-hero h1, .news-hero-kicker, .news-hero-sub, .news-tabs,
  .nv-badge, .nv-cover-tag, .nv-feature-body time, .nv-feature-body h3,
  .nv-feature-body > p, .nv-feature-body .news-full, .nv-more {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .nv-feature { opacity: 1; transform: none; }
  .nv-card.nv-enter, .nv-feature.nv-enter { opacity: 1; transform: none; }
  .nv-card::after { content: none; }
  .nf-img, .nv-card .cover-img { transform: none !important; transition: none !important; }
  .news-tab-thumb { transition: none; }
  .nv-card.nv-pop { animation: none; opacity: 1; }
}
