/* =========================================================
   Header
   顶部导航
========================================================= */


/* =========================================================
   顶部导航
========================================================= */

.site-header {
    width: 100%;
    height: 72px;

    /* 恢复白色背景 */
    background: #fff;

    border-bottom: 1px solid #eeeeee;

    position: relative;

    z-index: 1000;
}


/* 核心修改：增加最大宽度和两侧留白，解决拥挤问题 */
.header-inner {
    width: calc(100% - 80px);
    max-width: 1200px;

    height: 100%;

    margin: 0 auto;

    display: flex;
    align-items: center;
}


/* =========================================================
   Logo
========================================================= */

.site-logo {
    width: 280px;

    flex-shrink: 0;

    margin-right: 60px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    line-height: 1;
}


.logo-cn {
    color: #0072c6;

    font-size: 19px;
    font-weight: 400;

    letter-spacing: 3px;

    line-height: 1.3;

    white-space: nowrap;
}


.logo-en {
    margin-top: 4px;

    color: #0072c6;

    font-size: 11px;
    font-weight: 400;

    letter-spacing: 1px;

    line-height: 1.2;

    white-space: nowrap;

    text-transform: uppercase;
}


/* =========================================================
   主导航
========================================================= */

.main-nav {
    height: 100%;

    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 40px;
}


.nav-item {
    height: 100%;

    position: relative;

    display: flex;
    align-items: center;

    color: #333;

    font-size: 15px;
    font-weight: 400;

    white-space: nowrap;

    cursor: pointer;
}


.nav-item.active {
    color: #0076c8;

    font-weight: 600;
}


.nav-item.active::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    width: 28px;
    height: 3px;

    background: #0076c8;

    transform: translateX(-50%);
}


/* =========================================================
   下拉箭头
========================================================= */

.dropdown-arrow {
    margin-left: 5px;

    color: #666;

    font-size: 13px;

    line-height: 1;

    transition: transform .2s ease;
}


.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   下拉菜单
========================================================= */

.nav-dropdown {
    position: relative;
}


.dropdown-menu {
    position: absolute;

    left: 50%;
    top: 72px;

    width: 170px;

    padding: 8px 0;

    background: #fff;

    border: 1px solid #eeeeee;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .10);

    transform: translate(-50%, 0);

    opacity: 0;

    visibility: hidden;

    /* 页面端：悬停时只淡入淡出，避免菜单上下滑动的偏移感 */
    transition:
        opacity .2s ease,
        visibility .2s ease;

    z-index: 100;
}


.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1;

    visibility: visible;

    transform: translate(-50%, 0);
}


.dropdown-menu a {
    display: block;

    padding: 12px 20px;

    color: #444;

    font-size: 14px;

    white-space: nowrap;
}


.dropdown-menu a:hover {
    color: #0076c8;

    background: #f4f8fb;
}


/* =========================================================
   登录按钮（恢复为蓝底白字）
========================================================= */

.login-button {
    width: 82px;
    height: 32px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;

    background: #0076c8;

    border-radius: 2px;

    font-size: 13px;

    transition:
        background .2s ease,
        transform .2s ease;
}


.login-button:hover {
    background: #0064a9;

    transform: translateY(-1px);
}

/* =========================================================
   移动端适配（防止间距在小屏上乱掉）
========================================================= */
@media screen and (max-width: 768px) {
    .header-inner {
        width: calc(100% - 40px);
        flex-direction: column;
        padding: 15px 0;
    }

    .site-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
}