
.carousel {
    position: relative;
    width: 100vw; /* 设置宽度为全屏 */
    height: 456px; /* 高度被限制为 456px */
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    width: calc(501px * 14); /* 10张图片 + 4张克隆，计算总宽度 */
}

.carousel-item {
    min-width: 501px; /* 每张图片的宽度 */
    height: 456px; /* 每张图片的高度 */
    position: relative;
}

.carousel-item img {
    width: 501px;
    height: 456px;
    object-fit: cover; /* 图片保持比例并铺满 */
}

/* 固定的透明层，左侧位置 */
.fixed-caption {
    position: absolute;
    top: 0;
    left: 300px; /* PC端距离左侧250px */
    width: 200px;
    height: 456px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black; /* 文字改为黑色更适合乳白色背景 */
    z-index: 2;
}

.caption-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 456px;
    background-color: rgba(255, 255, 255, 0.3); /* 乳白色的透明背景 */
    z-index: 1;
}

/* 响应式设计，移动端靠左显示透明层 */
@media (max-width: 768px) {
    .fixed-caption {
        left: 0; /* 移动端居左 */
    }
}

/* 自动轮播动画 */
@keyframes slide {
    0% { transform: translateX(0); }
    10% { transform: translateX(-501px); }
    20% { transform: translateX(-1002px); }
    30% { transform: translateX(-1503px); }
    40% { transform: translateX(-2004px); }
    50% { transform: translateX(-2505px); }
    60% { transform: translateX(-3006px); }
    70% { transform: translateX(-3507px); }
    80% { transform: translateX(-4008px); }
    90% { transform: translateX(-4509px); }
    100% { transform: translateX(-5010px); }
}

.carousel-inner {
    animation: slide 28s infinite; /* 28秒一个完整循环 */
}
