:root {
    --primary-color: #00479d; /* 科技深蓝 */
    --accent-color: #e60012; /* 动感红 */
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fb;
    --bg-dark: #12151c;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* 动画类 */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 导航栏 (悬浮/滚动) */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 20px 5%; display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: var(--transition); background: transparent;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98); box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 0 5%;
}
.navbar .logo { font-size: 24px; font-weight: 800; padding: 15px 0; }
.navbar .logo img.nav-logo { filter: brightness(0) invert(1); transition: filter 0.3s; }
.navbar.scrolled .logo img.nav-logo { filter: none; }

.nav-links { display: flex; list-style: none; gap: 0; height: 100%; }
.nav-item { height: 100%; display: flex; align-items: center; position: relative; }
.nav-item > a {
    text-decoration: none; color: var(--white); font-weight: 500; font-size: 16px; 
    transition: color 0.3s; padding: 25px 20px; position: relative; cursor: pointer;
}
.navbar.scrolled .nav-item > a { color: var(--text-main); }
.nav-item > a:hover { color: var(--primary-color); }

/* 底部蓝线动画 */
.navbar.scrolled .nav-item > a::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 3px; background: var(--primary-color); transition: width 0.3s ease;
}
.navbar.scrolled .nav-item:hover > a::after,
.navbar.scrolled .nav-item > a.active::after { width: 100%; }
.navbar.scrolled .nav-item > a.active { color: var(--primary-color); font-weight: bold; }

/* --- 全局超级菜单 (Mega Menu) - 恢复全宽版本 --- */
.mega-menu {
    position: absolute; top: 100%; left: 0; width: 100vw; background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); border-top: 1px solid #eee;
    opacity: 0; visibility: hidden; transform: translateY(5px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; justify-content: center; padding: 40px 5%;
    margin-left: calc(-50vw + 50%); 
}
.nav-item:hover .mega-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}

/* 统一的高级链接样式 */
.mega-link {
    color: var(--text-main); text-decoration: none; font-size: 16px; font-weight: 500;
    transition: all 0.3s; padding: 15px 30px; border-radius: 4px; display: block;
    text-align: center; background: #f8f9fb; border: 1px solid transparent;
}
.mega-link:hover { color: var(--primary-color); background: #fff; border-color: var(--primary-color); box-shadow: 0 5px 15px rgba(0,71,157,0.1); }

/* 产品中心：6个系列的 2行3列 网格 */
.mega-grid-2x3 {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 100px;
    width: 100%; max-width: 1000px; margin: 0 auto;
}

/* 单行均匀分布 */
.mega-flex-row {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 1000px; margin: 0 auto; gap: 40px;
}

/* --- 经典局部下拉菜单 (Dropdown) 极其稳定 --- */
.dropdown-menu {
    position: absolute; top: 100%; left: 0; 
    background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-radius: 4px; border-top: 2px solid var(--primary-color);
    padding: 10px 0; min-width: 160px; text-align: left;
    opacity: 0; visibility: hidden; transform: translateY(10px); 
    transition: all 0.3s ease; list-style: none; margin: 0; z-index: 1001;
}
.nav-item:hover .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu li { padding: 0; margin: 0; }
.dropdown-menu a {
    display: block; padding: 12px 25px; color: #555; text-decoration: none;
    font-size: 14px; font-weight: normal; transition: all 0.2s;
    white-space: nowrap;
}
.dropdown-menu a:hover {
    background: #f8f9fb; color: var(--primary-color); padding-left: 30px; /* 悬停小动画 */
}

/* 专门针对产品中心的两列宽菜单 */
.dropdown-products {
    min-width: 320px; display: grid; grid-template-columns: 1fr 1fr; padding: 15px;
}
.dropdown-products a { padding: 10px 15px; }
.dropdown-products a:hover { padding-left: 20px; }

/* --- 修复所有大尺寸下拉菜单居中问题 --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%; /* 1. 先定位到父元素的水平中心 */
    transform: translateX(-50%) translateY(10px); /* 2. 再向左偏移自身宽度的一半，实现完美居中 */
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 4px;
    border-top: 2px solid var(--primary-color);
    padding: 10px 0;
    min-width: 160px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
    z-index: 1001;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0); /* 只修改Y轴，保留居中逻辑 */
}

/* 针对解决方案的两列大菜单单独适配 */
.nav-item .dropdown-menu.large-grid {
    min-width: 700px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 25px 30px;
    gap: 20px;
}
.nav-item .dropdown-menu.large-grid a {
    padding: 12px 25px;
}





/* === 现代矩阵页脚 === */
.footer-matrix { background: #f8f9fb; padding: 80px 5% 40px; border-top: 1px solid #eaeaea; color: var(--text-main); }
.footer-container { display: flex; justify-content: space-between; max-width: 1400px; margin: 0 auto; gap: 60px; }
.footer-left { flex: 3; }
.footer-left .f-logo { font-size: 28px; font-weight: 800; color: var(--primary-color); margin-bottom: 30px; display:flex; align-items:center; gap:15px; }
.footer-left .f-logo img { height: 40px; }
.footer-info { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 15px; font-size: 14px; color: var(--text-light); line-height: 1.8; }
.footer-info i { color: var(--primary-color); font-style: normal; margin-top: 3px; }
.footer-hotline { margin-top: 30px; }
.footer-hotline p { font-size: 12px; color: #999; margin-bottom: 5px; }
.footer-hotline h3 { font-size: 24px; color: var(--primary-color); font-weight: bold; margin-bottom: 15px; }

.footer-bottom-bar { display: flex; justify-content: space-between; align-items: center; padding: 30px 5% 30px; margin-top: 40px; border-top: 1px solid #eaeaea; }
.bottom-left { display: flex; flex-direction: column; gap: 16px; }
.bottom-left span { font-size: 13px; color: #999; }
.bottom-qr { display: flex; gap: 40px; }
.bottom-qr .qr-item { text-align: center; }
.bottom-qr .qr-item img { width: 90px; height: 90px; border-radius: 6px; }
.bottom-qr .qr-item span { display: block; margin-top: 10px; font-size: 13px; color: #666; }

.footer-right { flex: 7; display: flex; justify-content: space-between; }
.f-nav-col h4 { font-size: 16px; color: var(--text-main); margin-bottom: 25px; font-weight: 600; }
.f-nav-col ul { list-style: none; padding: 0; }
.f-nav-col li { margin-bottom: 15px; }
.f-nav-col a { color: var(--text-light); text-decoration: none; font-size: 14px; transition: color 0.3s; }
.f-nav-col a:hover { color: var(--primary-color); }

/* 首屏 Hero */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}
.hero-video {
    position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%;
    transform: translate(-50%, -50%); z-index: -2; object-fit: cover;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,20,50,0.8) 0%, rgba(0,0,0,0.4) 100%); z-index: -1;
}
.hero-content { max-width: 1000px; padding: 0 20px; z-index: 1; }
.hero h1 { font-size: 64px; font-weight: 700; margin-bottom: 20px; letter-spacing: 4px; line-height: 1.2; }
.hero p { font-size: 22px; font-weight: 300; opacity: 0.9; margin-bottom: 40px; letter-spacing: 1px; }
.btn-primary {
    display: inline-block; padding: 15px 40px; background: var(--primary-color); color: var(--white);
    text-decoration: none; font-size: 16px; font-weight: 600; border-radius: 4px; transition: var(--transition);
}
.btn-primary:hover { background: var(--accent-color); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(230,0,18,0.3); }

/* 统计数据条 (悬浮在首屏底部) */
.stats-bar {
    position: relative; margin-top: -60px; z-index: 10; max-width: 1200px; margin-left: auto; margin-right: auto;
    background: var(--white); border-radius: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    display: flex; justify-content: space-around; padding: 40px 20px;
}
.stat-item { text-align: center; }
.stat-num { font-size: 40px; font-weight: 800; color: var(--primary-color); margin-bottom: 5px; font-family: Impact, sans-serif; }
.stat-label { font-size: 14px; color: var(--text-light); }

/* 通用区块 */
section { padding: 100px 5%; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 36px; font-weight: 700; color: var(--text-main); margin-bottom: 15px; }
.section-subtitle { font-size: 16px; color: var(--text-light); letter-spacing: 2px; text-transform: uppercase; }

/* 现代卡片 (产品/工艺) 强制一行三个 */
.modern-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1400px; margin: 0 auto; }
.modern-card {
    background: var(--white); border-radius: 8px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); transition: var(--transition);
    border: 1px solid #eee;
}
.modern-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.card-img-wrap { width: 100%; height: 260px; overflow: hidden; background: #f8f9fa; display: flex; align-items:center; justify-content:center;}
.card-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding:20px; transition: transform 0.6s ease; }
.modern-card:hover .card-img-wrap img { transform: scale(1.08); }
.card-content { padding: 30px; }
.card-title { font-size: 20px; font-weight: 600; margin-bottom: 10px; color: var(--text-main); }
.card-desc { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* 制造实力 (无缝深色拼图) */
.manufacturing { background: var(--bg-light); }
.masonry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1400px; margin: 0 auto; }
.masonry-item { position: relative; border-radius: 8px; overflow: hidden; height: 300px; }
.masonry-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.masonry-item:hover img { transform: scale(1.1); }
.masonry-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: var(--white);
    font-size: 18px; font-weight: 600; text-align: center;
}

/* 客户 Logo 无缝滚动 */
.client-marquee { background: var(--white); padding: 60px 0; overflow: hidden; position: relative; }
.marquee-track { display: flex; width: max-content; animation: scrollLeft 80s linear infinite; }
/* 移除黑白滤镜，始终保持彩色 */
.marquee-track img { height: 60px; margin: 0 40px; object-fit: contain; }
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- 产品中心页专属样式 --- */
.products-layout {
    display: flex;
    max-width: 1400px;
    margin: 50px auto 100px;
    padding: 0 5%;
    gap: 50px;
    align-items: flex-start;
}

/* 左侧边栏导航 (精准复刻参考图 + 二级菜单) */
.sidebar-nav { width: 280px; flex-shrink: 0; position: sticky; top: 120px; }
.sidebar-item { margin-bottom: 0; }
.sidebar-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5px; color: #333; text-decoration: none;
    font-size: 16px; font-weight: 500; transition: color 0.3s;
    border-bottom: 1px solid var(--primary-color);
    cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active { color: var(--primary-color); }
.sidebar-link.active { font-weight: bold; }
.sidebar-icon {
    font-size: 14px; color: #666; transition: transform 0.3s ease; font-weight: normal;
}
.sidebar-link.expanded .sidebar-icon { transform: rotate(180deg); color: var(--primary-color); }

/* 二级菜单样式 */
.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fdfdfd;
}
.sidebar-item.expanded .sub-menu {
    max-height: 500px; /* 足够高以容纳子菜单 */
}
.sub-menu ul { list-style: none; padding: 10px 0; margin: 0; }
.sub-menu li { padding: 0; }
.sub-menu a {
    display: block; padding: 10px 15px; color: #666; text-decoration: none;
    font-size: 14px; transition: all 0.3s; border-left: 3px solid transparent;
}
.sub-menu a:hover {
    color: var(--primary-color); background: #f0f4f8; border-left-color: var(--primary-color);
}

/* 右侧内容区 */
.products-content {
    flex: 1;
}
.category-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}
.category-header h2 {
    font-size: 24px;
    color: var(--text-main);
    position: relative;
    padding-left: 15px;
}
.category-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: var(--text-light);
    border-radius: 2px;
}

/* 产品卡片 */
.pro-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.pro-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.pro-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}
.pro-card-img {
    height: 220px;
    background: #f8f9fa; /* 浅灰底色 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.pro-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}
.pro-card:hover .pro-card-img img {
    transform: scale(1.08);
}
.pro-card-info {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pro-card-title {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 500;
}
.pro-card-arrow {
    color: var(--text-light);
    font-weight: bold;
    transition: var(--transition);
}
.pro-card:hover .pro-card-arrow {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* === 制造实力 (统一现代企业风) === */
.mfg-hero {
    height: 60vh;
    background: linear-gradient(135deg, rgba(0,30,80,0.9), rgba(0,71,157,0.7)), url('images/factory_workshop_1.jpg') center/cover;
    display: flex; align-items: center; justify-content: center;
    color: white; text-align: center; padding-top: 80px;
}
.mfg-hero h1 { font-size: 56px; font-weight: 800; margin-bottom: 20px; letter-spacing: 4px; }
.mfg-hero p { font-size: 20px; opacity: 0.9; max-width: 900px; margin: 0 auto; line-height: 1.8; }

.mfg-gallery { background: var(--bg-light); padding: 80px 5% 100px; }
.mfg-container { max-width: 1400px; margin: 0 auto; }
.mfg-block {
    display: flex; align-items: center; gap: 60px; margin-bottom: 80px;
    background: var(--white); border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    overflow: hidden; border: 1px solid #eee;
}
.mfg-block:nth-child(even) { flex-direction: row-reverse; }

.mfg-img { flex: 1.2; height: 400px; overflow: hidden; }
.mfg-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mfg-block:hover .mfg-img img { transform: scale(1.05); }

.mfg-text { flex: 1; padding: 50px; }
.mfg-num { 
    display: inline-block; font-size: 14px; color: var(--primary-color); 
    letter-spacing: 2px; margin-bottom: 15px; font-weight: 600;
}
.mfg-title { font-size: 32px; color: var(--text-main); margin-bottom: 20px; font-weight: 700; }
.mfg-desc { font-size: 16px; color: var(--text-light); line-height: 1.8; text-align: justify; }
.breadcrumb {
    padding: 120px 5% 20px;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}
.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}
.breadcrumb a:hover {
    color: var(--primary-color);
}
.breadcrumb .separator {
    font-size: 12px;
    color: #ccc;
}
.breadcrumb .current {
    color: var(--text-main);
    font-weight: 500;
}
footer { background: var(--bg-dark); color: #888; padding: 80px 5% 30px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; max-width: 1400px; margin: 0 auto 50px; }
.footer-title { color: var(--white); font-size: 18px; font-weight: 600; margin-bottom: 25px; }
.footer-contact p { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 10px;}
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); }

/* === 右侧悬浮快捷导航 === */
.floating-toolbar {
    position: fixed;
    right: -80px; /* 初始隐藏在屏幕右侧外部 */
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    box-shadow: -2px 0 15px rgba(0,0,0,0.08);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px 0 0 8px;
    overflow: hidden;
}
.floating-toolbar.show {
    right: 0; /* 滚动后滑出显示 */
}

.float-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 65px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 12px;
    border-bottom: 1px solid #f5f5f5;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}
.float-item:last-child { border-bottom: none; }
.float-item:hover {
    background: var(--primary-color);
    color: #fff;
}
.float-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

/* 悬停弹出的隐藏信息块 (如电话号码) */
.float-popup {
    position: absolute;
    right: 100%; /* 在左边弹出 */
    top: 0;
    height: 100%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    border-radius: 4px 0 0 4px;
    pointer-events: none;
}
.float-item:hover .float-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 产品页核心优势区块 */
.advantage-section {
    background: #f8f9fb;
    padding: 80px 5%;
}
.advantage-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.advantage-title {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: 15px;
}
.advantage-subtitle {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 50px;
}
.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
@media (max-width: 1024px) {
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .advantage-grid {
        grid-template-columns: 1fr;
    }
}
.advantage-card {
    background: white;
    padding: 40px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}
.advantage-card:hover {
    transform: translateY(-8px);
    border-bottom-color: var(--primary-color);
}
.advantage-icon {
    font-size: 40px;
    margin-bottom: 15px;
}
.advantage-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}
.advantage-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   语言切换按钮 (lang-switch)
   ============================================ */
.lang-switch-item {
  margin-left: 5px;
}
.lang-switch-item:hover > .dropdown-menu {
  display: none !important;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}
.lang-btn {
  padding: 1px 4px;
  border: 0.5px solid rgba(255,255,255,0.3);
  background: transparent;
  color: white;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s;
  font-family: inherit;
  line-height: 1.2;
}
.lang-btn:hover {
  background: rgba(255,255,255,0.15);
}
.lang-btn.active {
  background: white;
  color: var(--primary-color, #00479d);
  font-weight: 600;
}
/* 滚动后导航栏适配 */
.navbar.scrolled .lang-btn {
  border-color: rgba(0,71,157,0.3);
  color: var(--text-main, #1a2340);
}
.navbar.scrolled .lang-btn:hover {
  background: rgba(0,71,157,0.08);
}
.navbar.scrolled .lang-btn.active {
  background: var(--primary-color, #00479d);
  color: white;
  border-color: var(--primary-color, #00479d);
}
