/* 页头样式 */
.header1 {
    height: 60px;
    background-color: white;
    width: 100%;
    position: fixed; /* 固定定位 */
    top: 0; /* 置于顶部 */
    left: 0; /* 确保从左侧开始 */
    transition: all 0.5s ease-out; /* 添加过渡效果以实现平滑动画 */
    z-index: 2000;
    box-shadow: 0 4px 8px rgba(115, 190, 255, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19); /* 添加阴影 */
}
.header-main-container{
    display: flex;
    justify-content: space-between
}
.header-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    line-height: 20px;
    gap: 50px;
    margin-left: 20px;
}
.herder-login{
    /*width: 30%;*/
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    margin-right: 30px;
}
/* 定义一个类用于隐藏页头并应用动画 */
.header1.hidden {
    transform: translateY(-100%); /* 向上移动 */
    opacity: 0; /* 淡出 */
}
.logoCss{
    margin-top: 5px;
    width: 75px;
    height: 50px
}
.registerCss{
    text-decoration: none;
}
.menuBox{
    min-width: 60px
}
.menuCss {
    color: #000; /* 默认文字颜色 */
    cursor: pointer;
}

.menuCss:hover{
    color: #4e71f0; /* 改变背景颜色 */
    cursor: pointer;
}


/* 子菜单容器 */
.header-submenu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 2000;
    width: 150px;
    font-size: 14px;
    text-align: center;
    margin-left: -40px;
}
/* 子菜单项样式 */
.submenuCss {
    display: block;
    padding: 10px 20px;
    color: #000; /* 子菜单文字颜色 */
    text-decoration: none;
}

.submenuCss:hover {
    background-color: #f0f0f0; /* 鼠标移入时改变背景颜色 */
    color: #4e71f0; /* 鼠标移入时改变文字颜色 */
}
.aCss{
    text-decoration: none;
    color: black
}
.submenuCss:hover .aCss{
    background-color: #f0f0f0; /* 鼠标移入时改变背景颜色 */
    color: #4e71f0; /* 鼠标移入时改变文字颜色 */
}
.menuCss:hover .aCss{
    color: #4e71f0; /* 改变背景颜色 */
    cursor: pointer;
}
/* 鼠标移入“了解我们”菜单时显示子菜单 */
.dropdown1:hover .header-submenu {
    display: block;
}
.submenu-show {
    display: block !important; /* 强制显示 */
}
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    align-items: center;
}

.nav-links li {
    padding: 10px;
    text-align: center;
}

.nav-links a {
    text-decoration: none;
    font-size: 16px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-box {
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger-inner {
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    transition: transform 0.3s ease-in-out;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: transform 0.3s ease-in-out;
}

.hamburger-inner::before {
    top: -6px;
}

.hamburger-inner::after {
    top: 6px;
}

.nav-links.active {
    transform: translateX(0);
}

.hamburger.active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::before {
    transform: rotate(90deg);
    top: 0;
}

.hamburger.active .hamburger-inner::after {
    transform: rotate(90deg);
    top: 0;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .nav-links {
        position: static;
        flex-direction: row;
        transform: translateX(0);
        width: auto;
        background-color: transparent;
    }

    .nav-links li {
        padding: 0 15px;
    }
}
.controlConsoleCss{
    border-radius: 3px;
    width: 80px;
    display: none;
    text-decoration: none;
}
.loginCss{
    border-radius: 3px;
    width: 80px;
}
.avatarCss{
    padding-top: 10px;
    height: 60px;
    width: 40px;
    display: none
}
.avatarSubmenu {
    display: none; /* 默认隐藏子菜单 */
    position: absolute;
    background-color: #fff; /* 子菜单背景颜色 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* 添加阴影 */
    border-radius: 4px;
    padding: 10px 0;
    z-index: 2000; /* 确保子菜单在最上层 */
    width:120px;
    font-size: 14px;
    margin-left: -80px;
    text-align: left;
}
.avatarDropdown:hover .avatarSubmenu {
    display: block;
}
.mobile-logo{
    display: none;
}
/* 媒体查询：针对手机端 */
@media (max-width: 768px) {
    .logo-div{
        display: none;
    }
    .mobile-logo{
        display: block;
    }
    .logoCss{
        margin-top:0;
        width: 50px;
        height: 40px;
    }
    .mobile-nav{
        display:flex;
        gap:23px;
    }
    .header1{
        background-color: #c0d9f6;
    }
    .header-main-container{
        margin-top: 10px;
    }
    .header-submenu{
        margin-left: -68%;
    }
    .avatarCss{
        padding-top: 0;
    }
    .controlConsoleCss{
        margin-top: -15px;
        margin-right: -20px;
    }
    /* 禁用PC端hover效果 */
    .dropdown1:hover .header-submenu {
        display: none !important;
    }

    /* 移动端激活状态 */
    .dropdown1.active .header-submenu {
        display: block !important;
        position: static;
        width: 100%;
        margin-left: 0;
        box-shadow: none;
        animation: slideDown 0.3s ease;
    }

}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
