/* 基础样式 - 叠加效果修改为图文分离 */
.carousel-container {
    position: relative;
    width:100%;
    max-width: 1200px;
    margin: 50px auto;
    overflow: visible;
}

.carousel-slides {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px
}

.carousel-slide {
    position: absolute;
    width: 40%;
    height: 75%;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1;
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    transition: transform 1s ease, opacity 1s ease, width 1s ease, height 1s ease, z-index 0s step-end;
}

/* 中间激活的幻灯片 */
.carousel-slide.active {
    width: 60%;
    height: 90%;
    z-index: 3;
    opacity: 1;
    transform: translateX(0);
}

/* 左侧幻灯片 */
.carousel-slide.prev {
    z-index: 2;
    transform: translateX(-90%) scale(0.90);
}

/* 右侧幻灯片 */
.carousel-slide.next {
    z-index: 2;
    transform: translateX(90%) scale(0.90);
}

/* 图片容器样式 */
.carousel-slide img {
    width: 100%;
    height: 60%; /* 图片占50%高度 */
    object-fit: cover;
}
.swiper-slide .title,
.swiper-slide .desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 幻灯片内容样式  */
.slide-content {
    position: relative;
    width: 100%;
    height: 40%;
    padding: 20px;
    background: white;
    color: #333;
    box-sizing: border-box;
}

.slide-title {
    font-size: 20px;
    margin-bottom: 8px;
}

.slide-header {
    width:645px;
    display: flex;
    flex-direction: column;
}

.slide-header .slide-title-inline {
    order: 1;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.slide-header .slide-link {
    order: 2;
    font-size: 14px;
    display: inline-block;
    padding: 5px 9px;
    border:1px solid #288acf;
    color: #000000;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.8s;
    margin-left: 0;
    align-self: flex-start;
    margin-bottom: 15px;
}

.slide-header .slide-desc {
    margin-top: 15px;
    order: 3;
    font-size: 14px;
    line-height: 1.4;
}

.slide-link:hover {
    color: white;
    background-color: #288acf;
}

/* 在大屏幕上将h2和按钮放在同一行 */
@media (min-width: 768px) {
    .slide-header {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .slide-header .slide-title-inline {
        order: 1;
        margin: 0 15px 15px 0;
        font-size: 20px;
        flex: 1;
    }

    .slide-header .slide-link {
        order: 2;
        align-self: center;
        margin: 0 0 15px 0;
    }

    .slide-header .slide-desc {
        order: 3;
        flex: 0 0 100%;
    }
}

/* 控制按钮 */
.carousel-btn {
    position: absolute;
    top: 65%;
    transform: translateY(-50%);
    /*透明*/
    background: rgb(141, 171, 205);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 24px;
    z-index: 10;
    transition: all 0.8s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #4573af;
    transform: translateY(-50%) scale(1.1);
}

.prev-btnl {
    left: -110px;
}

.next-btnl {
    right: -110px;
}

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

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3); /* 改为深色指示器，与白色背景对比 */
    cursor: pointer;
    transition: background 0.8s, transform 0.3s;
}

.indicator.active {
    background: #333; /* 激活状态为深黑色 */
    transform: scale(1.2);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .carousel-container {
        max-width: 100%;
        padding: 20px 0;
    }

    .carousel-slides {
        height: 550px; /* 调整高度 */
    }

    .carousel-slide {
        width: 75%;
    }

    .carousel-slide.active {
        width: 85%;
    }

    .carousel-slide.prev,
    .carousel-slide.next {
        transform: translateX(-50%) scale(0.9);
    }

    .slide-title {
        font-size: 16px;
    }

    .slide-title-inline {
        font-size: 16px;
    }

    .slide-desc {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .carousel-slide img {
        height: 40%;
    }

    .slide-content {
        height: 60%;
        padding: 10px;
    }

}
