/**
 * 云蜗智能 - 最新资讯页面专属样式 (News Page Styles)
 * 仅作用于 news.html 页面，前缀为 news-page、news-list 或 news-pagination
 */

/* 定义区域全局 CSS 变量 */
.news-page-main {
  --news-thumb-width: 356px;
  --news-image-gap: 48px;
  --news-date-gap: 32px;
}

/* ==========================================================================
   1. Hero 首屏背景与面包屑区域
   ========================================================================== */
.news-page-hero {
  position: relative;
  width: 100%;
  height: 480px;
  background-image: url("../images/news/设计元素-最新咨讯背景图.webp");
  background-repeat: no-repeat;
  background-size: max(100%, 1920px) auto;
  background-position: center -120px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.news-page-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* 面包屑导航 */
.news-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #333333;
  margin-bottom: 24px;
}

.news-breadcrumb .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4a4a4a;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.news-breadcrumb .breadcrumb-item:hover {
  color: var(--color-primary);
}

.news-breadcrumb .breadcrumb-item.is-current {
  color: var(--color-primary);
  font-weight: 500;
  cursor: default;
}

.news-breadcrumb .breadcrumb-separator {
  color: var(--color-text-muted);
  font-size: 14px;
  user-select: none;
}

/* 标题与描述 */
.news-page-hero__title {
  font-size: 40px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0 0 18px 0;
  letter-spacing: -0.5px;
}

.news-page-hero__desc {
  font-size: 18px;
  color: #4a4a4a;
  line-height: 1.6;
  margin: 0;
}


/* ==========================================================================
   2. 资讯列表主体与 3 列卡片排版
   ========================================================================== */
.news-page-main {
  width: 100%;
  background-color: #ffffff;
  padding-top: 48px;
  padding-bottom: 72px;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 32px 0;
  box-sizing: border-box;
}

.news-list-item:first-child {
  padding-top: 0;
}

/* 局部半透明绿色分隔线（仅从正文列开始延伸至最右侧，图片下方留空） */
.news-list-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: calc(var(--news-thumb-width) + var(--news-image-gap));
  height: 1px;
  background-color: rgba(0, 167, 142, 0.25);
}

/* A. 左侧缩略图 (356 x 209) */
.news-list-item__thumb-wrap {
  width: var(--news-thumb-width);
  height: 209px;
  aspect-ratio: 356 / 209;
  flex-shrink: 0;
  margin-right: var(--news-image-gap);
  border-radius: 12px;
  overflow: hidden;
  background-color: #f5f7fa;
  display: block;
}

.news-list-item__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* B. 中间标题与摘要列 */
.news-list-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-list-item__title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.45;
  margin: 0 0 12px 0;
}

.news-list-item__excerpt {
  font-size: 14px;
  color: #666666;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* C. 右侧日期数字列 (桌面端) */
.news-list-item__date {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  margin-left: var(--news-date-gap);
}

.news-list-item__date-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #718096;
}

.news-list-item__clock-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: 0.85;
}

.news-list-item__date-day {
  font-size: 42px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
  margin-top: 6px;
}


/* ==========================================================================
   3. 静态分页框架 (.news-pagination)
   ========================================================================== */
.news-pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.news-pagination {
  display: flex;
  align-items: center;
}

.news-pagination__list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-sizing: border-box;
  user-select: none;
  cursor: default;
}

.news-pagination__item.is-active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  font-weight: 600;
}

.news-pagination__item.is-disabled {
  background-color: #f5f7fa;
  color: #a0aec0;
  border-color: #edf2f7;
  opacity: 0.7;
}

.news-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 38px;
  font-size: 14px;
  color: #a0aec0;
  user-select: none;
}


/* ==========================================================================
   4. 响应式布局适配 (1920px+ / 1024px / 768px / 480px / 375px)
   ========================================================================== */
@media (min-width: 1920px) {
  .news-page-hero {
    background-position: center calc(480px - 31.25vw);
  }
}

@media (max-width: 1199px) {
  .news-page-main {
    --news-thumb-width: 280px;
    --news-image-gap: 32px;
    --news-date-gap: 24px;
  }
  .news-list-item__thumb-wrap {
    height: 164px;
  }
  .news-list-item__title {
    font-size: 18px;
  }
  .news-list-item__date-day {
    font-size: 36px;
  }
}

@media (max-width: 1023px) {
  .news-page-hero {
    height: 400px;
    background-position: center -200px;
  }
  .news-page-hero__title {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .news-page-hero {
    height: 320px;
    background-size: 1200px auto;
    background-position: center -55px;
  }
  .news-breadcrumb {
    font-size: 14px;
    margin-bottom: 16px;
  }
  .news-page-hero__title {
    font-size: 28px;
    margin-bottom: 12px;
  }
  .news-page-hero__desc {
    font-size: 15px;
  }

  .news-page-main {
    --news-thumb-width: 100%;
    --news-image-gap: 0px;
    --news-date-gap: 0px;
    padding-top: 32px;
    padding-bottom: 48px;
  }

  .news-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 24px 0;
  }

  /* 移动端分隔线贯穿整个内容宽度 */
  .news-list-item::after {
    left: 0;
  }

  .news-list-item__thumb-wrap {
    order: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 356 / 209;
    margin-right: 0;
    margin-bottom: 14px;
    border-radius: 10px;
  }

  /* 移动端统一调重置单行日期组件 */
  .news-list-item__date {
    order: 2;
    width: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    align-self: flex-start;
    font-size: 13px;
    color: #666666;
    margin-left: 0;
    margin-bottom: 8px;
    text-align: left;
  }

  .news-list-item__date-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: inherit;
  }

  .news-list-item__date-day {
    font-size: 13px;
    font-weight: 400;
    line-height: inherit;
    color: inherit;
    margin-top: 0;
  }

  .news-list-item__date-day::before {
    content: "/";
    margin-right: 1px;
  }

  .news-list-item__body {
    order: 3;
    width: 100%;
  }

  .news-list-item__title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .news-list-item__excerpt {
    font-size: 14px;
  }

  .news-pagination-wrap {
    margin-top: 40px;
  }
}

/* 单页资讯列表的条数说明（替代原假分页） */
.news-list-summary {
  margin-top: 40px;
  color: var(--color-text-muted, #666666);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 480px) {
  .news-list-summary {
    margin-top: 32px;
  }
}
