/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --text-color: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* ========== 头部导航 ========== */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 700;
}

.logo .slogan {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 0;
    position: relative;
}

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.header-contact {
    text-align: right;
}

.header-contact p {
    font-size: 12px;
    color: var(--text-light);
}

.header-contact .phone {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* ========== 轮播图 ========== */
.banner {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    color: white;
    max-width: 600px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: white;
    width: 30px;
    border-radius: 6px;
}

/* ========== 通用区块标题 ========== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title p {
    font-size: 16px;
    color: var(--text-light);
}

/* ========== 核心业务 ========== */
.services {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.service-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-link:hover {
    gap: 10px;
}

/* ========== 为什么选择我们 ========== */
.why-us {
    padding: 80px 0;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.why-item {
    text-align: center;
}

.why-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-color);
}

.why-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.why-item p {
    color: var(--text-light);
    font-size: 14px;
}

/* ========== 产品展示 ========== */
.products {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
}

.product-card h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
    color: var(--text-color);
}

.product-card p {
    padding: 0 20px 15px;
    color: var(--text-light);
    font-size: 14px;
}

.product-tag {
    display: inline-block;
    margin: 0 20px 20px;
    padding: 5px 15px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ========== 新闻动态 ========== */
.news {
    padding: 80px 0;
}

.news-grid {
    display: grid;
    gap: 30px;
}

.news-card {
    display: flex;
    gap: 30px;
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
}

.news-date {
    min-width: 80px;
    text-align: center;
    padding: 15px;
    background-color: var(--primary-color);
    border-radius: 8px;
    color: white;
}

.news-date .day {
    display: block;
    font-size: 32px;
    font-weight: 700;
}

.news-date .month {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

.news-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-link:hover {
    gap: 10px;
}

/* ========== 合作伙伴 ========== */
.partners {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
}

.partner-item {
    background-color: var(--bg-white);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.partner-item:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ========== 底部 ========== */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-col p {
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #94a3b8;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 20px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ========== 返回顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav {
        display: none;
        width: 100%;
        margin-top: 20px;
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav a {
        display: block;
        padding: 15px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-contact {
        display: none;
    }

    .banner {
        height: 400px;
    }

    .banner-content h2 {
        font-size: 32px;
    }

    .banner-content p {
        font-size: 16px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .services-grid,
    .products-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        flex-direction: column;
    }

    .news-date {
        min-width: auto;
        width: 100px;
    }

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

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

@media (max-width: 480px) {
    .banner {
        height: 300px;
    }

    .banner-content h2 {
        font-size: 24px;
    }

    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .services,
    .products,
    .news,
    .why-us,
    .partners {
        padding: 50px 0;
    }
}
