/* ============================================================
   移动端导航（汉堡菜单）· 2026-11-02
   ------------------------------------------------------------
   背景：index_common.css:761 在 @media(max-width:750px) 里把
   `.header-nav .nav-head{display:none!important}` —— 手机上整个导航消失，
   只剩 logo 和电话。原站是「PC 导航放不下就干脆不显示」，等于手机访客
   只能看到首页，进不了任何栏目。

   本文件只负责「长什么样」，菜单结构由 mobile-nav.js 从页面里现成的
   .nav-fir / .nav-sec 读出来（后台「导航菜单」改了，这里自动跟着变）。

   类名前缀统一 mnav-，避免和原站样式打架。
   ============================================================ */

/* 汉堡按钮：钉在头部左侧，垂直居中。
   头部在手机上高 40px（logo 高度），所以按钮做 36px 正好放得下。 */
#mnav-btn {
	display: none;
	position: fixed;
	left: 8px;
	top: 10px; /* 兜底值，JS 会按各模板实际头高改成垂直居中 */
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 8px;
	/* 白底 + 轻阴影：不管头部是白底还是深蓝首屏，按钮都看得见 */
	background: #fff;
	box-shadow: 0 1px 5px rgba(16, 30, 48, .16);
	cursor: pointer;
	z-index: 100002;
	-webkit-tap-highlight-color: transparent;
}

#mnav-btn span {
	display: block;
	position: absolute;
	left: 8px;
	width: 20px;
	height: 2px;
	background: #1a1a1a;
	border-radius: 2px;
	transition: transform .28s ease, opacity .18s ease, background .28s ease;
}

#mnav-btn span:nth-child(1) { top: 11px; }
#mnav-btn span:nth-child(2) { top: 17px; }
#mnav-btn span:nth-child(3) { top: 23px; }

/* 打开时直接隐藏固定按钮 —— 抽屉自带关闭按钮（右上角 ×）。
   不隐藏的话这个 fixed 按钮会压在抽屉顶部的 logo 上。 */
/* ★ 必须带 !important：下面 @media 里的 body.mnav-has #mnav-btn
   特异性与这条相同，靠书写顺序会把它盖掉，结果打开抽屉后汉堡
   按钮还浮在抽屉 logo 上面。 */
body.mnav-open #mnav-btn { display: none !important; }

/* 遮罩 */
#mnav-mask {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(12, 20, 32, .46);
	z-index: 100000;
	opacity: 0;
	transition: opacity .26s ease;
}

body.mnav-open #mnav-mask {
	display: block;
	opacity: 1;
}

/* 抽屉 */
#mnav-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 84%;
	max-width: 330px;
	background: #fff;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
	box-shadow: 2px 0 18px rgba(0, 0, 0, .12);
	will-change: transform;
	-webkit-overflow-scrolling: touch;
}

body.mnav-open #mnav-drawer {
	transform: translateX(0);
}

/* 抽屉顶部：logo + 关闭 */
.mnav-head {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	height: 56px;
	border-bottom: 1px solid #eef1f5;
}

.mnav-head img { height: 32px; width: auto; display: block; }

.mnav-close {
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	padding: 0;
	position: relative;
	cursor: pointer;
}

.mnav-close::before,
.mnav-close::after {
	content: '';
	position: absolute;
	left: 7px;
	top: 16px;
	width: 20px;
	height: 2px;
	background: #55606f;
	border-radius: 2px;
}

.mnav-close::before { transform: rotate(45deg); }
.mnav-close::after { transform: rotate(-45deg); }

/* 菜单主体 */
.mnav-body {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 4px 0 24px;
}

.mnav-item { border-bottom: 1px solid #f2f4f8; }

.mnav-l1 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 50px;
	padding: 0 16px;
	box-sizing: border-box;
	font-size: 16px;
	color: #1a1a1a;
	text-decoration: none;
	background: transparent;
	border: 0;
	width: 100%;
	text-align: left;
	font-family: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.mnav-l1:active { background: #f6f8fb; }

.mnav-l1 .mnav-txt {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 展开箭头 */
.mnav-arrow {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	margin-left: 10px;
	border-right: 1.6px solid #9aa7bd;
	border-bottom: 1.6px solid #9aa7bd;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .25s ease;
}

.mnav-item.open > .mnav-l1 .mnav-arrow {
	transform: rotate(-135deg) translateY(-2px);
}

/* 二级面板 */
.mnav-sub {
	display: none;
	background: #f8fafc;
	padding: 4px 0 10px;
}

.mnav-item.open > .mnav-sub { display: block; }

.mnav-group {
	padding: 10px 16px 4px;
	font-size: 13px;
	color: #8a94a6;
	letter-spacing: .4px;
}

.mnav-l2 {
	display: block;
	padding: 11px 16px 11px 24px;
	font-size: 15px;
	color: #333;
	text-decoration: none;
	line-height: 1.45;
	-webkit-tap-highlight-color: transparent;
}

.mnav-l2:active { background: #eef3f9; }

/* 底部联系区 */
.mnav-foot {
	flex: 0 0 auto;
	border-top: 1px solid #eef1f5;
	padding: 14px 16px 18px;
	background: #fff;
}

.mnav-tel {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	border-radius: 6px;
	background: #1677ff;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.mnav-tel:active { background: #0f5fd0; }

.mnav-tip {
	margin: 10px 0 0;
	font-size: 12px;
	color: #8a94a6;
	text-align: center;
	line-height: 1.6;
}

/* ---------------- 只在手机断点启用 ---------------- */
@media (max-width: 750px) {
	/* 有导航结构、或 lite 版式的页面才显示按钮（由 JS 加 class 控制） */
	body.mnav-has #mnav-btn { display: block; }

	/* 给汉堡让出位置：logo 右移 40px，避免被按钮压住。
	   只在真的插入了按钮时生效，不影响其它情况。 */
	body.mnav-has .header-nav .header-default .logo-box {
		margin-left: 40px;
	}
	body.mnav-has .lite-hd-in .lite-logo {
		margin-left: 40px;
	}

	/* 抽屉打开时锁住背景滚动 */
	body.mnav-open { overflow: hidden; }
}
