﻿/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 主导航 ========== */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 24px;
    color: #1a3a5c;
    margin: 0;
}

.logo p {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
}

/* 导航菜单 - 悬停背景色效果 */
nav {
    flex: 1;
    text-align: center;
}

nav ul {
    display: inline-flex;
    list-style: none;
    gap: 5px;
}

nav ul li a {
    display: inline-block;
    padding: 8px 18px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.active {
    color: #fff;
    background-color: #e6a017;
    border-bottom: none;
}

/* 右侧图标 */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icons a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.header-icons a:hover {
    color: #e6a017;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.lang-switch a {
    color: #333;
    text-decoration: none;
}

.lang-switch a:hover {
    color: #e6a017;
}

.lang-switch a.active {
    color: #e6a017;
    font-weight: bold;
}

.lang-separator {
    color: #ccc;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

/* ========== 二级下拉菜单 ========== */
nav ul li {
    position: relative;
}

nav ul li .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 6px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    list-style: none;
    padding: 8px 0;
}

nav ul li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
}

nav ul li .sub-menu li {
    margin: 0;
}

nav ul li .sub-menu li a {
    display: block;
    padding: 8px 20px;
    color: #333;
    background: none;
    border-radius: 0;
    white-space: nowrap;
}

nav ul li .sub-menu li a:hover {
    background-color: #e6a017;
    color: #fff;
}

/* 移动端：点击父菜单展开子菜单 */
@media (max-width: 768px) {
    nav ul li .sub-menu {
        position: static;
        box-shadow: none;
        background: #f5f5f5;
        opacity: 1;
        visibility: visible;
        display: none;
        margin-top: 5px;
    }
    nav ul li .sub-menu.show {
        display: block;
    }
    nav ul li .sub-menu li a {
        padding-left: 35px;
    }
}

/* ========== 搜索框 ========== */
.search-box {
    position: relative;
    display: inline-block;
}

.search-input {
    position: absolute;
    right: 0;
    top: 30px;
    width: 0;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: white;
    z-index: 1000;
}

.search-box.active .search-input {
    width: 200px;
    opacity: 1;
    visibility: visible;
}

/* ========== 横幅轮播 ========== */
.hero {
    position: relative;
    height: 500px;
    background: url('../images/banner1.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* ========== 通用区块 ========== */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 15px;
    color: #1a3a5c;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
    color: #555;
}

/* ========== 设备分类标签 ========== */
.equipment-tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 30px;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-btn.active,
.tab-btn:hover {
    color: #e6a017;
    border-bottom-color: #e6a017;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.equip-card {
    text-align: center;
    cursor: pointer;
}

.equip-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.equip-card:hover img {
    transform: scale(1.02);
}

.equip-card h3 {
    margin: 15px 0 10px;
    font-size: 18px;
    color: #1a3a5c;
}

.equip-card p {
    color: #e6a017;
    font-size: 14px;
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px 15px 5px;
    font-size: 18px;
    color: #1a3a5c;
}

.product-card .click-btn {
    display: inline-block;
    margin: 10px 0 20px;
    padding: 5px 20px;
    border: 1px solid #e6a017;
    color: #e6a017;
    background: transparent;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s;
}

.product-card .click-btn:hover {
    background: #e6a017;
    color: #fff;
}

/* ========== 新闻列表 ========== */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}

.news-title {
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.news-title:hover {
    color: #e6a017;
}

.news-date {
    color: #999;
    font-size: 14px;
}

/* ========== 页脚 ========== */
footer {
    background: #1a3a5c;
    color: #ccc;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-col p,
.footer-col a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
    font-size: 14px;
}

.footer-col a:hover {
    color: #e6a017;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-block;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #e6a017;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2a4a6c;
    font-size: 12px;
}

/* ========== 在线客服浮窗 ========== */
.float-客服 {
    position: fixed;
    bottom: 100px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-客服 a {
    display: block;
    width: 50px;
    height: 50px;
    background: #e6a017;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    color: white;
    font-size: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    text-decoration: none;
}

.float-客服 a:hover {
    transform: scale(1.1);
    background: #1a3a5c;
}

.float-客服 .wechat {
    position: relative;
}

.float-客服 .wechat-qrcode {
    display: none;
    position: absolute;
    right: 60px;
    bottom: 0;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.float-客服 .wechat:hover .wechat-qrcode {
    display: block;
}

.float-客服 .wechat-qrcode img {
    width: 120px;
    height: auto;
}

.float-客服 .wechat-qrcode p {
    margin-top: 5px;
    font-size: 12px;
    color: #333;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .header-flex {
        flex-wrap: wrap;
    }
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav {
        display: none;
    }
    nav.active {
        display: block;
    }
    nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .header-icons {
        gap: 10px;
    }
    .hero h2 {
        font-size: 32px;
    }
    .section-title {
        font-size: 28px;
    }
    .equipment-tabs {
        gap: 15px;
    }
    .tab-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    .float-客服 a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 18px;
    }
}