.hero.hero-carousel {
  position: relative;
  display: block;
  /* 轮播原图为 1920 × 750，锁定比例，避免被基础 hero 的整屏高度规则拉长。 */
  width: 100%;
  height: min(39.0625vw, 750px);
  min-height: 0;
  aspect-ratio: 1920 / 750;
  overflow: hidden;
  padding: 0;
  background: #06133e;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.hero.hero-carousel.is-dragging { cursor: grabbing; }

.hero-carousel .hero-slides,
.hero-carousel .hero-slide {
  position: absolute;
  inset: 0;
}

.hero-carousel .hero-slide {
  z-index: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .8s ease, transform 5.8s ease;
}

.hero-carousel .hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.hero-carousel .hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-controls {
  position: absolute;
  z-index: 3;
  bottom: 26px;
  left: 50%;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.carousel-dot {
  width: 28px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .48);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}

.carousel-dot.is-active {
  width: 46px;
  background: #fff;
}

.carousel-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.carousel-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 24px;
  color: #fff;
  background: rgba(4,18,61,.25);
  font: 300 42px/1 sans-serif;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity .25s ease, background .25s ease, border-color .25s ease;
}
.carousel-arrow:hover { background: rgba(4,18,61,.65); border-color: rgba(255,255,255,.7); }
.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }

/* 轮播按钮默认不打扰画面；鼠标移入首图或键盘聚焦时再显示。 */
@media (hover: hover) and (pointer: fine) {
  .hero-carousel:hover .carousel-arrow,
  .hero-carousel:focus-within .carousel-arrow {
    opacity: 1;
    pointer-events: auto;
  }
}

.carousel-arrow:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (max-width: 800px) {
  .hero.hero-carousel {
    height: 390px;
    aspect-ratio: auto;
  }

  .hero-carousel .hero-slide img {
    object-fit: contain;
    object-position: center;
  }

  .carousel-controls {
    bottom: 16px;
    gap: 7px;
  }

  .carousel-dot {
    width: 20px;
  }

  .carousel-dot.is-active {
    width: 34px;
  }

  .carousel-arrow { display: none; }
}
