/* =========================================================================
 * 蜀天模块引擎 — 前台补充样式
 * 站点设计的 99% 由主题「额外 CSS」(clone-style.css) 提供，本文件只做三件事：
 *   1) 解除主题容器对「模块页」整页宽度的限制（原站是通栏）
 *   2) 自定义页头的吸顶与品牌字
 *   3) Hero 首屏模块的版式（该模块是新写的，原站无对应 class）
 * 命名统一 shtfb- / sht- 前缀，避免与 clone-style.css 的 hp22* 冲突。
 * ====================================================================== */

/* ---------- 1. 模块页：通栏 ---------- */
body.shtfb-module-page #content .ast-container,
body.shtfb-module-page .site-content > .ast-container {
	display: block;
	max-width: none;
	padding: 0;
	margin: 0;
	width: 100%;
}
body.shtfb-module-page #primary.shtfb-content,
body.shtfb-module-page .shtfb-content {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	float: none;
	border: none;
	background: none;
}
body.shtfb-module-page .shtfb-main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

/* 每个模块一层壳：清浮动，避免 clone 的 float 版式互相顶穿 */
.sht-module {
	width: 100%;
	position: relative;
}
.sht-module::after {
	content: "";
	display: block;
	clear: both;
}
.sht-module > *:first-child { margin-top: 0; }

/* 模块页里隐藏「正文标题 / 面包屑」这类主题杂质（有则隐藏，无则无碍） */
body.shtfb-module-page .entry-header,
body.shtfb-module-page .ast-single-entry-banner,
body.shtfb-module-page .ast-breadcrumbs,
body.shtfb-module-page .entry-title { display: none !important; }

/* ---------- 2. 自定义页头 ---------- */

/* 2.0 兜底：自定义页头页脚生效时，隐藏主题（Astra）残留的页头页脚外壳。
   实测 Astra 的默认页脚不挂在可被 remove_action 摘掉的点上，会在我们的页脚之外
   再输出一整套（含 "My WordPress" 版权），产生两个 #colophon。
   这里按 class 精确排除我们自己的那一个，机制无关、稳定。 */
body.shtfb-chrome-on footer#colophon:not(.shtfb-footer),
body.shtfb-chrome-on .site-footer:not(.shtfb-footer),
body.shtfb-chrome-on header#masthead:not(.shtfb-header),
body.shtfb-chrome-on .site-header:not(.shtfb-header) { display: none !important; }
/* 页头页脚已自查替换，避免出现第二个 id=colophon 造成样式/脚本取错元素 */
body.shtfb-chrome-on footer#colophon:not(.shtfb-footer) *,
body.shtfb-chrome-on header#masthead:not(.shtfb-header) * { display: none !important; }

.shtfb-header {
	background-color: #ffffff;
	width: 100%;
	position: relative;
	z-index: 900;
}
.shtfb-header.shtfb-sticky {
	position: sticky;
	top: 0;
	z-index: 999;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
/* 后台工具条存在时让出高度 */
body.admin-bar .shtfb-header.shtfb-sticky { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .shtfb-header.shtfb-sticky { top: 46px; }
}

.shtfb-brandtext {
	display: inline-block;
	font-size: 22px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: .2px;
	color: #0f2a4a;
}
.shtfb-header .shtfb-logo img,
.shtfb-header .custom-logo { max-height: 62px; width: auto; }

/* 页头按钮（沿用 Astra 结构，缺样式时给个兜底） */
.shtfb-header .ast-custom-button {
	display: inline-block;
	padding: 12px 22px;
	background-color: #0f6fd8;
	color: #fff;
	border-radius: 4px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}
.shtfb-header .ast-custom-button-link:hover .ast-custom-button { filter: brightness(1.06); }

/* ---------- 3. Hero 首屏模块 ---------- */
.shtHeroSection { position: relative; }
.shtHero {
	position: relative;
	background-color: #0b2440;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	min-height: 620px;
	display: flex;
	align-items: center;
	overflow: hidden;
}
.shtHero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg,
		rgba(6, 22, 44, .88) 0%,
		rgba(6, 22, 44, .70) 42%,
		rgba(6, 22, 44, .22) 100%);
	z-index: 1;
}
.shtHero > .container { position: relative; z-index: 2; width: 100%; }
.shtHeroInner {
	max-width: 740px;
	padding: 96px 0;
	color: #ffffff;
}
.shtHeroTag {
	display: inline-block;
	margin-bottom: 18px;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 999px;
	font-size: 13px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #ffffff;
	background: rgba(255, 255, 255, .08);
}
.shtHeroInner h1 {
	margin: 0 0 18px;
	font-size: 46px;
	line-height: 1.16;
	font-weight: 800;
	color: #ffffff;
}
.shtHeroText {
	margin-bottom: 30px;
	font-size: 17px;
	line-height: 1.75;
	color: rgba(255, 255, 255, .88);
	max-width: 640px;
}
.shtHeroBtns {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
}
.shtHeroBtns .commonBtn { text-decoration: none; }
.shtHeroBtns .whiteBtn {
	background-color: #ffffff;
	color: #0f2a4a;
}

@media (max-width: 991px) {
	.shtHero { min-height: 520px; }
	.shtHeroInner { padding: 72px 0; }
	.shtHeroInner h1 { font-size: 34px; }
}
@media (max-width: 767px) {
	.shtHero { min-height: 440px; }
	.shtHeroInner { padding: 56px 0; max-width: 100%; }
	.shtHeroInner h1 { font-size: 27px; }
	.shtHeroText { font-size: 15px; }
	.shtHeroBtns { flex-direction: column; align-items: stretch; }
	.shtHeroBtns .commonBtn { text-align: center; }
}

/* ---------- 4. 自定义页脚兜底 ---------- */
.shtfb-footer .footerSocial { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.shtfb-footer .footerSocial li { margin: 0; }
.shtfb-footer .footerSocial a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	text-decoration: none;
}
.shtfb-footer .footerDetails { list-style: none; margin: 0; padding: 0; }
.shtfb-footer .footerlogo img { max-width: 180px; height: auto; }

/* ---------- 6. 询盘弹窗兜底（#contactPopUpForm 由插件在 wp_footer 输出） ----------
   原站这几条规则在主题的「额外 CSS」(clone-style.css) 里；这里再写一份，
   防止该文件被清空/未加载时弹窗变成「一直显示」。 */
.popupOverlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .7);
	z-index: 999;
}
#contactPopUpForm {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 535px;
	background: #fff;
	border-radius: 15px;
	padding: 0;
	z-index: 9999;
	box-shadow: 0 0 15px rgba(0, 0, 0, .5);
	max-height: 90vh;
	overflow: auto;
}
#contactPopUpForm .quickQuote { padding: 40px 30px; box-shadow: none; border: 0; }
#contactPopUpForm .quickQuoteTitle { font-size: 24px; font-weight: 600; }
#contactPopUpForm .closePopup {
	display: inline-block;
	width: 26px;
	height: 26px;
	line-height: 24px;
	text-align: center;
	color: #fff;
	border-radius: 25px;
	position: absolute;
	right: 20px;
	top: 20px;
	background: #b7bfcf;
	border: 1px solid #b7bfcf;
	cursor: pointer;
}
.shtfb-popup-empty { padding: 6px 0 0; }

/* ---------- 5. 询盘表单兜底（模块 sec23 内嵌 Fluent Forms 结构） ---------- */
.sht-mod-sec23 input[type="text"],
.sht-mod-sec23 input[type="email"],
.sht-mod-sec23 input[type="tel"],
.sht-mod-sec23 textarea,
.sht-mod-sec23 select {
	max-width: 100%;
}
