/* 顶栏 */
header {
    position: relative;
    width: 100%;
    height: 128px;
    top: 0;
    z-index: 1000;
    background: #FFFFFF;
}

.heard-msg {
    font-size: 14px;
    background: #f7f7f7;
    height: 33px;
    line-height: 33px;
    border-bottom: 1px solid #ececec;
    color: #666;
}

.heard-msg .heard-msg-content {
    display: flex;
    justify-content: flex-start; /* 仅左对齐 */
    align-items: center; /* 垂直方向可按需调整 */
}

/* 顶部宣传语占满整行 */
.heard-msg .heard-msg-content .header-slogan {
    flex: 1 1 auto;
    display: block;
    width: 100%;
    text-align: left;
}

.logo {
    margin: 20px 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
}

.logo img {
    height: 56px;
}

.nav {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        align-items: center;
        height: auto;
        padding: 5px 0;
    }

.nav-content {
    margin: 0;
    float: right;
    list-style: none;
    justify-self: end;
}

.nav-content .bar {
    display: none;
    text-align: center;
    color: #343434;
}

.nav-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 32px; /* 导航间距加大100%：16px -> 32px */
}

.nav-content li {
    flex: 0 0 auto; /* PC端改为按内容宽度排列，更紧凑 */
    text-align: center;
    cursor: default;
    color: #343434;
}
/* PC端不显示图标，保证样式不变 */
.nav-content ul li i { display: none; }
/* 桌面端隐藏关闭按钮项（移动端单独显示） */
.nav-content .nav-close-item { display: none; }

.nav-content li .title {
    position: relative;
    display: block;
    text-align: center;
    width: 100%;
}

.nav-content li .title:after {
    content: '';
    display: block;
    position: absolute;
    bottom: -5px;
    height: 3px;
}

.nav-content li .title:after {
    width: 0;
    left: 50%;
    background: var(--main);
}


.nav-content li.active, .nav-content li:hover {
    color: var(--main)
}

.nav-content li.active .title:after, .nav-content li:hover .title:after {
    width: 100%;
    left: 0;
}

.swiper {
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-bottom: 15px;
}

.swiper img {
    width: 100%;
    height: auto;
}

/* 通用遮罩层（PC与移动端均适用，默认不显示） */
.nav-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0; /* 兼容微信内置浏览器，不使用 inset 简写 */
    background: rgba(0,0,0,.35);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    display: none;
    z-index: 900; /* 低于抽屉(9999)，不遮挡菜单；兼容微信点击 */
}
.nav-overlay.show {
    display: block;
}

@media (max-width: 640px) {

    header {
        position: relative;
        background: #FFFFFF;
        height: auto;
    }

    .swiper {
        height: auto !important;
        margin-bottom: 10px !important;
    }

    .logo {
        margin: 0;
        padding: 15px 0;
        justify-self: start;
        justify-items: start;
        align-items: center;
    }

    .logo img {
        height: 32px;
    }

    .nav-content {
        width: 30px;
    }

    .nav-content .bar {
        display: block;
    }

    /* Banner（移动端）：显示完整图片，宽度100%，高度自适应，无圆角 */
    .swiper-content {
        border-radius: 0;
        overflow: hidden;
    }

    /* 限制每个滑块内的溢出，防止看到下一张 */
    .swiper-slide {
        overflow: hidden;
        width: 100% !important;
        flex: 0 0 100% !important; /* 每个滑块占满视口宽度，避免下一张露出 */
    }

    /* 包裹图片的链接也需限制尺寸与溢出，避免右侧空白与下一张泄露 */
    .swiper-slide a {
        display: block;
        width: 100%;
        height: auto;
        overflow: hidden;
    }

    .swiper-slide img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0;
        margin-left: 0;
        margin-right: 0;
    }

    /* 防止滑块之间产生空隙或露出下一张 */
    .swiper-wrapper { gap: 0 !important; }

    /* 右侧抽屉容器（移动端） */
    .nav-content .nav-content-list {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80vw; /* 抽屉宽度更适配移动端 */
        max-width: 360px;
        min-width: 240px;
        display: flex;
        flex-direction: column;
        background: #FFFFFF;
        box-shadow: -12px 0 24px rgba(0,0,0,.15);
        border-left: 1px solid #eee;
        border-radius: 12px 0 0 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform .3s ease;
        z-index: 9999; /* 保证抽屉始终在最上层 */
        padding-bottom: 12px;
    }

    /* 列表内容（跟随抽屉布局） */
    .nav-content ul {
        display: flex;
        padding-left: 0;
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        gap: 0;
    }

    .nav-content .nav-content-list.show {
        transform: translateX(0);
    }

    .nav-content ul li {
        color: #343434;
        padding: 12px 16px; /* 更紧凑的行高与内边距 */
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-content li .title:before {
        width: 100px;
        left: calc(50% - 50px);
        background: #838383;
    }

    .nav-content li.active .title:after, .nav-content li:hover .title:after {
        width: 100px;
        left: calc(50% - 50px);
    }

    .nav-content li .title:after {

    }

    /* 覆盖层样式已在媒体查询外统一定义，这里不重复设置 */

    /* 移动端关闭按钮样式（顶部吸附） */
    .nav-content .nav-close-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        background: #fff;
        padding: 14px 16px;
        border-bottom: 1px solid #eee;
        z-index: 1;
    }
    .nav-content .nav-close-item .nav-title {
        font-size: 16px;
        font-weight: bold;
        color: #343434;
    }
    .nav-content .nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 16px;
        font-size: 20px;
        color: #343434;
        background: transparent;
        border: none;
        cursor: pointer;
        transition: background .2s, color .2s;
    }
    .nav-content .nav-close:hover {
        background: #f5f5f5;
        color: var(--main);
    }

    /* 列表项布局与状态 */
    .nav-content ul li a {
        display: flex;
        align-items: center;
        gap: 8px; /* 图标与文字更紧凑 */
        color: inherit;
        text-decoration: none;
    }
    .nav-content ul li i { display: inline-block; color: var(--main); width: 20px; text-align: center; }
    .nav-content ul li:hover { background: #f8f9fa; }
    .nav-content ul li.active { background: #fff4ec; }
}
