/* ==========================================================================
   新闻与行业资讯 3x3 矩阵网格样式 (news-grid.css)
   ========================================================================== */

:root {
  --primary-color: #c12022;
  --primary-hover: #b82d19;
  --text-main: #1a1a1a;
  --text-muted: #888888;
  --bg-card-border: #e8eaec;
}

.section-news-matrix {
  padding: 150px 0 80px 0;
  background-color: #ffffff;
}

/* 核心 3 列网格排版 */
.news-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  box-sizing: border-box;
}

/* 卡片外层基础骨架 */
.news-matrix-card {
  background-color: #ffffff;
  border: 1px solid var(--bg-card-border);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.news-matrix-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.news-matrix-card .card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* 1. 卡片上半部分实景图 */
.news-matrix-card .card-img-wrap {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background-color: #f0f2f5;
  position: relative;
}

.news-matrix-card .card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.news-matrix-card:hover .card-img-wrap img {
  transform: scale(1.05);
}

/* 2. 卡片下半部分文本信息区 */
.news-matrix-card .card-info-wrap {
  padding: 24px 22px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  background-color: #ffffff;
  box-sizing: border-box;
}

/* 标题样式：限制最多 2 行显示，行高紧凑 */
.news-matrix-card .card-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-main);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  min-height: 46px; /* 保持两行标题时的高度对齐 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.25s ease;
}

.news-matrix-card:hover:not(.featured-red) .card-title {
  color: var(--primary-color);
}

/* 描述正文：限制 3 行，浅灰小字 */
.news-matrix-card .card-desc {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-bottom: 25px; /* 留出底部箭头的空间 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-align: justify;
}

/* 右下角小箭头指示符 */
.news-matrix-card .card-arrow-action {
  position: absolute;
  right: 22px;
  bottom: 14px;
  font-size: 16px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  color: var(--primary-color);
  transition: transform 0.25s ease;
}

.news-matrix-card:hover .card-arrow-action {
  transform: translateX(4px);
}

/* ================= 3. 核心首推高亮卡片（featured-red 实心红底） ================= */
/* 下半部分背景变为实心品牌红 */
.news-matrix-card:hover .card-info-wrap {
  background-color: var(--primary-color, #da3c25);
}

/* 标题转为纯白 */
.news-matrix-card:hover .card-title {
  color: #ffffff !important;
}

/* 描述文字转为高透纯白 */
.news-matrix-card:hover .card-desc {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* 箭头转为纯白并向右轻微移动 */
.news-matrix-card:hover .card-arrow-action {
  color: #ffffff !important;
  transform: translateX(4px);
}
/* ================= 4. 全端响应式自适应 (<= 992px & <= 768px) ================= */
@media screen and (max-width: 992px) {
  .news-matrix-grid {
    grid-template-columns: repeat(2, 1fr); /* 平板端切换为 2 列 */
    gap: 20px;
  }
  .news-matrix-card .card-img-wrap {
    height: 190px;
  }
}

@media screen and (max-width: 768px) {
  .sub-nav-item {
    width: 50%;
  }
  .section-news-matrix {
    padding: 50px 0;
  }

  .news-matrix-grid {
    grid-template-columns: 1fr; /* 手机端单列排版 */
    gap: 16px;
  }

  .news-matrix-card .card-img-wrap {
    height: 175px;
  }

  .news-matrix-card .card-info-wrap {
    padding: 18px 16px 16px 16px;
  }

  .news-matrix-card .card-title {
    font-size: 14.5px;
    min-height: auto;
    margin-bottom: 8px;
  }

  .news-matrix-card .card-desc {
    font-size: 12px;
    margin-bottom: 18px;
    -webkit-line-clamp: 2; /* 手机端适度收敛为 2 行，防止占屏过多 */
  }

  .news-matrix-card .card-arrow-action {
    right: 16px;
    bottom: 12px;
    font-size: 14px;
  }
}
