/**
 * 移动端Header和Footer样式
 * 生效条件：屏幕宽度 ≤ 768px
 * 创建时间：2025-11-07
 */

/* ============================================
   移动端Header样式
   ============================================ */

@media screen and (max-width: 768px) {
    /* 隐藏PC端Header */
    .header_main {
        display: none !important;
    }

    /* 移动端Header容器 */
    .mobile-header {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 999;
        padding: 0 15px;
    }

    /* Header内部布局 */
    .mobile-header .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        max-width: 100%;
    }

    /* Logo样式 */
    .mobile-header .mobile-logo {
        height: 40px;
        display: flex;
        align-items: center;
    }

    .mobile-header .mobile-logo img {
        height: 100%;
        width: auto;
        object-fit: contain;
    }

    /* 右侧按钮组 */
    .mobile-header .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    /* 搜索按钮 */
    .mobile-header .search-btn {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .mobile-header .search-btn svg {
        width: 22px;
        height: 22px;
        stroke: #333;
    }

    /* 汉堡菜单按钮 */
    .mobile-header .hamburger {
        width: 36px;
        height: 36px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
    }

    .mobile-header .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: #333;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    /* 汉堡菜单激活状态 */
    .mobile-header .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-header .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-header .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* 移动端搜索框（展开状态） */
    .mobile-search-box {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 998;
    }

    .mobile-search-box.active {
        display: block;
    }

    .mobile-search-box .search-input-wrapper {
        display: flex;
        gap: 10px;
    }

    .mobile-search-box input[type="text"] {
        flex: 1;
        height: 40px;
        padding: 0 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
    }

    .mobile-search-box button {
        width: 80px;
        height: 40px;
        background: #007bbe;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
    }

    /* 侧边栏导航 */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    }

    .mobile-sidebar.active {
        right: 0;
    }

    /* 侧边栏头部 */
    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border-bottom: 1px solid #eee;
        background: #f8f9fa;
    }

    .mobile-sidebar-header h3 {
        margin: 0;
        font-size: 16px;
        color: #333;
    }

    .mobile-sidebar-close {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 24px;
        color: #666;
        padding: 0;
    }

    /* 导航菜单列表 */
    .mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav-list > li {
        border-bottom: 1px solid #eee;
    }

    .mobile-nav-list > li > a,
    .mobile-nav-list > li > .nav-item-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        color: #333;
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
    }

    .mobile-nav-list > li.active > a,
    .mobile-nav-list > li.active > .nav-item-wrapper {
        color: #007bbe;
        background: #f0f7fb;
    }

    /* 子菜单箭头 */
    .mobile-nav-list .nav-arrow {
        width: 20px;
        height: 20px;
        transition: transform 0.3s ease;
    }

    .mobile-nav-list .nav-arrow svg {
        width: 100%;
        height: 100%;
        stroke: #999;
    }

    .mobile-nav-list li.open .nav-arrow {
        transform: rotate(180deg);
    }

    /* 子菜单容器 */
    .mobile-submenu {
        display: none;
        background: #f8f9fa;
        padding: 0;
    }

    .mobile-submenu.active {
        display: block;
    }

    .mobile-submenu li {
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-submenu li:last-child {
        border-bottom: none;
    }

    .mobile-submenu a {
        display: block;
        padding: 12px 15px 12px 30px;
        color: #666;
        text-decoration: none;
        font-size: 14px;
    }

    .mobile-submenu a:active {
        background: #e9ecef;
    }

    /* 语言选择器（移动端） */
    .mobile-language-selector {
        padding: 15px;
        border-top: 1px solid #eee;
        background: #f8f9fa;
    }

    .mobile-language-selector h4 {
        margin: 0 0 10px 0;
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }

    .mobile-language-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .mobile-language-list a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-decoration: none;
        color: #333;
        font-size: 13px;
    }

    .mobile-language-list a img {
        width: 20px;
        height: 20px;
        object-fit: cover;
        border-radius: 50%;
    }

    .mobile-language-list a.active {
        background: #007bbe;
        color: #fff;
        border-color: #007bbe;
    }

    /* 遮罩层 */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .mobile-overlay.active {
        display: block;
    }

    /* 页面主体padding（避免被固定Header遮挡） */
    body {
        padding-top: 60px;
    }

    /* ============================================
       移动端Footer样式
       ============================================ */

    /* 底部主容器 */
    .bottom_main {
        padding: 30px 0 20px;
    }

    .bottom_main .w1400 {
        width: 100%;
        padding: 0 15px;
    }

    /* 顶部Logo和电话区域 */
    .bottom_main .tel {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding-bottom: 20px;
        border-bottom: 1px solid #eee;
        margin-bottom: 20px;
    }

    .bottom_main .tel .left,
    .bottom_main .tel .right {
        width: 100%;
        float: none;
    }

    .bottom_main .tel .left img {
        max-width: 180px;
        height: auto;
    }

    .bottom_main .tel .right p {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .bottom_main .tel .right h3 {
        font-size: 22px;
        margin: 0;
    }

    /* 底部版权信息区域 */
    .bottom_main .bottom_copy {
        flex-direction: column;
        gap: 20px;
    }

    .bottom_main .bottom_copy .left,
    .bottom_main .bottom_copy .right {
        width: 100%;
        float: none;
    }

    /* 底部链接 */
    .bottom_main .bottom_copy .left .a {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 15px;
        margin-bottom: 15px;
    }

    .bottom_main .bottom_copy .left .a a {
        font-size: 13px;
        padding: 5px 0;
    }

    /* 版权文字 */
    .bottom_main .bottom_copy .left p {
        font-size: 11px;
        line-height: 1.6;
        text-align: center;
        color: #999;
    }

    .bottom_main .bottom_copy .left p a {
        font-size: 11px;
    }

    /* 二维码区域 */
    .bottom_main .bottom_copy .right {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }

    .bottom_main .bottom_copy .right img {
        max-width: 120px;
        height: auto;
        margin-bottom: 10px;
    }

    .bottom_main .bottom_copy .right p {
        font-size: 13px;
        color: #666;
    }

    /* ============================================
       右侧固定栏（移动端适配）
       ============================================ */

    .rightFix {
        display: none !important; /* 移动端隐藏右侧固定栏 */
    }

    /* 移动端返回顶部按钮 */
    .mobile-back-to-top {
        display: none;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        background: #007bbe;
        color: #fff;
        border: none;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        z-index: 998;
        font-size: 20px;
        align-items: center;
        justify-content: center;
    }

    .mobile-back-to-top.show {
        display: flex;
    }

    .mobile-back-to-top:active {
        background: #005f99;
    }

    /* 移动端联系按钮组 */
    .mobile-contact-buttons {
        position: fixed;
        bottom: 80px;
        right: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        z-index: 998;
    }

    .mobile-contact-buttons a {
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        text-decoration: none;
        font-size: 20px;
    }

    .mobile-contact-buttons .contact-phone {
        background: #52c41a;
        color: #fff;
    }

    .mobile-contact-buttons .contact-wechat {
        background: #1aad19;
        color: #fff;
    }

    /* ============================================
       小屏手机适配（≤480px）
       ============================================ */

    @media screen and (max-width: 480px) {
        /* Header高度调整 */
        .mobile-header {
            height: 55px;
        }

        .mobile-header .mobile-logo {
            height: 35px;
        }

        .mobile-header .header-actions {
            gap: 10px;
        }

        body {
            padding-top: 55px;
        }

        /* 侧边栏宽度调整 */
        .mobile-sidebar {
            width: 85%;
        }

        /* Footer字体调整 */
        .bottom_main .tel .right h3 {
            font-size: 20px;
        }

        .bottom_main .bottom_copy .left p {
            font-size: 10px;
        }
    }
}

/* ============================================
   PC端默认隐藏移动端元素
   ============================================ */

@media screen and (min-width: 769px) {
    .mobile-header,
    .mobile-sidebar,
    .mobile-overlay,
    .mobile-search-box,
    .mobile-back-to-top,
    .mobile-contact-buttons {
        display: none !important;
    }
}
