/* static/zde/css/featured-carousel.css */

.featured-carousel {
    margin: 0 auto 20px auto;  /* 居中对齐 */
    max-width: 1190px;         /* 与 .excerpts 保持一致 */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.featured-carousel .swiper {
    width: 100%;
    height: 100%;
}

.featured-slide {
    position: relative;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    text-align: left;
}

.slide-content h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.slide-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    max-height: 4.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.slide-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
}

.slide-category {
    display: inline-block;
    background-color: #ff6651;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 10px;
}

.slide-stats {
    display: flex;
    align-items: center;
}

.slide-stats span {
    margin-left: 15px;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #ff6651;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .featured-slide {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 20px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .featured-slide {
        height: 220px;
    }
    
    .slide-content h2 {
        font-size: 18px;
    }
    
    .slide-content p {
        font-size: 12px;
        -webkit-line-clamp: 2;
        max-height: 3em;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 14px;
    }
}