/* partials.css通用组件样式
    header与footer的样式,loader.js 生成的文章卡片样式,通用组件（card, news-list, content-card 等）*/
/* fragments 加载时隐藏主体以避免闪烁 */
.site-header {
    width: 100%;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    background: #ffffff; /* 白色背景 */
    color: var(--text-on-dark);
    transition: height 220ms ease, background 220ms ease;
}

/* 全宽底部边框 */
.site-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 1198;
}

/* 头部容器：左右分布布局 */
.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    position: relative;
}

/* 品牌Logo区域 */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.brand-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.brand-name-cn {
    font-size: 20px;
    font-weight: 600;
    color: #000000; /* 黑色文字 */
    white-space: nowrap;
}

.brand-name-en {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.75); /* 深灰色文字 */
    white-space: nowrap;
}

.main-nav {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    height: 100%;
    z-index: 1200;
    background: transparent;
    display: flex;
    align-items: center;
    transition: height 220ms ease;
}

.main-nav .nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 12px;
}

/* 渐变遮罩，初始隐藏，JS 根据滚动显示/隐藏 */
.nav-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    pointer-events: none;
    transition: opacity 240ms ease;
    opacity: 0;
    z-index: 1210;
}

.nav-fade-left {
    left: 0;
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0));
}

.nav-fade-right {
    right: 0;
    background: linear-gradient(270deg, #ffffff, rgba(255, 255, 255, 0));
}

/* 可滚动容器 */
.nav-scroll {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 64px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 56px;
    height: 100%;
}

/* 窄屏进一步压缩内边距以确保首尾项可见并更易滑动 */
@media (max-width: 420px) {
    .nav-list {
        padding: 0 16px;
        gap: 20px;
    }
}

.nav-item {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    font-size: 18px;
    color: #000000; /* 黑色字体 */
    border-radius: 0;
    transition: color 200ms ease, background-color 200ms ease, transform 200ms ease, font-weight 200ms ease;
    line-height: 1;
    padding: 20px 18px 20px;
}

.nav-link:hover,
.nav-link:focus {
    color: #000000;
    font-weight: 700; /* 悬停时加粗 */
    outline: none;
    transform: none; /* 移除向上移动效果 */
    background: transparent; /* 不添加灰色背景 */
}

.nav-link:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.nav-link.active {
    font-weight: 700; /* 选中时加粗 */
    color: #000000;
}

/* 桌面端：关闭横向滚动，全部项平铺靠右 */
@media (min-width: 768px) {
    .nav-scroll {
        overflow: visible;
    }

    .nav-list {
        justify-content: flex-end;
        gap: 32px;
        padding: 0;
    }

    .nav-fade {
        display: none;
    }
}

/* 渐变显示时的可见状态 */
.nav-fade.visible {
    opacity: 1;
}

/* ===== Footer ===== */
/*页脚顶部内边距调整：当导航增高时，页脚背景可视上移以保持视觉平衡*/
.main-footer {
    width:100%;
    background-color:#f0f0f0;
    color:#333;
    transition: padding-top 220ms ease;
    padding: calc(32px + (var(--nav-rows, 1) - 1) * 12px) 0 32px;
}

/* 页脚内容容器 */
.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.footer-nav-grid {
    display:grid;
    grid-template-columns: repeat(4,1fr);
    gap:30px;
    margin-bottom:40px;
}

.footer-nav-column h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.footer-nav-column p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.footer-nav-column h4 {
    font-size:16px;
    font-weight:600;
    margin-bottom:18px;
    color:var(--mtr-accent-purple);
}
.footer-nav-column ul {
    display:flex;
    flex-direction:column;
    gap:10px;
}
/* 链接统一样式（合并冗余覆盖写法） */
.footer-nav-column ul li a {
    font-size:14px;
    color:#555;
    transition:color .2s ease;
}
.footer-nav-column ul li a:hover {
    color:var(--mtr-accent-purple);
    text-decoration:underline;
}

/* 待开放栏目链接样式 */
.footer-nav-column ul li a.coming-soon {
    cursor: pointer;
    text-decoration: none;
}
/* 页脚分隔线 */
.footer-divider {
    width:100%;
    height:1px;
    background-color:#444;
    margin-bottom:12px;
}
/* 办公地址 */
.footer-address {
    display:flex;
    align-items:flex-start;
    gap:8px;
    margin:8px 0 18px;
}
.footer-small-title {
    margin:0;
    font-size:16px;
    font-weight:600;
    color:var(--mtr-accent-purple);
}
.footer-address .address-lines p {
    margin:0 0 6px;
    color:#555;
    font-size:14px;
    line-height:1.3;
}
/* 版权区域 */
.footer-copyright {
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:15px;
}
.copyright-links {
    display:flex;
    gap:20px;
}
.copyright-links a {
    font-size:13px; color:#999; transition:color .2s ease;
}
.copyright-links a:hover {
    color:var(--mtr-accent-purple); 
    text-decoration:underline;
}
/* ===== 响应式合并（所有768px样式合并在一起） ===== */
@media (max-width:768px) {
    .footer-address {
        flex-direction:column; gap:6px;
    }

    .footer-copyright {
        flex-direction:column; align-items:flex-start;
    }

    .copyright-links {
        flex-wrap:wrap;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .footer-nav-grid {
        grid-template-columns: 1fr;
    }

    .top-quick-links a:nth-child(n+2) {
        display: none;
    }
}


/* ===== 全站通用链接样式 =====
   适用于：index.html 的 .page-link 和 info/moreinfo.html 的正文链接
   特点：蓝色下划线，悬停时变为紫色波浪线并轻微上浮 */
.page-link,
.nav-page .content-area a {
    color: #0044cc;
    text-decoration: underline;
    text-decoration-color: #0044cc;
    text-underline-offset: 2px;
    transition: color 160ms ease, transform 120ms ease, text-decoration-color 160ms ease;
}

.page-link:hover, .page-link:focus,
.nav-page .content-area a:hover, .nav-page .content-area a:focus {
    color: #6a0dad; /* 紫色 */
    text-decoration-style: wavy; /* 波浪线 */
    text-decoration-color: #6a0dad;
    transform: translateY(-3px); /* 上浮效果 */
}

/* ===== Loader.js 模板相关样式 ===== */
/* ===== 通用卡片样式（适用于 index/info/moreinfo 等页面） ===== */
/* 页面容器/小节卡片：长方形卡片，圆角边框，左侧导航栏颜色色块 */
.page-section {
    margin-bottom: 24px;
}

/* index.html 首页卡片：需要独立的宽度和居中设置 */
.page-section .card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 28px 32px 28px 48px; /* 左侧留出空间给色块 */
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page-section .card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 卡片左侧导航栏颜色色块 */
.page-section .card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--nav-bg-color); /* 导航栏深蓝色 */
    border-radius: 12px 0 0 12px;
}

/* index.html 卡片内容左对齐 */
.page-section .card .card-body {
    text-align: left;
}

.page-section .card .card-meta {
    text-align: left;
}

.page-section .card .page-link {
    display: inline-block;
}

.card {
    padding: 14px;
}

/* news-list 内的卡片（info.html等页面使用） */
.news-list .card {
    padding: 24px 28px 24px 34px; /* 与 news-item 保持一致 */
}

.card .card-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.card .card-title {
    font-size: 20px;
}

.card .card-meta {
    font-size: 13px;
    color: #666;
}

.card .card-body {
    font-size: 15px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
    text-align: center;
    /* 标题底部装饰线：颜色统一由 --accent-line-color CSS 变量控制 */
    border-bottom: 4px solid var(--accent-line-color, #0073da);
    padding-bottom: 8px;
}

.card-meta {
    font-size: 14px;
    color: #666666;
    text-align: center;
}

.card-body {
    font-size: 16px;
    color: #333333;
    line-height: 1.8;
}

/* 空内容卡片保持最小高度，布局与有内容卡片一致 */
.card-body:empty {
    min-height: 40px;
}

/* 声明类(statement) 标题强调为红色，兼容模板渲染 */
.statement .card-title {
    text-align: center;
    font-size: 28px;
    color: #c00000;
    letter-spacing: 1px;
}

.article-report .card-title,
.content-card.article-report .card-title {
    text-align: center;
    font-size: 28px;
    color: #1a1a1a;
    letter-spacing: 1px;
    margin: 0 auto;
}

.article-report .card-meta,
.content-card.article-report .card-meta {
    text-align: center;
    margin-top: 8px;
}

/* ===== 通用：news 列表与 content-card（供 info/moreinfo复用） ===== */
/* 
 * news-list: 新闻/文章列表容器
 * news-item: 单个新闻/文章项，现为独立卡片样式
 * 设计说明：每篇文章为独立卡片，带有圆角、阴影和悬停效果
 * 布局说明：
 * - news-list 直接放在 main 下，无需 page-container 外层
 * - 通过 max-width 和 margin auto 实现居中
 */
.news-list {
    display: block;
    width: 100%;
    max-width: 1200px; /* 与首页保持一致的最大宽度 */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* 两侧留白，避免贴边 */
}

/* 
 * 新闻/文章项样式：改为卡片样式
 * - 移除底部分割线
 * - 添加白色背景、圆角、阴影
 * - 添加内边距使内容有呼吸感
 * - 悬停时阴影加深并轻微上浮
 * 注意：loader.js 使用 wrapperClass: "card" 创建包装元素
 * 因此这里同时支持 .card 和 .news-item 两种class
 */
.news-item,
.news-list .card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px 28px 24px 34px; /* 左侧留出空间给色块 */
    margin-bottom: 20px; /* 卡片之间的间距 */
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

/* 最后一篇文章不需要特殊处理，所有文章都是独立卡片 */
.news-item:last-child,
.news-list .card:last-child {
    margin-bottom: 0; /* 最后一篇移除底部间距 */
}

/* 卡片悬停效果：阴影加深并轻微上浮 */
.news-item:hover,
.news-list .card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 卡片左侧导航栏颜色色块 */
.news-item::before,
.news-list .card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--nav-bg-color); /* 导航栏深蓝色 */
    border-radius: 12px 0 0 12px;
}

.news-title {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.news-meta {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}
/*小节通用标题样式*/
.page-title {
    font-size: var(--heading-h1-size);
    color: #003366;
    margin-bottom: 12px;
    text-align: center;
}
/* 页面标题样式（h1.page-title） */
.news-page .page-title {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto 20px; /* 上边距30px，下边距20px，水平居中 */
    padding: 0 20px; /* 与 news-list 保持一致的两侧留白 */
    font-size: var(--heading-h1-size);
    color: var(--nav-bg-color);
    text-align: center;
    font-weight: 600;
}

.content-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 32px;
    margin-bottom: 24px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
    transition: box-shadow 0.3s ease;
}
.content-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* 文章正文字体*/
.content-card, .card-body, .card {
    font-family: var(--article-text-font), sans-serif; }

/* ===== 通用垂直导航选项样式 =====
   适用于：moreinfo.html, server.html, route.html 的子选项
   特点：白色背景选中、红色左边框、悬停右移效果 */

/* 通用垂直导航项基础样式 */
.vertical-nav-item,
.sub-nav-content .category-tab,
.sub-nav-content .map-nav-item {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-left: 4px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    text-align: left;
    white-space: normal;
    word-break: keep-all;
    text-decoration: none;
}

/* 悬停效果：浅灰色背景 + 红色文字 + 向右移动 */
.vertical-nav-item:hover,
.sub-nav-content .category-tab:hover,
.sub-nav-content .map-nav-item:hover {
    background: #ebebeb;
    color: #c00000;
    padding-left: 28px;
}

/* 选中状态：白色背景 + 红色文字 + 红色左边框 */
.vertical-nav-item.active,
.sub-nav-content .category-tab.active,
.sub-nav-content .map-nav-item.active {
    background: #ffffff;
    color: #c00000;
    font-weight: 600;
    border-left-color: #c00000;
}

/* ===== 通用页面布局样式 =====
   适用于：server.html, info.html, moreinfo.html
   布局：左侧导航菜单 + 右侧内容区域 */


/* 左侧导航菜单容器 */
.server-nav {
    width: 260px;
    flex-shrink: 0;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-right: none;
    padding: 20px 0;
    position: sticky;
    top: 80px; /* 距离顶部header的距离 */
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.server-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.server-nav-item {
    margin: 0;
    padding: 0;
}

/* 右侧内容区域 */
.content-area {
    width: 900px; /* 固定宽度 */
    flex-shrink: 0; /* 防止内容区域收缩 */
    min-width: 900px; /* 最小宽度确保不会变窄 */
    min-height: calc(100vh - var(--header-height)); /* 减去Header高度，防止顶部显示页脚 */
    padding: 30px 40px 120px; /* 底部增加120px内边距，避免页脚出现 */
    background: #FFFCF7; /* 作业本纸的温暖米黄色 */
    border: 1px solid #e0e0e0;
    border-left: none;
    position: relative;
}

/* 内容区域中的 article 标签样式（loader.js 注入的内容） */
.content-section article {
    font-size: 18px; /* 正文字号 */
    color: #333;
    line-height: 1.8;
}

.content-section article p {
    margin-bottom: 16px;
    text-indent: 2em;
    line-height: 1.8;
}

/* 标题样式（h1, h2, h3等） */
.content-section article h1,
.content-section article h2,
.content-section article h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 32px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e60012;
}

.content-section article h1 {
    font-size: 32px;
}

.content-section article h2 {
    font-size: 28px;
}

.content-section article h3 {
    font-size: 24px;
    border-bottom-width: 2px;
}

/* 地址样式 */
.content-section article address {
    font-style: normal;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

/* 内容区域链接样式 */
.content-section article a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.content-section article a:hover {
    color: #e60012;
    text-decoration: underline;
}

/* 指南图片样式 */
.guide-image {
    margin: 24px 0;
    text-align: center;
}

.guide-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-caption {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    text-align: center;
    text-indent: 0;
}

/* 内容章节默认隐藏 */
.content-section {
    display: none;
}

/* 显示当前激活的章节（由 JS 控制 .is-active 类） */
.content-section.is-active {
    display: block;
    animation: fadeInUp 0.4s ease forwards;
}

/* 关键修复：为每个章节设置锚点偏移量，防止被 Header 遮挡或跳动 */
.content-section {
    scroll-margin-top: 80px; /* Header(64px) + 16px 缓冲，精准对齐减少跳动 */
}

/* 初始化状态：页面加载时默认隐藏所有内容，等待 JS 激活，防止闪烁 */
body:not(.js-loaded) .content-section {
    display: none !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .server-nav {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-bottom: none;
        padding: 10px 0;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .content-area {
        width: 100%;
        min-width: 0;
        min-height: auto;
        flex: 1 0 0;
        overflow: visible;
        padding: 20px;
        border: 1px solid #e0e0e0;
    }

    /* 防止内容区内部元素撑出容器导致水平滚动 */
    .content-area article,
    .content-area section {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* 图片自适应 */
    .content-area img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 16px;
    }

    .content-section article {
        font-size: 15px;
    }
}

/* ===== 多层级导航页面布局样式 ===== */

/* 页面整体布局：父导航在顶部，下方是子导航+内容 */
.nav-page {
    display: flex;
    gap: 0;
    flex-direction: column;
    padding: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
    position: relative;
}

/* ---------- 一级父导航：始终使用横向滚动移动端样式 ---------- */
.parent-nav {
    width: 100%;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    padding: 8px 0;
    flex-shrink: 0;
    position: sticky;
    top: var(--header-height);
    z-index: 1100;
}

.parent-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 12px;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
    gap: 4px;
}

.parent-nav-list::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

.parent-nav-item {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.parent-nav-link {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.parent-nav-link:hover {
    background: #ebebeb;
    color: #c00000;
}

.parent-nav-link.active {
    color: #c00000;
    font-weight: 600;
    border-bottom-color: #c00000;
    box-shadow: inset 7px -4px 0 0 #c00000;
}

/* ---------- 子导航 + 内容 横向容器 ---------- */
.content-body {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
}

/* ---------- 二级子导航：左侧垂直样式 ---------- */
.child-nav {
    width: 220px;
    flex-shrink: 0;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-right: none;
    padding: 16px 0;
    position: sticky;
    top: calc(var(--header-height) + 56px); /* 父导航高度 */
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - 56px);
    overflow-y: auto;
}

.child-nav .child-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.child-nav .child-nav-item {
    margin: 0;
    padding: 0;
}

.child-nav .child-nav-link {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.child-nav .child-nav-link:hover {
    background: #ebebeb;
    color: #c00000;
    padding-left: 28px;
}

.child-nav .child-nav-link.active {
    background: #ffffff;
    color: #c00000;
    font-weight: 600;
    border-left-color: #c00000;
    box-shadow: inset 10px 0 0 #c00000;
}

/* nav-page 的 content-area 调整 */
.nav-page .content-area {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 30px 40px 120px;
    background: #FFFCF7;
    border: 1px solid #e0e0e0;
    border-left: none;
    min-height: 0;
}

/* ---------- 响应式适配（移动端） ---------- */
@media (max-width: 768px) {
    .nav-page {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .parent-nav {
        position: static;
        padding: 6px 0;
    }

    .parent-nav-link {
        padding: 10px 16px;
        font-size: 15px;
    }

    .content-body {
        flex-direction: column;
    }

    /* 子导航变为横向滚动 */
    .child-nav {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-bottom: none;
        padding: 8px 0;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .child-nav .child-nav-list {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .child-nav .child-nav-list::-webkit-scrollbar {
        display: none;
    }

    .child-nav .child-nav-item {
        flex-shrink: 0;
    }

    .child-nav .child-nav-link {
        padding: 10px 14px;
        font-size: 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .child-nav .child-nav-link:hover {
        padding-left: 14px;
    }

    .child-nav .child-nav-link.active {
        border-left: none;
        border-bottom-color: #c00000;
        box-shadow: inset 7px -4px 0 0 #c00000;
    }

    .nav-page .content-area {
        width: 100%;
        padding: 20px;
        border: 1px solid #e0e0e0;
    }
}

@media (max-width: 480px) {
    .parent-nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .child-nav .child-nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .nav-page .content-area {
        padding: 16px;
    }
}

/* ===== 汉堡菜单样式（仅移动端显示） ===== */
/* 汉堡按钮 - 默认隐藏，仅在移动端显示 */
.nav-toggle {
    display: none; /* 桌面端隐藏 */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 52px;
    height: 52px;
    z-index: 1200;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* 图标容器：相对定位，作为线条参考系 */
.nav-toggle-icon {
    position: relative;
    display: block;
    width: 28px;
    height: 20px;
    pointer-events: none;
}

/* 通用横线样式 */
.nav-toggle-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #000000;
    border-radius: 3px;
    will-change: transform, opacity;
    transform-origin: center center;
    /* 只过渡 transform 和 opacity，避免 Layout 触发 */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 三条线统一用 top: 50% 定位，靠 translateY 拉开距离 */
.nav-toggle-line:nth-child(1) {
    top: 50%;
    transform: translateY(-8px);
}
.nav-toggle-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}
.nav-toggle-line:nth-child(3) {
    top: 50%;
    transform: translateY(6px);
}

/* 激活态：中间线消失，上下线旋转成 X */
.nav-toggle.active .nav-toggle-line:nth-child(1) {
    transform: translateY(-50%) rotate(45deg);
}
.nav-toggle.active .nav-toggle-line:nth-child(2) {
    transform: translateY(-50%) scaleX(0.8);
    opacity: 0;
}
.nav-toggle.active .nav-toggle-line:nth-child(3) {
    transform: translateY(-50%) rotate(-45deg);
}

/* 移动端导航面板 */
.mobile-nav-panel {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 1199;
    overflow-y: auto;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.6s ease, opacity 0.6s ease, visibility 0.6s ease;
}

.mobile-nav-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* 关闭时的特殊样式 - 向上收起 */
.mobile-nav-panel.closing {
    animation: slideUpClose 0.6s ease forwards !important;
}

@keyframes slideUpClose {
    0% {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
    }
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    position: relative;
}

/* 菜单项之间的分割线（最后一个除外） */
.mobile-nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.mobile-nav-item a {
    display: block;
    padding: 18px 24px;
    font-size: 18px;
    color: #000000;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-item a:hover,
.mobile-nav-item a.active {
    background: #f5f5f5;
    color: #c00000;
}

/* 遮罩层 */
.mobile-nav-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: #00000080;
    z-index: 1198;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 移动端显示汉堡按钮，隐藏导航链接 */
@media (max-width: 768px) {
    /* 使用更强的选择器确保按钮显示 */
    .header-container .main-nav .nav-inner .nav-toggle,
    .nav-toggle {
        display: block !important; /* 移动端显示，使用!important防止被覆盖 */
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* 确保 nav-inner 使用 flex 布局，让按钮和导航并排 */
    .header-container .main-nav .nav-inner,
    .nav-inner {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    /* 移动端隐藏原始导航链接和渐变遮罩，只保留汉堡按钮 */
    .main-nav .nav-scroll {
        display: none !important;
    }

    .main-nav .nav-fade {
        display: none !important;
    }

    /* 隐藏后导航栏高度回缩 */
    .main-nav {
        height: auto !important;
    }
}
