/* 自定义字体 */
@font-face {
    font-family: 'JiYingHuiPianYuan';
    src: url('../切图/极影毁片圆.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 固定顶部导航栏 */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px !important;
    max-height: 100px !important;
    min-height: 100px !important;
    background: rgba(255, 255, 255, 0.6);
    z-index: 1000;
}

/* 小屏幕时使用vw */
@media screen and (max-width: 1600px) {
    .header-fixed {
        height: 5.2vw !important;
        min-height: 60px !important;
        max-height: 100px !important;
    }
}

/* 移动端限制高度，防止按钮被遮挡 */
@media screen and (max-width: 768px) {
    .header-fixed {
        height: 60px !important;
        min-height: 60px !important;
        max-height: 100vh !important;
        /* 最多不超过视口高度 */
    }
}

.header-container {
    width: 100%;
    max-width: 1920px;
    height: 100%;
    margin: 0 auto;
    position: relative;
}

.logo {
    position: absolute;
    left: 40px;
    top: 24%;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo img {
    width: 204px;
    max-width: 204px;
    height: auto;
}

/* 小屏幕时使用vw */
@media screen and (max-width: 1600px) {
    .logo img {
        width: 10.6vw;
        /* 204/1920 */
    }
}

.logo-link:hover {
    opacity: 0.8;
}

.nav-menu {
    position: absolute;
    left: 339px;
    top: 39%;
    display: flex;
    gap: 80px;
    flex-wrap: nowrap;
}

/* 小屏幕时使用百分比 */
@media screen and (max-width: 1600px) {
    .logo {
        left: 2.1%;
        /* 40/1920 */
    }

    .nav-menu {
        left: 17.7%;
        /* 339/1920 */
        gap: 4.2vw;
        /* 80/1920 */
        flex-wrap: nowrap;
    }
}

.nav-link {
    text-decoration: none;
    color: #1E2543;
    font-family: 'JiYingHuiPianYuan', SourceHanSansCN, sans-serif;
    font-weight: bold;
    font-size: 21px;
    max-font-size: 21px;
    line-height: 1;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.8;
}

/* 当前页面导航项高亮 - 使用伪元素添加背景，不影响文字对齐 */
.nav-link.active {
    position: relative;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 40px);
    height: 100px;
    background: #F5F7FB;
    z-index: -1;
}

/* 小屏幕时使用vw */
@media screen and (max-width: 1600px) {
    .nav-link {
        font-size: 1.1vw;
        /* 21/1920 */
    }

    .nav-link.active::before {
        width: calc(100% + 2vw);
        /* Adaptive width */
        height: 5.2vw;
        /* 100/1920 */
    }
}

/* 语言切换 */
.language-selector {
    position: absolute;
    right: 160px;
    top: 0;
    width: 188px;
    max-width: 188px;
    height: 100%;
    background: #F5F7FB;
    cursor: pointer;
}

.language-current {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.language-text {
    font-family: 'JiYingHuiPianYuan', SourceHanSansCN, sans-serif;
    font-weight: bold;
    font-size: 21px;
    max-font-size: 21px;
    color: #1E2543;
    white-space: nowrap;
}

.language-arrow {
    font-size: 12px;
    max-font-size: 12px;
    color: #1E2543;
}

/* 小屏幕时使用vw */
@media screen and (max-width: 1600px) {
    .language-text {
        font-size: 1.1vw;
    }

    .language-arrow {
        font-size: 0.625vw;
    }
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #F5F7FB;
    display: none;
    flex-direction: column;
}

.language-selector:hover .language-dropdown {
    display: flex;
}

.language-option {
    padding: 15px 20px;
    text-decoration: none;
    color: #1E2543;
    font-family: 'JiYingHuiPianYuan', SourceHanSansCN, sans-serif;
    font-weight: bold;
    font-size: 21px;
    max-font-size: 21px;
    text-align: center;
    transition: background 0.3s ease;
}

.language-option:hover {
    background: rgba(0, 120, 215, 0.1);
}

/* 小屏幕时使用vw */
@media screen and (max-width: 1600px) {
    .language-option {
        font-size: 1.1vw;
    }
}

/* 登录按钮 */
.login-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 160px;
    max-width: 160px;
    height: 100%;
    background: #0078D7;
}

.login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #FFFFFF;
    font-family: 'JiYingHuiPianYuan', SourceHanSansCN, sans-serif;
    font-weight: bold;
    font-size: 21px;
    max-font-size: 21px;
    text-align: center;
}

/* 小屏幕时使用vw */
@media screen and (max-width: 1600px) {
    .login-link {
        font-size: 1.1vw;
    }
}

/* 中等屏幕优化 - 缩小窗口时调整布局 */
@media screen and (max-width: 1200px) and (min-width: 769px) {
    .nav-menu {
        left: 15%;
        gap: 2vw;
        flex-wrap: nowrap;
    }

    .nav-link {
        font-size: 14px;
        white-space: nowrap;
    }

    .language-selector {
        right: 120px;
        width: 140px;
        max-width: 140px;
    }

    .language-text {
        font-size: 14px;
    }

    .login-btn {
        width: 120px;
        max-width: 120px;
    }

    .login-link {
        font-size: 14px;
    }
}

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    right: 150px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-around;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1E2543;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 小屏幕优化 - 移动端使用汉堡菜单 */
@media screen and (max-width: 768px) {
    .logo {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

    .logo img {
        width: 100px;
        max-width: 100px;
    }

    /* 显示汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
        right: 150px;
    }

    /* 隐藏导航菜单，默认不显示 */
    .nav-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    /* 菜单展开时显示 */
    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        font-size: 16px;
        padding: 15px 20px;
        width: 100%;
        text-align: left;
        white-space: nowrap;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link.active::before {
        display: none;
    }

    .nav-link.active {
        background: #F5F7FB;
    }

    .language-selector {
        right: 70px;
        width: 80px;
        max-width: 80px;
    }

    .language-text {
        font-size: 12px;
        white-space: nowrap;
    }

    .language-current {
        white-space: nowrap;
    }

    .language-arrow {
        font-size: 8px;
    }

    .login-btn {
        width: 70px;
        max-width: 70px;
    }

    .login-link {
        font-size: 12px;
    }
}