/* 大图轮播：全宽、较矮，适配手机 / iPad / 桌面 */
.carousel-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 21 / 5;
  max-height: min(22vh, 220px);
  max-height: min(22dvh, 220px);
  background: #173d7f;
}
.carousel-wrap::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(23, 61, 127, 0.85) 100%);
  pointer-events: none;
  z-index: 2;
}
.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}
.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-color: #173d7f;
  background-size: cover;
  background-position: center;
  position: relative;
}
.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 61, 127, 0.75) 0%, transparent 55%);
  z-index: 0;
}
.carousel-slide .slide-content {
  position: relative;
  z-index: 1;
  max-width: min(42rem, 92vw);
  padding: clamp(0.6rem, 1.8vw, 1.5rem) clamp(1rem, 4vw, 3rem);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.carousel-slide .slide-content h2 {
  font-size: clamp(1.15rem, 2.8vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}
.carousel-slide .slide-content p {
  font-size: clamp(0.8rem, 1.7vw, 1rem);
  margin: 0;
  opacity: 0.95;
  line-height: 1.45;
}
.carousel-dots {
  position: absolute;
  bottom: clamp(0.5rem, 1.5vw, 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}
.carousel-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.carousel-dots span.active {
  background: #fff;
  box-shadow: 0 0 0 2px #173d7f;
  transform: scale(1.2);
}
.carousel-dots span:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* iPad */
@media (min-width: 768px) and (max-width: 1023px) {
  .carousel-wrap {
    aspect-ratio: 18 / 5;
    max-height: min(18vh, 180px);
    max-height: min(18dvh, 180px);
  }
}

/* 手机 */
@media (max-width: 767px) {
  .carousel-wrap {
    aspect-ratio: 16 / 5;
    max-height: min(16vh, 140px);
    max-height: min(16dvh, 140px);
  }
  .carousel-slide .slide-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* 横屏矮屏 */
@media (max-height: 560px) and (orientation: landscape) {
  .carousel-wrap {
    max-height: min(14vh, 110px);
    max-height: min(14dvh, 110px);
    aspect-ratio: 21 / 5;
  }
  .carousel-slide .slide-content p { display: none; }
}
