/* 自定义变量 */
:root {
	--brand-black: #1a1a1a;
	--brand-gold: #cca43b;
	--bg-off-white: #f9f9f9;
	--header-height: 90px; /* 定义导航栏固定高度 */
}

body {
	font-family: 'Montserrat', sans-serif;
	background-color: var(--bg-off-white);
}

.brand-font { font-family: 'Playfair Display', serif; }

/* 导航过渡 */
.nav-container {
	height: var(--header-height); /* 强制固定高度 */
	transition: all 0.3s ease;
	background-color: #ffffff;
}

/* 滚动后变矮一点，更紧凑 */
.nav-scrolled {
	height: calc(var(--header-height) * 0.78); /* 滚动后变矮 */
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* 移动端导航栏响应式 */
@media (max-width: 1024px) {
	.nav-container {
		height: 70px;
	}

	.nav-scrolled {
		height: 55px;
	}
}

@media (max-width: 640px) {
	.nav-container {
		height: 60px;
	}

	.nav-scrolled {
		height: 50px;
	}
}

/* 链接下划线动画 */
.nav-item-link {
	position: relative;
	display: flex;          /* 改为Flex */
	align-items: center;    /* 垂直居中 */
	height: 100%;           /* 占满父容器高度 */
	padding: 0 12px;        /* 增加左右点击区域 */
}
.nav-item-link span {
	position: relative;
	padding-bottom: 4px; /* 稍微增加下划线距离 */
}
.nav-item-link span::after {
	content: '';
	position: absolute;
	width: 0;
	height: 2px;
	bottom: 0;
	left: 0;
	background-color: var(--brand-black);
	transition: width 0.3s ease;
}
.nav-item-link:hover span::after {
	width: 100%;
}

/* --- Mega Menu 核心样式 --- */
.mega-menu-container {
	position: absolute;
	left: 0;
	top: 100%; /* 紧贴导航栏底部 */
	width: 100%;
	background: white;
	border-top: 1px solid #eee;
	box-shadow: 0 10px 25px rgba(0,0,0,0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.2s ease-in-out;
	z-index: 40;
	pointer-events: none;
}

/* 关键修复：添加透明桥梁，防止鼠标过快移动导致断触 */
.mega-menu-container::before {
	content: "";
	position: absolute;
	top: -20px; /* 向上延伸20px覆盖可能的缝隙 */
	left: 0;
	width: 100%;
	height: 20px;
	background: transparent;
}

/* 鼠标悬停在父级 li 上时显示 Mega Menu */
.group:hover .mega-menu-container {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

/* 侧边栏列表项悬停效果 */
.sidebar-item:hover {
	background-color: #f3f4f6;
	color: var(--brand-black);
}

/* 图片卡片悬停放大效果 */
.img-card { overflow: hidden; }
.img-card img { transition: transform 0.5s ease; }
.img-card:hover img { transform: scale(1.05); }
