/**
 * "三个臭皮匠" 门户标准导航样式
 */

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #000;
    font-weight: 800;
    font-size: 20px;
}

.nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: stretch;
    height: 70px;
}

.nav-links > a, .nav-dropdown, .nav-dropdown > a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--brand-text-main);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s;
    cursor: pointer;
    height: 100%;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    display: none;
}

.nav-dropdown:hover::after {
    display: block;
}

.nav-links > a:hover, .nav-dropdown:hover > a {
    color: var(--brand-primary);
}

.nav-dropdown-content {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 200px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    display: grid;
    gap: 5px;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-content a {
    padding: 10px 15px;
    text-decoration: none;
    color: var(--brand-text-main);
    font-size: 14px;
    border-radius: 8px;
    transition: background 0.3s;
    height: auto;
    display: block;
}

.nav-dropdown-content a:hover {
    background: var(--brand-bg-light);
    color: var(--brand-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 70px;
}

.nav-login-btn {
    background: var(--brand-primary);
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-login-btn:hover {
    background: #000 !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.lang-switcher {
    display: flex;
    gap: 5px;
    background: #f8fafc;
    padding: 4px;
    border-radius: 30px;
    scale: 0.9;
}

.lang-btn {
    border: none;
    background: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s;
}

.lang-btn.active {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 移动端菜单组件初始隐藏 */
.mobile-toggle, .mobile-menu, .mobile-menu-overlay {
    display: none;
}

.mobile-toggle {
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--brand-text-main);
    transition: all 0.3s;
    border-radius: 2px;
}

@media (max-width: 991px) {
    .nav-links, .lang-switcher {
        display: none !important;
    }
    .mobile-toggle {
        display: flex;
    }
    .nav-container {
        padding: 0 15px;
    }
    .mobile-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        padding: 80px 25px 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        flex-direction: column;
        gap: 20px;
        overflow-y: auto;
    }
    .mobile-menu.active {
        right: 0;
    }
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    .mobile-link {
        font-size: 18px;
        font-weight: 700;
        color: var(--brand-text-main);
        text-decoration: none;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
        display: block;
    }
    .mobile-sub-links {
        padding-left: 15px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 5px;
    }
    .mobile-sub-link {
        font-size: 15px;
        color: var(--brand-text-muted);
        text-decoration: none;
    }
    .mobile-lang-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 20px;
    }
    .mobile-lang-btn {
        padding: 10px;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        font-size: 13px;
        text-align: center;
        background: #f8fafc;
        cursor: pointer;
    }
    .mobile-lang-btn.active {
        border-color: var(--brand-primary);
        color: var(--brand-primary);
        background: var(--brand-primary-light);
    }
    .mobile-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
