/* 
 * 移动端导航栏全局样式
 * 统一管理所有页面的移动端logo浮动效果
 * 作者: InfiVisTech
 * 更新时间: 2024
 */

/* 移动端只显示浮动logo */
@media (max-width: 768px) {
    .navbar {
        background: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        position: fixed !important;
        top: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }
    
    .nav-container {
        padding: 0 !important;
        height: 0 !important;
        overflow: visible !important;
    }
    
    .nav-logo {
        position: fixed !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1001 !important;
    }
    
    .nav-logo img {
        height: 45px !important;
        width: auto !important;
        filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2)) !important;
    }
    
    /* 隐藏所有其他导航元素 */
    .mobile-menu-toggle,
    .nav-menu,
    .nav-container > ul,
    .nav-container > div:not(.nav-logo) {
        display: none !important;
    }
    
    /* 确保主内容区域适配无导航栏背景的布局 */
    section:first-of-type,
    #home,
    main > section:first-child {
        margin-top: 0 !important;
        padding-top: 80px !important;
    }
}

/* 确保桌面端保持原有样式 - 强制修复全屏问题 */
@media (min-width: 769px) {
    /* 强制导航栏不全屏 */
    .navbar {
        background: transparent !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        z-index: 1000 !important;
    }
    
    /* 导航容器居中并添加背景 */
    .nav-container {
        max-width: 1200px !important;
        margin: 0 auto !important;
        height: 70px !important;
        overflow: visible !important;
        padding: 0 20px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* 恢复logo的正常位置 */
    .nav-logo {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        z-index: auto !important;
    }
    
    .nav-logo img {
        filter: none !important;
        height: 45px !important;
    }
    
    /* 确保导航菜单显示 */
    .nav-menu {
        display: flex !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        align-items: center !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* 恢复主内容区域的上边距 */
    section:first-of-type,
    #home,
    main > section:first-child {
        margin-top: 70px !important;
        padding-top: initial !important;
    }
}
