/*
	Theme Name: TFan
	Theme URI: https://example.com
	Description: Child theme của Hello Elementor cho TFan. Tùy chỉnh tại đây mà không ảnh hưởng theme gốc.
	Author: Công Ty TNHH Xuất Nhập Khẩu T.Power
	Author URI: https://example.com
	Template: hello-elementor
	Version: 1.0.0
	Requires at least: 6.0
	Tested up to: 6.8
	Requires PHP: 7.4
	License: GNU General Public License v3 or later.
	License URI: https://www.gnu.org/licenses/gpl-3.0.html
	Text Domain: hello-elementor-child
*/

/* ==========================================================================
   Thêm CSS tùy chỉnh của bạn bên dưới
   ========================================================================== */

/* --------------------------------------------------------------------------
   .product-content-custom – Định dạng thẻ tiêu đề h1–h6
   -------------------------------------------------------------------------- */
.product-content-custom h1,
.product-content-custom h2,
.product-content-custom h3,
.product-content-custom h4,
.product-content-custom h5,
.product-content-custom h6 {
	margin: 0 0 0.5em;
	font-weight: 600;
	line-height: 1.3;
	color: #222;
}

.product-content-custom h1 {
	font-size: 1.75rem;
	margin-bottom: 0.6em;
}

.product-content-custom h2 {
	font-size: 1.5rem;
	margin-bottom: 0.55em;
}

.product-content-custom h3 {
	font-size: 1.25rem;
	margin-bottom: 0.5em;
}

.product-content-custom h4 {
	font-size: 1.125rem;
	margin-bottom: 0.45em;
}

.product-content-custom h5 {
	font-size: 1rem;
	margin-bottom: 0.4em;
}

.product-content-custom h6 {
	font-size: 0.875rem;
	margin-bottom: 0.35em;
}

/* Khoảng cách phía trên khi tiêu đề không phải phần tử đầu tiên */
.product-content-custom h1:not(:first-child),
.product-content-custom h2:not(:first-child),
.product-content-custom h3:not(:first-child),
.product-content-custom h4:not(:first-child),
.product-content-custom h5:not(:first-child),
.product-content-custom h6:not(:first-child) {
	margin-top: 1em;
}

/* --------------------------------------------------------------------------
   .product-seo-content & Single Post – Định dạng bài viết chuẩn SEO & Hài hòa
   (Cô lập 100% bên trong vùng nội dung bài viết - KHÔNG ảnh hưởng Footer hay Header)
   -------------------------------------------------------------------------- */

/* Tiêu đề chính H1 và Background Hero Banner trên Single Post */
.elementor-183 > .elementor-top-section:first-child,
div[data-elementor-type="single-post"] > .elementor-top-section:first-child,
.elementor-element-4556d363 {
	background-position: center center !important;
	background-size: cover !important;
	background-repeat: no-repeat !important;
}

body.single-post h1.elementor-heading-title {
	font-size: clamp(20px, 2.8vw, 30px) !important;
	line-height: 1.35 !important;
	font-weight: 700 !important;
	max-width: 960px !important;
	margin: 0 auto !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Nội dung bài viết chi tiết */
.product-seo-content,
.elementor-widget-theme-post-content {
	line-height: 1.75;
	color: #334155;
	font-size: 15.5px;
}

.elementor-widget-theme-post-content p,
.product-seo-content p {
	font-size: 15.5px !important;
	line-height: 1.75 !important;
	color: #334155 !important;
	margin-bottom: 1.15em !important;
}

.elementor-widget-theme-post-content strong,
.elementor-widget-theme-post-content b,
.product-seo-content strong,
.product-seo-content b {
	font-weight: 700 !important;
	color: #0f172a !important;
}

/* Headings H2 trong nội dung bài viết */
.elementor-widget-theme-post-content h2,
.product-seo-content h2 {
	font-size: 1.35rem !important;
	font-weight: 700 !important;
	color: #1835c3 !important;
	margin: 1.8em 0 0.6em !important;
	padding-bottom: 8px !important;
	border-bottom: 2px solid #e2e8f0 !important;
	position: relative !important;
	line-height: 1.4 !important;
}

.elementor-widget-theme-post-content h2::after,
.product-seo-content h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 45px;
	height: 2px;
	background: #f65723;
}

/* Headings H3 trong bài viết */
.elementor-widget-theme-post-content h3,
.product-seo-content h3 {
	font-size: 1.15rem !important;
	font-weight: 600 !important;
	color: #1e293b !important;
	margin: 1.4em 0 0.5em !important;
	line-height: 1.45 !important;
}

/* Headings H4 trong bài viết */
.elementor-widget-theme-post-content h4,
.product-seo-content h4 {
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	color: #334155 !important;
	margin: 1.2em 0 0.4em !important;
}

/* Lists */
.elementor-widget-theme-post-content ul,
.elementor-widget-theme-post-content ol,
.product-seo-content ul,
.product-seo-content ol {
	margin: 0.5em 0 1.2em 1.6em !important;
	padding: 0 !important;
}

.elementor-widget-theme-post-content li,
.product-seo-content li {
	font-size: 15.5px !important;
	margin-bottom: 0.45em !important;
	line-height: 1.7 !important;
	color: #334155 !important;
}

/* Links in content (loại trừ button & cta-btn) */
.elementor-widget-theme-post-content p a,
.elementor-widget-theme-post-content li a,
.elementor-widget-theme-post-content td a,
.product-seo-content p a,
.product-seo-content li a,
.product-seo-content td a {
	color: #1835c3 !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	transition: all 0.2s ease !important;
}

.elementor-widget-theme-post-content p a:hover,
.elementor-widget-theme-post-content li a:hover,
.elementor-widget-theme-post-content td a:hover,
.product-seo-content p a:hover,
.product-seo-content li a:hover,
.product-seo-content td a:hover {
	color: #f65723 !important;
	text-decoration: underline !important;
}

/* Blockquote / Ví Dụ Tính Toán */
.elementor-widget-theme-post-content blockquote,
.elementor-widget-theme-post-content .wp-block-quote,
.product-seo-content blockquote {
	background: linear-gradient(to right, #eff6ff 0%, #f8fafc 100%) !important;
	border-left: 4px solid #1835c3 !important;
	border-radius: 0 10px 10px 0 !important;
	padding: 16px 22px !important;
	margin: 1.5em 0 !important;
	color: #1e293b !important;
	font-style: normal !important;
	box-shadow: 0 2px 8px rgba(24, 53, 195, 0.04) !important;
}

.elementor-widget-theme-post-content blockquote p,
.elementor-widget-theme-post-content .wp-block-quote p {
	font-size: 15px !important;
	line-height: 1.7 !important;
	color: #1e293b !important;
	margin-bottom: 0.4em !important;
}

.elementor-widget-theme-post-content code,
.product-seo-content code {
	background: #e2e8f0;
	color: #0f172a;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
	font-family: Consolas, Monaco, monospace;
}

/* Bảng thông số kỹ thuật (Gutenberg & HTML Table - 100% hiển thị không cuộn ngang) */
.elementor-widget-theme-post-content .wp-block-table,
.product-seo-content .vdc-category-description__table-wrap {
	width: 100% !important;
	max-width: 100% !important;
	overflow: hidden !important;
	margin: 1.4em 0 1.6em !important;
	border-radius: 8px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
	border: 1px solid #e2e8f0 !important;
}

.elementor-widget-theme-post-content .wp-block-table table,
.product-seo-content table {
	width: 100% !important;
	table-layout: fixed !important;
	border-collapse: collapse !important;
	font-size: 13.5px !important;
	text-align: left !important;
	background: #fff !important;
	margin: 0 !important;
}

.elementor-widget-theme-post-content .wp-block-table th,
.product-seo-content th {
	background: #1835c3 !important;
	color: #ffffff !important;
	font-weight: 600 !important;
	padding: 10px 8px !important;
	border: 1px solid #132a9e !important;
	font-size: 13.5px !important;
	line-height: 1.35 !important;
	white-space: normal !important;
	text-align: center !important;
}

.elementor-widget-theme-post-content .wp-block-table td,
.product-seo-content td {
	padding: 8px 8px !important;
	border: 1px solid #e2e8f0 !important;
	color: #334155 !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	white-space: normal !important;
	word-break: normal !important;
}

.elementor-widget-theme-post-content .wp-block-table tr:nth-child(even) td,
.product-seo-content tr:nth-child(even) td {
	background: #f8fafc !important;
}

.elementor-widget-theme-post-content .wp-block-table tr:hover td,
.product-seo-content tr:hover td {
	background: #eef2ff !important;
}

/* FAQ Accordion Details */
.elementor-widget-theme-post-content .wp-block-details,
.elementor-widget-theme-post-content details,
.product-seo-content details {
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 8px !important;
	padding: 13px 18px !important;
	margin-bottom: 10px !important;
	transition: all 0.2s ease !important;
}

.elementor-widget-theme-post-content .wp-block-details[open],
.elementor-widget-theme-post-content details[open],
.product-seo-content details[open] {
	background: #ffffff !important;
	border-color: #1835c3 !important;
	box-shadow: 0 2px 8px rgba(24, 53, 195, 0.1) !important;
}

.elementor-widget-theme-post-content .wp-block-details summary,
.elementor-widget-theme-post-content summary,
.product-seo-content summary {
	font-weight: 600 !important;
	font-size: 15px !important;
	color: #1e293b !important;
	cursor: pointer !important;
	outline: none !important;
	user-select: none !important;
	display: list-item !important;
}

.elementor-widget-theme-post-content .wp-block-details[open] summary,
.elementor-widget-theme-post-content details[open] summary,
.product-seo-content details[open] summary {
	color: #1835c3 !important;
	margin-bottom: 8px !important;
	padding-bottom: 6px !important;
	border-bottom: 1px solid #f1f5f9 !important;
}

.elementor-widget-theme-post-content .wp-block-details p,
.elementor-widget-theme-post-content details p {
	font-size: 14.5px !important;
	color: #475569 !important;
	line-height: 1.65 !important;
	margin-top: 6px !important;
	margin-bottom: 0 !important;
}

/* Khung CTA Báo Giá Dự Án Nâng Cao (Trong Bài Viết & Sản Phẩm) */
.elementor-widget-theme-post-content .vdc-category-description__cta,
.product-seo-content .vdc-category-description__cta {
	background: linear-gradient(135deg, #1835c3 0%, #0d1e70 100%) !important;
	color: #ffffff !important;
	padding: 24px 28px !important;
	border-radius: 12px !important;
	margin: 2em 0 1.5em !important;
	text-align: center !important;
	box-shadow: 0 4px 16px rgba(24, 53, 195, 0.2) !important;
}

.elementor-widget-theme-post-content .vdc-category-description__cta h4,
.product-seo-content .vdc-category-description__cta h4 {
	color: #ffd166 !important;
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	margin: 0 0 8px !important;
	border: none !important;
	padding: 0 !important;
}
.elementor-widget-theme-post-content .vdc-category-description__cta h4::after,
.product-seo-content .vdc-category-description__cta h4::after {
	display: none !important;
}

.elementor-widget-theme-post-content .vdc-category-description__cta p,
.product-seo-content .vdc-category-description__cta p {
	color: #f1f5f9 !important;
	font-size: 15px !important;
	margin: 0 0 16px !important;
}

.elementor-widget-theme-post-content .vdc-category-description__cta-btn,
.product-seo-content .vdc-category-description__cta-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #f65723 !important;
	color: #ffffff !important;
	padding: 11px 30px !important;
	border-radius: 50px !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(246, 87, 35, 0.35) !important;
	transition: all 0.25s ease !important;
}

.elementor-widget-theme-post-content .vdc-category-description__cta-btn:hover,
.product-seo-content .vdc-category-description__cta-btn:hover {
	background: #e04412 !important;
	color: #ffffff !important;
	text-decoration: none !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 18px rgba(246, 87, 35, 0.45) !important;
}

/* Mục lục bài viết (.vdc-toc) */
.vdc-toc {
	margin: 0 0 24px !important;
	padding: 18px 22px !important;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 10px !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.vdc-toc__title {
	margin: 0 0 10px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	color: #1835c3 !important;
	padding-bottom: 8px !important;
	border-bottom: 1.5px solid #e2e8f0 !important;
}

.vdc-toc__item {
	margin: 0 0 6px !important;
	line-height: 1.5 !important;
}

.vdc-toc__link {
	color: #475569 !important;
	font-size: 14.5px !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
}

.vdc-toc__link:hover {
	color: #1835c3 !important;
	font-weight: 600 !important;
}

.vdc-toc__item--h3 {
	padding-left: 18px !important;
	font-size: 13.5px !important;
	color: #64748b !important;
}


