/* =============== 重构导航栏（解决重合核心） =============== */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: 60px; /* 固定高度避免抖动 */
}
.header-container {
    height: 100%;
    display: flex;
    align-items: center;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo区域：固定宽度+弹性收缩 */
.logo-box {
    flex: 0 0 180px; /* 固定宽度避免挤压 */
    height: 100%;
    display: flex;
    align-items: center;
}
.logo-link {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #1E9FFF;
    text-decoration: none;
    line-height: 1;
}
.logo-text {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}
.nav-item {
    position: relative;
    margin: 0 15px;
    display: flex;
    align-items: center;
}
.nav-item a {
    color: #333;
    font-size: 16px;
    padding: 8px 0;
    transition: all 0.3s;
    display: block;
    line-height: 1;
}
.nav-item.active a,
.nav-item:hover a {
    color: #1E9FFF;
    border-bottom: 2px solid #1E9FFF;
}
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1E9FFF;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.nav-item.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 汉堡菜单（移动端专属） */
.nav-trigger {
    display: none;
    width: 28px;
    height: 22px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10000;
}
.nav-trigger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.nav-trigger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-trigger.active span:nth-child(2) {
    opacity: 0;
}
.nav-trigger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =============== 响应式断点 =============== */
@media (max-width: 992px) {
    .nav-item { margin: 0 10px; }
    .logo-link { font-size: 18px; }
}

@media (max-width: 768px) {
    /* 显示汉堡菜单，隐藏导航 */
    .nav-trigger { display: flex; }
    .nav-menu {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 60px);
        background: #fff;
        flex-direction: column;
        padding: 30px 0;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 9998;
    }
    .nav-menu.active {
        right: 0;
    }
    .nav-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    .nav-item a {
        padding: 15px 30px;
        font-size: 18px;
        text-align: left;
        border-bottom: none !important;
    }
    .nav-item::after { display: none; }
    
    /* Logo区域缩小 */
    .logo-box { flex: 0 0 150px; }
    .logo-link { font-size: 18px; }
    
    /* 防止页面滚动时导航抖动 */
    body.nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-box { flex: 0 0 120px; }
    .logo-link { font-size: 16px; }
    .nav-item a { padding: 12px 25px; font-size: 17px; }
}

/* 顶部安全距离（避免内容被固定导航遮挡） */
.main-wrapper {
    padding-top: 100px; /* 60px导航 + 40px缓冲 */
    transition: padding-top 0.3s;
}
.banner-wrapper {
    margin-top: 60px; /* 与导航高度一致 */
}
.banner-carousel { border-radius: 0; }
@media (max-width: 768px) {
    .main-wrapper { padding-top: 80px; }
    .banner-wrapper { margin-top: 60px; }
    .banner-carousel { height: 220px !important; }
}

/* 返回顶部按钮样式 */
.go-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: rgba(30, 159, 255, 0.85);
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
    z-index: 999;
    transition: all 0.3s;
}
.go-top:hover {
    background: #1E9FFF;
    transform: translateY(-2px);
}
@media (max-width: 768px) {
    .go-top { bottom: 20px; right: 15px; width: 40px; height: 40px; line-height: 40px; }
} 