/* ==========================================================================
   电器·智库 — 头部公共样式（品牌条 + 主导航 + 检索）
   三套模板的头部差异已在此统一：
     品牌名字号 30px（首页 body.dq-front 放大到 40px）
     品牌条内边距 24px 24px 22px
     导航背景 --white、高度 58px、菜单项左右 17px
     检索框 36px 高 / 18px 圆角 / --paper 底色
   ========================================================================== */

/* ---------- 品牌条 ---------- */
.brand-bar {
	background: var(--brand);
	color: var(--white);
	border-top: 3px solid var(--copper);
}

/* 两行网格：第一行「品牌名 / 官网标识」同轴，第二行「描述 / 入口」同轴 */
.brand-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"name  org"
		"tag   action";
	align-items: center;
	column-gap: 20px;
	row-gap: 10px;
	padding: 24px 24px 22px;
}

.brand-name {
	grid-area: name;
	display: inline-block;
	justify-self: start;
	font-family: var(--serif);
	font-size: 32px;
	font-weight: 700;
	letter-spacing: 3px;
	line-height: 1.25;
	color: var(--white);
}

.brand-name .brand-logo {
	display: block;
	width: auto;
	height: 1.5em;
}

.brand-tagline {
	grid-area: tag;
	font-size: 14px;
	font-weight: 300;
	letter-spacing: 2px;
	color: rgba(255, 255, 255, .8);
}

.brand-org {
	grid-area: org;
	justify-self: end;
	font-size: 13px;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, .6);
	white-space: nowrap;
}

.brand-org strong {
	color: var(--white);
	font-weight: 500;
}

.brand-about {
	grid-area: action;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 18px;
	border-radius: 999px;
	background: linear-gradient(135deg, #e6c084 0%, var(--copper-light) 45%, #c08f45 100%);
	color: #4a0a14;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
	transition: transform .2s, box-shadow .2s, filter .2s;
}

.brand-about::after {
	content: "→";
	font-weight: 400;
	letter-spacing: 0;
	transition: transform .2s;
}

.brand-about:hover {
	color: #4a0a14;
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 7px 18px rgba(0, 0, 0, .3);
}

.brand-about:hover::after {
	transform: translateX(3px);
}

/* 首页：品牌条采用大尺寸版 */
.dq-front .brand-inner {
	padding: 30px 24px 28px;
}

.dq-front .brand-name {
	font-size: 40px;
	letter-spacing: 4px;
}

.dq-front .brand-tagline {
	font-size: 16px;
	letter-spacing: 3px;
	margin-top: 8px;
}

/* ---------- 主导航 ---------- */
.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 2px 12px rgba(13, 27, 42, .05);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 24px;
	height: 58px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	min-width: 0;
}

.nav-links li {
	position: relative;
}

.nav-links a {
	display: block;
	position: relative;
	height: 58px;
	line-height: 58px;
	padding: 0 17px;
	font-size: 15px;
	letter-spacing: 1px;
	color: var(--text);
	white-space: nowrap;
	transition: color .2s, background .2s;
}

.nav-links a::after {
	content: "";
	position: absolute;
	left: 17px;
	right: 17px;
	bottom: 0;
	height: 2px;
	background: var(--copper);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s;
}

.nav-links a:hover {
	color: var(--copper);
	background: var(--paper-2);
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links .current-menu-item > a::after {
	transform: scaleX(1);
}

.nav-links a.active,
.nav-links .current-menu-item > a {
	color: var(--copper);
	font-weight: 600;
	background: var(--paper-2);
}

/* ---------- 检索框 ---------- */
.nav-search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--paper);
	color: var(--muted);
	font-size: 13px;
	transition: border-color .2s, background .2s;
}

.nav-search:focus-within,
.nav-search:hover {
	border-color: var(--copper);
	background: var(--white);
}

.nav-search svg {
	flex: none;
}

.nav-search input[type="search"] {
	width: 106px;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	font-size: 13px;
	color: var(--text);
	line-height: 1;
}

.nav-search input[type="search"]::placeholder {
	color: var(--muted);
}

.nav-search button {
	display: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
	.nav-links a {
		padding: 0 12px;
	}

	.nav-links a::after {
		left: 12px;
		right: 12px;
	}

	.nav-search input[type="search"] {
		width: 84px;
	}
}

@media (max-width: 900px) {
	.nav-inner {
		height: auto;
		flex-wrap: wrap;
		padding: 8px 24px;
	}

	.nav-links {
		width: 100%;
	}

	.nav-links a {
		height: 42px;
		line-height: 42px;
		padding: 0 10px;
		font-size: 14px;
	}

	.nav-links a::after {
		left: 10px;
		right: 10px;
	}

	.nav-search {
		display: none;
	}
}

@media (max-width: 640px) {
	.brand-name,
	.dq-front .brand-name {
		font-size: 28px;
		letter-spacing: 4px;
	}

	.brand-inner,
	.dq-front .brand-inner {
		grid-template-columns: 1fr;
		grid-template-areas:
			"name"
			"tag"
			"org"
			"action";
		row-gap: 8px;
		padding: 20px 18px 18px;
	}

	.brand-tagline,
	.dq-front .brand-tagline {
		font-size: 13px;
		letter-spacing: 1px;
	}

	.brand-org,
	.brand-about {
		justify-self: start;
	}

	.nav-inner {
		padding: 6px 18px;
	}
}
