/* swiper-style.css - 轮播图优化样式 */

/* ============================================
   轮播图容器 - 添加圆角效果
   ============================================ */
.swiper {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 确保所有子元素也继承圆角 */
.swiper-wrapper,
.swiper-slide,
.carousel-img {
    border-radius: inherit;
}

/* ============================================
   轮播图图片样式
   ============================================ */
.carousel-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* 固定图片高度，保持比例一致 */
@media (min-width: 1400px) {
    .carousel-img {
        height: 550px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .carousel-img {
        height: 500px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .carousel-img {
        height: 450px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .carousel-img {
        height: 400px;
    }
}

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

/* ============================================
   轮播图文字样式
   ============================================ */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    color: white;
    padding: 2rem 3rem;
    text-align: left;
    z-index: 10;
    /* 确保文字区域不影响圆角 */
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

/* 标题样式 */
.carousel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

/* 描述文字 */
.carousel-desc {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    max-width: 60%;
}

/* 按钮样式 */
.carousel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #ff3860;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.carousel-btn:hover {
    background-color: #ff1c4a;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 56, 96, 0.3);
}

.carousel-btn i {
    transition: transform 0.3s ease;
}

.carousel-btn:hover i {
    transform: translateX(4px);
}

/* ============================================
   轮播图控制按钮（左右箭头）- 稍微内移避免被圆角遮挡
   ============================================ */
.swiper-button-next,
.swiper-button-prev {
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin: 0 15px;  /* 左右内边距，避免太靠边缘 */
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

/* ============================================
   轮播图分页器
   ============================================ */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background-color: #ff3860;
    width: 24px;
    border-radius: 5px;
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 992px) {
    .carousel-caption {
        padding: 1.5rem 2rem;
    }

    .carousel-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .carousel-desc {
        font-size: 0.9rem;
        max-width: 70%;
        margin-bottom: 0.75rem;
    }

    .carousel-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 38px;
        height: 38px;
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .carousel-caption {
        padding: 1rem 1.5rem;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    }

    .carousel-title {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .carousel-desc {
        font-size: 0.75rem;
        max-width: 100%;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .carousel-btn {
        padding: 0.3rem 1rem;
        font-size: 0.7rem;
    }

    .carousel-btn i {
        font-size: 0.65rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 32px;
        height: 32px;
        margin: 0 8px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px;
    }

    .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
    }

    .swiper-pagination-bullet-active {
        width: 16px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .carousel-caption {
        padding: 0.8rem 1rem;
    }

    .carousel-title {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .carousel-desc {
        font-size: 0.65rem;
        -webkit-line-clamp: 1;
        margin-bottom: 0.3rem;
    }

    .carousel-btn {
        padding: 0.2rem 0.8rem;
        font-size: 0.6rem;
    }

    .carousel-btn i {
        font-size: 0.55rem;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 28px;
        height: 28px;
        margin: 0 5px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 12px;
    }
}