/* 首页专用样式 */

/* Swiper轮播图样式 */
.banner {
    height: 500px;
    position: relative;
    overflow: hidden;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-slide .banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
    width: 12px;
    height: 12px;
    margin: 0 6px;
}

.swiper-pagination-bullet-active {
    background: #fff;
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 24px;
    font-weight: bold;
}

/* 首页关于我们样式 */
.about {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-img {
    flex: 1;
    height: 400px;
    background-color: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

/* 首页产品样式 */
.products {
    padding: 80px 0;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-info div {
    color: #666;
    margin-bottom: 15px;
    height: 50px;
    line-height: 25px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* 兼容其他浏览器 */
    display: -moz-box;
    -moz-line-clamp: 2;
    -moz-box-orient: vertical;
    display: box;
    line-clamp: 2;
    box-orient: vertical;
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal !important;
}

/* 首页新闻样式 */
.news {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    text-decoration: none;
}

.news-img {
    width: 40%;
    height: 200px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.news-info {
    width: 60%;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.news-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-info p {
    flex: 1;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-date {
    color: #999;
    font-size: 12px;
}

/* 我们的优势样式 */
.advantage {
    padding: 80px 0;
    background-color: #fff;
}

.advantage-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.advantage-item {
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background-color: #0066cc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    margin: 0 auto 20px;
}

.advantage-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.advantage-item p {
    color: #666;
    font-size: 16px;
}

/* 合作伙伴样式 */
.partners {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.partner-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 20px 0;
    gap: 40px;
    /* 隐藏滚动条但保留滚动功能 */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* 隐藏Chrome等浏览器的滚动条 */
.partner-list::-webkit-scrollbar {
    display: none;
}

.partner-item {
    flex: 0 0 auto;
    width: 180px;
    height: 80px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.partner-logo {
    width: 140px;
    height: 60px;
    color: #666;
    font-size: 14px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img,
.partner-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 首页响应式样式 */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
        gap: 40px;
    }

    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .banner h1 {
        font-size: 36px;
    }

    .banner p {
        font-size: 18px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .news-item {
        flex-direction: column;
    }

    .news-img,
    .news-info {
        width: 100%;
    }

    .news-img {
        height: 200px;
    }

    .advantage-list {
        grid-template-columns: 1fr;
    }

    .partner-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .partner-item {
        width: 45%;
        margin-bottom: 20px;
    }
}