/* 导航栏容器 .nav-container */
.nav-container {
}
/* 导航列表：横向排列+垂直居中 */
.nav-list {
    background-color: #00329F;
    width: 100%;
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.25rem;
}

/* 基础导航项：相对定位（用于二级菜单绝对定位） */
.nav-item {
    position: relative;
    height: 4.375rem;
    display: flex;
    align-items: center;
}

/* 导航链接：白色文字+垂直居中+hover加深 */
.nav-link {
    color: #fff;
    font-size: 1.5625rem;
    font-weight: bold;
    /* padding: 0 22px; */
    min-width: 13.75rem;
    height: 100%;
    display: flex;
    align-items: center;

    justify-content: center;
    transition: background-color 0.2s ease;
}

/* 覆盖所有交互状态的文字颜色 */
.nav-link:link,    /* 未访问的链接 */
.nav-link:visited, /* 已访问的链接 */
.nav-link:active { /* 点击激活的链接 */
    color: #fff;
    text-decoration: none;
}

.nav-link:hover {
    background-color: #043bb1;
    color: #fff;
}

/* 带二级菜单的项：添加向下小箭头 */
.has-submenu .nav-link::after {
    content: "";
    display: inline-block;
    margin-left: 0.375rem;
    width: 0;
    height: 0;
    border-top: 0.25rem solid #fff;
    border-left: 0.25rem solid transparent;
    border-right: 0.25rem solid transparent;
}

/* 右侧语言切换：核心！自动推挤到最右侧 */
.nav-lang {
    margin-left: auto;
    /* 关键属性：左外边距自动填充，推到右侧 */
}

/* 二级菜单：默认隐藏+绝对定位+白色背景+阴影 */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 10rem;
    background-color: #fff;
    box-shadow: 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12);
    display: none;
    padding: 0.25rem 0;
}

/* 二级菜单链接：核心！新增hover背景色+文字色 */
.submenu-link {
    display: block;
    color: #333;
    font-size: 1rem;
    padding: 0.5625rem 1.5rem;
    transition: all 0.2s ease;
}

/* 二级菜单项hover：背景高亮+文字加深 */
.submenu-link:hover {
    background-color: #e8f3ff;
    color: #0052b4;
}


/* 基础样式（原有）保持不变，新增以下内容 */

/* 1. 移动端菜单按钮（默认隐藏，小屏幕显示） */
.mobile-menu-btn {
    display: none;
    /* PC端隐藏 */
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 200;
    border-radius: 0.375rem;
    background-color: #324653;
    box-shadow: -0.0625rem 0 0.3125rem rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* 2. 移动端侧边目录（默认隐藏，左侧滑出） */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -80%;
    width: 80%;
    max-width: 18.75rem;
    height: 100vh;
    background-color: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 0.125rem 0 0.5rem rgba(0, 0, 0, 0.15);
}

/* 侧边目录头部 */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 3rem;
    background-color: #324653;
    color: #fff;
    font-size: 1rem;
}

.sidebar-close {
    font-size: 1.25rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* 侧边目录列表 */
.sidebar-list {
    padding: 1rem 0;
}

.sidebar-item {
    border-bottom: 0.0625rem solid #eee;
}

.sidebar-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333;
    font-size: 0.875rem;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* 移动端二级菜单（默认隐藏） */
.mobile-submenu {
    display: none;
    background-color: #f5f5f5;
}

.mobile-submenu-link {
    display: block;
    padding: 0.625rem 2rem;
    color: #333;
    font-size: 0.8125rem;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

/* 3. 移动端遮罩层（默认隐藏） */
.mobile-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* 移动端带二级菜单的项：相对定位（给三角定位） */
.has-mobile-submenu {
    position: relative;
}

/* 移动端展开/收起小三角：纯CSS实现，默认向右 */
.has-mobile-submenu .sidebar-link::after {
    content: "";
    display: inline-block;
    position: absolute;
    right: 1.25rem;
    top: 1.5625rem;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 0.25rem solid transparent;
    border-bottom: 0.25rem solid transparent;
    border-left: 0.3125rem solid #333;
    transition: transform 0.2s ease;
}

/* 二级菜单展开时：三角旋转90°变成向下 */
.has-mobile-submenu.active .sidebar-link::after {
    transform: translateY(-50%) rotate(90deg);
}

/* 原有移动端二级菜单样式保留，无需改动 */
.mobile-submenu {
    display: none;
    background-color: #f5f5f5;
}

.mobile-submenu-link {
    display: block;
    padding: 0.625rem 2rem;
    color: #333;
    font-size: 0.8125rem;
}


/* PC端高亮：底部2px白色横线 */
.nav-item.active .nav-link {
    position: relative;
}
.nav-item.active .nav-link::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0.125rem;
    background-color: #fff;
}

/* 移动端高亮：背景色+文字白色 */
.sidebar-item.active .sidebar-link {
    background-color: #324653;
    color: #fff !important;
}

/* 移动端二级菜单高亮（可选） */
.mobile-submenu-item.active .mobile-submenu-link {
    background-color: #324653;
    color: #fff !important;
}

/* 4. 响应式媒体查询（小屏幕≤768px时生效） */
@media (max-width: 768px) {

    /* 隐藏PC端导航列表 */
    .nav-list {
        display: none;
    }

    /* 显示移动端菜单按钮 */
    .mobile-menu-btn {
        display: flex;
    }

    /* 侧边目录显示时的状态 */
    .mobile-sidebar.show {
        left: 0;
        /* 从左侧滑出 */
    }

    /* 遮罩层显示 */
    .mobile-mask.show {
        display: block;
    }
}