/* =============================================
   新闻资讯模块 - 参照 demo.html 的 mfid10
   命名空间: .ni-* (完全隔离，不影响其他模块)
   ============================================= */

.news-info-section {
  background: #f9f9f9;
  padding: 60px 0;
  width: 100%;
}

/* ---------- 标题区 ---------- */
.ni-header {
  position: relative;
  text-align: center;
  margin-bottom: 50px;
  padding: 20px 0 0;
  overflow: hidden;
}

.ni-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
  position: relative;
  display: inline-block;
  z-index: 2;
}

.ni-title .accent {
  color: #0074bc;
}

.ni-title-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 110px;
  font-weight: 900;
  color: #ededed;
  font-style: italic;
  letter-spacing: 8px;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
}

.ni-subtitle {
  text-align: center;
  color: #999;
  font-size: 15px;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* ---------- 内容容器（Grid 布局，左右两栏天然等高） ---------- */
.ni-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 48% 1fr;
  gap: 30px;
  align-items: stretch;
}

/* 左侧头条卡片容器（Grid 子项：占 48% 列，等高拉伸） */
.ni-content > .ni-feature-viewport {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 头条卡片轨道（与右侧列表同步切换） */
.ni-feature-viewport {
  overflow: hidden;
  position: relative;
}

.ni-feature-track {
  display: flex;
  width: 300%; /* fallback，JS 按 pageCount 动态设置 */
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  flex: 1 1 auto;
}

.ni-feature-page {
  flex: 0 0 33.3333%; /* fallback，JS 按 pageCount 动态设置 */
  width: 33.3333%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* ---------- 左侧：单卡 ---------- */
.ni-feature {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  overflow: hidden;
  transition: all 0.35s ease;
  cursor: pointer;
}

.ni-feature:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.ni-feature-img {
  position: relative;
  width: 100%;
  flex: 1 1 0;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: #d9e3f0;
  overflow: hidden;
}

.ni-feature-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 1;
}

.ni-feature-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #0074bc;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 18px;
  letter-spacing: 2px;
  z-index: 2;
}

.ni-feature-body {
  padding: 24px 20px 28px;
  flex: 0 0 auto;
}

.ni-feature-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.ni-feature:hover .ni-feature-title {
  color: #0074bc;
}

.ni-feature-desc {
  font-size: 14px;
  color: #999;
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 分类Tab（标题下方居中） ---------- */
.ni-tabs {
  max-width: 1400px;
  margin: 0 auto 30px;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.ni-tab {
  flex: 0 0 auto;
  padding: 8px 22px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  color: #0074bc;
  border: 1px solid #0074bc;
  transition: all 0.25s ease;
  outline: none;
}

.ni-tab:hover {
  background: #0074bc;
  color: #fff;
}

.ni-tab.active {
  background: #0074bc;
  border-color: #0074bc;
  color: #fff;
}

/* 列表容器（用于左滑动画，由 Grid stretch 自动等高） */
.ni-list-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ni-list-viewport {
/*  flex: 1 1 auto;*/
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: #fff;
}

.ni-list-track {
  display: flex;
  width: 300%; /* 3 页 × 100% 视口 */
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.ni-list-track .ni-list-page {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  box-sizing: border-box;
}

.ni-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ni-list-item {
  display: flex;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px dashed #e5e5e5;
  transition: background 0.25s ease;
  gap: 16px;
}

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

.ni-list-item:hover {
  background: #f5f9ff;
  box-shadow: 1px 1px 10px #A0D3FA;
}
    /* <a> 包裹层：display:contents 使其对 flex 布局完全透明 */
    .ni-list-item > a {
        display: contents;
        text-decoration: none;
        color: inherit;
    }
.ni-list-main {
  flex: 1;
  min-width: 0;
}

.ni-list-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.ni-list-item:hover .ni-list-title {
  color: #0074bc;
}

.ni-list-desc {
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ni-list-date {
  flex: 0 0 90px;
  text-align: right;
  border-left: 1px dashed #e5e5e5;
  padding-left: 16px;
}

.ni-list-date .ni-month {
  display: block;
  font-size: 12px;
  color: #999;
  font-style: italic;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.ni-list-date .ni-day {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.ni-list-item:hover .ni-list-date .ni-day {
  color: #0074bc;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
  .ni-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .ni-content > .ni-feature-viewport {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .ni-feature-img {
    min-height: 280px;
  }

  .ni-list-viewport {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .news-info-section {
    padding: 40px 0;
  }

  .ni-title {
    font-size: 24px;
  }

  .ni-title-deco {
    font-size: 60px;
    letter-spacing: 4px;
  }

  .ni-tabs {
    gap: 8px;
    flex-wrap: wrap;
  }

  .ni-tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .ni-feature-img {
    height: 200px;
    min-height: 200px;
  }

  .ni-feature-body {
    padding: 16px 14px 20px;
  }

  .ni-feature-title {
    font-size: 16px;
  }

  .ni-feature-desc {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .ni-list-item {
    padding: 14px 12px;
    gap: 12px;
  }

  /* 移动端标题显示两行（避免大量省略） */
  .ni-list-title {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .ni-list-desc {
    -webkit-line-clamp: 1;
  }

  .ni-list-date {
    flex: 0 0 56px;
    padding-left: 10px;
  }

  .ni-list-date .ni-day {
    font-size: 20px;
  }

  .ni-list-date .ni-month {
    font-size: 10px;
    letter-spacing: 0;
  }
}
