/* 首页主轮播样式：控制首屏焦点图、切换按钮、分页点和轮播动效。 */
.home-hero-carousel {
  --hero-min-height: 700px;
  --hero-fade-bottom: rgba(237, 245, 251, 1);
  --hero-control-side-gap: clamp(0.75rem, 2.8vw, 1.5rem);
  --hero-control-bg: rgba(7, 28, 46, 0.36);
  --hero-control-bg-hover: rgba(5, 38, 68, 0.82);
  --hero-control-border: rgba(255, 255, 255, 0.36);
  --hero-control-shadow: 0 18px 42px rgba(7, 22, 38, 0.24);
  position: relative;
  overflow: hidden;
  background: #0b3962;
}

.home-hero-carousel .hero-slides {
  position: relative;
  min-height: var(--hero-min-height);
}

.home-hero-carousel .hero-slide-inner {
  min-height: var(--hero-min-height);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background-image: var(--hero-slide-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition:
    opacity 0.8s ease,
    visibility 0s linear 0.8s;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50px;
  background: linear-gradient(180deg, rgba(237, 245, 251, 0), var(--hero-fade-bottom));
}

.hero-slide-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  padding: 0;
}

.hero-controls,
.hero-dots {
  display: none;
}

html.js-ready .hero-controls {
  position: absolute;
  inset: 50% 0 auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: var(--hero-control-side-gap);
  transform: translateY(-50%);
  pointer-events: none;
}

.carousel-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  appearance: none;
  color: #fff;
  border: 1px solid var(--hero-control-border);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)),
    var(--hero-control-bg);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--hero-control-shadow);
  pointer-events: auto;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.carousel-button::before {
  content: "";
  width: 12px;
  height: 12px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}

.carousel-button-prev::before {
  transform: rotate(-135deg);
}

.carousel-button-next::before {
  transform: rotate(45deg);
}

.carousel-button:hover,
.carousel-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    var(--hero-control-bg-hover);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 20px 44px rgba(6, 22, 38, 0.28);
}

.carousel-button:active {
  transform: scale(0.98);
}

.carousel-button:focus-visible,
.hero-dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 2px;
}

html.js-ready .hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 28, 46, 0.28);
  backdrop-filter: blur(12px) saturate(145%);
  box-shadow: 0 12px 30px rgba(7, 22, 38, 0.16);
  transform: translateX(-50%);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.hero-dot {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transform: translateZ(0);
  transform-origin: center;
  will-change: width, background-color, box-shadow, transform, opacity;
  transition:
    width 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    background-color 0.24s ease,
    box-shadow 0.3s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease;
}

.hero-dot:hover,
.hero-dot:focus-visible {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.84);
  transform: scale(1.08);
}

.hero-dot.is-active {
  width: 30px;
  border-color: rgba(255, 255, 255, 0.96);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.46),
    0 0 0 4px rgba(255, 255, 255, 0.14),
    0 6px 14px rgba(10, 28, 44, 0.12);
  transform: scale(1);
}

.hero-controls[hidden],
.hero-dots[hidden] {
  display: none !important;
}

@media (max-width: 767.98px) {
  .home-hero-carousel {
    --hero-min-height: 420px;
  }

  html.js-ready .hero-controls {
    padding-inline: 0.75rem;
  }

  .carousel-button {
    width: 44px;
    height: 44px;
  }

  html.js-ready .hero-dots {
    bottom: 1.25rem;
    gap: 0.45rem;
    padding: 0.42rem 0.62rem;
  }

  .hero-dot {
    width: 8px;
    height: 8px;
  }

  .hero-dot.is-active {
    width: 24px;
  }
}
