/* 动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 板块5样式 */
.section-5-content {
    width: 100%;
    max-width: 1920px;
    height: 100%;
    margin: 0 auto;
    position: relative;
}

.section-5-title {
    position: absolute;
    left: 372px;
    top: 75px;
    width: 1182px;
    height: 70px;
    font-family: 'JiYingHuiPianYuan', sans-serif;
    font-weight: normal;
    font-size: 75px;
    color: #000000;
    line-height: 70px;
    text-align: center;
    z-index: 2;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
}

.section-5-title.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.carousel-container {
    position: absolute;
    width: 100%;
    height: 500px;
    top: 220px;
    left: 0;
    overflow: visible;
    perspective: 1000px;
    pointer-events: none; /* Fix: Ensure container doesn't block anything */
}

.carousel-stage {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none; /* Fix: Ensure stage doesn't block anything */
}

.carousel-item {
    position: absolute;
    top: 0;
    width: 640px;
    height: 360px;
    left: 50%;
    margin-left: -320px;
    transition: all 0.5s ease;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Default none */
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none; /* Handled by parent div for prev/next */
}

/* Carousel States */
.carousel-item.active {
    z-index: 10;
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    /* Active item container is none to let clicks pass through empty areas */
    pointer-events: none; 
}

/* If we want the Active Image to be clickable (e.g. for link), enable this:
.carousel-item.active img {
    pointer-events: auto;
    cursor: default; 
}
*/

.carousel-item.prev {
    z-index: 5;
    transform: translate3d(-400px, 0, -100px) scale(0.9); /* Move Left */
    opacity: 0.9;
    pointer-events: auto; /* Explicitly enable click */
    cursor: pointer;
}

.carousel-item.next {
    z-index: 5;
    transform: translate3d(400px, 0, -100px) scale(0.9); /* Move Right */
    opacity: 0.9;
    pointer-events: auto; /* Explicitly enable click */
    cursor: pointer;
}

.carousel-item.hidden {
    z-index: 0;
    transform: translate3d(0, 0, -200px) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

/* 描述框 */
.carousel-desc-box {
    position: absolute;
    left: 780px;
    top: 663px;
    width: 360px;
    height: 66px;
    border-radius: 30px;
    border: 2px solid #0078D7;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 2;
}

.carousel-desc-text {
    font-family: 'JiYingHuiPianYuan', sans-serif;
    font-weight: normal;
    font-size: 25px;
    color: #0078D7;
    text-align: center;
}

/* 分页点 */
.carousel-dots {
    position: absolute;
    left: 0;
    top: 775px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.dot {
    width: 8px;
    height: 8px;
    background: #0078D7;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 22px;
    border-radius: 4px;
}

/* 响应式 */
@media screen and (max-width: 1920px) {
    .section-5-title {
        left: 19.38vw;
        top: 3.91vw;
        width: 61.56vw;
        height: 3.65vw;
        font-size: 3.91vw;
        line-height: 3.65vw;
    }

    .carousel-container {
        top: 11.46vw;
        height: 26.04vw;
    }

    .carousel-item {
        width: 33.33vw;
        height: 18.75vw;
        margin-left: -16.67vw;
    }

    .carousel-item.prev {
        transform: translate3d(-20.83vw, 0, -100px) scale(0.9);
    }

    .carousel-item.next {
        transform: translate3d(20.83vw, 0, -100px) scale(0.9);
    }

    .carousel-desc-box {
        left: 40.63vw;
        top: 34.53vw;
        width: 18.75vw;
        height: 3.44vw;
        border-radius: 1.56vw;
        border-width: 0.10vw;
    }

    .carousel-desc-text {
        font-size: 1.30vw;
    }

    .carousel-dots {
        top: 40.36vw;
        gap: 0.78vw;
    }

    .dot {
        width: 0.42vw;
        height: 0.42vw;
    }

    .dot.active {
        width: 1.15vw;
        border-radius: 0.21vw;
    }
}

@media screen and (min-width: 1920px) {
    .section-5-title {
        font-size: 75px;
    }
    .carousel-desc-text {
        font-size: 25px;
    }
}
