/*style.css修改日期：2026-03-19*/
/*全局样式重置与主题变量，作用：统一浏览器默认样式，定义全局主题，一键修改配色/尺寸*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f5f5;
/* 保持原有 overflow-x 设置，避免横向滚动 */
}

/*根变量：全局主题配置，修改此处可一键更换主题*/
:root {
/*红色 */
    --primary-color: #e60012;
/*功能区背景主色：深蓝色 */
    --secondary-color: #003366;
/*辅助色白色文字/图标*/
    --white-color: #ffffff;
/*正文默认色：深灰色*/
    --text-color: #333333;
/*导航hover高亮色*/
    --nav-hover-color: #ffcc00;
/*全局字体：跨平台无衬线字体*/
    --font-family: "Times New Roman", "Arial", sans-serif;
/*头部固定高度，方便布局计算*/
    --header-height: 60px;
/*功能区固定高度*/
    --function-height: 120px;
/*预留扩展变量：深色模式配色、圆角、动画时长等*/
}

html, body {height: 100%;}

/* 确保页面内锚点跳转时不会被固定头部遮挡*/
[id] {scroll-margin-top: calc(var(--header-height) + 12px);}

/*全局平滑滚动（页面内锚点/脚本滚动优先）*/
html { scroll-behavior: smooth; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
    /*避免内容被固定头部遮挡*/
    padding-top: var(--header-height);
}

/*清除列表默认样式*/
ul, li {
    list-style: none;
}

/*统一链接样式*/
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/*图片自适应，避免溢出*/
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/*清除按钮默认样式*/
button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

/*使页面main在可用空间中伸展，保证页脚位于视口底部 */
main {
    flex: 1 0 auto;
    display: block;
}

/*清除输入框默认样式*/
input {
    font-family: inherit;
    outline: none;
    border: none;
}

/* 头部导航样式作用：固定在页面顶部，层级最高，保证在banner上方显示*/
.site-header {
    width: 100%;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    /* 顶部改为蓝色 */
    background: #0b66a3; /* 深蓝 */
    color: var(--white-color);
}

/* 头部容器：居中布局，限制最大宽度 */
.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: transparent;
    position: relative; /* 允许内部绝对定位汉堡按钮 */
}

/*左侧logo区域*/
.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.home-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    line-height: 0; /*避 svg垂直偏移*/
}

.home-icon svg {
    display: block; /*修复响应时 svg 偏离*/
    width: 22px;
    height: 22px;
}

.home-icon:hover {
    background: rgba(255,255,255,0.06);
}


/*主导航菜单*/
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 28px;
/*允许主导航在宽度不足时换行到多行*/
    flex-wrap: nowrap; /* 默认不换行，媒体查询中修改为 wrap */
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

/*导航交互样式（hover/active/underline）*/
.nav-link.active { background: #ff8a00; color: #fff; }
.nav-link::after{ content: ''; position: absolute; bottom:0; left:0; width:0; height:2px; background:var(--nav-hover-color); transition: width 0.3s ease; }
.nav-link:hover{ color: var(--nav-hover-color); }
.nav-link:hover::after{ width:100%; }

/* 移动端导航（当前项目使用 .nav-toggle + .mobile-nav-panel）
 说明：在窄屏时隐藏主导航，显示右侧汉堡按钮（使用 .nav-toggle），点击展开右侧滑出菜单*/

.nav-toggle{ display: none; background:none; color:var(--white-color); font-size:22px; line-height:1; width:44px; height:44px; border-radius:6px; }

.mobile-nav-panel{ position:fixed; top:var(--header-height); right:0; width:260px; max-width:80vw; background:#0b66a3; color:white; box-shadow:-8px 0 24px rgba(0,0,0,0.15); transform:translateY(-10px); opacity:0; visibility:hidden; transition: opacity 220ms ease, transform 220ms ease; --menu-clip-x:100%; --menu-clip-y:0px; --menu-clip-radius:0px; clip-path: circle(var(--menu-clip-radius) at var(--menu-clip-x) var(--menu-clip-y)); z-index:1000; border-bottom-left-radius:8px; border-top-left-radius:8px; overflow:hidden; }

.mobile-nav-panel.active{ transform:translateY(0); opacity:1; visibility:visible; left:0; right:0; width:100%; max-width:none; border-bottom-left-radius:0; border-top-left-radius:0; transition: clip-path 360ms ease, opacity 220ms ease, transform 220ms ease; }

.mobile-nav-panel .mobile-nav-list{ display:flex; flex-direction:column; }
.mobile-nav-panel .mobile-nav-item a{ display:block; padding:14px 18px; color:white; border-bottom:1px solid rgba(255,255,255,0.06); }

.nav-toggle.active{ font-size:20px; }

/* 半透明遮罩，当移动面板展开时显示，点击可关闭 */
.mobile-nav-overlay{ position:fixed; inset:var(--header-height) 0 0 0; top:var(--header-height); left:0; right:0; bottom:0; background:rgba(0,0,0,0.35); opacity:0; visibility:hidden; transition:opacity 200ms ease; z-index:990; }
.mobile-nav-overlay.active{ opacity:1; visibility:visible; }

/* 窄屏断点 */
@media (max-width: 900px){ .main-nav{ display:none; } .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; position:absolute; right:16px; top:50%; transform:translateY(-50%); } }
@media (max-width:420px){ .mobile-nav-panel{ width:86vw; } }


/*注意：当前模板使用 .nav-toggle + .mobile-nav-panel 组合实现移动端导航*/
/*主视觉横幅区样式作用：全屏大图展示，适配不同屏幕尺寸*/
.hero-banner {
    width: 100%;
/*占据整个视口高度，减去固定头部高度，确保大图“覆盖一个屏幕” */
    height: calc(100vh - var(--header-height));
    position: relative;
    overflow: hidden;
    z-index: 0; /* 在 header 之下 */
}

.banner-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /*保证整张图完整可见*/
    display: block;
}

/*站点标注：右下角定位*/
.banner-label {
    position: absolute;
    right: 40px;
    bottom: calc(var(--function-height) + 30px);
    color: var(--white-color);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
}

/*核心功能区样式作用：覆盖在banner底部，仅保留快捷功能按钮组*/
.function-wrapper {
    width: 100%;
    height: var(--function-height);
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(0, 51, 102, 0.85);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    gap: 40px;
    z-index: 99;
}

/*快捷功能按钮组（全屏居中）*/
.shortcut-functions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 1200px;
}

.function-item {
    flex: 1;
    text-align: center;
}

.function-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.function-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.function-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.function-text {
    font-size: 14px;
    white-space: nowrap;
}

/*右侧悬浮按钮样式作用：固定在页面右侧，垂直居中，层级最高*/
.float-buttons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.float-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white-color);
    color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.float-btn:hover {
    background: var(--secondary-color);
    color: var(--white-color);
    transform: scale(1.05);
}

/*汉堡菜单按钮（移动端）*/
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 22px;
    padding: 6px 10px;
    cursor: pointer;
}

/*当导航打开时的样式*/
.nav-list.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #0b66a3;
    padding: 12px 16px;
    gap: 8px;
    z-index: 999;
}

/*小屏时调整页脚为单列堆叠并增加内边距*/
@media (max-width: 768px) {
    .nav-toggle { display: inline-block; }
    .main-nav { display: block; }
    .nav-list { display: none; }
    .nav-list.open { display: flex; }

    .footer-nav-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .main-footer { padding: 24px 0; }
    .container[style] { padding-left: 16px; padding-right: 16px; }
}

/* 预留扩展区域样式作用：为后续新增内容模块提供基础样式*/
.content-extend {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 12px; /*进一步减少外层间距*/
}

/*卡片化每个分区*/
.section-card {
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 6px; /*小间隙，卡片不相连*/
}

/*减少 section 之间间距*/
.page-section {
    margin-bottom: 6px; /*更紧凑*/
}

.banner-img { display: block; }

.section-card h2 { margin: 0 0 8px 0; font-size: 18px; }
.section-card .preview-item { margin: 0 0 6px 0; }
.section-card p { margin: 0 0 8px 0; }

/* Hero 横幅：统一规则，优先保证图片完整可见（object-fit: contain）并占据视口-头部高度 */
/* Hero 横幅：覆盖整个视口（cover），并在 header 之下显示，保持页面其余内容不被遮挡 */
.hero-banner {
    width: 100%;
    height: calc(100vh); /*首屏高度占满视口（不包含 header，因为 body 有 padding-top）*/
    margin-top: 0;
    min-height: 480px;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.hero-banner .banner-img {
    width: 100%;
    height: calc(100vh - var(--header-height));
    object-fit: cover;
    display: block;
}

/*Scroll snap：使首屏与次屏在竖直滚动时产生平滑对齐过渡*/
#snap-container {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth; /*现代浏览器平滑滚动*/
}

.snap-page {
    scroll-snap-align: start;
    min-height: calc(100vh - var(--header-height));
}

/*微交互：为从第一屏滑动到第二屏添加淡入过渡*/
#second-screen { animation: fadeInUp 420ms ease both; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/*hero-inner 固定在底部25%区域，用于放置标注/按钮/CTA等*/
.hero-inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 25vh; /* 底部 25% 可见互动区域 */
    min-height: 120px; /* 可根据需要调整 */
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 右下角放置 label */
    padding: 0 20px 20px 20px;
    z-index: 2;
}
/* 可选遮罩与标注 */
.hero-banner .banner-overlay { position: absolute; inset:0; background: rgba(0,0,0,0.0); z-index:1; }
.hero-banner .banner-label { color:#fff; background: rgba(0,0,0,0.35); padding:6px 10px; border-radius:4px; }

/*导航自适应：中等宽度行为已恢复为不换行，窄屏隐藏主导航仅显示汉堡按钮*/
/*保持导航不换行（默认行为，窄屏通过其他 media query 隐藏主导航）*/
@media (max-width: 900px) {
    .main-nav { display: none; }
    .nav-toggle { display: inline-flex; }
}

/*页脚样式作用：展示版权、备案信息，预留友情链接扩展*/
.main-footer {
    width: 100%;
    background-color: #f0f0f0; /* 灰色背景 */
    color: #333333;
    padding: 32px 0;
}

/*页脚导航网格布局：4列等宽*/
.footer-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/*单个导航列标题样式*/
.footer-nav-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--mtr-text-white);
}

/*导航链接列表样式*/
.footer-nav-column ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav-column ul li a {
    font-size: 14px;
    color: #cccccc;
    transition: color 0.2s ease;
}

/*全站：页脚链接颜色统一为深灰，便于阅读（可全局覆盖）*/
.main-footer .footer-nav-column ul li a { color: #555; }

/*链接hover效果：变白，显示下划线*/
.footer-nav-column ul li a:hover {
    color: var(--mtr-text-white);
    text-decoration: underline;
}

/*页脚分隔线*/
.footer-divider {
    width: 100%;
    height: 1px;
    background-color: #444444;
    margin-bottom: 25px;
}

/*版权信息区域样式*/
.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright p {
    font-size: 14px;
    color: #999999;
}

/*版权链接样式*/
.copyright-links {
    display: flex;
    gap: 20px;
}

.copyright-links a {
    font-size: 13px;
    color: #999999;
    transition: color 0.2s ease;
}

.copyright-links a:hover {
    color: var(--mtr-text-white);
    text-decoration: underline;
}

/*响应式适配样式作用：针对不同屏幕尺寸调整布局，保证移动端、平板端的浏览体验，适配主流设备尺寸*/
/* 响应式（手机）调优：版权区堆叠*/
@media (max-width: 768px) {
    .footer-copyright { flex-direction: column; align-items: flex-start; }
    .copyright-links { flex-wrap: wrap; }
}
/*小屏手机适配：屏幕宽度小于480px时生效*/
@media (max-width: 480px) {
/*页脚导航：2列改1列*/
    .footer-nav-grid {
        grid-template-columns: 1fr;
    }
/*顶部快捷链接*/
    .top-quick-links a:nth-child(n+2) {
        display: none;
    }
}
/*新闻/通告/建设规划 列表页面样式作用：顶部导航不变，列表从上到下排列，使用浅色细分割线，页脚右上方显示分页*/
.news-page {
    padding: 20px 0 60px; /*顶部由固定头部覆盖，无需额外 margin-top*/
}
.page-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.page-title {
    font-size: 22px;
    color: #003366;
    margin-bottom: 12px;
}
.news-list {
    display: block;
}
.news-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06); /* 浅色细分割线 */
}
.news-item:last-child {
    border-bottom: none;
}
.news-title {
    font-size: 18px;
    color: #222;
    margin-bottom: 6px;
}
.news-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}
.news-summary {
    font-size: 14px;
    color: #444;
}

.pagination {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end; /*右侧对齐*/
}
.pagination-right {
    background: transparent;
    color: #333;
    font-size: 14px;
    padding: 6px 8px;
}

/*在页脚右侧上方显示分页小组件（针对页面底部）*/
.site-footer + .pagination {
    position: relative;
}

@media screen and (max-width: 768px) {
    .page-container { padding: 12px; }
    .page-title { font-size: 18px; }
}


/*线网示意页面-下拉选项栏样式作用：和导航栏同高同色，包含下拉框+信息按钮*/
.dropdown-bar {
    width: 100%;
    height: var(--header-height); /*和导航栏同高*/
    background: rgba(0, 0, 0, 0.2); /*和导航栏同色*/
    position: fixed;
    top: var(--header-height); /*位于导航栏下方*/
    left: 0;
    z-index: 998; /*低于导航栏，高于图片区*/
}

.dropdown-container {
    width: 100%;
    max-width: 1920px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between; /*下拉框左，i按钮右*/
}

/*下拉选项框：支持7汉字+20字母显示*/
.map-select {
    width: 350px; /* 7汉字≈70px + 20字母≈140px + 内边距≈90px */
    height: 40px;
    padding: 0 15px;
    font-size: 16px;
    border-radius: 4px;
    border: none;
    outline: none;
    background: white;
    color: #333;
}

/*信息按钮：i图标*/
.info-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #003366;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-btn:hover {
    background: #003366;
    color: white;
}

/*线网示意页面-图片展示区域样式*/
.map-container {
    width: 100%;
    height: calc(100vh - var(--header-height) * 2); /*减去导航栏+下拉栏高度*/
    position: fixed;
    top: calc(var(--header-height) * 2); /*位于下拉栏下方*/
    left: 0;
    overflow: hidden; /*隐藏超出区域的图片*/
    background: #f5f5f5;
}

/*地铁线网图：初始居中，支持拖拽缩放*/
.subway-map {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: grab; /*抓手样式*/
    transition: transform 0.05s ease; /*拖拽平滑过渡*/
}

.subway-map:active {
    cursor: grabbing; /*按住时抓手样式*/
}

/*缩放控制按钮：右下角垂直排列*/
.control-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background: rgba(0, 51, 102, 0.8);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(0, 51, 102, 1);
    transform: scale(1.05);
}

/*信息弹窗样式*/
.info-modal {
    display: none; /*默认隐藏*/
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/*点击触发时显示模态框并居中内容*/
.info-modal.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 400px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #e60012;
}

.modal-content h3 {
    color: #003366;
    margin-bottom: 10px;
}

.modal-content p {
    color: #333;
    line-height: 1.6;
}