/* 头部 */
header {
    height: 0.9rem;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    z-index: 99;
    border-bottom: 1px solid rgb(229, 229, 229);
    background: url(/thdk/lib/home/images/herder-bcg.png) no-repeat;
    background-size: 100% 100%;
}

header.active {
    background: #fff;
}

header .hd-div {
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    height: 100%;
}

.herder-max {
    height: 100%;
}

.website-nav {
    display: flex;
}

.website-logo {
    display: flex;
}

.website-logo a {
    display: flex;
    align-items: center;
}

.website-logo img {
    width: 4.11rem;
}

.herder-nav-ul {
    display: flex;
}

.herder-nav-ul li .nav-level-1 {
    font-size: 0.18rem;
    display: flex;
    align-items: center;
    color: #fff;
}

header.active .herder-nav-ul li .nav-level-1 {
    color: rgb(0, 79, 153);
}

.herder-nav-li {
    height: 100%;
    margin-right: 0.4rem;
}

.herder-nav-li .nav-level-1 {
    position: relative;
    height: 100%;
}

.herder-nav-li .nav-level-1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    /* 从中间开始 */
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: all 0.4s;
    transform: translateX(-50%);
    /* 确保居中 */
}

header.active .herder-nav-ul li .nav-level-1::after {
    background-color: rgb(0, 79, 153);
}

.herder-nav-li .nav-level-1:hover {
    font-weight: 600;
}

.herder-nav-li .nav-level-1:hover::after {
    width: 100%;
    /* 展开到全宽 */
    left: 50%;
    /* 保持居中 */
    transform: translateX(-50%);
    /* 保持居中 */
}

.serch-btn {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.pull-down {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 8px 0;
    min-width: 160px;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.pull-down li {
    padding: 8px 24px;
    margin: 0;
    text-align: center;
    list-style: none;
}

.pull-down li a {
    color: #333;
    text-decoration: none;
    display: block;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.2s;
    white-space: nowrap;
}

.pull-down li:hover a {
    color: rgb(0, 79, 153);
}

.pull-down li:hover {
    background-color: #f8f9fa;
}

.herder-nav-li {
    position: relative;
}

.herder-nav-li:hover .pull-down {
    display: block;
}

/* 小三角形指示器 */
.pull-down::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}

/* 底部 */
footer {
    background-color: rgb(0, 79, 153);
}

.footer-tab {
    display: flex;
    padding-top: 0.8rem;
    justify-content: space-between;
}

.bottom-navigation-item>a {
    font-weight: 700;
    color: #fff;
    font-size: 16px;
    margin-bottom: 0.2rem;
    display: block;
}

.bottom-navigation {
    display: flex;
    width: 66%;
    justify-content: space-between;
}


.bottom-navigation-item ul li {
    margin-bottom: 0.16rem;
}

.bottom-navigation-item ul li a {
    font-size: 15px;
    color: #fff;
}

.bottom-copyright {
    display: flex;
    justify-content: space-between;
    padding: 0.34rem 0;
    border-top: 1px solid rgb(229, 229, 229);
    margin-top: 0.4rem;
}

.bottom-copyright p {
    font-size: 14px;
    color: #fff;
}

.weixin {
    width: 2rem;
    height: 2rem;
    background-color: #fff;
}

.f-l-text {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.4rem;
}

.f-l-text span {
    margin-left: 10px;
    margin-right: 16px;
    color: #fff;
}

/* 移动端头部样式 */
.Mobile-Head {
    display: none;
    height: 50px;
    position: relative;
    width: 100%;
    background-color: #fff;
}

/* 移动端顶部栏 */
.mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 0.3rem;
    background: transparent;
    position: relative;
    z-index: 1002;
}

/* Logo */
.mobile-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.mobile-logo img {
    height: 30px;
    object-fit: contain;
}

/* 汉堡菜单按钮 */
.hamburger-btn {
    width: 36px;
    height: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
    left: 0;
}

/* 设置四个span的位置 */
.hamburger-btn span:nth-child(1) {
    top: 0;
    transform-origin: left center;
}

.hamburger-btn span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.hamburger-btn span:nth-child(3) {
    bottom: 0;
    transform-origin: left center;
}

/* 如果有第四个span，隐藏它 */
.hamburger-btn span:nth-child(4) {
    display: none;
}

/* 侧边栏菜单 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1001;
    /* 使用visibility和opacity控制显示/隐藏，以便过渡动画 */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

.sidebar-content {
    position: absolute;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    will-change: left;
}

/* 侧边栏打开状态 */
.mobile-sidebar.active {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
}

.mobile-sidebar.active .sidebar-overlay {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.mobile-sidebar.active .sidebar-content {
    left: 0;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 侧边栏打开时的汉堡菜单动画 */
.mobile-sidebar.active~.mobile-top-bar .hamburger-btn span:nth-child(1) {
    transform: rotate(45deg) translateY(-2px);
    top: 50%;
    left: 4px;
}

.mobile-sidebar.active~.mobile-top-bar .hamburger-btn span:nth-child(2) {
    opacity: 0;
}

.mobile-sidebar.active~.mobile-top-bar .hamburger-btn span:nth-child(3) {
    transform: rotate(-45deg) translateY(2px);
    bottom: 50%;
    left: 4px;
}

/* 关闭按钮 */
.sidebar-close {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #333;
    cursor: pointer;
    z-index: 1;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.mobile-sidebar.active .sidebar-close {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease 0.2s;
}

.sidebar-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* 移动端导航列表 */
.mobile-nav-list {
    margin-top: 0.9rem;
    padding: 0.3rem 0;
}

.mobile-nav-list li {
    list-style: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

/* 侧边栏打开时，导航项逐个显示 */
.mobile-sidebar.active .mobile-nav-list li {
    opacity: 1;
    transform: translateX(0);
}

/* 为每个导航项添加延迟动画 */
.mobile-sidebar.active .mobile-nav-list li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(4) {
    transition-delay: 0.25s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(5) {
    transition-delay: 0.3s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(6) {
    transition-delay: 0.35s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(7) {
    transition-delay: 0.4s;
}

.mobile-sidebar.active .mobile-nav-list li:nth-child(8) {
    transition-delay: 0.45s;
}

.mobile-nav-list li:last-child {
    border-bottom: none;
}

.mobile-nav-list li a {
 display: block;
    padding: 5px 5px 5px 20px;
    font-size: 18px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 36px;
}

.mobile-nav-list li a:hover {
    background: #f5f5f5;
    color: rgb(0, 79, 153);
    padding-left: 0.4rem;
}

/* 添加点击反馈 */
.mobile-nav-list li a:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 子菜单 */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    position: absolute;
    right: 5px;
    top: 13px;
    transform: translateY(-50%);
    font-size: 30px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
}

.has-submenu.active .submenu-toggle {
    transform: translateY(-50%) rotate(90deg);
    color: rgb(0, 79, 153);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background: #f9f9f9;
}

.has-submenu.active .mobile-submenu {
    max-height: 1000px;
    transition: max-height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-submenu li {
    border-bottom: none;
    border-top: 1px solid #f0f0f0;
    opacity: 1;
    transform: none;
    transition: none;
}

.mobile-submenu li a {
    padding-left: 0.5rem;
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
padding-left: 30px;
}

.mobile-submenu li a:hover {
    color: rgb(0, 79, 153);
    background: #f0f0f0;
    padding-left: 30px;
}

/* 搜索框 */
.mobile-search-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 1003;
    display: none;
    padding: 0.3rem;
    box-sizing: border-box;
}

.search-box-inner {
    margin-top: 0.9rem;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.2rem;
    overflow: hidden;
    padding: 0.1rem;
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.15rem;
    font-size: 0.16rem;
    outline: none;
    height: 0.4rem;
    line-height: 0.4rem;
}

.search-submit {
    padding: 0.15rem 0.2rem;
    background: rgb(0, 79, 153);
    color: #fff;
    border: none;
    border-radius: 0.2rem;
    font-size: 0.16rem;
    cursor: pointer;
    margin-left: 0.1rem;
    white-space: nowrap;
    height: 0.4rem;
    line-height: 0.1rem;
}

.search-close {
    padding: 0.15rem 0.2rem;
    color: #666;
    font-size: 0.16rem;
    cursor: pointer;
    white-space: nowrap;
    height: 0.4rem;
    line-height: 0.1rem;
    margin-left: 0.1rem;
}

/* 搜索框显示状态 */
.mobile-search-box.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.mobile-header {
    height: 100%;
    width: 100%;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 1400px) {
    .herder-nav-ul li a {
        font-size: 16px;
    }
}

@media screen and (max-width: 750px) {
    .herder-max {
        display: none;
    }

    .Mobile-Head {
        display: block;
    }

    header {
        height: 50px;
    }

    .bottom-navigation-item ul {
        display: none;
    }

    .footer-tab {
        padding-top: 20px;
        justify-content: space-between;
        flex-direction: column;
    }

    .bottom-navigation-item>a {
        margin-bottom: 10px;
    }

    .bottom-navigation-item {
        margin-right: 0;
        text-align: center;
        width: 40%;
    }

    .weixin {
        width: 120px;
        height: 120px;
    }

    .bottom-copyright p {
        text-align: center;
        line-height: 26px;
    }

    .Friendship-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bottom-copyright {
        display: flex;
        padding: 0.34rem 0;
        border-top: 1px solid rgb(229, 229, 229);
        margin-top: 15px;
        flex-direction: column;
        padding-bottom: 15px;
    }

    .bottom-navigation {
        width: 100%;
        flex-wrap: wrap;
        display: none;
    }
}