/* =========================================================
   站点头部（参考 industrie.rstheme.com/engineering 的顶部导航）
   - 半透明深色条，叠在 Hero 之上
   - 左侧 logo + 竖分隔线 + 主导航；右侧电话 + 竖线 + 搜索 / 网格
   - 只在「可编辑区块首页」等使用 get_header() 的模板中出现；
     静态首页 home-static.html 自带 Elementor 头部，互不影响。
   ========================================================= */

.rs-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 999;
	height: 78px;
	background: rgba(31, 31, 31, 0.9);
	color: #fff;
	font-family: "Space Grotesk", "Segoe UI", Roboto, Arial, sans-serif;
	transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.rs-header.is-scrolled {
	background: rgba(20, 20, 20, 0.97);
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.38);
}

/* WP 管理工具栏在顶部时，头部整体下移 */
body.admin-bar .rs-header { top: 32px; }

.rs-header__inner {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 clamp(20px, 4.2vw, 88px);
}

/* ---- logo ---- */
.rs-logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	text-decoration: none;
}

.rs-logo img {
	display: block;
	height: 35px;
	width: auto;
	max-width: none;
}

/* ---- 竖分隔线 ---- */
.rs-sep {
	flex: 0 0 auto;
	width: 1px;
	height: 34px;
	margin: 0 clamp(20px, 2.6vw, 44px);
	background: rgba(255, 255, 255, 0.16);
}

.rs-sep--short { height: 26px; margin: 0 20px; }

/* ---- 主导航 ---- */
.rs-nav { flex: 0 0 auto; }

.rs-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(20px, 2.1vw, 40px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.rs-nav__item { position: relative; }

.rs-nav__item > a {
	display: inline-flex;
	align-items: center;
	font-size: 15px;
	font-weight: 600;
	line-height: 78px;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.18s ease;
}

.rs-nav__item > a:hover,
.rs-nav__item.has-sub:hover > a { color: #e91224; }

.rs-nav__item.is-current > a { color: #e91224; }

.rs-plus {
	margin-left: 5px;
	font-weight: 500;
	opacity: 0.9;
}

/* ---- 下拉 ---- */
.rs-sub {
	position: absolute;
	top: 100%;
	left: -18px;
	min-width: 210px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: #141414;
	border-top: 2px solid #e91224;
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.rs-nav__item.has-sub:hover > .rs-sub,
.rs-nav__item.has-sub:focus-within > .rs-sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.rs-sub a {
	display: block;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: #c9ccd0;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.rs-sub a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
}

/* ---- 右侧 ---- */
.rs-header__right {
	display: flex;
	align-items: center;
	margin-left: auto;
}

.rs-phone {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.94);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.18s ease;
}

.rs-phone:hover { color: #e91224; }

.rs-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	transition: color 0.18s ease, background-color 0.18s ease;
}

.rs-icon:hover {
	color: #e91224;
	background: rgba(255, 255, 255, 0.06);
}

.rs-icon svg { width: 19px; height: 19px; display: block; }

/* ---- 汉堡按钮（窄屏） ---- */
.rs-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 38px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.rs-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: #fff;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.rs-header.nav-open .rs-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.rs-header.nav-open .rs-burger span:nth-child(2) { opacity: 0; }
.rs-header.nav-open .rs-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- 非「可编辑首页」模板需要给固定头部让位 ---- */
body:not(.industrie-editable) { padding-top: 78px; }
@media (max-width: 782px) {
	body.admin-bar .rs-header { top: 46px; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1180px) {
	/* 导航收起后，logo 后那条竖线失去参照，一并隐藏 */
	.rs-header__inner > .rs-sep { display: none; }

	.rs-nav {
		position: fixed;
		top: 78px;
		left: 0;
		right: 0;
		max-height: calc(100vh - 78px);
		overflow-y: auto;
		padding: 14px 24px 28px;
		background: #101010;
		box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-10px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	}

	.rs-header.nav-open .rs-nav {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.rs-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.rs-nav__item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
	.rs-nav__item:last-child { border-bottom: 0; }

	.rs-nav__item > a {
		justify-content: space-between;
		line-height: 1.4;
		padding: 14px 2px;
	}

	.rs-sub {
		position: static;
		display: none;
		min-width: 0;
		padding: 0 0 10px 16px;
		border-top: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.rs-nav__item.is-open > .rs-sub { display: block; }
	.rs-nav__item.is-open > .rs-sub a { padding: 8px 0; }

	.rs-burger { display: flex; }
	.rs-nav__item > a:hover { color: #fff; }
	.rs-nav__item.is-current > a { color: #e91224; }
}

@media (max-width: 860px) {
	.rs-phone,
	.rs-sep--short { display: none; }
	.rs-sep { margin: 0 18px; }
}

@media (max-width: 520px) {
	.rs-logo img { height: 28px; }
	.rs-sep { display: none; }
	.rs-icon--grid { display: none; }
}
