/* 智星动态轮播图样式 */

.news-preview-section {
    padding: 80px 0;
    background: #f8f9fa;
    overflow: hidden;
}

.news-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.news-preview-header .section-title {
    font-size: 2.5rem;
    color: #333333;
    font-weight: 600;
    margin: 0;
}

.view-more-btn {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    border: 2px solid #333333;
    border-radius: 4px;
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background: #333333;
    color: #ffffff;
    transform: translateX(5px);
}

/* 轮播容器 */
.news-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.news-carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.news-carousel-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 10px;
}

/* 新闻卡片样式 */
.news-preview-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.news-preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.news-preview-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-preview-card:hover .news-preview-image img {
    transform: scale(1.1);
}

.news-preview-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.date-day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.9;
}

.news-preview-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-preview-title {
    font-size: 18px;
    color: #333333;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-preview-excerpt {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.news-preview-category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #666666;
    font-size: 12px;
    border-radius: 3px;
}

.news-preview-arrow {
    font-size: 20px;
    color: #333333;
    transition: transform 0.3s ease;
}

.news-preview-card:hover .news-preview-arrow {
    transform: translateX(5px);
}

/* 轮播控制按钮 */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.carousel-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    color: #333333;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav-btn:hover {
    background: #333333;
    color: #ffffff;
    border-color: #333333;
    transform: scale(1.1);
}

.carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-nav-btn:disabled:hover {
    background: #ffffff;
    color: #333333;
    border-color: #e0e0e0;
    transform: scale(1);
}

/* 轮播指示器 */
.carousel-indicators {
    display: flex;
    gap: 10px;
    align-items: center;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cccccc;
    border: 2px solid #999999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #333333;
    border-color: #333333;
    transform: scale(1.3);
}

/* 加载状态 */
.news-preview-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .news-carousel-slide {
        gap: 20px;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .news-preview-section {
        padding: 60px 0;
    }
    
    .news-preview-header .section-title {
        font-size: 2rem;
    }
    
    .news-carousel-slide {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .news-preview-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .news-preview-header .section-title {
        font-size: 1.8rem;
    }
    
    .news-carousel-slide {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-preview-image {
        height: 180px;
    }
    
    .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .carousel-controls {
        margin-top: 30px;
    }
}

@media (max-width: 576px) {
    .news-preview-section {
        padding: 40px 0;
    }
    
    .news-preview-header .section-title {
        font-size: 1.5rem;
    }
    
    .view-more-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .news-preview-content {
        padding: 15px;
    }
    
    .news-preview-title {
        font-size: 16px;
    }
    
    .news-preview-excerpt {
        font-size: 13px;
    }
}
