﻿/* ===== Global ===== */
html {
	scroll-padding-top: 82px;
}

body {
	padding-top: 82px;
}

/* ===== Header ===== */
.site-header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 999;
	backdrop-filter: blur(14px);
	background: #213D63;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.header-inner {
	min-height: 82px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	position: relative;
}

.site-header .brand {
	display: flex;
	align-items: center;
	gap: 14px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	position: relative;
	z-index: 32;
	flex-shrink: 0;
}

.site-header .brand img {
	height: 38px;
	width: auto;
	display: block;
}

/* ===== Navigation ===== */
.site-header .nav {
	display: flex;
	align-items: center;
	gap: 26px;
	overflow: visible;
}

.site-header .nav a {
	position: relative;
	text-decoration: none;
	font-size: 16px;
	color: rgba(255, 255, 255, .88);
	white-space: nowrap;
	transition: color .25s ease;
}

.site-header .nav>a::after,
.site-header .nav>.nav-dropdown>.dropdown-toggle::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 0;
	height: 2px;
	background: #fff;
	border-radius: 999px;
	transform: translateX(-50%);
	transition: width .28s ease;
}

.site-header .nav>a:hover,
.site-header .nav>a.active,
.site-header .nav>.nav-dropdown>.dropdown-toggle:hover,
.site-header .nav>.nav-dropdown>.dropdown-toggle.active {
	color: #fff;
}

.site-header .nav>a:hover::after,
.site-header .nav>a.active::after,
.site-header .nav>.nav-dropdown>.dropdown-toggle:hover::after,
.site-header .nav>.nav-dropdown>.dropdown-toggle.active::after {
	width: 100%;
}

/* ===== CTA ===== */
.header-cta {
	padding: 12px 18px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	font-size: 14px;
	border: 1px solid rgba(255, 255, 255, .12);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background .2s ease, transform .2s ease;
}

.header-cta:hover {
	background: rgba(255, 255, 255, .16);
	transform: translateY(-1px);
}

/* ===== Mobile Toggle ===== */
.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, .08);
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
	z-index: 35;
	flex-shrink: 0;
}

.menu-toggle:hover {
	background: rgba(255, 255, 255, .12);
}

.menu-toggle .bar {
	position: absolute;
	width: 20px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: transform .28s ease, opacity .2s ease, top .28s ease;
}

.menu-toggle .bar:nth-child(1) { top: 14px; }
.menu-toggle .bar:nth-child(2) { top: 21px; }
.menu-toggle .bar:nth-child(3) { top: 28px; }

.menu-toggle.active .bar:nth-child(1) {
	top: 21px;
	transform: rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) {
	top: 21px;
	transform: rotate(-45deg);
}

/* ===== Mega Dropdown ===== */
.nav-dropdown {
	position: static;
}

.nav-dropdown .dropdown-toggle {
	cursor: pointer;
	display: flex;
	align-items: center;
	position: relative;
}

.nav-dropdown .dropdown-toggle::before {
	content: "";
	position: absolute;
	left: -24px;
	right: -24px;
	top: 100%;
	height: 34px;
	background: transparent;
}

.nav-dropdown .dropdown-menu {
	max-height: calc(100vh - 82px);
	overflow-y: auto;
	overscroll-behavior: contain;
	position: fixed;
	top: 82px;
	left: 50%;
	width: min(var(--max), calc(100% - 40px));
	display: grid;
	grid-template-columns: repeat(3, minmax(240px, 1fr));
	gap: 36px 42px;
	padding: 44px 40px 48px;
	background: rgba(255, 255, 255, .98);
	border-radius: 0 0 18px 18px;
	border-top: 1px solid rgba(0, 0, 0, .06);
	border-bottom: 1px solid rgba(0, 0, 0, .08);
	box-shadow: 0 22px 55px rgba(15, 35, 55, .14);
	z-index: 998;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-50%) translateY(8px);
	transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown .dropdown-menu:hover {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.dropdown-section {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.dropdown-section:nth-child(4),
.dropdown-section:nth-child(5) { margin-top: -8px; }

.dropdown-title {
	width: 100%;
	color: #172033;
	font-size: 16px;
	font-weight: 800;
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid rgba(20, 35, 55, .14);
}

.nav-dropdown .dropdown-menu a {
	width: 100%;
	display: block;
	position: static;
	padding: 8px 0;
	color: #687386;
	font-size: 14px;
	line-height: 1.6;
	text-decoration: none;
	white-space: normal;
	border-radius: 8px;
	text-align: left;
	transition: color .22s ease, background .22s ease, transform .22s ease;
}

.nav-dropdown .dropdown-menu a::after { display: none !important; content: none !important; }

.nav-dropdown .dropdown-menu a:hover {
	color: var(--brand-deep);
	background: rgba(33, 61, 99, .07);
	transform: translateY(-1px);
	padding: 8px 10px;
}

/* ===== 当前产品 dropdown 高亮 ===== */
.nav-dropdown .dropdown-menu a.active-product-link {
	color: var(--brand-deep);
	background: rgba(33, 61, 99, .07);
	padding: 8px 10px;
}

/* ===== Footer ===== */
.site-footer {
	width: 100%;
	font-size: 15px;
	background: #213D63;
	color: rgba(255, 255, 255, .72);
	margin-top: 20px;
	padding: 0;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.2fr .9fr .8fr 1fr;
	gap: 30px;
	padding: 64px 0 40px;
}

.footer-title {
	color: #fff;
	font-weight: 700;
	margin-bottom: 12px;
}

.footer-col a {
	display: block;
	margin-bottom: 8px;
	text-decoration: none;
	color: rgba(255, 255, 255, .72);
}

.footer-col a:hover { color: #fff; }

.footer-col p { margin: 0; line-height: 1.8; }

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .2);
	color: rgba(255, 255, 255, .72);
	font-size: 12px;
	padding: 14px 10px;
	letter-spacing: .5px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	text-align: center;
}

.footer-bottom img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	vertical-align: middle;
}

/* ===== Tablet ===== */
@media (max-width: 1180px) {
	.nav-dropdown .dropdown-menu {
		grid-template-columns: repeat(2, minmax(220px, 1fr));
		gap: 32px 36px;
	}
	.dropdown-section:nth-child(4),
	.dropdown-section:nth-child(5) { margin-top: 0; }
}

/* ===== Mobile ===== */
@media (max-width: 950px) {
	.header-cta { display: none; }

	.menu-toggle { display: inline-flex; }

	.menu-toggle, .menu-toggle:hover, .menu-toggle:active, .menu-toggle:focus {
		background: rgba(255, 255, 255, .08) !important;
		transform: none !important;
	}

	.site-header .nav {
		position: absolute;
		top: calc(100% + 12px);
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 12px;
		background: rgba(255, 255, 255, 1.0);
		border: 1px solid rgba(255, 255, 255, .08);
		border-radius: 16px;
		box-shadow: 0 20px 50px rgba(0, 0, 0, .28);
		z-index: 34;
		overflow: hidden;
		max-height: calc(100vh - 106px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.site-header .nav.open { display: flex; }

	.site-header .nav a,
	.site-header .nav a:hover,
	.site-header .nav a:focus,
	.site-header .nav a:active,
	.site-header .nav>.nav-dropdown>.dropdown-toggle:hover,
	.site-header .nav>.nav-dropdown>.dropdown-toggle:focus,
	.site-header .nav>.nav-dropdown>.dropdown-toggle:active {
		display: block;
		padding: 10px 15px;
		border-radius: 12px;
		color: #213D63 !important;
		background: transparent !important;
		transform: none !important;
		transition: none !important;
		text-decoration: none !important;
	}

	.site-header .nav a.active {
		color: #213D63 !important;
		background: rgba(33, 61, 99, .07) !important;
	}

	.nav-dropdown { position: relative; }
	.nav-dropdown .dropdown-menu {
		position: static !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		width: 100% !important;
		display: none !important;
		grid-template-columns: 1fr !important;
		gap: 0 !important;
		padding: 4px 0 8px !important;
		background: transparent !important;
		border: none !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		transform: none !important;
		transition: none !important;
		max-height: none;
		overflow-y: visible;
	}
	.nav-dropdown.active .dropdown-menu { display: grid !important; }

	.dropdown-section, .dropdown-section:hover {
		align-items: stretch !important;
		text-align: left !important;
		padding: 4px 12px !important;
		margin-top: 0 !important;
		transform: none !important;
	}

	.dropdown-title, .dropdown-title:hover {
		color: #172033 !important;
		font-size: 14px !important;
		padding: 10px 4px 8px !important;
		margin: 0 !important;
		border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
		background: transparent !important;
		transform: none !important;
	}

	.nav-dropdown .dropdown-menu a,
	.nav-dropdown .dropdown-menu a:hover,
	.nav-dropdown .dropdown-menu a:focus,
	.nav-dropdown .dropdown-menu a:active {
		color: #687386 !important;
		background: transparent !important;
		transform: none !important;
		padding: 10px 10px !important;
		font-size: 14px !important;
		transition: none !important;
	}
}

@media (max-width: 820px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
	.container { width: min(var(--max), calc(100% - 24px)); }
}

@media (max-width: 640px) {
	.footer-grid .footer-col:nth-child(2),
	.footer-grid .footer-col:nth-child(3) { display: none; }
}