/* ===== 全局重置与基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    transition: background 0.3s, color 0.3s;
}

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

h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    color: #1a1a2e;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2d3436;
}

p {
    margin-bottom: 15px;
    color: #555;
}

a {
    text-decoration: none;
    color: #667eea;
    transition: color 0.3s;
}

a:hover {
    color: #764ba2;
}

/* ===== 按钮 ===== */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== 头部导航 ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: background 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo svg {
    display: block;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu li a {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-menu li a.active,
.nav-menu li a:hover {
    color: #667eea;
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #667eea;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: background 0.3s;
}

/* ===== Hero Banner ===== */
.hero {
    padding: 140px 20px 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 400px;
}

.slide {
    display: none;
    animation: fadeIn 0.8s ease;
}

.slide.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.slide-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.1rem;
    color: #ddd;
    margin-bottom: 30px;
}

.slide-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* ===== 通用区块 ===== */
.section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 品牌介绍 ===== */
.brand-section {
    background: #fff;
}

.brand-content article {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.brand-content article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ===== 产品中心 ===== */
.products-section {
    background: #f0f2ff;
}

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

.product-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.product-card svg {
    margin-bottom: 20px;
}

/* ===== 服务支持 ===== */
.support-section {
    background: #fff;
}

.support-content article {
    margin-bottom: 40px;
}

.faq-list {
    margin-top: 20px;
}

.faq-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(102,126,234,0.05);
}

.faq-question {
    font-weight: 600;
    color: #2d3436;
    position: relative;
    padding-right: 30px;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    display: none;
    margin-top: 10px;
    color: #666;
    animation: fadeIn 0.3s ease;
}

.faq-item.active .faq-answer {
    display: block;
}

.howto-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.howto-content h4 {
    margin-top: 20px;
    color: #1a1a2e;
}

/* ===== 新闻资讯 ===== */
.news-section {
    background: #f0f2ff;
}

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

.news-card {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.news-date {
    color: #888;
    font-size: 0.9rem;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: #764ba2;
}

/* ===== 案例展示 ===== */
.cases-section {
    background: #fff;
}

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

.case-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ===== 联系我们 ===== */
.contact-section {
    background: #f0f2ff;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info p {
    margin-bottom: 10px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
    outline: none;
}

.contact-form button {
    align-self: flex-start;
}

/* ===== 页脚 ===== */
footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-links h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: #ccc;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #667eea;
}

.footer-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-info a {
    color: #667eea;
}

/* ===== 返回顶部按钮 ===== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 999;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* ===== 动画关键帧 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 响应式布局 ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 20px 60px;
    }

    .slide-content h1 {
        font-size: 1.8rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

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

/* ===== 暗色模式 ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    header {
        background: rgba(18,18,18,0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .nav-menu li a {
        color: #e0e0e0;
    }

    .nav-toggle span {
        background: #e0e0e0;
    }

    .brand-section,
    .support-section,
    .cases-section {
        background: #1e1e1e;
    }

    .brand-content article,
    .case-card {
        background: #2a2a2a;
    }

    .products-section,
    .news-section,
    .contact-section {
        background: #1a1a2e;
    }

    .product-card,
    .news-card {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .product-card p,
    .news-card p {
        color: #bbb;
    }

    .howto-content {
        background: #2a2a2a;
    }

    .contact-form input,
    .contact-form textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    h2, h3 {
        color: #e0e0e0;
    }

    p {
        color: #bbb;
    }

    .faq-question {
        color: #e0e0e0;
    }

    .faq-answer {
        color: #aaa;
    }

    footer {
        background: #0d0d1a;
    }

    .footer-links ul li a {
        color: #bbb;
    }

    .footer-info p {
        color: #aaa;
    }
}