/* ==================== 响应式 ==================== */
@media (max-width: 991px) {
    .nav-menu { display: none; position: fixed; top: 0; left: -100%; width: 300px; height: 100vh; background: rgba(45,45,45,0.98); flex-direction: column; padding: 80px 0 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.3); transition: left 0.3s ease; z-index: 1001; overflow-y: auto; }
    .nav-menu.show { display: flex; left: 0; }
    .nav-item { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-item a { padding: 14px 20px; color: #fff !important; font-size: 15px; }
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
    .search-input { width: 150px; }
    .slider-title { font-size: 36px; }
    .slider-subtitle { font-size: 20px; }
}
@media (max-width: 767px) {
    .top-bar { font-size: 12px; padding: 6px 0; }
    .contact-info { flex-direction: column; gap: 5px; }
    .social-links { gap: 5px; }
    .social-link { width: 24px; height: 24px; font-size: 12px; }
    .language-btn { padding: 4px 8px; font-size: 12px; }
    .logo-text { font-size: 24px; }
    .search-box { padding: 6px 12px; }
    .search-input { width: 100px; font-size: 13px; }
    .hero-slider { height: 400px; }
    .slider-title { font-size: 28px; }
    .slider-subtitle { font-size: 16px; }
    .slider-description { font-size: 14px; }
    .btn-view-more { padding: 10px 25px; font-size: 14px; }
    .carousel-control-prev, .carousel-control-next { width: 40px; height: 40px; }
    .carousel-control-prev { left: 15px; }
    .carousel-control-next { right: 15px; }
}
@media (max-width: 575px) {
    .top-bar-content { flex-direction: column; gap: 10px; text-align: center; }
    .contact-info { width: 100%; }
    .top-bar-right { width: 100%; justify-content: center; }
    .slider-title { font-size: 24px; }
    .slider-subtitle { font-size: 14px; }
}

/* 返回顶部 */
.back-to-top { position: fixed; right: 20px; bottom: 80px; width: 50px; height: 50px; background: #0f0f0f; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; text-decoration: none; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 9999; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.back-to-top:hover { background: #333; color: #fff; transform: translateY(-3px); }
@media (max-width: 768px) { .back-to-top { width: 40px; height: 40px; font-size: 16px; right: 10px; bottom: 60px; } }

/* ==================== PC端：3 级分类下拉菜单 ==================== */

/* PC端隐藏移动端专用元素 */
.mobile-dropdown-toggle,
.level-toggle,
.mobile-menu-close-item {
    display: none !important;
}

.nav-item.has-dropdown {
    position: relative;
}

/* ── 一级下拉面板 ── */
.mega-dropdown {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    width: auto;
    background: #fff !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    border-top: 3px solid rgb(0,80,156);
    border-radius: 0;
    z-index: 1100;
    margin-top: 0;
}
.nav-item.has-dropdown:hover > .mega-dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}
.mega-inner { padding: 0; }

/* ── 1 级列表 ── */
.level1-list { list-style: none; margin: 0; padding: 0; }

.level1-item {
    position: relative;
    display: flex;
    align-items: stretch;
    transition: background 0.15s;
}
.level1-item:hover {
    background: rgb(0,80,156);
}
.level1-link {
    flex: 1;
    display: block;
    padding: 10px 16px;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
    transition: color 0.15s;
    line-height: 1.4;
    background: transparent !important;
    border-radius: 0 !important;
}
.level1-item:hover > .level1-link {
    color: #fff !important;
}
.level1-arrow {
    display: flex;
    align-items: center;
    font-size: 10px;
    color: #bbb;
    padding: 0 12px 0 0;
    pointer-events: none;
    flex-shrink: 0;
    transition: color 0.15s;
}
.level1-item:hover > .level1-arrow {
    color: #fff;
}

/* ── 2 级面板 ── */
.level2-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    position: absolute;
    top: 3px;
    left: 100%;
    min-width: 210px;
    width: auto;
    background: #fff !important;
    box-shadow: 4px 8px 24px rgba(0,0,0,0.11);
    border-top: 3px solid rgb(0,80,156);
    border-radius: 0;
    z-index: 1200;
}
.level1-item:hover > .level2-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.level2-list { list-style: none; margin: 0; padding: 0; }

.level2-item {
    position: relative;
    display: flex;
    align-items: stretch;
    transition: background 0.15s;
}
.level2-item:hover {
    background: rgb(0,80,156);
}
.level2-link {
    flex: 1;
    display: block;
    padding: 9px 16px;
    color: #333 !important;
    text-decoration: none;
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
    transition: color 0.15s;
    line-height: 1.4;
    background: transparent !important;
    border-radius: 0 !important;
}
.level2-item:hover > .level2-link {
    color: #fff !important;
}
.level2-arrow {
    display: flex;
    align-items: center;
    font-size: 10px;
    color: #bbb;
    padding: 0 10px 0 0;
    pointer-events: none;
    flex-shrink: 0;
    transition: color 0.15s;
}
.level2-item:hover > .level2-arrow {
    color: #fff;
}

/* ── 3 级面板 ── */
.level3-panel {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    position: absolute;
    top: 6px;
    left: 100%;
    min-width: 200px;
    width: auto;
    background: #fff !important;
    box-shadow: 4px 8px 24px rgba(0,0,0,0.10);
    border-top: 3px solid rgb(0,80,156);
    border-radius: 0;
    z-index: 1300;
}
.level2-item:hover > .level3-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.level3-list { list-style: none; margin: 0; padding: 0; }

.level3-item {
    display: block;
    transition: background 0.15s;
}
.level3-item:hover {
    background: rgb(0,80,156);
}
.level3-link {
    display: block;
    padding: 9px 16px;
    color: #333 !important;
    text-decoration: none;
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
    transition: color 0.15s;
    line-height: 1.4;
    background: transparent !important;
    border-radius: 0 !important;
}
.level3-item:hover > .level3-link {
    color: #fff !important;
}

/* ==================== 移动端（<=991px） ==================== */
@media (max-width: 991px) {
    .nav-item.has-dropdown { position: static; }

    /* 隐藏PC端箭头 */
    .level1-arrow, .level2-arrow { display: none !important; }
    /* 显示移动端展开按钮 */
    .mobile-dropdown-toggle { display: flex !important; align-items: center; justify-content: center; width: 40px; height: 50px; color: #fff; }
    .level-toggle { display: none !important; }

    /* 移动端下拉面板 - 隐藏但可通过JS显示 */
    .mega-dropdown { 
        display: none !important; 
    }
    
    /* 移动端JS控制显示 */
    .mega-dropdown.mobile-open {
        display: block !important;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    /* 移动端展开按钮样式 */
    .mobile-dropdown-toggle {
        position: absolute;
        right: 0;
        top: 0;
        z-index: 10;
    }
    
    /* 移动端下拉菜单样式 */
    .mega-dropdown.mobile-open .level1-list {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .mega-dropdown.mobile-open .level1-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .mega-dropdown.mobile-open .level1-link {
        color: #fff !important;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .mega-dropdown.mobile-open .level1-item:hover {
        background: rgba(0, 80, 156, 0.8);
    }
    
    .mega-dropdown.mobile-open .level1-item:hover .level1-link {
        color: #fff !important;
    }

    /* nav-right 移动端菜单按钮 */
    .mobile-menu-btn { display: flex !important; }

    /* 移动端菜单深色主题 */
    .nav-menu {
        background: rgba(45, 45, 45, 0.98) !important;
        left: -100%;
        width: 300px;
    }
    .nav-menu.show { left: 0; }

    .nav-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav-item a {
        color: #fff !important;
        font-size: 15px;
        padding: 14px 20px;
    }
    .nav-item.active a { color: #fff !important; font-weight: 600; }
    .nav-item.has-dropdown > a { font-weight: 600; }

    /* 移动端关闭按钮 */
    .mobile-menu-close-item {
        display: flex;
        justify-content: flex-end;
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .mobile-menu-close {
        font-size: 24px;
        color: rgba(255,255,255,0.7);
        cursor: pointer;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s;
    }
    .mobile-menu-close:hover {
        color: #fff;
        background: rgba(255,255,255,0.1);
    }
}
