/* 防止横向滚动 */
body {
    overflow-x: hidden;
}

/* 轮播图容器样式 */
.custom-slider {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 380px;
    overflow: hidden;
    margin: 0 auto;
}

/* 轮播图包装器 */
.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 每张图片 - 左右滑动效果 */
.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
    transform: translateX(0);
    z-index: 1;
}

.slider-item.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

/* 向左滑出 */
.slider-item.slide-left {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
}

/* 向右滑出 */
.slider-item.slide-right {
    opacity: 0;
    transform: translateX(100%);
    z-index: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 指示器圆点 - 移到外部 */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.slider-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: rgba(136, 136, 136, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: width, background, border-radius;
}

.slider-indicators button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateZ(0) scale(1.2);
}

.slider-indicators button.active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
    transform: translateZ(0);
}

/* 左右箭头 */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(82, 82, 82, 0.6);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.slider-control span {
    position: relative;
    top: -2px;
    /* 向上抬 2px */
}

.custom-slider:hover .slider-control {
    opacity: 1;
}

.slider-control:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.slider-control.prev {
    left: 15px;
}

.slider-control.next {
    right: 15px;
}

/* 轮播图外层容器 */
.slider-container {
    display: block;
    width: 100%;
}

/* 响应式布局 - 主要内容区域 */
.main-content-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.content-left {
    flex: 1;
    min-width: 300px;
    color: #fff;
}

.content-right {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

/* 平板及以下尺寸 - 上下布局 */
@media (max-width: 991px) {
    .main-content-row {
        flex-direction: column;
    }

    .content-left {
        width: 100%;
        text-align: center;
        order: 1;
    }

    .content-right {
        width: 100%;
        order: 2;
        margin-top: 30px;
    }

    .custom-slider {
        max-width: 100%;
        height: 350px;
    }
}

/* 手机尺寸优化 */
@media (max-width: 767px) {
    .content-left h1 {
        font-size: 28px !important;
    }

    .content-left h3 {
        font-size: 18px !important;
    }

    .content-left p {
        font-size: 14px !important;
    }

    .custom-slider {
        height: 280px;
    }

    .btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
        display: block;
        width: 100%;
        margin: 10px 0 !important;
    }
}

/* 小手机优化 */
@media (max-width: 480px) {
    .custom-slider {
        height: 220px;
    }

    .content-left h1 {
        font-size: 24px !important;
    }

    .slider-control {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}