
/*灰色系配色方案 - 简洁优雅*/
.menu-list{
	width : 100%;
}
.menu-list ul{
	list-style: none;
}
.menu-list>ul>li{
	width        : 100%;
	border-bottom: 1px solid #e8e8e8;
	-webkit-transition: .3s ease;
	-moz-transition: .3s ease;
	-o-transition: .3s ease;
			transition: .3s ease;
}
.menu-list>ul>li p[class=menu-title]{
	width      : 100%;
	line-height: 2;
	padding    : 0;
	border     : none;
	position   : relative;
	font-size  : 20px;
	color      : #333;
}

/* 确保所有menu-title都有足够的右边距来容纳符号 */
p.menu-title.level-2 {
	padding-right: 50px !important;
	position: relative;
	display: flex;
	align-items: center;
	min-height: 45px; /* 手机端默认高度 */
}

/* 二级菜单标题中的链接 */
p.menu-title.level-2 > a {
	display: flex !important;
	align-items: center;
	line-height: 1.4 !important;
	padding: 10px 0 !important;
}

/* 没有level-2和level-3的普通菜单标题 */
p.menu-title:not(.level-2):not(.level-3) > a {
	display: inline-block;
	line-height: 1.4;
	padding: 5px 0;
}

p.menu-title.level-3 {
	padding-right: 45px !important;
	position: relative;
	display: flex;
	align-items: center;
	min-height: 40px;
}

/* 三级菜单标题中的链接 */
p.menu-title.level-3 > a {
	display: flex !important;
	align-items: center;
	line-height: 1.4 !important;
	padding: 8px 0 !important;
}

/* 二级菜单折叠符号 - 深灰圆形 */
p.menu-title.level-2 > span.toggle-icon{
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #FFF;
	background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
	border-radius: 50%;
	padding: 0;
	font-size: 18px;
	font-weight: bold;
	line-height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	text-align: center;
	box-shadow: 0 2px 6px rgba(45, 55, 72, 0.3);
	cursor: pointer;
	transition: all 0.3s ease;
}

p.menu-title.level-2 > span.toggle-icon:hover{
	background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 3px 8px rgba(45, 55, 72, 0.4);
}

/* 三级菜单折叠符号 - 浅蓝色圆角矩形，更小更精致 */
p.menu-title.level-3 > span.toggle-icon{
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #FFF;
	background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
	border-radius: 3px;
	padding: 0;
	font-size: 14px;
	font-weight: bold;
	line-height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	text-align: center;
	box-shadow: 0 1px 4px rgba(66, 153, 225, 0.3);
	cursor: pointer;
	transition: all 0.3s ease;
}

p.menu-title.level-3 > span.toggle-icon:hover{
	background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 2px 6px rgba(66, 153, 225, 0.4);
}

/* 收起符号 - 二级菜单展开后（使用深灰色表示展开状态） */
/* 注意：现在符号在同一个标题上动态切换，不再需要单独的内层标题样式 */

/* 收起符号 - 三级菜单展开后（使用深蓝色表示展开状态） */
/* 注意：现在符号在同一个标题上动态切换，不再需要单独的内层标题样式 */

.list-se{
	overflow: hidden;
	display: none;
}

/* 三级菜单容器背景 - 增强层次 */
.list-se-level-3 {
	background: #f7fafc !important;
	padding-top: 5px;
}
.list-se>li{
	position: relative;
	right   : -100%;
	-webkit-transition: right .5s;
	-moz-transition   : right .5s;
	-o-transition     : right .5s;
	transition        : right .5s;
}
.list-se>li>p{
	background  : #fff;
	color       : #666;
	height      : 50px;
	-webkit-box-sizing :border-box;
	        box-sizing :border-box;
	padding-left: 10px;
	line-height : 50px;
	border-left : 5px solid #e8e8e8;
	-webkit-transition   : border .3s, background .3s;
			 transition  : border .3s, background .3s;
}

/* 四级菜单特殊样式 - 增加左边距和不同的边条颜色 */
.list-se-level-3 > li {
	margin: 0;
	padding: 0;
}

.list-se-level-3 > li > p {
	padding-left: 25px;
	border-left: 4px solid #bee3f8;
	background: #fafafa;
	height: 45px;
	line-height: 45px;
	margin: 0;
}

.list-se-level-3 > li > p:hover {
	border-left-color: #4299e1;
	background: #f0f9ff;
}

.list-se>li>p>a{
	color: #666;
	text-decoration: none;
}
.list-se>li>p:hover{
	border-color: #5a5a5a;
	background  : #f8f8f8;
}

/* 三级菜单项的hover效果 */
.list-se-level-2 > li:not(.level-3-item) > p:hover {
	border-color: #718096;
	background: #f7fafc;
}
.list-se>li>p:hover>a{
	color: #333;
}

/* 高亮当前活跃的菜单项 - 通用样式 */
.list-se>li.active>p{
	border-color: #5a5a5a;
	background  : #f0f0f0;
}
.list-se>li.active>p>a{
	color       : #333;
	font-weight : 600;
}

/* 四级菜单active状态 - 使用深蓝色系（优先级更高，放在后面） */
.list-se-level-3 > li.active > p {
	border-left-color: #3182ce !important;
	background: linear-gradient(to right, #dbeafe 0%, #eff6ff 100%) !important;
	box-shadow: 0 1px 3px rgba(49, 130, 206, 0.1);
	margin: 0 !important;
}

.list-se-level-3 > li.active > p > a {
	color: #1e40af !important;
	font-weight: 600;
}

/* 三级菜单项（无子菜单）的active样式 */
.list-se-level-2 > li.active:not(.level-3-item) > p {
	border-color: #718096;
	background: #e2e8f0;
}

.list-se-level-2 > li.active:not(.level-3-item) > p > a {
	color: #2d3748;
	font-weight: 600;
}

/* 三级菜单项（无子菜单）基础样式 */
.list-se-level-2 > li:not(.level-3-item) > p {
	padding-left: 20px;
	border-left-color: #cbd5e0;
}

/* 二级和三级菜单链接的active样式 */
a.active-link {
	color: #333 !important;
	font-weight: 600;
}

/* 二级菜单标题选中状态 - 灰色背景 */
p.menu-title.level-2.active-menu {
	background: #e8e8e8;
	border-radius: 4px;
	margin: 5px 5px !important;
	transition: background 0.2s ease;
}

/* 二级菜单有活跃子项时的背景色 */
li.has-active-child > p.menu-title.level-2 {
	background: #e8e8e8;
	border-radius: 4px;
	margin: 5px 5px !important;
}

/* 二级菜单标题hover效果 */
p.menu-title.level-2:hover {
	background: #f5f5f5;
	border-radius: 4px;
	margin: 5px 5px !important;
}

/* 三级菜单标题选中状态 - 使用灰色系而不是蓝色 */
p.menu-title.level-3.active-menu {
	background: #e2e8f0;
	border-radius: 3px;
	margin: 5px 5px !important;
	transition: background 0.2s ease;
}

/* 三级菜单有活跃子项时的背景色 - 灰色系 */
li.level-3-item.has-active-child > p.menu-title.level-3 {
	background: #e2e8f0;
	border-radius: 3px;
	margin: 5px 5px !important;
}

/* 三级菜单标题hover效果 */
p.menu-title.level-3:hover {
	background: #f0f4f8;
	border-radius: 3px;
	margin: 5px 5px !important;
}

/* 没有子菜单的二级菜单项选中状态 */
p.menu-title.active-menu:not(.level-2):not(.level-3) {
	background: #e8e8e8;
	border-radius: 4px;
	margin: 5px 5px !important;
}

/* 三级菜单项active样式（不含子菜单） */
.list-se>li.active {
	border-left-color: #5a5a5a;
}

.list-se.list-se-level-3 {
  padding-bottom: 20px;
}

/* ========== 手机端（默认）：隐藏图片 ========== */
.sidebar-menu-icon,
.sidebar-submenu-icon {
	display: none;
}

/* ========== 电脑端（>768px）：显示图片，右侧展开，箭头指示器 ========== */
@media (min-width: 769px) {
	/* 显示侧边栏菜单图标 */
	.sidebar-menu-icon {
		display: inline-block;
		width: 80px;
		height: 80px;
		margin-right: 0;
		margin-bottom: 8px;
		border-radius: 6px;
		object-fit: cover;
		border: 1px solid #e0e0e0;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
		flex-shrink: 0;
	}

	/* 显示侧边栏子菜单图标 */
	.sidebar-submenu-icon {
		display: inline-block;
		width: 70px;
		height: 70px;
		margin-right: 14px;
		border-radius: 5px;
		object-fit: cover;
		border: 1px solid #e0e0e0;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
		flex-shrink: 0;
		vertical-align: middle;
	}

	/* 菜单文本 */
	.menu-text {
		flex: 1;
		line-height: 1.4;
		text-align: center;
		word-wrap: break-word;
	}

	/* 电脑端：覆盖所有菜单链接的margin，确保居中对齐 */
	p.menu-title.level-2 > a,
	p.menu-title:not(.level-3) > a {
		margin: 0 !important; /* 覆盖内联样式的margin: 0 22px */
	}

	/* 电脑端：侧边栏主菜单垂直布局 */
	p.menu-title.level-2 {
		min-height: 120px !important;
		padding-right: 0 !important; /* 去掉右侧padding，因为箭头是absolute定位 */
	}

	/* 电脑端：侧边栏主菜单没有图片时，降低高度并居中 */
	p.menu-title.level-2:not(:has(.sidebar-menu-icon)) {
		min-height: 60px !important;
	}

	p.menu-title.level-2:not(:has(.sidebar-menu-icon)) > a {
		justify-content: center !important;
		align-items: center !important;
		min-height: 60px !important;
	}

	p.menu-title.level-2:not(:has(.sidebar-menu-icon)) > a span.menu-text {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* 电脑端：所有菜单项统一padding，确保对齐 */
	p.menu-title:not(.level-3) {
		padding-right: 0 !important;
	}

	p.menu-title.level-2 > a,
	p.menu-title:not(.level-3) > a {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		line-height: 1.4 !important;
		padding: 12px 8px !important;
		text-align: center;
		width: 100%;
		font-weight: 600; /* 加粗侧边栏菜单字体 */
		font-size: 14px;
	}

	/* 选中的菜单项字体更粗 */
	p.menu-title.level-2.active-menu > a,
	p.menu-title.active-menu > a,
	a.active-link {
		font-weight: 700 !important;
	}

	/* 电脑端：没有子菜单的菜单项也要统一高度 */
	p.menu-title:not(.level-2):not(.level-3) {
		min-height: 120px;
		display: flex;
		align-items: center;
	}

	/* 电脑端：没有子菜单且没有图片的菜单项，降低高度并居中 */
	p.menu-title:not(.level-2):not(.level-3):not(:has(.sidebar-menu-icon)) {
		min-height: 60px !important;
	}

	p.menu-title:not(.level-2):not(.level-3):not(:has(.sidebar-menu-icon)) > a {
		justify-content: center !important;
		align-items: center !important;
		min-height: 60px !important;
	}

	p.menu-title:not(.level-2):not(.level-3):not(:has(.sidebar-menu-icon)) > a span.menu-text {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* 为有子菜单的二级菜单项添加position: relative */
	.menu-list>ul>li {
		position: relative;
	}

	/* 电脑端：有子菜单的二级菜单标题添加向右箭头 */
	p.menu-title.level-2::after {
		content: '▶';
		position: absolute;
		right: 10px;
		top: 50%;
		transform: translateY(-50%);
		color: #999;
		font-size: 14px;
		transition: color 0.3s ease;
		z-index: 10;
	}

	p.menu-title.level-2:hover::after {
		color: #4299e1;
	}

	/* 电脑端：子菜单向右侧展开 - 网格多列布局 */
	.list-se-level-2 {
		display: none !important;
		position: absolute;
		left: 100%;
		top: 0;
		min-width: 300px;
		max-width: 900px;
		background: #ffffff;
		box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
		border: 1px solid #e0e0e0;
		border-radius: 4px;
		padding: 8px;
		margin-left: 0; /* 紧贴父菜单，无间隙 */
		z-index: 1000;

		/* 网格布局 - 自动多列 */
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
		gap: 0;
		grid-auto-flow: row;
	}

	/* 电脑端：hover时显示子菜单 */
	.menu-list>ul>li:hover > .list-se-level-2 {
		display: grid !important;
	}

	/* 电脑端：子菜单项样式 */
	.list-se-level-2 > li {
		right: 0 !important; /* 覆盖动画的right: -100% */
		border-bottom: none; /* 去掉底部边框，因为是网格布局 */
		margin: 0;
	}

	.list-se-level-2 > li:last-child {
		border-bottom: none;
	}

	.list-se-level-2 > li > p {
		padding: 15px 18px;
		margin: 2px;
		height: auto;
		min-height: 95px;
		line-height: 1.5;
		background: #fff;
		transition: background 0.2s ease;
		border-left: none;
		border: 3px solid #f5f5f5;
		border-radius: 4px;
		display: flex;
		align-items: center;
	}

	/* 没有图片时降低高度 */
	.list-se-level-2 > li:not(:has(.sidebar-submenu-icon)) > p {
		height: auto !important;
		min-height: 60px !important;
		padding: 10px 18px;
	}

	/* 三级菜单标题没有图片时也降低高度 */
	.list-se-level-2 > li:not(:has(.sidebar-submenu-icon)) > p.menu-title.level-3 {
		height: auto !important;
		min-height: 60px !important;
		padding: 10px 18px;
	}

	.list-se-level-2 > li > p:hover {
		background: #f0f9ff;
	}

	.list-se-level-2 > li > p > a {
		color: #666;
		font-size: 14px !important;
		margin: 0 !important;
		padding: 0 !important;
		display: flex;
		align-items: center;
		font-weight: 500; /* 子菜单字体也稍微加粗 */
	}

	/* 没有图片时文字居中 */
	.list-se-level-2 > li:not(:has(.sidebar-submenu-icon)) > p > a {
		justify-content: center;
		text-align: center;
	}

	/* 三级菜单标题没有图片时文字也居中 */
	.list-se-level-2 > li:not(:has(.sidebar-submenu-icon)) > p.menu-title.level-3 > a {
		justify-content: center !important;
		text-align: center;
	}

	.list-se-level-2 > li:not(:has(.sidebar-submenu-icon)) > p > a span.menu-text {
		text-align: center;
	}

	/* 选中的子菜单项字体更粗 */
	.list-se-level-2 > li.active > p > a,
	.list-se-level-3 > li.active > p > a {
		font-weight: 700 !important;
	}

	.list-se-level-2 > li > p > a:hover {
		color: #4299e1;
	}

	/* 电脑端：隐藏手机端的+号（如果JS已添加） */
	p.menu-title.level-2 > span.toggle-icon,
	p.menu-title.level-3 > span.toggle-icon {
		display: none !important;
	}
}