/* ===== 新闻中心 - 左幻灯片右文章布局 ===== */

/* 整体布局 */
.news-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

/* ===== 左侧幻灯片区域 ===== */
.news-slider-panel {
  position: relative;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* 幻灯片项 */
.slide-item {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
}

.slide-item:hover .slider-image {
  transform: scale(1.05);
}

.news-slider-panel .slider-image {
  transition: transform 0.5s ease;
}

.slide-item.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.news-slider-panel .slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-slider-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, 
    rgba(0,0,0,0.9) 0%, 
    rgba(0,0,0,0.6) 40%, 
    rgba(0,0,0,0.2) 70%, 
    transparent 100%);
  padding: 60px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-date {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.slider-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.4;
}

.slider-description {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 幻灯片指示器 */
.slider-indicators {
  position: absolute;
  bottom: 20px;
  right: 30px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-indicators .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-indicators .dot.active {
  width: 24px;
  border-radius: 4px;
  background: #fff;
}

/* ===== 右侧文章列表区域 ===== */
.news-articles-panel {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 16px;
  padding: 10px 0;
  height: 100%;
}

/* 单篇文章卡片 */
.news-article-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  overflow: hidden;
}

.news-article-card:hover {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* 日期方块 */
.article-date-box {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-date-box .day {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
}

.article-date-box .month {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  margin: 0;
  opacity: 0.9;
}

/* 文章内容 */
.article-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.article-content h4 {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  line-height: 1.5;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-article-card:hover .article-content h4 {
  color: var(--primary-color);
}

.article-content p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 箭头图标 */
.article-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.news-article-card:hover .article-arrow {
  background: var(--primary-color);
  color: #fff;
  transform: translateX(3px);
}

/* ===== 平板端适配（768px - 1300px） ===== */
@media (max-width: 1300px) {
  .news-split-layout {
    gap: 24px;
  }
  
  .news-slider-panel {
    height: 450px;
  }
  
  .slider-title {
    font-size: 22px;
  }
  
  .news-articles-panel {
    gap: 14px;
  }
  
  .news-article-card {
    padding: 16px;
    gap: 16px;
  }
  
  .article-date-box {
    width: 55px;
    height: 55px;
  }
  
  .article-date-box .day {
    font-size: 20px;
  }
}

/* ===== 移动端适配（≤768px） ===== */
@media (max-width: 768px) {
  .news-split-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .news-slider-panel {
    height: 350px;
    border-radius: 12px;
  }
  
  .news-slider-overlay {
    padding: 40px 20px 20px;
  }
  
  .slider-title {
    font-size: 20px;
  }
  
  .slider-description {
    font-size: 14px;
    -webkit-line-clamp: 1;
  }
  
  .slider-indicators {
    right: 20px;
    bottom: 15px;
  }
  
  .news-articles-panel {
    grid-template-rows: repeat(4, auto);
    gap: 12px;
    height: auto;
  }
  
  .news-article-card {
    padding: 14px;
    gap: 14px;
  }
  
  .article-date-box {
    width: 50px;
    height: 50px;
  }
  
  .article-date-box .day {
    font-size: 18px;
  }
  
  .article-date-box .month {
    font-size: 11px;
  }
  
  .article-content h4 {
    font-size: 15px;
  }
  
  .article-content p {
    font-size: 13px;
    -webkit-line-clamp: 1;
  }
  
  .article-arrow {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* ===== 黑夜模式 ===== */
body.dark-mode .news-section {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .news-split-layout {
  /* 保持布局不变 */
}

/* 左侧幻灯片黑夜模式 */
body.dark-mode .news-slider-panel {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .news-slider-overlay {
  background: linear-gradient(to top, 
    rgba(0, 0, 0, 0.95) 0%, 
    rgba(0, 0, 0, 0.7) 40%, 
    rgba(0, 0, 0, 0.3) 70%, 
    transparent 100%);
}

body.dark-mode .slider-date {
  color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .slider-title {
  color: #fff;
}

body.dark-mode .slider-description {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .slider-indicators .dot {
  background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .slider-indicators .dot.active {
  background: var(--primary-colors);
}

/* 右侧文章列表黑夜模式 */
body.dark-mode .news-articles-panel {
  /* 保持布局不变 */
}

body.dark-mode .news-article-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-mode .news-article-card:hover {
  background: #0f172a;
  border-color: var(--primary-colors);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

body.dark-mode .article-date-box {
  background: linear-gradient(135deg, var(--primary-colors) 0%, var(--dark-primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

body.dark-mode .article-content h4 {
  color: #e2e8f0;
}

body.dark-mode .news-article-card:hover .article-content h4 {
  color: var(--primary-colors);
}

body.dark-mode .article-content p {
  color: #94a3b8;
}

body.dark-mode .article-arrow {
  background: #334155;
  color: #64748b;
}

body.dark-mode .news-article-card:hover .article-arrow {
  background: var(--primary-colors);
  color: #fff;
}