/* Modern Slider Styles */
.modern-slider {
    position: relative;
    /* 基础高度使用视窗宽度的比例，创建16:9的比例 */
    height: 56.25vw;
    max-height: 80vh;
    min-height: 350px;
    overflow: hidden;
}

.swiper-container {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 移除深色遮罩层，让背景图片颜色正常显示 */
    background: transparent;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem 0;
}


.slide-title {
    text-align: center;
    margin-top: 30%;
    /* 使用视窗宽度单位，让文字随浏览器宽度缩放 */
    font-size: clamp(2rem, 5.5vw, 6rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 6px rgba(0,0,0,0.6);
    animation: slideInUp 1s ease-out;
}

.slide-description {
    /* 使用视窗宽度单位，让描述文字也随浏览器宽度缩放 */
    font-size: clamp(1rem, 2.2vw, 1.8rem);
    margin-bottom: 2rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8), 0 0 4px rgba(0,0,0,0.6);
    animation: slideInUp 1s ease-out 0.2s both;
    color: rgba(255,255,255,0.9);
}

.slide-buttons {
    animation: slideInUp 1s ease-out 0.4s both;
}

.slide-buttons .btn {
    background-color: #007bff;
    color: #fff;
    padding: 8px 15px;
    font-size: 1.1rem;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.slide-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(255,255,255,0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Swiper Pagination */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: white;
    transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-slider {
        height: 40vh;
        min-height: 250px;
    }

    .slide-title {
        margin-top: 15%;
        font-size: 2.5rem;
    }

    .slide-description {
        font-size: 1.1rem;
    }

    .slide-buttons .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .slide-title {
        font-size: 2rem;
    }

    .slide-description {
        font-size: 1rem;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auto-height adjustment */
.swiper-container {
    --swiper-navigation-color: #fff;
    --swiper-pagination-color: #fff;
}

/* 响应式设计 - 根据屏幕宽度调整轮播高度 */
@media (max-width: 576px) {
    /* 小屏幕手机 */
    .modern-slider {
        height: 70vw;
        max-height: 60vh;
        min-height: 280px;
    }

    .slide-title {
        /* 使用更紧凑的动态缩放范围 */
        font-size: clamp(1.5rem, 8vw, 3rem);
        margin-top: 15%;
    }

    .slide-description {
        /* 手机端描述文字使用更小的缩放范围 */
        font-size: clamp(0.9rem, 4vw, 1.4rem);
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    /* 平板设备 */
    .modern-slider {
        height: 60vw;
        max-height: 70vh;
        min-height: 320px;
    }

    .slide-title {
        /* 平板端使用中等的动态缩放范围 */
        font-size: clamp(2rem, 6vw, 4rem);
    }

    .slide-description {
        /* 平板端描述文字 */
        font-size: clamp(1rem, 3vw, 1.6rem);
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    /* 小桌面屏幕 */
    .modern-slider {
        height: 50vw;
        max-height: 75vh;
        min-height: 400px;
    }

    .slide-title {
        margin-top: 15%;
        /* 小桌面端文字缩放 */
        font-size: clamp(2.5rem, 5vw, 5rem);
    }

    .slide-description {
        font-size: clamp(1.1rem, 2vw, 1.7rem);
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    /* 中等桌面屏幕 */
    .modern-slider {
        height: 45vw;
        max-height: 80vh;
        min-height: 450px;
    }

    .slide-title {
        margin-top: 15%;
        /* 中等桌面端文字缩放 */
        font-size: clamp(3rem, 4.5vw, 5.5rem);
    }

    .slide-description {
        font-size: clamp(1.2rem, 1.8vw, 1.8rem);
    }
}

@media (min-width: 1201px) {
    /* 大屏幕 */
    .modern-slider {
        height: 40vw;
        max-height: 85vh;
        min-height: 500px;
    }

    .slide-title {
        margin-top: 20%;
        /* 大屏幕端文字缩放，最大不超过6rem */
        font-size: clamp(3.5rem, 4vw, 6rem);
    }

    .slide-description {
        font-size: clamp(1.3rem, 1.5vw, 2rem);
    }
}
