/* 移动端导航栏样式 (≤767px) */

/* 移动端导航栏布局 */
@media (max-width: 767px) {
    /* 导航栏容器 */
    header {
        padding: 0 12px;
        height: 60px;
        justify-content: space-between;
    }
    
    /* Logo区域 */
    .logo {
        font-size: 20px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        order: 2;
        flex: 0 0 auto;
    }
    
    /* 汉堡菜单按钮 */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
        position: relative;
        order: 1;
        flex: 0 0 auto;
    }
    
    .hamburger-line {
        width: 24px;
        height: 2px;
        background: #333;
        margin: 3px 0;
        transition: all 0.3s ease;
        transform-origin: center;
    }
    
    /* 汉堡菜单激活状态 */
    .hamburger.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* 导航菜单 - 移动端折叠状态 */
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 0;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        overflow: hidden;
        transition: height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 40px;
        gap: 0;
        display: flex;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav.active {
        height: calc(100vh - 60px);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        max-width: 300px;
        padding: 20px 30px;
        font-size: 18px;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        justify-content: center;
        min-height: 60px;
        display: flex;
        align-items: center;
    }
    
    .nav-link:hover {
        background-color: #000;
        color: #fff;
    }
    
    /* 语言切换按钮 - 移动端优化 */
    .language-selector {
        order: 3;
        flex: 0 0 auto;
        display: block !important;
        z-index: 1002;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .lang-trigger {
        padding: 10px 15px;
        width: 70px;
        height: 40px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .lang-popup {
        width: 100px;
        right: 0;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 1003;
    }
    
    .lang-option {
        padding: 12px 15px;
        font-size: 13px;
        color: #000;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .lang-option:hover {
        background-color: #f5f5f5;
        color: #000;
    }
    
    .lang-option:last-child {
        border-bottom: none;
    }
    
    /* 移动端内容内边距调整 */
    main {
        padding-top: 60px !important;
        transition: padding-top 0.3s ease;
    }
    /* 首页特殊：移动端移除 main 顶部内边距，完全贴合导航 */
    body.home main {
        padding-top: 0 !important;
    }
}

