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

body {
    background: #0a0c10;
    color: #e0e4e8;
    font-family: 'Segoe UI', 'Poppins', 'Roboto', sans-serif;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== 顶部栏 ========== */
.top-bar {
    background: #0c0e12;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lang-switch a {
    color: #ccc;
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.3s;
}
.lang-switch a.active,
.lang-switch a:hover {
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc;
}

/* ========== 头部 ========== */
.header {
    background: #101214;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-area {
    margin-bottom: 20px;
}
.logo-rect {
    max-height: 60px;
    width: auto;
}

/* ========== 导航栏（PC端：flex 均分一行） ========== */
.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.main-nav li {
    flex: 1;
    text-align: center;
}

.main-nav a {
    display: block;
    padding: 10px 5px;
    color: #ddd;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    background: linear-gradient(145deg, #2c2e32, #1e2024);
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5), -1px -1px 2px rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: linear-gradient(145deg, #3a3e44, #2a2c30);
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5), inset -1px -1px 2px rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

/* ========== 轮播 ========== */
.banner-swiper {
    width: 100%;
    position: relative;
    aspect-ratio: 100 / 30;
    margin: 20px 0;
    overflow: hidden;
    background: #000;
}
.banner-swiper .swiper-slide {
    width: 100%;
    height: 100%;
}
.banner-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== 通用区块 ========== */
.section {
    margin: 60px 0;
}
.section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00ccaa;
    box-shadow: 0 0 6px #00ccaa;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.product-card {
    background: #15181c;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #2a2e34;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 204, 170, 0.15);
    border-color: #00ccaa;
}
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}
.btn-more, .btn-detail {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    border: 1px solid #00ccaa;
    color: #00ccaa;
    text-decoration: none;
    transition: 0.3s;
    background: transparent;
}
.btn-more:hover, .btn-detail:hover {
    background: #00ccaa;
    color: #000;
    box-shadow: 0 0 10px #00ccaa;
}

/* 新闻列表 */
.news-list {
    list-style: none;
}
.news-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #333;
}
.news-list a {
    color: #e0e4e8;
    text-decoration: none;
    transition: 0.3s;
}
.news-list a:hover {
    color: #00ccaa;
}

/* 底部 */
.footer {
    background: #0c0e12;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-contact p {
    margin-bottom: 10px;
}
.wechat-qr {
    margin-top: 15px;
}
.wechat-qr img {
    max-width: 80px;
    border-radius: 8px;
}
.copyright {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 12px;
}

/* 页面通用 */
.page-main {
    padding: 40px 0;
}
.news-list-page .news-item {
    margin-bottom: 30px;
    border-bottom: 1px solid #2a2e34;
    padding-bottom: 20px;
}
.contact-card, .job-item {
    background: #15181c;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #2a2e34;
}

/* ========== 响应式：手机端导航改为两行三列均分 ========== */
@media (max-width: 768px) {
    .logo-area {
        margin-bottom: 15px;
        text-align: left;
    }

    /* 导航栏使用 Grid 布局：两行三列，宽度均分 */
    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        justify-content: stretch;
    }
    .main-nav li {
        flex: none;           /* 重置 flex 属性 */
        text-align: center;
    }
    .main-nav a {
        padding: 8px 4px;
        font-size: 14px;
    }

    .banner-swiper {
        aspect-ratio: 100 / 30;
    }
    .section h2 {
        font-size: 1.6rem;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
    .footer-contact {
        text-align: center;
    }
}