/* ==========================================================================
   新闻中心页 - news.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Banner 区域
   -------------------------------------------------------------------------- */
.news-banner {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.news-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.7), rgba(255,255,255,0.4), transparent);
}

.news-banner__text {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 80px;
}

.news-banner__subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 700;
}

.news-banner__title {
  font-size: 64px;
  font-weight: 300;
  color: var(--foreground);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.news-banner__desc {
  font-size: 18px;
  color: var(--muted-foreground);
  max-width: 36rem;
  font-weight: 300;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   2. 新闻列表区
   -------------------------------------------------------------------------- */
.news-list {
  padding: 48px 80px 64px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

/* --------------------------------------------------------------------------
   3. 新闻卡片
   -------------------------------------------------------------------------- */
.news-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* 图片区域 */
.news-card__image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--muted);
}

.news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card__image {
  transform: scale(1.05);
}

/* 分类标签 */
.news-card__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  padding: 6px 12px;
  font-weight: 500;
}

/* 内容区域 */
.news-card__body {
  padding: 24px;
}

.news-card__date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
}

.news-card__date-icon {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.news-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.news-card:hover .news-card__title {
  color: var(--primary);
}

.news-card__summary {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 阅读更多 */
.news-card__footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.news-card__more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.news-card__more:hover {
  opacity: 0.8;
}

.news-card__more-arrow {
  transition: transform 0.2s ease;
}

.news-card__more:hover .news-card__more-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   4. 新闻详情弹窗
   -------------------------------------------------------------------------- */
.news-modal .modal-content {
  max-width: 768px;
  width: 90vw;
  background: var(--card);
  overflow: hidden;
}

.news-modal__image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--muted);
}

.news-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-modal__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  padding: 6px 12px;
  font-weight: 500;
}

.news-modal__body {
  padding: 32px;
  overflow-y: auto;
  max-height: calc(90vh - 300px);
}

.news-modal__date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
}

.news-modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.4;
  margin-bottom: 20px;
}

.news-modal__text {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   5. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .news-banner {
    height: 220px;
  }

  .news-banner__text {
    padding: 0 32px;
  }

  .news-banner__title {
    font-size: 40px;
  }

  .news-banner__desc {
    font-size: 15px;
  }

  .news-list {
    padding: 32px 16px 48px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-card__image-wrap {
    aspect-ratio: auto;
  }

  .news-card__image {
    object-fit: contain;
  }

  .news-modal__image {
    object-fit: contain;
  }

  .news-modal__body {
    padding: 24px;
  }

  .news-modal__title {
    font-size: 1.25rem;
  }
}
