/* ============================================
   企业动态样式 - 秦和食品
   ============================================ */

/* ====== 列表容器 ====== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 首页：两列网格，每项仍是统一横条结构 */
.news-list--home {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 7.5rem;
  gap: 1.25rem;
  align-items: stretch;
}

/* ====== 单条动态（统一横条布局） ====== */
.news-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.875rem;
  background: var(--bs-body-bg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.news-list > div,
.news-list--home > div {
  display: flex;
  min-width: 0;
}

.news-list > div > .news-item,
.news-list--home > div > .news-item {
  flex: 1;
  width: 100%;
  min-height: 0;
}

/* 列表页：固定高度，有图/无图一致 */
.news-item--list {
  height: 10.75rem;
  min-height: 10.75rem;
  max-height: 10.75rem;
}

.news-item--list .news-item__thumb {
  flex: 0 0 11.5rem;
  width: 11.5rem;
  height: 100%;
  min-height: 0;
}

.news-item--list .news-item__summary {
  min-height: calc(2 * 1.65 * 0.9rem);
}

.news-item:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
  color: inherit;
}

/* 左侧缩略图 / 日期占位（固定宽度，高度随条目拉伸） */
.news-item__thumb {
  flex: 0 0 11.5rem;
  width: 11.5rem;
  min-height: 0;
  align-self: stretch;
  background: var(--bs-secondary-bg);
  overflow: hidden;
  position: relative;
}

.news-item__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.news-item:hover .news-item__thumb img {
  transform: scale(1.04);
}

/* 无首图：品牌色日期块 */
.news-item__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--qinhe-red, #C41E24) 0%, var(--qinhe-red-dark, #9A181D) 100%);
}

.news-item__date-block {
  text-align: center;
  color: #fff;
  line-height: 1.2;
}

.news-item__date-day {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.news-item__date-ym {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.88;
  letter-spacing: 0.05em;
}

/* 右侧正文 */
.news-item__content {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.news-item__category {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 2rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
  font-weight: 500;
  line-height: 1.4;
}

.news-item__time {
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
}

.news-item__time i {
  margin-right: 0.2rem;
  color: var(--bs-primary);
  opacity: 0.85;
}

.news-item__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--bs-heading-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.news-item:hover .news-item__title {
  color: var(--bs-primary);
}

.news-item__summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--bs-secondary-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item__link {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bs-primary);
  padding-top: 0.25rem;
}

.news-item__link i {
  transition: transform 0.2s ease;
}

.news-item:hover .news-item__link i {
  transform: translateX(3px);
}

/* ====== 首页紧凑变体 ====== */
.news-item--home {
  height: 7.5rem;
  min-height: 7.5rem;
  max-height: 7.5rem;
}

.news-item--home .news-item__thumb {
  flex: 0 0 7.5rem;
  width: 7.5rem;
  height: 100%;
  min-height: 0;
}

.news-item--home .news-item__content {
  padding: 1rem 1.125rem;
  gap: 0.35rem;
}

.news-item--home .news-item__title {
  font-size: 1rem;
  -webkit-line-clamp: 2;
  white-space: nowrap;   /* 强制不换行 */
  overflow: hidden;       /* 超出隐藏 */
  text-overflow: ellipsis;/* 超出显示省略号（点点点） */
}

.news-item--home .news-item__date-day {
  font-size: 1.5rem;
}

.news-item--home .news-item__link {
  font-size: 0.8125rem;
}

/* ====== 详情页首图 ====== */
.news-detail-cover {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.875rem;
  overflow: hidden;
  background: var(--bs-secondary-bg);
}

.news-detail-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* ====== 详情页正文 ====== */
.news-detail-article .lead {
  font-size: 1.1rem;
  line-height: 1.8;
  font-weight: 400;
}

.news-content p {
  font-size: 1rem;
  line-height: 2;
  color: var(--bs-body-color);
  margin-bottom: 1.25rem;
  text-align: justify;
}

.news-content p:first-child {
  text-indent: 2em;
}

/* ====== 响应式 ====== */
@media (max-width: 991.98px) {
  .news-list--home {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

@media (max-width: 767.98px) {
  .news-item--list,
  .news-item--home {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .news-item {
    flex-direction: column;
  }

  .news-item__thumb {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .news-item__thumb--placeholder {
    aspect-ratio: 2.4 / 1;
  }

  .news-item--list .news-item__thumb,
  .news-item--home .news-item__thumb {
    flex: none;
    width: 100%;
    height: auto;
  }

  .news-item--list .news-item__summary {
    min-height: 0;
  }

  .news-item__content {
    padding: 1rem 1.125rem 1.125rem;
  }

  .news-item--home .news-item__title {
    min-height: 0;
  }

  .news-content p {
    font-size: 0.95rem;
    line-height: 1.8;
  }
}
