/*
Theme Name: 湘绣城 ECHN City
Theme URI: https://www.echn.com.cn/
Description: 基于原 Nuntius 外观重建的轻量企业主题，兼容现有主导航与小工具区。
Version: 1.3.16
Author: 湖南湘绣城
Text Domain: echn-city
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
*/

/* --- Reset (精简) --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	color: #333;
	background: #fff;
	font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Georgia, "Times New Roman", serif;
	font-size: 16px;
	line-height: 1.65;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: #890000; }
a:hover { color: #5c0000; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.75em; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1.25em; }
ul, ol { margin: 0 0 1.25em 1.5em; padding: 0; }

/* --- Layout --- */
#body-container { min-height: 100vh; display: flex; flex-direction: column; }
/* --- 首页幻灯 --- */
.home-feature {
	background: #f5f5f5;
	border-bottom: 1px solid #ddd;
}
.home-feature-inner {
	max-width: 980px;
	margin: 0 auto;
	padding: 20px 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
}
.echn-slideshow {
	position: relative;
	flex: 1 1 640px;
	min-width: 0;
	background: #222;
	border-radius: 2px;
	overflow: hidden;
}
.home-feature-aside {
	flex: 0 1 280px;
	min-width: 220px;
}
.echn-slideshow__viewport {
	position: relative;
	min-height: 280px;
}
.echn-slide {
	position: relative;
}
.echn-slide__media {
	display: block;
	line-height: 0;
	background: #890000;
}
.echn-slide__img {
	width: 100%;
	height: auto;
	max-height: 430px;
	object-fit: cover;
	display: block;
}
.echn-slide__placeholder {
	display: block;
	min-height: 280px;
	background: linear-gradient(135deg, #890000, #5c0000);
}
.echn-slide__caption {
	padding: 14px 16px 18px;
	background: #fff;
	border-top: 3px solid #890000;
}
.echn-slide__title {
	margin: 0 0 0.35em;
	font-size: 1.15rem;
}
.echn-slide__title a {
	color: #222;
	text-decoration: none;
}
.echn-slide__title a:hover {
	color: #890000;
}
.echn-slide__excerpt {
	margin: 0;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.5;
}
.echn-slideshow__btn {
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	width: 40px;
	height: 48px;
	border: none;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}
.echn-slideshow__btn:hover {
	background: rgba(137, 0, 0, 0.85);
}
.echn-slideshow__btn--prev { left: 0; }
.echn-slideshow__btn--next { right: 0; }
.echn-slideshow__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 10px;
	background: rgba(0, 0, 0, 0.35);
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
}
.echn-slideshow__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1px solid #fff;
	background: transparent;
	padding: 0;
	cursor: pointer;
}
.echn-slideshow__dot.is-active,
.echn-slideshow__dot:hover {
	background: #fff;
}

#container {
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
	padding: 24px 16px 48px;
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	flex: 1;
}
#content { flex: 1 1 560px; min-width: 0; }
#sidebar-primary { flex: 0 0 280px; max-width: 100%; }

/* --- Top bar --- */
#menu-secondary {
	background: #111;
	color: #8f8f8f;
	font-size: 13px;
}
#menu-secondary .wrap {
	max-width: 980px;
	margin: 0 auto;
	padding: 8px 16px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
#menu-secondary #site-description { color: #aaa; margin: 0; }
#menu-secondary .menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
}
#menu-secondary a { color: #ccc; text-decoration: none; }
#menu-secondary a:hover { color: #fff; }

/* --- Header --- */
#header {
	background-color: #890000;
	color: #fff;
	position: relative;
}
#header .wrap {
	max-width: 980px;
	margin: 0 auto;
	padding: 28px 16px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}
#header .header-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}
.custom-header #site-title { position: relative; z-index: 2; }
#site-title {
	margin: 0;
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 700;
	letter-spacing: 0.02em;
}
#site-title a { color: #fff; text-decoration: none; }
#header .header-search .search-form {
	display: flex;
	gap: 6px;
}
#header .header-search input[type="search"] {
	width: 160px;
	padding: 6px 10px;
	border: 1px solid #600;
	border-radius: 2px;
}
#header .header-search input[type="submit"] {
	padding: 6px 12px;
	background: #5c0000;
	color: #fff;
	border: none;
	cursor: pointer;
}

/* --- Primary nav --- */
#menu-primary {
	background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.45)), #890000;
	border-top: 1px solid rgba(255,255,255,0.08);
}
#menu-primary .menu {
	max-width: 980px;
	margin: 0 auto;
	padding: 0 8px;
}
#menu-primary > .menu > ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: stretch;
}
#menu-primary li { position: relative; }
#menu-primary > .menu > ul > li > a {
	display: block;
	padding: 10px 13px;
	font-size: 15px;
	color: #fff;
	text-decoration: none;
	border-left: 1px solid rgba(0,0,0,0.35);
	box-shadow: -1px 0 0 rgba(255,255,255,0.06);
	white-space: nowrap;
}
#menu-primary > .menu > ul > li:first-child > a { border-left: none; box-shadow: none; }
#menu-primary a:hover,
#menu-primary .current-menu-item > a,
#menu-primary .current_page_item > a,
#menu-primary .current-menu-ancestor > a,
#menu-primary .current_page_ancestor > a {
	background: rgba(0,0,0,0.35);
	color: #fff;
}
/* 子菜单：wp_nav_menu 用 .sub-menu，未分配菜单时 wp_page_menu 用 .children */
#menu-primary .sub-menu,
#menu-primary ul.children {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #090909;
	z-index: 100;
	flex-direction: column;
	flex-wrap: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
#menu-primary li:hover > .sub-menu,
#menu-primary li:hover > ul.children {
	display: flex;
}
#menu-primary .sub-menu li,
#menu-primary ul.children li {
	width: 100%;
}
#menu-primary .sub-menu a,
#menu-primary ul.children a {
	display: block;
	border: none;
	box-shadow: none;
	padding: 10px 16px;
	font-size: 14px;
	white-space: nowrap;
}
#menu-primary .sub-menu .sub-menu,
#menu-primary ul.children ul.children {
	top: 0;
	left: 100%;
}
.menu-toggle,
.submenu-toggle {
	display: none;
}

/* --- Breadcrumb --- */
.breadcrumb-trail-wrap {
	max-width: 980px;
	margin: 0 auto;
	padding: 10px 16px;
	font-size: 13px;
	color: #666;
	border-bottom: 1px solid #eee;
}
.breadcrumb-trail-wrap a { color: #666; }

/* --- Posts --- */
.post { margin-bottom: 2.5em; padding-bottom: 2em; border-bottom: 1px solid #eee; }
.post:last-child { border-bottom: none; }
.entry-title { font-size: 1.45rem; margin-bottom: 0.35em; }
.entry-title a { color: #222; text-decoration: none; }
.entry-title a:hover { color: #890000; }
.entry-meta, .byline {
	font-size: 13px;
	color: #777;
	margin-bottom: 1em;
}
.entry-meta a { color: #777; }
.entry-content { overflow-wrap: break-word; }
.entry-content img.aligncenter { display: block; margin: 1em auto; }

/* --- Nav / search --- */
.posts-navigation, .post-navigation {
	margin: 2em 0;
	padding-top: 1em;
	border-top: 1px solid #eee;
	font-size: 14px;
}
.nav-previous { float: left; }
.nav-next { float: right; }
.posts-navigation::after, .post-navigation::after { content: ""; display: block; clear: both; }

.search-no-results { padding: 2em 0; }

/* --- Sidebar widgets --- */
.widget { margin-bottom: 1.75em; font-size: 14px; }
.widget-title {
	font-size: 1rem;
	margin-bottom: 0.75em;
	padding-bottom: 0.35em;
	border-bottom: 2px solid #890000;
	color: #222;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 0.35em; }
.widget a { text-decoration: none; color: #444; }
.widget a:hover { color: #890000; }
.home-latest__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.home-latest__item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 8px;
}
.home-latest__item:last-child { margin-bottom: 0; }
.home-latest__thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 40px;
	line-height: 0;
}
.home-latest__thumb img {
	width: 64px;
	height: 40px;
	object-fit: cover;
	display: block;
}
.home-latest__title {
	flex: 1 1 auto;
	min-width: 0;
	color: #333;
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.home-latest__title:hover { color: #890000; }
.home-latest__date {
	display: block;
	margin-top: 2px;
	color: #888;
	font-size: 12px;
	line-height: 1.2;
}
.widget-archive-toggle {
	display: inline-block;
	margin-top: 0.55em;
	padding: 0;
	border: none;
	background: none;
	color: #890000;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.widget-archive-toggle:hover { color: #5c0000; }
.widget_archive li[hidden] { display: none; }

/* --- Comments (精简) --- */
#comments { margin-top: 2em; padding-top: 1.5em; border-top: 1px solid #eee; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-body { margin-bottom: 1.25em; padding: 12px; background: #f9f9f9; }

/* --- Footer --- */
#footer {
	margin-top: auto;
	background: #1a1a1a;
	color: #999;
	font-size: 13px;
}
#menu-footer .wrap {
	max-width: 980px;
	margin: 0 auto;
	padding: 12px 16px;
}
#menu-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}
#menu-footer a { color: #bbb; text-decoration: none; }
#menu-footer a:hover { color: #fff; }
#colophon {
	max-width: 980px;
	margin: 0 auto;
	padding: 16px 16px 22px;
	color: #f0f0f0;
	text-align: center;
	font-size: 14px;
}
#colophon a {
	color: #fff;
	text-decoration: none;
}
#colophon a:hover {
	color: #fff;
	text-decoration: underline;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

/* --- 首页企业版块 --- */
.home-main { flex: 1 1 100%; width: 100%; }
.home-section-heading {
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #890000;
	font-size: 1.25rem;
	color: #222;
}
.home-category-highlight { margin-bottom: 2.5rem; }
.home-category-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px 28px;
}
.home-category-section {
	background: #fafafa;
	border: 1px solid #e5e5e5;
	padding: 16px 18px 14px;
}
.home-category-section__title {
	margin: 0 0 12px;
	font-size: 1.05rem;
}
.home-category-section__title a {
	text-decoration: none;
	color: #890000;
}
.home-category-section__thumb {
	display: block;
	margin-bottom: 10px;
	line-height: 0;
}
.home-category-section__thumb img,
.home-more-articles__thumb img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}
.home-category-section__lead-title {
	margin: 0 0 0.35em;
	font-size: 1rem;
}
.home-category-section__lead-title a { color: #222; text-decoration: none; }
.home-category-section__lead-title a:hover { color: #890000; }
.home-category-section__excerpt {
	margin: 0 0 0.5em;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.5;
}
.home-category-section__date,
.home-category-section__list-date {
	font-size: 0.8rem;
	color: #888;
}
.home-category-section__list {
	list-style: none;
	margin: 12px 0 0;
	padding: 12px 0 0;
	border-top: 1px dashed #ddd;
}
.home-category-section__list li {
	margin: 0 0 0.55em;
	font-size: 0.92rem;
	display: flex;
	align-items: center;
	gap: 8px;
}
.home-category-section__list-thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 42px;
	line-height: 0;
}
.home-category-section__list-thumb img {
	width: 56px;
	height: 42px;
	object-fit: cover;
	display: block;
}
.home-category-section__list-title {
	flex: 1 1 auto;
	min-width: 0;
	text-decoration: none;
	color: #333;
}
.home-category-section__list-date { flex: 0 0 auto; }
.home-category-section__list a:hover { color: #890000; }
.home-more-articles { margin-bottom: 1rem; }
.home-more-articles__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px 24px;
}
.home-more-articles__item {
	border-bottom: 1px solid #eee;
	padding-bottom: 16px;
}
.home-more-articles__thumb {
	display: block;
	margin-bottom: 8px;
}
.home-more-articles__title {
	margin: 0 0 0.35em;
	font-size: 1rem;
}
.home-more-articles__title a { text-decoration: none; color: #222; }
.home-more-articles__title a:hover { color: #890000; }
.home-more-articles__meta {
	font-size: 0.8rem;
	color: #888;
	margin-bottom: 0.35em;
}
.home-more-articles__meta a { color: #890000; }
.home-more-articles__excerpt {
	margin: 0;
	font-size: 0.9rem;
	color: #555;
	line-height: 1.5;
}
.home-intro {
	margin-bottom: 2rem;
	padding: 16px 18px;
	background: #fafafa;
	border-left: 4px solid #890000;
}
.home-intro__title { margin-top: 0; font-size: 1.15rem; }

/* --- 首页荣誉 --- */
.home-honors,
.home-products {
	max-width: 980px;
	margin: 0 auto 2.5rem;
	padding: 0 16px;
}
.home-honors__lead,
.home-products__lead {
	margin: -0.35rem 0 1.25rem;
	font-size: 0.95rem;
	color: #555;
	line-height: 1.6;
}
.home-honors__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px 18px;
}
.home-honors__item {
	position: relative;
	margin: 0;
	padding: 14px 14px 14px 18px;
	background: #faf8f5;
	border: 1px solid #e8dfd0;
	border-left: 4px solid #890000;
}
.home-honors__title {
	margin: 0 0 0.35em;
	font-size: 0.98rem;
	line-height: 1.45;
	color: #222;
}
.home-honors__subtitle {
	margin: 0;
	font-size: 0.85rem;
	color: #666;
}
.home-products__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 0.85rem;
	padding-bottom: 0.45rem;
	border-bottom: 2px solid #890000;
}
.home-products__heading {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}
.home-products__lead {
	margin: 0 0 1.25rem;
}
.home-products__more {
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	color: #890000;
	white-space: nowrap;
}
.home-products__more:hover { color: #5c0000; }
.home-products .echn-ngg-album--teaser {
	margin-top: 0.5rem;
}
.home-products .echn-ngg-gallery {
	margin-bottom: 1.35rem;
}
.home-products .echn-ngg-gallery:last-child {
	margin-bottom: 0;
}
.home-products {
	margin-bottom: 0;
	padding-bottom: 2rem;
	border-bottom: 1px solid #d5d5d5;
}
.home-honors {
	margin-top: 2.25rem;
	padding-top: 1.75rem;
	border-top: 1px solid #d5d5d5;
}
.home-category-highlight,
.home-main > .home-intro {
	margin-top: 2rem;
}
.home-promo-video {
	max-width: 980px;
	margin: 0 auto 2.5rem;
	padding: 0 16px;
}
.home-promo-video__embed iframe,
.home-promo-video__embed video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	background: #111;
}

/* --- 旧 NextGEN 图库兼容 --- */
.echn-ngg-album { margin: 2em 0; }
.echn-ngg-gallery { margin-bottom: 2.25em; }
.echn-ngg-gallery__title {
	margin: 0 0 0.75em;
	padding-bottom: 0.35em;
	border-bottom: 1px solid #e0e0e0;
	font-size: 1.05rem;
	color: #890000;
}
.echn-ngg-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}
.echn-ngg-gallery--compact .echn-ngg-grid {
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 6px;
}
.echn-ngg-grid__item { margin: 0; }
.echn-ngg-grid__link { display: block; line-height: 0; background: #f0f0f0; }
.echn-ngg-grid__img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.echn-ngg-missing {
	padding: 12px 14px;
	background: #fff8e6;
	border: 1px solid #e6d9a8;
	color: #664d00;
}

@media (max-width: 768px) {
	#container { flex-direction: column; }
	#sidebar-primary { flex: 1 1 auto; }
	#header .wrap {
		flex-direction: column;
		align-items: stretch;
	}
	#header .header-search .search-form { width: 100%; }
	#header .header-search input[type="search"] { flex: 1; width: auto; }
	.menu-toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		margin: 0;
		padding: 12px 16px;
		border: none;
		background: transparent;
		color: #fff;
		font: inherit;
		font-size: 16px;
		cursor: pointer;
		text-align: left;
	}
	.menu-toggle__icon {
		display: block;
		width: 18px;
		height: 2px;
		background: #fff;
		box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
	}
	#menu-primary .menu { display: none; }
	#menu-primary.is-open .menu { display: block; }
	#menu-primary > .menu > ul {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: stretch;
	}
	#menu-primary > .menu > ul > li > a {
		white-space: normal;
		border-left: none;
		box-shadow: none;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		padding-right: 72px;
	}
	#menu-primary > .menu > ul > li:first-child > a { border-top: none; }
	#menu-primary li:hover > .sub-menu,
	#menu-primary li:hover > ul.children { display: none; }
	#menu-primary .sub-menu,
	#menu-primary ul.children {
		position: static;
		min-width: 0;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.28);
	}
	#menu-primary li.is-sub-open > .sub-menu,
	#menu-primary li.is-sub-open > ul.children { display: flex; }
	.submenu-toggle {
		display: block;
		position: absolute;
		top: 6px;
		right: 8px;
		padding: 6px 10px;
		border: 1px solid rgba(255, 255, 255, 0.35);
		background: transparent;
		color: #fff;
		font: inherit;
		font-size: 13px;
		cursor: pointer;
	}
	.home-category-grid,
	.home-more-articles__grid,
	.home-honors__grid {
		grid-template-columns: 1fr;
	}
}