/* ==========================================================================
   全新极简重构版 Header & Navigation CSS
   目标：纯粹的左右布局 + 右侧上下齐平布局
   ========================================================================== */
/* 1. 基础外壳 */
#site-header {
	position: relative;
}

.nav-wrap {
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	font-family: inherit;
	color: #c8161e;
}

/* 2. 核心左右布局 (Left-Right Layout) */
.site-header__bar {
	display: flex;
	justify-content: space-between; /* 左右两端对齐 */
	align-items: stretch; /* 让左右容器都拉伸到最大高度（由右侧决定） */
	padding-top: 15px; /* 减小上下留白 */
	padding-bottom: 15px;
	gap: 2em;
}

/* --- 左侧 Logo 区域 --- */
.nav-wrap .logo {
	display: flex;
	align-items: stretch; /* 拉伸以充满整个高度 */
	flex-shrink: 1; /* 允许在极端情况下缩小 */
	min-width: 0;
	/* background: yellow; */
}

.nav-wrap .logo a {
	display: flex;
	align-items: center;
	text-decoration: none;
	height: 100%; /* 继承容器高度 */
}

.nav-wrap .logo img {
	height: 75%; /* 完美跟随右侧导航的高度！ */

	width: auto;
	object-fit: contain;
	display: block;
}

.nav-wrap .logo .line {
	width: 1px;
	height: 60%; /* 竖线高度为总高度的 60% */
	align-self: center; /* 垂直居中 */
	background-color: #c8161e;
	margin: 0 15px;
	flex-shrink: 0;
}

/* 3. 核心右侧上下布局 (Right Side Top-Bottom Layout) */
.site-header__nav-col {
	display: flex;
	flex-direction: column;
	align-items: flex-end; /* 内容靠右对齐 */
	justify-content: space-between; /* 让上下两排分别贴紧顶部和底部，从而和Logo的上下边缘完美齐平 */
	line-height: 1.5;
	gap: 8px;
}

/* --- 右侧上部：工具栏 (Utilities) --- */
.nav-utils {
	display: flex;
	align-items: center;
	gap: 15px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-utils__link {
	display: flex;
	align-items: center;
	color: #c8161e;
	text-decoration: none;
	font-weight: 500;
	transition: opacity 0.2s;
}

.nav-utils__link:hover {
	opacity: 0.7;
}

.nav-utils__link img {
	height: 16px;
	width: auto;
}

/* 汉堡包按钮 — PC：红底白线，尺寸与工具栏图标一致；移动端见 @media (max-width: 1000px) */
.site-header__menu-btn {
	background-color: #c8161e;
	color: #fff;
	border: none;
	min-width: 24px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 0;
	font-size: 16px;
	line-height: 1;
	padding: 0;
	flex-shrink: 0;
}

.site-header__menu-btn i {
	color: inherit;
	line-height: 1;
	font-size: 16px;
}

.nav-utils__link.search-trigger i {
	font-size: 16px;
	line-height: 1;
}

.nav-utils > li {
	display: flex;
	align-items: center;
}

/* 分割线 */
.nav-utils > li + li::before {
	content: "";
	display: block;
	width: 1px;
	height: 12px;
	background: #ddd;
	margin-right: 15px;
}

/* --- 右侧下部：主菜单 (Main Menu) --- */
.site-header__menu-row {
	display: flex;
	align-items: center;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-menu > li {
	position: relative;
}

.nav-menu > li > div > a {
	color: #c8161e;
	text-decoration: none;
	font-size: clamp(14px, 1.2vw, 18px);
	white-space: nowrap; /* 强制不换行 */
	transition: color 0.2s;
}

.nav-menu__sep span {
	color: #ccc;
	font-size: 0.8em; /* 分隔符跟随主导航放大 */
}

/* 主菜单底部红线特效 */
.nav-menu > li.el::after {
	content: "";
	position: absolute;
	bottom: -4px;
	left: 0;
	right: 0;
	height: 2px;
	background-color: #c8161e;
	transform: scaleX(0);
	transition: transform 0.3s ease;
}

.nav-menu > li.el:hover::after,
.nav-menu > li.el.active::after {
	transform: scaleX(1);
}

/* --- 下拉二级菜单 --- */
.nav-menu > li > ul {
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	margin: 0;
	list-style: none;
	min-width: 180px;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s ease;
	z-index: 100;
}

.nav-menu > li:hover > ul {
	opacity: 1;
	visibility: visible;
	top: calc(100% + 15px);
}

.nav-menu > li > ul > li > a {
	display: block;
	padding: 8px 20px;
	color: #c8161e;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s;
}

.nav-menu > li > ul > li > a:hover {
	background: #f5f5f5;
}

/* ==========================================================================
   响应式调整 (Responsive Design)
   只需要调整高度，左右与上下齐平逻辑自动生效！
   ========================================================================== */

/* 已移除超大屏的固定高度和字号覆盖，统一使用主样式以保证自适应逻辑 */

/* 展开全站菜单时隐藏整个 nav-wrap（Logo + 工具栏 + 主导航） */
@media (min-width: 768px) {
	body.menu-open .nav-wrap {
		display: none !important;
	}

	body.menu-open .menu-wrap {
		position: relative;
		top: auto;
	}

	body.menu-open .menu-wrap.active {
		max-height: 100vh;
	}
}

.menu-wrap.active {
	height: auto;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	padding-top: 30px;
	transition: cubic-bezier(0.075, 0.82, 0.165, 1) all 1s;
}

@media (max-width: 1200px) and (min-width: 1001px) {
	.site-header__bar {
		gap: 0.75em;
	}

	/* Logo 缩小占比，给导航留更多空间 */
	.nav-wrap .logo {
		flex: 0 1 36%;
		max-width: 36%;
	}

	.site-header__nav-col {
		flex: 1;
		min-width: 0;
	}

	.nav-wrap .logo img {
		height: auto;
		max-height: 45px;
	}

	.nav-wrap .logo .line {
		height: 22px;
		margin: 0 8px;
	}

	.nav-menu {
		gap: 0.4em;
	}
}

@media (max-width: 1000px) {
	.nav-wrap {
		height: 45px;
		background: #fff;
		box-shadow: 0 3px 6px rgba(0, 0, 0, 0.07);
		display: flex !important;
		align-items: center;
	}

	.site-header__bar {
		padding-top: 0;
		padding-bottom: 0;
		height: 100%;
		width: 100%;
		align-items: center;
		gap: 10px;
	}

	.site-header__nav-col {
		height: auto;
		flex-direction: row;
		align-items: center;
	}

	.nav-utils {
		gap: 8px;
	}

	.nav-utils > li + li::before {
		margin-right: 7px;
	}

	.site-header__menu-btn.ms-3 {
		margin-left: 0 !important;
	}

	/* 移动端：无背景，主题色三条线 */
	.site-header__menu-btn {
		background: transparent;
		color: #c8161e;
		width: auto;
		height: auto;
		min-width: auto;
		font-size: 28px;
	}

	.site-header__menu-btn i {
		font-size: 28px;
	}

	.nav-wrap .logo {
		flex: 1;
		min-width: 0;
	}

	.nav-wrap .logo a {
		flex-shrink: 1;
		min-width: 0;
	}

	.nav-wrap .logo img {
		height: 20px;
		max-width: 100%;
		object-fit: contain;
	}

	.nav-wrap .logo .line {
		height: 20px;
		margin: 0 8px;
	}

	.site-header__menu-row {
		display: none;
	}

	.menu-wrap.active {
		max-height: calc(100vh - 45px);
	}
}

@media (max-width: 768px) {
	.nav-wrap {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1000;
	}
}
