/**
 * Chữ chìm (.title_background) — toàn site
 * - Viền brand mờ nhẹ, ruột shell
 * - Nằm CAO hơn tiêu đề (.sec_title)
 * - Hiển thị đầy đủ nội dung (không clip)
 */

:root {
	--fc-wm-brand: var(--primary-color, var(--fc-brand, #14c131));
	--fc-wm-fill: var(--fc-shell, #f2f5f3);
	/* Soft brand stroke (mờ hơn bản full opacity) */
	--fc-wm-stroke: linear-gradient(
		180deg,
		color-mix(in srgb, var(--fc-wm-brand) 38%, transparent) 0%,
		color-mix(in srgb, var(--fc-wm-brand) 18%, transparent) 46%,
		color-mix(in srgb, var(--fc-wm-brand) 3%, transparent) 94%
	);
	--fc-wm-opacity: 0.4;
}

/* Parent: chừa chỗ phía trên cho watermark, không cắt chữ */
.heading_group {
	position: relative;
	z-index: 2;
	overflow: visible !important;
	padding-top: 2.2rem !important;
}

.heading_group .sec_title {
	position: relative;
	z-index: 2;
}

/**
 * Base — viền brand mờ, ruột shell, full text, cao hơn title
 */
html body .heading_group .title_background,
html body section .heading_group .title_background,
html body .title_background,
html body.home .heading_group .title_background,
html body.home .title_background,
html body.page-template-home .heading_group .title_background,
html body.page-template-templateshome-php .heading_group .title_background,
html body.page-template-templatesabout-php .heading_group .title_background,
html body.page-template-about .heading_group .title_background,
html body.page-template-services .heading_group .title_background,
html body.page-template-templatesservices-php .heading_group .title_background,
html body.page-template-dealers .heading_group .title_background,
html body.page-template-templatesdealers-php .heading_group .title_background,
html body.page-template-templatesnews-php .heading_group .title_background,
html body.page-template-news .heading_group .title_background,
html body.page-template-templatesproducts-php .heading_group .title_background,
html body.page-template-products .heading_group .title_background,
html body.page-template-templatescontact-php .heading_group .title_background,
html body.page-template-contact .heading_group .title_background,
html body.page-template-templatesrecruit-php .heading_group .title_background,
html body.page-template-recruit .heading_group .title_background,
html body.page-template-templatescompare-php .heading_group .title_background,
html body.page-template-installment_estimate .heading_group .title_background,
html body.page-template-templatesinstallment_estimate-php .heading_group .title_background,
html body.page-template-content .heading_group .title_background,
html body.page-template-templatescontent-php .heading_group .title_background,
html body.single-product_xe .heading_group .title_background,
html body.single-product .heading_group .title_background,
html body.single-service .heading_group .title_background,
html body.single-post .heading_group .title_background,
html body.blog .heading_group .title_background,
html body.category .heading_group .title_background,
html body.tax-loai_xe .heading_group .title_background,
html body section.home_2 .title_background,
html body section.home_3 .title_background,
html body section.home_4 .title_background,
html body section.home_6 .title_background,
html body section.home_8 .title_background,
html body .why_choose_sec .title_background,
html body .services_page .title_background,
html body .product_details_5 .title_background,
html body section.product_details_11 .title_background,
html body section.about_1 .title_background,
html body section.about_2 .title_background,
html body section.about_3 .title_background,
html body section.service_details_1 .title_background {
	opacity: var(--fc-wm-opacity, 0.4) !important;
	font-family: "SFU Eurostile Extended", "Google Sans", sans-serif !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	background: var(--fc-wm-stroke) !important;
	background-image: var(--fc-wm-stroke) !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	-webkit-text-stroke: 5px transparent !important;
	color: var(--fc-wm-fill) !important;
	-webkit-text-fill-color: var(--fc-wm-fill) !important;
	pointer-events: none !important;
	user-select: none !important;
	/* Full content — never clip */
	overflow: visible !important;
	text-overflow: clip !important;
	white-space: nowrap !important;
	max-width: none !important;
}

/* Default: centered ABOVE title */
html body .heading_group .title_background,
html body .title_background {
	font-size: clamp(2.8rem, 6.2vw, 5.208rem) !important;
	line-height: 0.92 !important;
	width: max-content !important;
	max-width: none !important;
	text-align: center;
	position: absolute !important;
	left: 50% !important;
	right: auto !important;
	/* Cao hơn tiêu đề */
	top: 0 !important;
	bottom: auto !important;
	transform: translate(-50%, -34%) !important;
	transform-origin: center top !important;
	z-index: 0 !important;
}

.heading_group.text_center .title_background,
.heading_group.text_center .sec_title {
	margin-left: auto;
	margin-right: auto;
}

html body .heading_group.color_2 .title_background {
	color: var(--fc-wm-fill) !important;
	-webkit-text-fill-color: var(--fc-wm-fill) !important;
	background: var(--fc-wm-stroke) !important;
	background-image: var(--fc-wm-stroke) !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	-webkit-text-stroke: 5px transparent !important;
	opacity: var(--fc-wm-opacity, 0.4) !important;
}

/* home_4 vertical watermark — keep rotate, soft opacity */
html body.home .home_4 .heading_group .title_background,
html body.home .home_4 .title_background,
html body.page-template-home .home_4 .title_background,
html body.page-template-templateshome-php .home_4 .title_background {
	left: auto !important;
	right: 100% !important;
	width: max-content !important;
	max-width: none !important;
	text-align: left !important;
	transform: rotate(-90deg) translateX(12%) !important;
	transform-origin: 100% 100% !important;
	z-index: 0 !important;
	top: 0 !important;
	font-size: clamp(2.5rem, 4.5vw, 4.5rem) !important;
	line-height: 1 !important;
	opacity: 0.36 !important;
	-webkit-text-stroke: 4px transparent !important;
	color: var(--fc-wm-fill) !important;
	-webkit-text-fill-color: var(--fc-wm-fill) !important;
	background: var(--fc-wm-stroke) !important;
	background-image: var(--fc-wm-stroke) !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	overflow: visible !important;
	white-space: nowrap !important;
}

/* Soft reassert home sections */
html body.home #main .heading_group .title_background,
html body.page-template-home #main .heading_group .title_background {
	opacity: var(--fc-wm-opacity, 0.4) !important;
	overflow: visible !important;
	white-space: nowrap !important;
	max-width: none !important;
	width: max-content !important;
}

html body.page-template-services .services_page .heading_group .title_background,
html body.page-template-templatesservices-php .services_page .heading_group .title_background,
html body.single-service .service_details_1 .heading_group .title_background {
	opacity: var(--fc-wm-opacity, 0.4) !important;
	overflow: visible !important;
	white-space: nowrap !important;
}

/* Dark carbon band */
html body section.product_details_11 .title_background,
html body.single-product_xe section.product_details_11 .title_background,
html body.single-product section.product_details_11 .title_background {
	color: #2d2f37 !important;
	-webkit-text-fill-color: #2d2f37 !important;
	opacity: 0.45 !important;
}

@media only screen and (max-width: 1279px) {
	.heading_group {
		padding-top: 1.95rem !important;
	}
	html body .heading_group .title_background {
		font-size: clamp(2.2rem, 8vw, 3.75rem) !important;
		-webkit-text-stroke: 4px transparent !important;
		transform: translate(-50%, -31%) !important;
	}
}

@media only screen and (max-width: 849px) {
	.heading_group {
		padding-top: 1.55rem !important;
	}
	html body .heading_group .title_background {
		font-size: clamp(1.85rem, 9vw, 2.5rem) !important;
		line-height: 1 !important;
		-webkit-text-stroke: 3px transparent !important;
		transform: translate(-50%, -28%) !important;
		opacity: 0.34 !important;
	}
	html body.home .home_4 .heading_group .title_background,
	html body.home .home_4 .title_background {
		left: 50% !important;
		right: auto !important;
		transform: translate(-50%, -32%) !important;
		transform-origin: center !important;
		font-size: clamp(1.85rem, 9vw, 2.5rem) !important;
		text-align: center !important;
	}
}

@media only screen and (max-width: 575px) {
	.heading_group {
		padding-top: 1.35rem !important;
	}
	html body .heading_group .title_background {
		font-size: clamp(1.5rem, 11vw, 2rem) !important;
		-webkit-text-stroke: 2.5px transparent !important;
		transform: translate(-50%, -26%) !important;
		opacity: 0.3 !important;
	}
}
