/*
 * Component theo Figma (Coolen DS). Section Elementor gắn class qua "CSS Classes"
 * để màu/bo góc lấy từ tokens.css — không gõ hex trong Elementor.
 */

/* ===== Section ===== */
.hs-section {
	padding-top: var(--hs-space-section, 80px);
	padding-bottom: var(--hs-space-section, 80px);
}

.hs-section--head {
	padding-bottom: var(--hs-space-head, 32px);
}

/* Hàng tiếp nối trong cùng khối: không padding trên, khoảng cách hàng = gap lưới. */
.hs-section--tight {
	padding-top: 0;
	padding-bottom: var(--hs-gap, 20px);
}

.hs-section--tight:not(:has(+ .hs-section--tight)) {
	padding-bottom: var(--hs-space-section, 80px);
}

.hs-section--surface {
	background: var(--hs-surface);
}

.hs-section--navy {
	background: var(--hs-navy);
	color: rgba(255, 255, 255, 0.7);
}

.hs-section--navy h1,
.hs-section--navy h2,
.hs-section--navy h3 {
	color: var(--hs-white);
}

.hs-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--hs-primary);
	font-family: var(--hs-font-heading);
	font-weight: 500;
	font-size: var(--hs-fs-label);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.hs-eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentcolor;
}

.hs-section--navy .hs-eyebrow {
	color: var(--hs-accent-on-dark);
}

/* ===== Hero ===== */
.hs-hero {
	min-height: 560px;
	background-color: var(--hs-navy);
	background-size: cover;
	background-position: center;
}

.hs-hero .elementor-slide-heading,
.hs-hero h2 {
	font-family: var(--hs-font-heading);
	font-weight: 700;
	font-size: clamp(34px, 5vw, var(--hs-fs-display));
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: var(--hs-white);
}

.hs-hero .elementor-slide-button {
	border-radius: var(--hs-radius-pill);
	background: var(--hs-primary);
	border-color: var(--hs-primary);
	color: var(--hs-white);
}

/* ===== H1 dưới hero ===== */
.hs-h1-band {
	padding-top: 40px;
	padding-bottom: 8px;
	text-align: center;
}

/* ===== Card (Icon Box Elementor) ===== */
.hs-card .elementor-icon-box-wrapper,
.hs-card.elementor-widget-icon-box .elementor-widget-container {
	height: 100%;
	padding: 28px;
	border-radius: var(--hs-radius-card);
	background: var(--hs-white);
	transition: box-shadow 0.15s ease-out, transform 0.15s ease-out;
}

.hs-card:hover .elementor-icon-box-wrapper {
	box-shadow: var(--hs-shadow);
	transform: translateY(-2px);
}

.hs-card .elementor-icon {
	color: var(--hs-primary);
	font-size: 36px;
}

.hs-card .elementor-icon-box-title {
	font-family: var(--hs-font-heading);
	font-size: var(--hs-fs-h5);
	font-weight: 500;
	color: var(--hs-navy);
}

.hs-card .elementor-icon-box-title a {
	color: inherit;
}

/* ===== Quy trình 4 bước ===== */
.hs-step .elementor-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--hs-primary);
	color: var(--hs-white);
	font-size: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* ===== Accordion FAQ ===== */
.hs-faq .elementor-accordion-item {
	border: 0;
	border-bottom: 1px solid var(--hs-placeholder);
}

.hs-faq .elementor-tab-title {
	font-family: var(--hs-font-heading);
	font-weight: 500;
	color: var(--hs-navy);
}

/* Elementor in line-height 1 theo ID phần tử → câu hỏi 2 dòng dính nhau. */
html body .hs-faq .elementor-tab-title,
html body .hs-faq .elementor-tab-title a {
	line-height: 1.4;
}

/* ===== Khối đặt lịch ===== */
.hs-dat-lich .wpcf7 {
	padding: 32px;
	border-radius: var(--hs-radius-card);
	background: var(--hs-white);
}

.hs-goi-to {
	font-size: var(--hs-fs-h5);
	min-height: var(--hs-btn-h);
}

/* ===== Lưới dịch vụ khác / 404 / search ===== */
.hs-luoi-dv {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* "Trung tâm bảo hành" đủ 1 dòng */
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hs-luoi-dv li {
	margin: 0;
}

.hs-luoi-dv__item {
	display: flex;
	align-items: center;
	min-height: var(--hs-tap);
	padding: 12px 20px;
	border-radius: var(--hs-radius-pill);
	background: var(--hs-surface);
	color: var(--hs-navy);
	font-family: var(--hs-font-heading);
	font-weight: 500;
}

.hs-luoi-dv__item:hover {
	background: var(--hs-primary-tint);
	color: var(--hs-primary);
}

/* ===== Chi nhánh + bản đồ ===== */
.hs-chi-nhanh {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hs-chi-nhanh__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0 0 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--hs-surface);
}

.hs-chi-nhanh__actions {
	margin-top: 8px;
}

.hs-ban-do iframe {
	width: 100%;
	height: 360px;
	border: 0;
	border-radius: var(--hs-radius-card);
}

/* ===== Khối "Gọi ngay" cuối bài ===== */
.hs-goi-cuoi-bai {
	padding: 16px;
	border-radius: 12px;
	background: var(--hs-surface-warm);
	text-align: center;
}

@media (max-width: 767px) {

	.hs-hero {
		min-height: 420px;
	}
}

/* ===== Ghi đè Global Kit của Elementor để dùng token theme (màu/font heading, icon) ===== */
.elementor-widget-heading .elementor-heading-title {
	font-family: var(--hs-font-heading);
	color: var(--hs-navy);
}

.hs-section--navy .elementor-widget-heading .elementor-heading-title {
	color: var(--hs-white);
}

.elementor-widget-text-editor {
	font-family: var(--hs-font-body);
	color: var(--hs-text);
}

.hs-section--navy .elementor-widget-text-editor {
	color: rgba(255, 255, 255, 0.7);
}

.hs-card .elementor-icon,
.hs-card .elementor-icon svg {
	color: var(--hs-primary);
	fill: var(--hs-primary);
}

.hs-step .elementor-icon svg {
	fill: var(--hs-white);
}

/* ===== Logo dạng chữ (khi chưa có file logo) ===== */
#logo a:not(:has(img)) {
	font-family: var(--hs-font-heading);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	color: var(--hs-navy);
}

/* ===================================================================
 * UI polish — kết quả audit 23/09 (tương phản, vùng chạm, form mobile)
 * =================================================================== */

/* Chữ trên nền navy: ≥ 4.5:1 (rule màu body chung không được đè lên). */
html body .hs-section--navy p,
html body .hs-section--navy .elementor-widget-text-editor {
	color: rgba(255, 255, 255, 0.8);
}

/* Link chính sách ở thanh copyright: trước đây cùng màu nền. */
.absolute-footer a,
.absolute-footer .footer-nav a {
	color: var(--hs-text);
}

.absolute-footer a:hover,
.absolute-footer a:focus-visible {
	color: var(--hs-primary);
}

/* Card dịch vụ: cả thẻ là vùng bấm (stretched link) thay vì chỉ tiêu đề 30px. */
.hs-card .elementor-icon-box-wrapper {
	position: relative;
}

.hs-card .elementor-icon-box-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.hs-card:has(a:focus-visible) .elementor-icon-box-wrapper {
	outline: 2px solid var(--hs-primary);
	outline-offset: 2px;
}

.hs-card .elementor-icon-box-title a:focus-visible {
	outline: none;
}

/* Icon tìm kiếm: vùng chạm 44×44. */
.header-search > a,
.header-search-lightbox > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
}

/* Nút nhỏ trong danh sách chi nhánh: đủ vùng chạm. */
.hs-chi-nhanh .button {
	min-height: 44px;
	font-size: 14px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

/* H1 SEO dưới hero trang chủ: câu dài → cỡ vừa, không lấn hero. */
.hs-h1-band:not(.hs-section--navy) h1.elementor-heading-title {
	font-size: clamp(24px, 2.4vw, 34px);
	font-weight: 600;
	line-height: 1.3;
}

@media (max-width: 767px) {

	/* Hero mobile: ôm nội dung, không để khoảng trống 500px. */
	.hs-hero {
		min-height: 0;
		padding-top: 56px;
		padding-bottom: 48px;
	}
}

/* Card trắng nằm trong section navy: giữ màu chữ tối (rule chữ sáng của navy không được lọt vào card). */
html body .hs-section--navy .hs-card p,
html body .hs-section--navy .hs-card .elementor-icon-box-description {
	color: var(--hs-text);
}

/* Card cùng hàng cao bằng nhau. */
.elementor-column:has(> .elementor-widget-wrap > .hs-card) > .elementor-widget-wrap,
.hs-card,
.hs-card > .elementor-widget-container {
	height: 100%;
}

/* Hero: tiêu đề ngắt dòng cân (không chữ mồ côi), mô tả 18px như Figma. */
.hs-hero h2.elementor-heading-title {
	max-width: 20ch;
	text-wrap: balance;
}

.hs-hero .elementor-widget-text-editor p {
	max-width: 52ch;
	font-size: var(--hs-fs-title);
}

h1,
h2,
h3 {
	text-wrap: balance;
}

/* Nút phụ Flatsome (không dùng button_radius toàn cục): pill như Figma. */
.hs-chi-nhanh .button,
.button.is-outline,
.button.is-small {
	border-radius: var(--hs-radius-pill);
}

/* ================= Toast thông báo form (inc/cf7.php + assets/js/form.js) ================= */

/* JS bật toast → ẩn khung chữ CF7 dưới nút gửi (không JS thì khung vẫn hiện như cũ). */
.hs-has-toast .wpcf7 form .wpcf7-response-output {
	display: none !important;
}

.hs-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 10000;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: max-content;
	max-width: min(440px, calc(100vw - 32px));
	padding: 12px 8px 12px 16px;
	border-radius: var(--hs-r-12);
	background: var(--hs-navy);
	box-shadow: var(--hs-shadow);
	color: var(--hs-white);
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity 0.2s ease-out, transform 0.2s var(--hs-ease-out, ease-out);
}

.hs-toast.is-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

.hs-toast__icon {
	flex: none;
	width: 8px;
	height: 8px;
	margin-top: 8px;
	border-radius: 50%;
	background: var(--hs-success);
}

.hs-toast--error .hs-toast__icon {
	background: var(--hs-danger-ring-on-dark);
}

html body .hs-toast__text {
	margin: 0;
	color: var(--hs-white);
	font-size: var(--hs-fs-label);
	line-height: 1.5;
}

.hs-toast__close {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-height: 0;
	margin: -4px 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	opacity: 0.8;
}

.hs-toast__close:hover,
.hs-toast__close:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	opacity: 1;
}

@media (max-width: 767px) {

	/* Nằm trên thanh 3 nút (56px) + vùng an toàn iOS. */
	.hs-toast {
		bottom: calc(56px + 8px + env(safe-area-inset-bottom));
		max-width: calc(100vw - 16px);
	}
}

@media (prefers-reduced-motion: reduce) {

	.hs-toast {
		transition: none;
	}
}

/* ================= "Xem thêm" thay phân trang (inc/loadmore.php + assets/js/loadmore.js) ================= */

.hs-loadmore {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	margin: 32px auto 0;
	text-align: center;
}

.hs-loadmore__count {
	margin: 0;
	color: var(--hs-text-muted);
	font-size: var(--hs-fs-label);
}

.hs-loadmore__count b {
	color: var(--hs-navy);
	font-weight: 600;
}

/* Thanh tiến độ mảnh: đã xem bao nhiêu phần. */
.hs-loadmore__bar {
	overflow: hidden;
	width: 200px;
	height: 3px;
	border-radius: 3px;
	background: var(--hs-line);
}

.hs-loadmore__bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--hs-primary);
	transition: width 0.4s var(--hs-ease-out, ease-out);
}

.hs-loadmore__btn {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	min-height: var(--hs-btn-h);
	margin-top: 4px;
	padding: 0 var(--hs-btn-pad);
	border: 1px solid var(--hs-navy);
	border-radius: 9999px;
	color: var(--hs-navy);
	font: 500 var(--hs-fs-label)/1 var(--hs-font-heading);
	text-decoration: none;
	transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.hs-loadmore__btn:hover,
.hs-loadmore__btn:focus-visible {
	background: var(--hs-navy);
	color: var(--hs-white);
}

.hs-loadmore__icon {
	transition: transform 0.2s var(--hs-ease-out, ease-out);
}

.hs-loadmore__btn:hover .hs-loadmore__icon {
	transform: translateY(2px);
}

/* Đang tải: mũi tên thành vòng xoay. */
.hs-loadmore__btn.is-loading {
	pointer-events: none;
	opacity: 0.75;
}

.hs-loadmore__btn.is-loading .hs-loadmore__icon {
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: hs-spin 0.7s linear infinite;
}

.hs-loadmore__btn.is-loading .hs-loadmore__icon path {
	display: none;
}

@keyframes hs-spin {

	to {
		transform: rotate(360deg);
	}
}

/* Khung xương trong lúc tải (cùng ô lưới với thẻ thật). */
.hs-skel {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 8px;
	border-radius: var(--hs-r-16);
	background: var(--hs-white);
	list-style: none;
}

.hs-skel__media,
.hs-skel__line {
	display: block;
	border-radius: 10px;
	background: linear-gradient(90deg, var(--hs-surface) 25%, color-mix(in srgb, var(--hs-surface) 40%, var(--hs-white)) 50%, var(--hs-surface) 75%);
	background-size: 200% 100%;
	animation: hs-shimmer 1.2s ease-in-out infinite;
}

.hs-skel__media {
	aspect-ratio: 4 / 3;
}

.hs-skel__line {
	height: 14px;
}

.hs-skel__line.is-short {
	width: 60%;
}

/* Dạng dòng (kết quả tìm kiếm): ảnh vuông nhỏ bên trái, 2 dòng chữ bên phải. */
.hs-skel--row {
	display: grid;
	grid-template-columns: 56px 1fr;
	grid-template-rows: auto auto;
	gap: 8px 14px;
	align-content: center;
	min-height: 76px;
	padding: 10px;
	border: 1px solid var(--hs-line);
	border-radius: 12px;
}

.hs-skel--row .hs-skel__media {
	grid-row: 1 / 3;
	aspect-ratio: 1;
}

@keyframes hs-shimmer {

	from {
		background-position: 200% 0;
	}

	to {
		background-position: -200% 0;
	}
}

/* Thẻ mới hiện dần. */
.hs-loadmore-in {
	animation: hs-loadmore-in 0.35s var(--hs-ease-out, ease-out) both;
}

@keyframes hs-loadmore-in {

	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (prefers-reduced-motion: reduce) {

	.hs-skel__media,
	.hs-skel__line,
	.hs-loadmore__btn.is-loading .hs-loadmore__icon {
		animation: none;
	}
}

@media (max-width: 849px) {

	.hs-loadmore {
		margin-top: 16px;
	}
}
