/* 在现有样式基础上添加以下内容 */

:root {
    --nav-bg-color: #333;
    --nav-text-color: #fff;
    --nav-hover-color: #4CAF50;
    --main-spacing: 5%;
    --primary-color: #333;
    --secondary-color: #4CAF50;
    --text-color: #666;
    --light-gray: #f5f5f5;
    --border-color: #eee;
    --section-spacing: 40px;
}
a {
text-decoration: none; /* 去掉下划线 */
}
/* 导航栏样式 */
.navbar {
    background-color: var(--nav-bg-color);
    width: 100%;
    z-index: 1000;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--main-spacing);
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 52px;
    width: auto;
}

.logo-text {
    color: var(--nav-text-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    color: var(--nav-text-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: var(--nav-hover-color);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--nav-hover-color);
    transition: width 0.3s;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* Banner样式 */
.banner-section {
    position: relative;
}

.banner {
    width: 100%;
    height:40vh;
}

.swiper-slide {
    position: relative;
    height: 40vh;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    width: 80%;
}

.banner-content h2 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 1.8rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Banner底部装饰 */
.banner-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
    background: rgba(255,255,255,0.9);
}

.decoration-item {
    font-size: 1.5rem;
    color: #333;
    font-family: 'Arial', sans-serif;
}

/* Swiper自定义样式 */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--nav-hover-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 0.5rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 0.5rem;
    }

    .nav-item {
        padding: 0.3rem 0;
    }

    .banner,
    .swiper-slide {
        height: 300px;
    }

    .banner-content h2 {
        font-size: 2rem;
    }

    .banner-content p {
        font-size: 1.2rem;
    }

    .banner-decoration {
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .about-content {
        flex-direction: column;
        gap: 20px;
    }

    .about-image {
        width: 100%;
        height: 200px;
    }

    .about-image img {
        width: 100%;
        height: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-image {
        width: 100%;
    }

    .product-info {
        width: 100%;
        padding: 10px;
    }
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .news-image {
        width: 100%;
    }

    .news-info {
        width: 100%;
        padding: 10px;
    }

    .news-list {
        margin-bottom: 20px;
    }

    .news-item {
        padding: 15px;
    }

    .news-item h3 {
        font-size: 1.1rem;
    }

    .more-link,
    .more-link-products {
        width: 80px;
        margin: 20px auto;
    }

    .footer {
        padding: 20px 0;
    }

    .footer-content {
        gap: 10px;
    }

    .copyright {
        font-size: 0.9rem;
    }

    .footer-info {
        font-size: 0.8rem;
    }
}

/* 平板设备 */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-content h2 {
        font-size: 2.5rem;
    }

    .banner-content p {
        font-size: 1.5rem;
    }
}

/* 小屏幕手机 */
@media (max-width: 480px) {
    .banner,
    .swiper-slide {
        height: 250px;
    }

    .banner-content h2 {
        font-size: 1.8rem;
    }

    .banner-content p {
        font-size: 1rem;
    }

    .section {
        padding: 30px 0;
    }

    .product-title,
    .news-title {
        font-size: 16px;
    }

    .product-description,
    .news-description {
        font-size: 14px;
    }
}

/* 横屏手机 */
@media (max-height: 500px) and (orientation: landscape) {
    .banner,
    .swiper-slide {
        height: 250px;
    }

    .nav-links {
        flex-direction: row;
        gap: 1rem;
    }
}

/* 高分辨率设备 */
@media (min-resolution: 192dpi) {
    .logo img {
        transform: scale(1.2);
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #f5f5f5;
        --text-color: #ccc;
        --light-gray: #333;
        --border-color: #444;
    }

    .product-card,
    .news-card {
        background: #222;
    }

    .product-info,
    .news-info {
        color: #fff;
    }
}

/* 响应式汉堡菜单 */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--nav-text-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* 移动端导航样式 */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--nav-bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.5s;
        z-index: 1000;
        padding: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-item {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }

    /* 汉堡菜单动画 */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* 添加遮罩层 */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .overlay.active {
        display: block;
    }
}

/* 通用容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 章节通用样式 */
.section {
    padding: var(--section-spacing) 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
}

/* About Us 样式 */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-image {
    flex: 1;
    overflow: hidden;
    height: 200px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
    color: var(--text-color);
    line-height: 1.8;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

#products {
    background-color: #444444;
    color: white;
}
/* Products 样式 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 15px;
}

.product-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.product-image {
    position: relative;
    width: 90%;
    overflow: hidden;
    margin: 10px auto;

}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-info {
    width: 90%;
    padding: 15px;
    transition: bottom 0.3s ease;
    text-align: left;
    color: black;
}
/* 悬停效果 */
.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-description {
    font-size: 16px;
    margin-bottom: 5px;
}

.product-date {
    font-size: 14px;
    color: #ccc;
}

/* news 样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 15px;
}

.news-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.news-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 比例 */
    overflow: hidden;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-info {
    position: absolute;
    bottom: -22%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    transition: bottom 0.3s ease;
    text-align: center;
}

/* 悬停效果 */
.news-card:hover .news-info {
    bottom: 0;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.news-description {
    font-size: 16px;
    margin-bottom: 5px;
}

.news-date {
    font-size: 14px;
    color: #ccc;
}

/* News 样式 */
.news-list {
    margin-bottom: 40px;
}

.news-item {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.news-item:hover {
    background-color: var(--light-gray);
}

.news-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.news-item p {
    color: var(--text-color);
    line-height: 1.6;
}

/* More 链接样式 */
.more-link {
    border: 1px solid #ffffff;
    background-color: #444444;
    color: #ffffff;
    text-align: center;
    margin-top: 30px;
    border-radius: 20px;
    text-align: center;
    width: 100px;
    margin: 30px auto;
}

.more-link a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.more-link:hover {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #333;
}
.more-link a:hover {
    color: #333;
}

/* More 链接样式 */
.more-link-products {
    border: 1px solid #ffffff;
    background-color: #ffffff;
    border-radius: 20px;
    text-align: center;
    width: 100px;
    margin: 30px auto;
}

.more-link-products a {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.more-link-products:hover {
    border: 1px solid #ffffff;
    background-color: #444444;
}
.more-link-products a:hover {
    color: #ffffff;
}

/* Footer 样式 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.copyright {
    font-size: 1.1rem;
}

.footer-info {
    color: #999;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* .news-item {
        padding: 20px 15px;
    } */
}

/* 添加AOS动画相关样式 */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Products部分动画样式 */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.product-card.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* 确保动画平滑 */
.products-grid {
    perspective: 1000px;
}

.product-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* 在现有样式基础上添加News动画相关样式 */
.news-card {
    opacity: 0;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: all 0.6s ease-out;
}

.news-card.aos-animate {
    opacity: 1;
}

/* News部分特定动画效果 */
[data-aos="flip-left"] {
    transform: rotateY(-90deg);
    opacity: 0;
}

[data-aos="flip-left"].aos-animate {
    transform: rotateY(0);
    opacity: 1;
}

[data-aos="zoom-in"] {
    transform: scale(0.5);
    opacity: 0;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* 确保动画平滑 */
.news-grid {
    perspective: 1000px;
}

/* 在现有样式基础上添加About动画相关样式 */
.about-image.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

.about-text.aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* 图片悬停效果 */
.about-image img {
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* 文字动画效果 */
.about-text p {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.about-text.aos-animate p {
    opacity: 1;
    transform: translateY(0);
}