/* 全局变量 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --gray: #f5f5f5;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.logo a span:first-child {
    color: var(--secondary-color);
    margin-right: 10px;
}

.menu ul {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 30px;
}

.menu a {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.menu a:hover,
.menu a.active {
    color: var(--secondary-color);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.menu a:hover::after,
.menu a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    margin-top: 80px;
    padding: 80px 0;
    background-color: var(--gray);
}

.hero .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-buttons .btn {
    margin-right: 15px;
    margin-bottom: 15px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
    margin-top: 30px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 部分标题 */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-header p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* 产品中心 */
.products {
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-info h3 {
    margin-bottom: 10px;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* 我们的优势 */
.advantages {
    padding: 80px 0;
    background-color: var(--gray);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    font-size: 32px;
    color: var(--secondary-color);
}

/* 行业资讯 */
.news {
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-item {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.news-link {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    font-weight: 500;
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.news-link:hover {
    color: #2980b9;
}

.news-link span {
    margin-left: 5px;
    transition: var(--transition);
}

.news-link:hover span {
    transform: translateX(5px);
}

/* 客户评价 */
.testimonials {
    padding: 80px 0;
    background-color: var(--gray);
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-item {
    display: none;
    padding: 40px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.testimonial-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-rating {
    margin-bottom: 20px;
}

.testimonial-rating span {
    font-size: 20px;
    color: #f39c12;
}

.testimonial-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.testimonial-prev,
.testimonial-next {
    width: 40px;
    height: 40px;
    margin: 0 10px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* 联系我们 */
.contact {
    padding: 80px 0;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-right: 20px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    font-size: 20px;
    color: var(--secondary-color);
}

.contact-text h3 {
    margin-bottom: 5px;
}

.contact-text p {
    color: var(--text-light);
    margin: 0;
}

.contact-social {
    display: flex;
    margin-top: 40px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 15px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    font-size: 18px;
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 80px 0 40px;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 20px;
}

.footer-logo a span:first-child {
    color: var(--secondary-color);
    margin-right: 10px;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.footer-links,
.footer-contact,
.footer-newsletter {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-links h3,
.footer-contact h3,
.footer-newsletter h3 {
    color: var(--white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-contact h3::after,
.footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--secondary-color);
}

.footer-contact li {
    display: flex;
    align-items: center;
}

.footer-contact li span {
    margin-right: 10px;
    color: var(--secondary-color);
}

.footer-newsletter p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    font-family: inherit;
}

.newsletter-form button {
    padding: 12px 20px;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 0 4px 4px 0;
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: #2980b9;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.footer-policy {
    display: flex;
    gap: 20px;
}

.footer-policy a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-policy a:hover {
    color: var(--secondary-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .advantages-grid,
    .products-grid,
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 999;
    }
    
    .menu.active {
        left: 0;
    }
    
    .menu ul {
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
    }
    
    .menu li {
        margin: 15px 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        margin-right: 0;
    }
    
    .products,
    .advantages,
    .news,
    .testimonials,
    .contact {
        padding: 60px 0;
    }
    
    .footer-top {
        flex-direction: column;
    }
    
    .footer-links,
    .footer-contact,
    .footer-newsletter {
        width: 100%;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .testimonial-item {
        padding: 30px 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
}