/*styles\style-header.css*/
/* 页眉样式 - 固定在页面顶部的导航栏 */
.header {
    position: fixed;
    /* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    /* 固定高度 */
    background: rgba(255, 255, 255, 0.1);
    /* 初始透明度为0.1 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 左右分布内容 */
    padding: 0 30px;
    z-index: 30;
    /* 较高的z-index确保在最上层 */
    backdrop-filter: blur(10px);
    /* 毛玻璃效果 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* 底部细边框 */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    /* 初始较浅的阴影 */
    transition: all 0.4s ease;
    /* 添加过渡效果 */
}

/* 滚动后的导航栏样式 */
.header.scrolled {
    background: rgba(255, 255, 255, 1.0);
    /* 滚动后完全不透明 */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    /* 滚动后阴影加深 */
}

/* 网站logo样式 */
.logo {
    display: inline-block;
    height: 70px;
    width: 300px;
    /* 根据图片高度调整 */
}

.logo img {
    position: relative;
    top: -10px;
    display: block;
    height: 100%;
    width: auto;
}

/* 导航链接容器 */
.nav-links {
    display: flex;
    gap: 30px;
    position: relative;
    /* 添加过渡效果 */
    transition: transform 0.3s ease;
}

/* 导航链接样式 */
.nav-links a {
    color: rgb(0, 0, 0);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    /* 颜色过渡动画 */
    padding: 10px 15px;
    border-radius: 5px;
}

/* 导航链接悬停效果 */
.nav-links a:hover {
    color: #9370db;
    /* 悬停时变为紫色 */
    background: rgba(100, 95, 95, 0.1);
    /* 轻微背景色 */
}

/* 下拉菜单容器 */
.dropdown {
    position: relative;
    /* 为绝对定位的子菜单提供参考 */
}

/* 下拉菜单触发按钮 */
.dropdown-toggle {
    cursor: pointer;
    /* 鼠标指针变为手型 */
    display: flex;
    align-items: center;
}

/* 下拉箭头 */
.dropdown-toggle::after {
    content: "▼";
    /* 向下箭头 */
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s;
    /* 旋转动画 */
}

/* 全宽下拉菜单 - 覆盖整个屏幕宽度 */
.dropdown-menu {
    position: fixed;
    /* 固定定位 */
    top: 100%;
    /* 从导航栏底部开始 */
    left: 0;
    width: 100vw;
    /* 全视口宽度 */
    background: rgba(255, 255, 255, 0.95);
    /* 接近全黑的半透明背景 */
    backdrop-filter: blur(10px);
    /* 毛玻璃效果 */
    padding: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* 阴影效果 */
    opacity: 0;
    /* 初始完全透明 */
    visibility: hidden;
    /* 初始隐藏 */
    transform: translateY(10px);
    /* 初始向下偏移10px */
    transition: all 0.3s ease;
    /* 所有属性过渡动画 */
    z-index: 35;
    /* 高于导航栏的z-index */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* 顶部边框 */
}

/* 鼠标悬停时显示下拉菜单 */
.dropdown:hover .dropdown-menu {
    opacity: 1;
    /* 完全不透明 */
    visibility: visible;
    /* 显示元素 */
    transform: translateY(0);
    /* 回到原始位置 */
}

/* 鼠标悬停时旋转下拉箭头 */
.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
    /* 旋转180度 */
}

/* 菜单内容布局容器 */
.menu-content {
    display: flex;
    justify-content: center;
    max-width: 100vb;
    /* 最大宽度为100视口宽度单位 */
    margin: 0 auto;
    padding: 0 20px;
}

/* 菜单列样式 */
.menu-column {
    flex: 1;
    /* 等分剩余空间 */
    padding: 0 20px;
    min-width: 200px;
    /* 最小宽度 */
}

/* 菜单列之间的分隔线 */
.menu-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
    /* 半透明白色 */
    margin: 0 20px;
}

/* 菜单标题样式 */
.menu-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #9370db;
    /* 紫色 */
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* 底部边框 */
}

/* 菜单项样式 */
.menu-item {
    display: block;
    padding: 12px 0;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    /* 所有属性过渡动画 */
    border-left: 3px solid transparent;
    /* 透明左边框 */
    padding-left: 10px;
}

/* 菜单项悬停效果 */
.menu-item:hover {
    color: #9370db;
    /* 紫色文字 */
    border-left-color: #9370db;
    /* 紫色左边框 */
    background: rgba(255, 255, 255, 0.05);
    /* 轻微背景色 */
    padding-left: 15px;
    /* 增加左内边距 */
}

/* 遮罩层样式 - 用于下拉菜单激活时的背景变暗 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* 半透明黑色 */
    z-index: 25;
    /* 在导航栏下方但在内容上方 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* 过渡动画 */
}

/* 激活状态的遮罩层 */
.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 汉堡菜单按钮 - 默认隐藏 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 40;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: rgb(0, 0, 0);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 移动端样式 */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 30px;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 35;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        width: 80%;
        text-align: center;
        padding: 15px;
        margin: 5px 0;
        border-radius: 5px;
    }

    /* 移动端下拉菜单样式 */
    .dropdown-menu {
        position: static;
        width: 100%;
        background: rgba(255, 255, 255, 0.7);
        padding: 10px 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        display: none;
        max-height: 60vh;
        /* 添加最大高度 */
        overflow-y: auto;
        /* 允许滚动 */
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    /* 美化下拉菜单滚动条 */
    .dropdown-menu::-webkit-scrollbar {
        width: 4px;
    }

    .dropdown-menu::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .dropdown-menu::-webkit-scrollbar-thumb {
        background: #9370db;
        border-radius: 2px;
    }

    /* 确保菜单内容正确显示 */
    .menu-content {
        flex-direction: column;
        max-width: 100%;
        padding: 0;
        max-height: none;
        /* 移除高度限制 */
    }

    .menu-column {
        padding: 0 15px;
        /* 恢复一些内边距 */
        min-width: auto;
    }

    .menu-divider {
        width: 90%;
        height: 1px;
        margin: 10px auto;
    }

    .menu-title {
        text-align: center;
        margin-bottom: 10px;
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.8);
        z-index: 1;
        padding: 10px 0;
    }

    .menu-item {
        padding: 12px 0;
        text-align: center;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-item:hover {
        padding-left: 10px;
        border-left: none;
        border-bottom-color: #9370db;
    }

    /* 汉堡菜单动画 */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}