/* ============================================
   NEWS CAROUSEL - 最新消息
   Layout: image on top, colored text area below
   ============================================ */

.news-section {
  max-width: 1000px;
  margin: 50px auto 0;
  padding: 0 30px;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.news-section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.news-section-title .news-icon {
  width: 28px;
  height: 28px;
  background: #333;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.news-section-title .news-icon::after {
  content: '📰';
  font-size: 14px;
}

/* Carousel wrapper with arrows */
.news-carousel-wrapper {
  position: relative;
  padding: 0 50px;
}

.news-carousel-container {
  overflow: hidden;
}

.news-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
  gap: 12px;
}

/* Card: image top + colored text bottom */
.news-carousel-item {
  flex: 0 0 calc(25% - 9px);
  min-width: calc(25% - 9px);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.news-carousel-item .news-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.news-carousel-item .news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.news-carousel-item:hover .news-img img {
  transform: scale(1.05);
}

/* Colored text area below image */
.news-carousel-item .news-text {
  padding: 14px 14px 16px;
  color: #ffffff;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-carousel-item .news-text h4 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 10px;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-carousel-item .news-text .news-date {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

/* Background color variants */
.news-carousel-item.color-1 .news-text { background: #1a6fb5; }
.news-carousel-item.color-2 .news-text { background: #e8a838; }
.news-carousel-item.color-3 .news-text { background: #6b4c9a; }
.news-carousel-item.color-4 .news-text { background: #2e8b57; }

/* Navigation arrows - same as banner */
.news-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  z-index: 5;
  transition: all 0.3s;
  padding: 0;
}

.news-carousel-btn:hover {
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%) scale(1.08);
}

.news-carousel-btn-prev { left: 0; }
.news-carousel-btn-next { right: 0; }

.news-carousel-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.news-carousel-btn svg path {
  fill: #a30907;
}

/* More button */
.news-more-btn {
  text-align: center;
  margin-top: 24px;
}

.news-more-btn a {
  display: inline-block;
  padding: 10px 30px;
  background: #6b4c9a;
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s;
}

.news-more-btn a:hover {
  background: #5a3d87;
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .news-section {
    margin: 30px auto 0;
    padding: 0 15px;
  }

  .news-carousel-wrapper {
    padding: 0 40px;
  }

  .news-section-title {
    font-size: 20px;
  }

  .news-carousel-item {
    flex: 0 0 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }

  .news-carousel-btn {
    width: 30px;
    height: 30px;
  }

  .news-carousel-btn svg {
    width: 14px;
    height: 14px;
  }

  .news-carousel-item .news-text h4 {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .news-carousel-item {
    flex: 0 0 calc(33.33% - 8px);
    min-width: calc(33.33% - 8px);
  }
}
