/* 轮播图样式 */
.fa-chevron-left::before {
    content: "←";
    font-size: 24px;
}

.fa-chevron-right::before {
    content: "→";
    font-size: 24px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    /* 修改为固定高度 */
    overflow: hidden;
}

.carousel-track {
    display: flex;
    position: absolute;
    width: max-content;
    height: 100%;
    transition: transform 20s linear;
}

.carousel-slide {
    position: relative;
    width: 400px;
    /* 固定宽度 */
    height: 300px;
    /* 固定高度 */
    margin-right: 20px;
    overflow: hidden;
    background: #000;
    /* 留白为黑色 */
    /* border-radius: 12px; */
}

.carousel-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 水平居中 */
    text-align: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    /* 拉伸图片填满区域，允许变形 */
    background: #000;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 10;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background: white;
}

/* 轮播图响应式样式 */
@media (max-width: 991px) {
    .carousel-container {
        height: 250px;
    }

    .carousel-slide {
        width: 350px;
        height: 250px;
    }

    .carousel-slide-content {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .carousel-container {
        height: 200px;
    }

    .carousel-slide {
        width: 280px;
        height: 200px;
    }

    .carousel-slide-content {
        padding: 10px;
        font-size: 12px;
    }

    .carousel-button {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 575px) {
    .carousel-container {
        height: 180px;
    }

    .carousel-slide {
        width: 250px;
        height: 180px;
    }

    .carousel-slide-content {
        padding: 8px;
        font-size: 11px;
    }

    .carousel-button {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        height: 150px;
    }

    .carousel-slide {
        width: 200px;
        height: 150px;
    }

    .carousel-slide-content {
        padding: 6px;
        font-size: 10px;
    }

    .carousel-button {
        width: 25px;
        height: 25px;
    }
}