/* Lightweight horizontal looping carousel styles */
.hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
    /* 主页面轮播占据容器的 75% 宽度并居中，适配不同屏幕 */
    width: 75%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.hero-carousel-viewport {
    width: 100%;
    overflow: hidden
}

.hero-carousel-track {
    display: flex;
    will-change: transform
}

.hero-carousel-track .slide {
    min-width: 100%;
    /* 响应式高度：在窄屏保持不低于 220px，在宽屏不超过 420px，默认按视口宽度缩放 */
    height: clamp(220px, 24vw, 420px);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.hero-carousel .slide-inner {
    background: rgba(0, 0, 0, 0.28);
    padding: 20px;
    border-radius: 8px;
    max-width: 70%
}

.hero-carousel a.slide {
    display: block
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5
}

.carousel-prev {
    left: 12px
}

.carousel-next {
    right: 12px
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.65)
}

.carousel-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    display: flex;
    gap: 8px;
    z-index: 5
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: 0;
    padding: 0;
    cursor: pointer
}

.carousel-dot.active {
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3)
}

@media (max-width:767px) {
    .hero-carousel-track .slide {
        height: 220px
    }

    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px
    }

    .hero-carousel .slide-inner {
        max-width: 90%;
        padding: 12px
    }
}