/* ============================================================
   page-news —— 文章动态页面专属样式
   作用域限定：所有选择器以 .page-news 为祖先
   移动端优先 + 桌面端增强
   ============================================================ */

/* --- 页面级变量（仅在此页面作用域内生效） --- */
.page-news {
  --news-accent: var(--color-accent, #FF7F2A);
  --news-accent-hover: var(--color-accent-hover, #E66A1F);
  --news-bg-deep: var(--color-bg-dark, #0A0F1E);
  --news-bg-warm: var(--color-bg-light, #F5F7FA);
  --news-surface: var(--color-surface, #FFFFFF);
  --news-text-light: var(--color-text-primary, #F0F4F8);
  --news-text-muted: var(--color-text-secondary, #A0B4C8);
  --news-primary: var(--color-primary, #0B1D3A);
  --news-primary-light: var(--color-primary-light, #1A3A6A);
  --news-line-color: rgba(108, 142, 178, 0.35);
  --news-dot-glow: rgba(255, 127, 42, 0.55);
  --news-card-radius: 12px;
  --news-transition: var(--transition-base, 0.35s ease);
}

/* ===================== 通用容器 ===================== */
.page-news .container {
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===================== 面包屑 ===================== */
.page-news .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.8rem;
  color: var(--news-text-muted);
  padding: 1rem 0 0.5rem;
}

.page-news .breadcrumb a {
  color: var(--news-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast, 0.2s ease);
}

.page-news .breadcrumb a:hover,
.page-news .breadcrumb a:focus-visible {
  color: var(--news-accent);
  outline: 2px solid var(--news-accent);
  outline-offset: 2px;
}

.page-news .breadcrumb .sep {
  color: var(--news-text-muted);
  user-select: none;
}

.page-news .breadcrumb [aria-current="page"] {
  color: var(--news-text-light);
  font-weight: 500;
}

/* ===================== Hero 区 ===================== */
.page-news .news-hero {
  position: relative;
  background: var(--news-bg-deep);
  color: var(--news-text-light);
  overflow: hidden;
  padding: 2rem 0 4rem;
  /* 斜切下边缘 */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.5vw), 0 100%);
  margin-bottom: -1px;
}

.page-news .hero__layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.page-news .hero__text {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.page-news .hero__title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  line-height: 1.1;
  color: var(--news-text-light);
  background: linear-gradient(135deg, var(--news-text-light) 60%, var(--news-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-news .hero__desc {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.7;
  color: var(--news-text-muted);
  margin: 0 0 1.25rem;
  max-width: 600px;
}

.page-news .hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.page-news .hero__badge {
  display: inline-block;
  background: rgba(255, 127, 42, 0.15);
  border: 1px solid rgba(255, 127, 42, 0.35);
  color: var(--news-accent);
  font-family: var(--font-small, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.page-news .hero__visual {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  border-radius: var(--news-card-radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.page-news .hero__img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  display: block;
  aspect-ratio: 1920 / 400;
}

/* Hero 斜线装饰 */
.page-news .hero__slash {
  position: absolute;
  top: 0;
  right: -5%;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 127, 42, 0.06) 100%);
  transform: skewX(-12deg);
  pointer-events: none;
  z-index: 0;
}

/* ===================== 筛选栏 ===================== */
.page-news .news-filters {
  background: var(--news-bg-warm);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(108, 142, 178, 0.15);
  position: sticky;
  top: var(--header-height, 72px);
  z-index: 10;
}

.page-news .filters__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.page-news .filter-btn {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.5rem 1.2rem;
  border: 2px solid transparent;
  border-radius: 30px;
  background: var(--news-surface);
  color: var(--news-primary);
  cursor: pointer;
  transition: all var(--news-transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-news .filter-btn:hover,
.page-news .filter-btn:focus-visible {
  border-color: var(--news-accent);
  color: var(--news-accent);
  outline: none;
}

.page-news .filter-btn.is-active {
  background: var(--news-accent);
  color: #fff;
  border-color: var(--news-accent);
  box-shadow: 0 4px 14px rgba(255, 127, 42, 0.3);
}

/* ===================== 时间线区域 ===================== */
.page-news .news-timeline {
  background: var(--news-bg-warm);
  padding: 3rem 0 4rem;
  position: relative;
}

.page-news .timeline__section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--news-primary);
}

.page-news .timeline__section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--news-accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

/* 时间线轨道（斜线与主线） */
.page-news .timeline__wrapper {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.page-news .timeline__track {
  position: absolute;
  top: 0;
  left: 28px;
  width: 4px;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page-news .timeline__line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--news-line-color);
  border-radius: 2px;
}

/* 斜线引导 */
.page-news .timeline__slant {
  position: absolute;
  top: 0;
  left: -18px;
  width: 48px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 5%, rgba(255, 127, 42, 0.08) 20%, transparent 40%, rgba(108, 142, 178, 0.06) 60%, transparent 80%);
  transform: skewX(-18deg);
  border-left: 2px solid rgba(255, 127, 42, 0.12);
  border-right: 1px solid rgba(108, 142, 178, 0.08);
  pointer-events: none;
}

/* 时间线条目列表 */
.page-news .timeline__items {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* 每个条目 */
.page-news .timeline__item {
  position: relative;
  padding-left: 68px;
  min-height: 100px;
}

/* 发光圆点 */
.page-news .timeline__dot {
  position: absolute;
  top: 0.25rem;
  left: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--news-accent);
  box-shadow: 0 0 0 4px rgba(255, 127, 42, 0.15), 0 0 20px var(--news-dot-glow);
  z-index: 2;
  transform: translateX(-50%);
  transition: box-shadow var(--news-transition);
}

.page-news .timeline__item:hover .timeline__dot {
  box-shadow: 0 0 0 6px rgba(255, 127, 42, 0.25), 0 0 32px var(--news-dot-glow);
}

.page-news .dot__pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--news-accent);
  transform: translate(-50%, -50%) scale(1);
  animation: dot-pulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes dot-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

/* 时间线卡片 */
.page-news .timeline__card {
  background: var(--news-surface);
  border-radius: var(--news-card-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: transform var(--news-transition), box-shadow var(--news-transition);
  border: 1px solid rgba(108, 142, 178, 0.08);
  position: relative;
}

.page-news .timeline__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-news .card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.page-news .card__tag {
  display: inline-block;
  font-family: var(--font-small, 'Inter', sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.7rem;
  border-radius: 16px;
  background: rgba(108, 142, 178, 0.12);
  color: var(--news-primary-light);
}

.page-news .tag--version {
  background: rgba(255, 127, 42, 0.12);
  color: var(--news-accent);
}

.page-news .tag--service {
  background: rgba(46, 203, 126, 0.12);
  color: #1EA86A;
}

.page-news .tag--industry {
  background: rgba(108, 142, 178, 0.15);
  color: var(--news-primary-light);
}

.page-news .card__period {
  font-family: var(--font-small, 'Inter', sans-serif);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--news-text-muted);
  letter-spacing: 0.02em;
}

.page-news .card__title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin: 0 0 0.5rem;
  color: var(--news-primary);
  line-height: 1.3;
}

.page-news .card__summary {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.92rem;
  line-height: 1.7;
  color: #3A4A5E;
  margin: 0 0 0.75rem;
}

.page-news .card__visual {
  margin: 0.75rem 0 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  max-width: 320px;
}

.page-news .card__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  aspect-ratio: attr(width) / attr(height);
}

.page-news .card__footer {
  padding-top: 0.5rem;
}

.page-news .card__link {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--news-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast, 0.2s ease);
}

.page-news .card__link:hover,
.page-news .card__link:focus-visible {
  border-bottom-color: var(--news-accent);
  outline: none;
}

.page-news .card__link::after {
  content: ' →';
  transition: margin var(--transition-fast);
}

.page-news .card__link:hover::after {
  margin-left: 4px;
}

/* ===================== 内容索引区域 ===================== */
.page-news .news-index {
  background: var(--news-bg-deep);
  color: var(--news-text-light);
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* 网格底纹 */
.page-news .news-index::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 142, 178, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 142, 178, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.page-news .news-index .container {
  position: relative;
  z-index: 1;
}

.page-news .index__section-title {
  text-align: center;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--news-text-light);
}

.page-news .index__section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--news-accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.page-news .index__desc {
  text-align: center;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.95rem;
  color: var(--news-text-muted);
  max-width: 520px;
  margin: 0.5rem auto 2rem;
  line-height: 1.6;
}

/* 索引网格 */
.page-news .index__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 860px;
  margin: 0 auto 2rem;
}

.page-news .index__card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(108, 142, 178, 0.15);
  border-radius: var(--news-card-radius);
  padding: 1.25rem 1.5rem;
  transition: background var(--news-transition), border-color var(--news-transition);
}

.page-news .index__card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 127, 42, 0.25);
}

.page-news .index__card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.page-news .index__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 127, 42, 0.12);
  border-radius: 10px;
  color: var(--news-accent);
  flex-shrink: 0;
}

.page-news .index__title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  color: var(--news-text-light);
}

.page-news .index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.page-news .index__list li {
  position: relative;
  padding-left: 1.2rem;
}

.page-news .index__list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--news-accent);
  font-weight: 700;
  font-size: 1.1rem;
}

.page-news .index__list a {
  color: var(--news-text-muted);
  text-decoration: none;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  border-bottom: 1px solid transparent;
}

.page-news .index__list a:hover,
.page-news .index__list a:focus-visible {
  color: var(--news-accent);
  border-bottom-color: var(--news-accent);
  outline: none;
}

/* 索引区底图 */
.page-news .index__visual {
  max-width: 600px;
  margin: 2rem auto 0;
  border-radius: var(--news-card-radius);
  overflow: hidden;
  opacity: 0.7;
  transition: opacity var(--news-transition);
}

.page-news .index__visual:hover {
  opacity: 1;
}

.page-news .index__img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 600 / 300;
  object-fit: cover;
  border-radius: var(--news-card-radius);
}

/* ===================== 筛选交互（纯CSS基础状态） ===================== */
/* 默认全部显示，JS 可通过添加 .filter-active 类来控制隐藏 */
/* 无 JS 时所有条目可见，符合渐进增强 */
.page-news .timeline__item {
  display: block;
}

/* ===================== 响应式：平板以上 768px ===================== */
@media (min-width: 768px) {
  .page-news .hero__layout {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .page-news .hero__text {
    flex: 1 1 50%;
  }

  .page-news .hero__visual {
    flex: 1 1 45%;
    max-width: 520px;
  }

  .page-news .hero__img {
    max-height: 320px;
  }

  .page-news .hero__title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
  }

  .page-news .hero__desc {
    font-size: 1.05rem;
  }

  .page-news .news-hero {
    padding: 3rem 0 5rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%);
  }

  .page-news .timeline__track {
    left: 40px;
    width: 5px;
  }

  .page-news .timeline__slant {
    left: -24px;
    width: 68px;
  }

  .page-news .timeline__item {
    padding-left: 88px;
  }

  .page-news .timeline__dot {
    left: 26px;
    width: 28px;
    height: 28px;
  }

  .page-news .timeline__card {
    padding: 1.5rem 2rem;
  }

  .page-news .card__visual {
    max-width: 280px;
  }

  .page-news .index__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .page-news .index__card {
    padding: 1.5rem 1.75rem;
  }

  .page-news .index__visual {
    max-width: 600px;
  }
}

/* ===================== 响应式：桌面 1024px ===================== */
@media (min-width: 1024px) {
  .page-news .hero__layout {
    gap: 3rem;
  }

  .page-news .hero__visual {
    flex: 1 1 50%;
    max-width: 600px;
  }

  .page-news .hero__img {
    max-height: 360px;
  }

  .page-news .news-hero {
    padding: 4rem 0 6rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5vw), 0 100%);
  }

  .page-news .timeline__items {
    gap: 3rem;
  }

  .page-news .timeline__item {
    padding-left: 100px;
  }

  .page-news .timeline__dot {
    left: 28px;
    width: 32px;
    height: 32px;
  }

  .page-news .timeline__card {
    padding: 1.75rem 2.25rem;
  }

  .page-news .index__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  .page-news .index__card {
    padding: 1.25rem 1.5rem;
  }

  .page-news .filter-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
  }
}

/* ===================== 辅助 ===================== */
.page-news .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 确保所有图片自适应 */
.page-news img {
  max-width: 100%;
  height: auto;
}

/* 筛选按钮 focus 可见 */
.page-news .filter-btn:focus-visible {
  outline: 2px solid var(--news-accent);
  outline-offset: 3px;
}
