/**
 * Header — 页头 / 桌面导航 / 移动导航 / 语言切换
 */

/* ---- 页头 -------------------------------------------------------------- */

.tc-header {
	position: sticky;
	top: 0;
	z-index: var(--tc-z-header);
	background: var(--tc-white);
	border-bottom: 1px solid var(--tc-gray-200);
	box-shadow: var(--tc-shadow-1);
}

.tc-header__inner {
	display: flex;
	align-items: center;
	gap: var(--tc-space-5);
	min-height: var(--tc-header-h);
	transition: min-height var(--tc-dur) var(--tc-ease);
}

/* 滚动后收缩（由 navigation.js 添加，JS 不可用时页头仍完整可用） */
.tc-header.is-condensed .tc-header__inner {
	min-height: var(--tc-header-h-condensed);
}

.tc-header__branding {
	flex: 0 0 auto;
	min-width: 0;
}

/*
 * 窄屏（≤767px）品牌区必须可收缩：
 * 较长的品牌名（英文默认名）或较宽的后台上传 Logo 会把页头撑出横向滚动条，
 * 这里允许收缩并要求文字行以省略号截断——不改变桌面端观感。
 * 注意：不在父级加 overflow:hidden，避免裁掉 .tc-logo 的键盘焦点圈。
 */
@media (max-width: 767px) {
	.tc-header__branding {
		flex: 0 1 auto;
	}

	.tc-logo {
		max-width: 100%;
		min-width: 0;
	}

	.tc-logo__text {
		min-width: 0;
	}

	.tc-logo__name,
	.tc-logo__latin {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	/* 后台图片版 Logo：宽度同时受容器约束，object-fit:contain 保证不拉伸 */
	.tc-logo--image img {
		max-width: 100%;
	}
}

.tc-header__actions {
	display: flex;
	align-items: center;
	gap: var(--tc-space-4);
	margin-left: auto;
}

/* ---- Logo -------------------------------------------------------------- */

.tc-logo {
	display: inline-flex;
	align-items: center;
	gap: var(--tc-space-3);
	text-decoration: none;
}

/* W2.5：Logo 放大至品牌级视觉（整体宽约 150-180px），摆脱后台工具条感 */
.tc-logo__mark {
	width: 40px;
	height: 40px;
	flex: 0 0 auto;
}

.tc-logo__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.tc-logo__name {
	font-size: 1.375rem;   /* 22px */
	font-weight: 700;
	letter-spacing: 0.04em;
}

.tc-logo__latin {
	font-size: 0.6875rem;  /* 11px */
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* ---- 桌面导航 ---------------------------------------------------------- */

.tc-header__nav {
	display: none;
}

@media (min-width: 1100px) {
	.tc-header__nav {
		display: block;
		margin-left: var(--tc-space-6);
	}
}

.tc-nav__list {
	display: flex;
	align-items: center;
	/* W2.5：导航间距 24-30px，建立大站导航呼吸感 */
	gap: clamp(1.5rem, 1.9vw, 1.875rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tc-nav__list a {
	display: block;
	padding: var(--tc-space-3) 0;
	font-size: var(--tc-fs-sm);   /* 14-15px 品牌导航字号 */
	font-weight: 500;
	color: var(--tc-text-primary);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: color var(--tc-dur) var(--tc-ease),
		border-color var(--tc-dur) var(--tc-ease);
}

.tc-nav__list a:hover,
.tc-nav__list .current-menu-item > a,
.tc-nav__list .current_page_item > a {
	color: var(--tc-navy-900);
	border-bottom-color: var(--tc-gold-500);
}

/* 子菜单 */
.tc-nav__list ul {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: var(--tc-z-header);
	min-width: 12rem;
	margin: 0;
	padding: var(--tc-space-2) 0;
	list-style: none;
	background: var(--tc-white);
	border: 1px solid var(--tc-gray-200);
	border-radius: var(--tc-radius);
	box-shadow: var(--tc-shadow-2);
}

.tc-nav__list li {
	position: relative;
}

.tc-nav__list li ul {
	display: none;
}

.tc-nav__list li:hover > ul,
.tc-nav__list li:focus-within > ul {
	display: block;
}

.tc-nav__list ul a {
	padding: var(--tc-space-2) var(--tc-space-4);
	border-bottom: 0;
}

/* ---- 语言切换器 -------------------------------------------------------- */

.tc-lang__list {
	display: flex;
	align-items: center;
	gap: var(--tc-space-1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tc-lang__link {
	display: inline-block;
	padding: var(--tc-space-1) var(--tc-space-2);
	font-size: var(--tc-fs-xs);
	font-weight: 600;
	color: var(--tc-text-secondary);
	text-decoration: none;
	border-radius: var(--tc-radius-sm);
}

.tc-lang__link:hover {
	color: var(--tc-navy-900);
	background: var(--tc-gray-100);
}

.tc-lang__item.is-current .tc-lang__link {
	color: var(--tc-navy-900);
	background: var(--tc-gray-100);
}

/* 语言分隔（中文 | EN 的竖线） */
.tc-lang__item + .tc-lang__item {
	border-left: 1px solid var(--tc-gray-200);
}

/* ---- 移动菜单按钮 ------------------------------------------------------ */

.tc-nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	background: transparent;
	border: 1px solid var(--tc-gray-200);
	border-radius: var(--tc-radius);
	cursor: pointer;
}

@media (min-width: 1100px) {
	.tc-nav-toggle,
	.tc-mnav {
		display: none !important;
	}
}

.tc-nav-toggle__box {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tc-nav-toggle__bar {
	width: 18px;
	height: 2px;
	background: var(--tc-navy-900);
	transition: transform var(--tc-dur) var(--tc-ease),
		opacity var(--tc-dur) var(--tc-ease);
}

.tc-nav-toggle[aria-expanded="true"] .tc-nav-toggle__bar:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.tc-nav-toggle[aria-expanded="true"] .tc-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.tc-nav-toggle[aria-expanded="true"] .tc-nav-toggle__bar:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* ---- 移动导航抽屉 ------------------------------------------------------ */

.tc-mnav__overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--tc-z-drawer) - 1);
	background: rgba(12, 44, 74, 0.5);
}

.tc-mnav__panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: var(--tc-z-drawer);
	display: flex;
	flex-direction: column;
	width: min(22rem, 86vw);
	height: 100dvh;
	padding: var(--tc-space-4);
	overflow-y: auto;
	background: var(--tc-white);
	box-shadow: -8px 0 24px rgba(12, 44, 74, 0.18);
}

.tc-mnav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--tc-space-4);
}

.tc-mnav__title {
	font-weight: 700;
}

.tc-mnav__close {
	width: 2.5rem;
	height: 2.5rem;
	font-size: var(--tc-fs-xl);
	line-height: 1;
	color: var(--tc-text-primary);
	background: transparent;
	border: 1px solid var(--tc-gray-200);
	border-radius: var(--tc-radius);
	cursor: pointer;
}

.tc-mnav__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0 0 var(--tc-space-5);
	padding: 0;
	list-style: none;
}

.tc-mnav__list a {
	display: block;
	padding: var(--tc-space-3) var(--tc-space-4);
	font-size: var(--tc-fs-md);
	color: var(--tc-text-primary);
	text-decoration: none;
	border-radius: var(--tc-radius);
}

.tc-mnav__list a:hover,
.tc-mnav__list .current-menu-item > a,
.tc-mnav__list .current_page_item > a {
	background: var(--tc-gray-050);
	color: var(--tc-navy-900);
}

.tc-mnav__cta {
	margin-bottom: var(--tc-space-5);
}

.tc-mnav__contact {
	padding: var(--tc-space-4);
	margin-bottom: var(--tc-space-5);
	background: var(--tc-gray-050);
	border-radius: var(--tc-radius);
}

.tc-mnav__contact-label {
	margin: 0 0 var(--tc-space-1);
	font-size: var(--tc-fs-xs);
	color: var(--tc-text-secondary);
}

.tc-mnav__phone {
	font-size: var(--tc-fs-lg);
	font-weight: 700;
	color: var(--tc-navy-900);
	text-decoration: none;
}

.tc-mnav__lang {
	padding-top: var(--tc-space-4);
	border-top: 1px solid var(--tc-gray-200);
}
