/* ============================================
   News Page V2 - 页面布局样式
   参照 Work 页面设计模式
   组件样式引用自 components.css
   ============================================ */

/* ============================================
   页面基础布局
   ============================================ */
.news-page-v2 {
  background: #f5f5f5;
}

/* 页眉默认透明，不显示吸附背景 - 覆盖 header-v3.css */
.news-page-v2 .main-header {
  background: transparent !important;
}

.news-page-v2 .main-header::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  opacity: 0 !important;
  z-index: -1 !important;
  transform-origin: top !important;
  transition: none !important;
}

.news-page-v2 .main-header.sticky::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(245, 245, 245, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06) !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  z-index: -1 !important;
  transform-origin: top !important;
  transition: all 0.3s ease !important;
}

/* 页眉容器透明 */
.news-page-v2 .header__container {
  background: transparent !important;
}

.news-page-v2 .news-main {
  position: relative;
  z-index: 10;
  background: #f5f5f5;
  padding-top: 160px;
  padding-bottom: 100px;
  margin-bottom: var(--footer-h, 80vh);
  min-height: 100vh;
}

/* ============================================
   标题样式 - 与 Company 页面统一
   ============================================ */
.news-section-header {
  width: 100%;
  background: #f5f5f5;
  padding-bottom: 60px;
}

.news-section-header .section-header {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px;
}

.news-page-v2 .section-header-label {
  display: block;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #333333;
  margin-bottom: 16px;
}

.news-page-v2 .section-header-title {
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  color: #111111;
  margin: 0;
}

/* iPad 适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .news-section-header .section-header {
    padding: 0 32px;
  }

  .news-filter-wrapper {
    padding: 0 32px;
  }

  .news-cards-section {
    padding: 0 32px 48px;
  }

  .news-page-v2 .section-header-title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .news-section-header .section-header {
    padding: 0 24px;
  }

  .news-section-header {
    padding-bottom: 40px;
  }

  .news-page-v2 .section-header-label {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .news-page-v2 .section-header-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .news-page-v2 .section-header-label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .news-page-v2 .section-header-title {
    font-size: 24px;
  }
}

/* ============================================
   筛选器区域布局
   ============================================ */
.news-filter-wrapper {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto 50px;
  padding: 0 50px;
}

@media (max-width: 768px) {
  .news-filter-wrapper {
    padding: 0 24px;
  }
}

/* ============================================
   新闻卡片区域布局
   ============================================ */
.news-cards-section {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px 60px;
}

@media (max-width: 768px) {
  .news-cards-section {
    padding: 0 24px 40px;
  }
}

/* 新闻卡片增强样式 */
.news-page-v2 .card-news {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

.news-page-v2 .card-news:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.news-page-v2 .card-news-image {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.news-page-v2 .card-news-image img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0) scale(1);
}

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

/* 卡片悬停时标题变色 */
.news-page-v2 .card-news:hover .card-news-title {
  color: #333;
}

/* 卡片悬停时箭头联动右移 + 下划线展开 */
.news-page-v2 .card-news:hover .btn-underline--arrow .btn-arrow {
  transform: translateY(-50%) translateX(4px);
}

.news-page-v2 .card-news:hover .btn-underline::before {
  width: 100%;
}

/* 卡片底部信息 */
.card-news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #999;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
}

.card-news-category {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #111;
  background: #f0f0f0;
  border-radius: 4px;
}

.card-news-date {
  font-size: 13px;
  color: #999;
}

.card-news-footer {
  padding: 0 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.card-news-footer .btn-underline {
  font-size: 14px;
}

.card-news-footer .btn-underline--arrow {
  padding-right: 24px;
}

.card-news-footer .btn-underline--arrow .btn-arrow {
  width: 18px;
  height: 18px;
}

/* 空状态提示 */
.news-gallery__empty {
  display: none;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
  font-size: 18px;
  color: #666;
  font-family: 'Noto Sans SC', sans-serif;
}

.news-gallery__empty.is-visible {
  display: block;
}

/* 加载更多 */
.news-load-more {
  padding: 40px 0 0;
  text-align: center;
}

.news-load-more .btn-solid {
  min-width: 160px;
}

.news-load-end {
  text-align: center;
  padding: 40px 0 0;
  color: #999;
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
}

/* ============================================
   筛选动画
   ============================================ */
.card-news.is-hiding {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.card-news.is-showing {
  animation: newsCardFadeIn 0.4s ease forwards;
}

@keyframes newsCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   详情页样式 - 白色 section 风格（与 Company 页面统一）
   ============================================ */

/* 详情页 - 页眉样式 */
.news-page-v2.news-detail-mode .main-header.sticky::before {
  background: rgba(255, 255, 255, 0.95) !important;
}

/* --- Hero 区域：面包屑 + 元信息 + 标题 + 作者 --- */
.news-detail-hero {
  position: relative;
  width: 100%;
  background: #ffffff;
  z-index: 10;
  padding: 160px 0 80px;
}

.news-detail-hero__container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px;
}

/* 面包屑 */
.news-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.news-detail-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}

.news-detail-breadcrumb__link:hover {
  color: #111;
}

.news-detail-breadcrumb__link svg {
  flex-shrink: 0;
}

.news-detail-breadcrumb__sep {
  font-size: 14px;
  color: #ccc;
}

/* 元信息（分类 + 日期） */
.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
}

.news-detail-meta__category {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  background: #f0f0f0;
  border-radius: 6px;
}

.news-detail-meta__date {
  font-size: 14px;
  color: #999;
}

/* 标题 */
.news-detail-hero__title {
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: #111;
  margin: 0 0 32px;
  line-height: 1.2;
  max-width: 1000px;
  letter-spacing: -0.02em;
}

/* 作者 */
.news-detail-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-detail-author__name {
  font-size: 15px;
  font-weight: 500;
  color: #666;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
}

/* --- 特色图片区域 --- */
.news-detail-cover {
  position: relative;
  width: 100%;
  background: #ffffff;
  z-index: 10;
  padding: 40px 0 0;
}

.news-detail-cover__container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px;
}

.news-detail-cover__frame {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: #f0f0f0;
}

.news-detail-cover__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- 文章正文区域 --- */
.news-detail-content {
  position: relative;
  width: 100%;
  background: #ffffff;
  z-index: 10;
  padding: 80px 0 100px;
}

.news-detail-content__container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px;
}

/* 文章内容 */
.news-detail-article {
  overflow: visible;
  max-width: 820px;
  margin: 0 auto;
}

.news-detail-article__body {
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: #333;
}

.news-detail-article__body p {
  margin: 0 0 1.2em;
}

.news-detail-article__body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 2em 0 1em;
  color: #111;
}

.news-detail-article__body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 1.5em 0 0.8em;
  color: #111;
}

.news-detail-article__body ul,
.news-detail-article__body ol {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

.news-detail-article__body li {
  margin-bottom: 0.5em;
}

.news-detail-article__body blockquote {
  margin: 1.5em 0;
  padding: 1.2em 1.5em;
  border-left: 3px solid #111;
  background: #f9f9f9;
  border-radius: 0 12px 12px 0;
  font-style: normal;
  color: #555;
}

.news-detail-article__body img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: 12px;
}

.news-detail-article__body a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.news-detail-article__body a:hover {
  color: #666;
}

/* 标签 */
.news-detail-tags {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-detail-tag {
  font-size: 13px;
  font-weight: 400;
  color: #666;
  background: #f0f0f0;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-detail-tag:hover {
  color: #111;
  background: #e5e5e5;
  transform: translateY(-1px);
}

/* --- 上一篇 / 下一篇导航 --- */
.news-detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 820px;
  margin: 60px auto 0;
  padding-top: 40px;
  border-top: 1px solid #e5e5e5;
}

.news-detail-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  transition: color 0.3s ease;
}

.news-detail-nav__item:hover {
  color: #666;
}

.news-detail-nav__placeholder {
  visibility: hidden;
  pointer-events: none;
}

.news-detail-nav__item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.news-detail-nav__prev:hover svg {
  transform: translateX(-4px);
}

.news-detail-nav__next:hover svg {
  transform: translateX(4px);
}

/* --- 相关文章区域 - 浅灰背景 --- */
.news-detail-related {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  z-index: 10;
  padding: 80px 0 100px;
  margin-bottom: var(--footer-h, 80vh);
}

.news-detail-related__container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 50px;
}

.news-detail-related__grid {
  margin-top: 40px;
}

.news-detail-related .section-header-label {
  font-size: 14px;
  color: #999;
}

.news-detail-related .section-header-title {
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #111;
  margin: 0;
}

/* 无相关文章时，正文区域承担 margin-bottom */
.news-detail-content:last-child {
  margin-bottom: var(--footer-h, 80vh);
}

/* ============================================
   详情页响应式
   ============================================ */
@media (max-width: 768px) {
  .news-detail-hero {
    padding: 120px 0 48px;
  }

  .news-detail-hero__container {
    padding: 0 24px;
  }

  .news-detail-hero__title {
    font-size: 26px;
  }

  .news-detail-cover__container {
    padding: 0 24px;
  }

  .news-detail-cover__frame {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
  }

  .news-detail-content {
    padding: 48px 0 60px;
  }

  .news-detail-content__container {
    padding: 0 24px;
  }

  .news-detail-nav {
    margin-top: 40px;
    padding-top: 28px;
  }

  .news-detail-related {
    padding: 48px 0 60px;
  }

  .news-detail-related__container {
    padding: 0 24px;
  }

  .news-page-v2 .news-main {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .news-page-v2 .news-main,
  .news-detail-related,
  .news-detail-content:last-child {
    margin-bottom: var(--footer-h, 70vh);
  }
}

@media (max-width: 480px) {
  .news-detail-hero__title {
    font-size: 22px;
  }

  .news-detail-article__body {
    font-size: 15px;
    line-height: 1.9;
  }

  .news-detail-nav__item {
    font-size: 14px;
  }
}

/* ============================================
   筛选提示
   ============================================ */
.news-filter-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 20px;
}

.news-filter-info__text {
  font-size: 14px;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  color: #333;
}

.news-filter-info__text strong {
  color: #111;
  font-weight: 600;
}

.news-filter-info__count {
  color: #999;
}

.news-filter-info__clear {
  font-size: 13px;
  font-family: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  color: #666;
  text-decoration: none;
  padding: 6px 14px;
  background: #f0f0f0;
  border-radius: 6px;
  transition: all 0.2s;
}

.news-filter-info__clear:hover {
  background: #111;
  color: #fff;
}