/* ============================================================
 * TRUEVIEW — Brand Palette A (Industrial Premium)
 * Locked in 2026-05-15.
 *
 * Strategy:
 *   1. CSS custom properties tại :root — single source of truth.
 *   2. Override Flatsome có chọn lọc (header / megamenu / button primary / link).
 *   3. Utility classes mới cho component Phase A/B/C: .tv-section-dark,
 *      .tv-stats-bar, .tv-trust-strip, .tv-hero-dark, .tv-cta-primary, .tv-cta-ghost.
 *   4. KHÔNG đụng tới class inline color/background trong các UX Builder page
 *      đang chạy (Tony chỉnh lại sau theo từng trang).
 * ============================================================ */

:root {
	--tv-primary:        #0F172A;  /* navy gần đen — chủ đạo */
	--tv-primary-90:     #1E293B;  /* slate đậm — surface dark phụ */
	--tv-primary-80:     #334155;  /* slate trung */
	--tv-surface:        #F8FAFC;  /* trắng ngà — background sáng */
	--tv-surface-100:    #F1F5F9;
	--tv-border:         #E2E8F0;
	--tv-text:           #0F172A;
	--tv-text-2:         #475569;
	--tv-text-3:         #64748B;
	--tv-text-on-dark:   #F8FAFC;
	--tv-text-on-dark-2: rgba(248, 250, 252, 0.78);

	--tv-brand-blue:     #0063b2;  /* link, secondary action — xanh Flatsome (chốt 2026-07-11) */
	--tv-brand-blue-90:  #004E8C;
	--tv-accent:         #ED1C24;  /* CTA + badge "Hot/Mới" — ~5% diện tích */
	--tv-accent-90:      #C81020;

	--tv-success:        #16A34A;
	--tv-warning:        #F59E0B;

	--tv-radius:         8px;
	--tv-radius-lg:      12px;
	--tv-radius-pill:    99px;
	--tv-shadow-1:       0 1px 3px rgba(15, 23, 42, .06);
	--tv-shadow-2:       0 4px 12px rgba(15, 23, 42, .08);
	--tv-shadow-3:       0 12px 32px rgba(15, 23, 42, .12);

	--tv-font-body:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================
 * 1. FLATSOME HEADER OVERRIDE
 *    Header chuyển sang navy đen. Logo + nav text trắng.
 * ============================================================ */

#header,
.header-wrapper,
.header-main {
	background-color: var(--tv-primary) !important;
}
#header .header-bottom,
#header .header-top {
	background-color: var(--tv-primary) !important;
}

/* Nav text trắng */
#header .nav > li > a,
#header .header-nav > li > a {
	color: var(--tv-text-on-dark) !important;
}
#header .nav > li > a:hover,
#header .nav > li.active > a,
#header .nav > li.current-menu-item > a {
	color: #ffffff !important;
}

/* Mega menu — đổi từ blue #044E9F (cũ) sang navy đen */
#mega-menu-wrap,
.mega-sub-menu {
	background-color: var(--tv-primary) !important;
}
.mega-sub-menu a {
	color: var(--tv-text-on-dark-2) !important;
}
.mega-sub-menu a:hover {
	color: #ffffff !important;
}

/* Underline indicator của Flatsome — đổi sang accent đỏ */
.nav-line-bottom > li > a:before,
.nav-line > li > a:before,
.nav-line-grow > li > a:before {
	background-color: var(--tv-accent) !important;
	height: 3px !important;
}

/* Header icon (search, account, cart) — chuyển trắng */
#header .header-button > .button.is-outline,
#header .header-button > .icon,
#header .nav-icon {
	color: var(--tv-text-on-dark) !important;
}

/* Logo TRUEVIEW → trắng trên header navy (wordmark 1 màu → white) */
#logo img,
.header-main #logo img,
.stuck #logo img {
	filter: brightness(0) invert(1);
}

/* ============================================================
 * 2. BUTTON STYLES — primary đỏ accent, secondary navy outline
 *    KHÔNG đụng .button.is-link / .button.is-outline (Flatsome variants).
 * ============================================================ */

.tv-cta-primary,
.button.tv-primary,
.button.primary:not(.is-underline):not(.is-link):not(.is-outline) {
	background-color: var(--tv-accent) !important;
	color: #ffffff !important;
	border: 0;
	border-radius: var(--tv-radius-pill);
	padding: 12px 32px;
	font-weight: 600;
	font-size: 1rem;
	box-shadow: 0 4px 12px rgba(237, 28, 36, .25);
	transition: transform .15s, box-shadow .15s, background-color .15s;
}
.tv-cta-primary:hover,
.button.tv-primary:hover,
.button.primary:not(.is-underline):not(.is-link):not(.is-outline):hover {
	background-color: var(--tv-accent-90) !important;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(237, 28, 36, .35);
}

/* Biến thể nhẹ của Flatsome (underline/link) — dùng xanh primary #0063b2, KHÔNG đỏ */
.button.primary.is-underline,
.button.primary.is-link {
	color: var(--tv-brand-blue) !important;
	background: transparent !important;
	box-shadow: none !important;
}

.tv-cta-ghost,
.button.tv-ghost {
	background-color: transparent !important;
	color: var(--tv-text-on-dark) !important;
	border: 2px solid rgba(248, 250, 252, .6) !important;
	border-radius: var(--tv-radius-pill);
	padding: 10px 30px;
	font-weight: 600;
	transition: background .15s, border-color .15s;
}
.tv-cta-ghost:hover,
.button.tv-ghost:hover {
	background-color: rgba(248, 250, 252, .12) !important;
	border-color: rgba(248, 250, 252, .9) !important;
	color: #ffffff !important;
}

/* Light variant cho trang nền trắng */
.tv-cta-ghost--light {
	color: var(--tv-primary) !important;
	border-color: var(--tv-border) !important;
}
.tv-cta-ghost--light:hover {
	background-color: var(--tv-surface-100) !important;
	border-color: var(--tv-primary) !important;
}

/* ============================================================
 * 3. LINK COLOR — brand blue (giữ recognizable cho khách hàng cũ)
 * ============================================================ */

a {
	color: var(--tv-brand-blue);
}
a:hover {
	color: var(--tv-brand-blue-90);
}

/* Trừ .button, các nav link, và link trong dark sections */
.tv-section-dark a:not(.button),
.tv-section-dark .entry-content a {
	color: #93C5FD;
}
.tv-section-dark a:not(.button):hover {
	color: #DBEAFE;
}

/* ============================================================
 * 4. SECTION DARK — utility cho hero, trust strip, footer
 * ============================================================ */

.tv-section-dark {
	background-color: var(--tv-primary);
	color: var(--tv-text-on-dark);
}
.tv-section-dark h1,
.tv-section-dark h2,
.tv-section-dark h3,
.tv-section-dark h4 {
	color: #ffffff;
}
.tv-section-dark p,
.tv-section-dark li {
	color: var(--tv-text-on-dark-2);
}

/* ============================================================
 * 5. HERO DARK — dùng trên homepage Phase C
 * ============================================================ */

.tv-hero-dark {
	background-color: var(--tv-primary);
	color: var(--tv-text-on-dark);
	padding: 80px 0 96px;
	position: relative;
	overflow: hidden;
}
.tv-hero-dark::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at top right, rgba(4, 78, 159, 0.35) 0%, transparent 55%);
	pointer-events: none;
}
.tv-hero-dark__eyebrow {
	display: inline-block;
	padding: 6px 16px;
	background: rgba(237, 28, 36, 0.15);
	color: var(--tv-accent);
	border: 1px solid rgba(237, 28, 36, 0.3);
	border-radius: var(--tv-radius-pill);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
	margin-bottom: 20px;
}
.tv-hero-dark__title {
	font-size: clamp(2rem, 4.5vw, 3.5rem);
	line-height: 1.15;
	font-weight: 700;
	margin: 0 0 20px;
	color: #ffffff;
	max-width: 920px;
}
.tv-hero-dark__title .accent {
	background: linear-gradient(90deg, #ffffff 0%, #93C5FD 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.tv-hero-dark__sub {
	font-size: clamp(1rem, 1.6vw, 1.25rem);
	line-height: 1.6;
	max-width: 720px;
	color: var(--tv-text-on-dark-2);
	margin: 0 0 32px;
}
.tv-hero-dark__actions {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
}

/* ============================================================
 * 6. STATS BAR — TRUEVIEW bằng con số (Phase A6)
 * ============================================================ */

.tv-stats-bar {
	background-color: var(--tv-primary-90);
	color: var(--tv-text-on-dark);
	padding: 48px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tv-stats-bar__inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}
.tv-stats-bar__item {
	text-align: center;
	padding: 0 12px;
}
.tv-stats-bar__num {
	font-size: clamp(2.2rem, 4vw, 3.4rem);
	font-weight: 700;
	line-height: 1;
	color: #ffffff;
	margin: 0 0 8px;
	letter-spacing: -1px;
}
.tv-stats-bar__num .suffix {
	color: var(--tv-accent);
	margin-left: 2px;
}
.tv-stats-bar__label {
	font-size: .9rem;
	font-weight: 500;
	color: var(--tv-text-on-dark-2);
	text-transform: uppercase;
	letter-spacing: .8px;
}
@media (max-width: 768px) {
	.tv-stats-bar__inner {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 16px;
	}
}

/* ============================================================
 * 7. TRUST STRIP FOOTER (Phase A4)
 * ============================================================ */

.tv-trust-strip {
	background-color: var(--tv-primary);
	color: var(--tv-text-on-dark-2);
	padding: 56px 0 24px;
	font-size: .9rem;
}
.tv-trust-strip__grid {
	display: grid;
	grid-template-columns: 2fr 1.2fr 1.2fr 1fr;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}
.tv-trust-strip__col h4 {
	color: #ffffff;
	font-size: .95rem;
	font-weight: 600;
	margin: 0 0 16px;
	text-transform: uppercase;
	letter-spacing: .5px;
}
.tv-trust-strip__col p,
.tv-trust-strip__col li {
	margin: 0 0 8px;
	line-height: 1.6;
	color: var(--tv-text-on-dark-2);
}
.tv-trust-strip__col ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.tv-trust-strip__col a {
	color: var(--tv-text-on-dark-2);
	text-decoration: none;
	transition: color .15s;
}
.tv-trust-strip__col a:hover {
	color: #ffffff;
}
.tv-trust-strip__cert {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.tv-trust-strip__cert img {
	height: 40px;
	width: auto;
	background: rgba(255, 255, 255, 0.05);
	padding: 6px 10px;
	border-radius: 4px;
}
.tv-trust-strip__legal {
	max-width: 1200px;
	margin: 32px auto 0;
	padding: 20px 20px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: .8rem;
	color: rgba(248, 250, 252, .5);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}
@media (max-width: 900px) {
	.tv-trust-strip__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.tv-trust-strip__grid { grid-template-columns: 1fr; }
	.tv-trust-strip__legal { flex-direction: column; align-items: flex-start; }
}

/* Legal bar: logo Bộ Công Thương + menu phụ (gộp từ footer Flatsome cũ) */
.tv-trust-strip__legal-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tv-trust-strip__bct img { height: 44px; width: auto; display: block; background: #fff; border-radius: 4px; padding: 2px 6px; }
.tv-trust-strip__legal-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; }
.tv-trust-strip__legal-menu a { color: rgba(248, 250, 252, .6); text-decoration: none; font-size: .8rem; }
.tv-trust-strip__legal-menu a:hover { color: #fff; }

/* GỘP FOOTER: ẩn footer gốc Flatsome (.absolute-footer) — nội dung đã dời sang trust strip */
.absolute-footer { display: none !important; }

/* ============================================================
 * 8. BADGE "Hot / Mới" — dùng đỏ accent có tính toán
 * ============================================================ */

.tv-badge-hot {
	display: inline-block;
	padding: 3px 10px;
	background: var(--tv-accent);
	color: #ffffff;
	border-radius: var(--tv-radius-pill);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .8px;
	text-transform: uppercase;
	line-height: 1.4;
}

/* ============================================================
 * 9. LIGHTLY DAMPEN OLD RED-DOMINANT CUSTOM CSS
 *    Bớt đỏ ở các icon-home cũ trên homepage (giữ structure, đổi tone).
 * ============================================================ */

.icon-home .col-inner {
	border: 1px solid var(--tv-border) !important;
	border-radius: var(--tv-radius);
	background: #ffffff;
	padding: 16px 18px;
	transition: border-color .15s, box-shadow .15s;
}
.icon-home .col-inner:hover {
	border-color: var(--tv-primary) !important;
	box-shadow: var(--tv-shadow-2);
}

/* ============================================================
 * 10. TYPOGRAPHY POLISH
 * ============================================================ */

h1, h2, h3, h4, h5, h6 {
	color: var(--tv-text);
	font-weight: 700;
	letter-spacing: -0.01em;
}

body {
	color: var(--tv-text);
}

/* Selection */
::selection {
	background: var(--tv-accent);
	color: #ffffff;
}

/* ============================================================
 * 11. CARD "DỰ ÁN MỚI TRIỂN KHAI" (.info-card-1) — refactor
 *     Card sạch: ảnh 3:2 crop đều, bo góc, shadow, hover nâng,
 *     nút xanh primary (không đỏ) ghim đáy để các card thẳng hàng.
 * ============================================================ */
.info-card-1 .box {
	background: #fff;
	border: 1px solid var(--tv-border);
	border-radius: var(--tv-radius-lg);
	overflow: hidden;
	box-shadow: var(--tv-shadow-1);
	transition: transform .18s, box-shadow .18s;
	height: 100%;
	display: flex;
	flex-direction: column;
}
.info-card-1 .box:hover {
	transform: translateY(-4px);
	box-shadow: var(--tv-shadow-3);
}
.info-card-1 .box-image {
	margin: 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}
.info-card-1 .box-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s;
}
.info-card-1 .box:hover .box-image img { transform: scale(1.05); }
.info-card-1 .box-text {
	background: #fff !important;
	padding: 16px 20px 20px !important;
	text-align: left !important;
	flex: 1 1 auto;
	display: flex;
}
.info-card-1 .box-text-inner {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
}
.info-card-1 .box-text h4 {
	font-size: 1.05rem;
	line-height: 1.4;
	margin: 0 0 12px;
	color: var(--tv-text);
}
.info-card-1 .button.primary.is-underline {
	margin: auto 0 0 !important;
	padding: 0 !important;
	font-weight: 600;
	color: var(--tv-brand-blue) !important;
	align-self: flex-start;
}
