/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: #c00;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #a00;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #666;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #555;
}

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
}

.logo h1 {
    font-size: 24px;
    color: #c00;
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #c00;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s;
}

/* 首页大图样式 */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center; /* 修改为center，使内容居中 */
    padding: 150px 0 100px;
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
    text-align: center; /* 添加text-align: center确保所有内容居中 */
}

/* 修改首页大图文字居中 */
.hero-content {
    max-width: 500px;
    z-index: 1;
    text-align: center;
    margin: 0 auto; /* 添加margin: 0 auto确保内容块在父容器中居中 */
}

.hero-content h2 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
    text-align: center; /* 明确设置文字居中 */
}

.hero-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    text-align: center; /* 明确设置文字居中 */
}

/* 确保按钮也居中 */
.hero-content .btn-primary {
    display: inline-block;
    margin: 0 auto;
}

/* 修改导航栏样式，使Logo和导航分离 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

/* 修改首页大图文字居中 */
.hero-content {
    max-width: 500px;
    z-index: 1;
    text-align: center;
}

/* 为移动端菜单按钮添加动画样式 */
.rotate-down {
    transform: rotate(45deg) translate(5px, 5px);
}

.rotate-up {
    transform: rotate(-45deg) translate(7px, -6px);
}

.hide {
    opacity: 0;
}

.hero-content h2 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.hero-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* 产品展示样式 */
.products-section {
    padding: 100px 0;
}

.products-section h2 {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px;
    font-size: 18px;
    color: #333;
}

.product-card p {
    padding: 0 15px 15px;
    color: #666;
    font-size: 14px;
}

.product-price {
    padding: 0 15px 15px;
    font-size: 18px;
    color: #c00;
    font-weight: bold;
}

.product-card button {
    margin: 0 15px 15px;
    width: calc(100% - 30px);
}

/* 产品特色样式 */
.features-section {
    padding: 100px 0;
    background-color: #fff;
}

.features-section h2 {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
    font-size: 14px;
}

/* 新闻资讯样式 */
.news-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.news-section h2 {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 60px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card h3 {
    padding: 15px;
    font-size: 18px;
    color: #333;
}

.news-date {
    padding: 0 15px;
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-excerpt {
    padding: 0 15px 15px;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.read-more {
    display: block;
    padding: 0 15px 15px;
    color: #c00;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.read-more:hover {
    color: #a00;
}

/* 客户评价样式 */
.testimonials-section {
    padding: 100px 0;
    background-color: #fff;
}

.testimonials-section h2 {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 60px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.customer-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
}

.testimonial-card h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.rating {
    color: #f1c40f;
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 联系我们样式 */
.contact-section {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.contact-section h2 {
    text-align: center;
    font-size: 36px;
    color: #333;
    margin-bottom: 60px;
}

.contact-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.contact-item {
    text-align: center;
    margin: 20px;
}

.contact-item h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.contact-item p {
    color: #666;
    font-size: 16px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form button {
    width: 100%;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.footer-logo h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #c00;
}

.footer-info p {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #c00;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #a00;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 导航栏响应式 */
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li {
        margin: 15px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* 首页大图响应式 */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 120px 0 80px;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    /* 产品展示响应式 */
    .products-section h2,
    .features-section h2,
    .news-section h2,
    .testimonials-section h2,
    .contact-section h2 {
        font-size: 28px;
    }

    /* 产品特色响应式 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 新闻资讯响应式 */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* 客户评价响应式 */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* 联系我们响应式 */
    .contact-info {
        flex-direction: column;
    }

    .contact-item {
        margin: 10px 0;
    }
}

@media screen and (max-width: 480px) {
    /* 产品特色响应式 */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* 表单响应式 */
    .contact-form {
        padding: 20px;
    }

    /* 返回顶部按钮响应式 */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}