/* ========== 导航栏容器 ========== */
.navbar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    
}

.navbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 70px;
}

/* ========== Logo ========== */
.logo {
    flex-shrink: 0;
    margin-right: 32px;
}

.logo a {
    display: block;
    outline: none;
}

/* ========== 桌面端水平导航 ========== */
.nav-links {
    display: flex;
    list-style: none;
    flex-grow: 1;
    gap: 32px;
}

.nav-links li {
    border-right: #dadbdf solid 1px;
    padding-right: 20px;
    height: 40px;
    display: flex;
    align-items: center;

}

.nav-links .active {
    border-bottom: 5px #FF9800 solid;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--brand-blue);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-blue);
    border-radius: 1px;
}

/* ========== 汉堡按钮（仅移动端显示） ========== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 6px;
    transition: var(--transition);
}

.hamburger:hover {
    background: var(--gray-100);
}

.hamburger span {
    width: 22px;
    height: 2px;
    background:black;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger span:nth-child(2) {
    margin: 5px 0;
}

/* 汉堡 → X 动画 */
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== 移动端下拉菜单 ========== */
.mobile-dropdown {
    display: none;
    /* 桌面端隐藏 */
        position: static;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease;
    opacity: 0;
}

.mobile-dropdown.open {
    max-height: 400px;
    /* 足够容纳所有链接 */
    opacity: 1;
}

.mobile-dropdown ul {
    list-style: none;
    padding: 8px 0;
}

.mobile-dropdown a {
    display: block;
    padding: 14px 24px;
    text-decoration: none;
    color: var(--gray-900);
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.mobile-dropdown a:hover,
.mobile-dropdown a:focus-visible {
    background: #f5f9ff;
    color: var(--brand-blue);
    border-left-color: var(--brand-blue);
}

.mobile-dropdown a.active {
    background: #f0f5ff;
    color: var(--brand-blue);
    font-weight: 600;
    border-left-color: var(--brand-blue);
}

/* ========== 响应式断点 ========== */
@media (min-width:1025px) {
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
        margin-left: auto;
    }

    .mobile-dropdown {
        display: block;
    }

    .navbar-inner {
        padding: 0 16px;
    }

    .logo {
        margin-right: auto;
    }
    
}

@media (max-width: 480px) {
    .mobile-dropdown a {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ========== 无障碍焦点样式 ========== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* ========== 减少动画偏好 ========== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}