/* =========================================================================
 * X3SALES DV Process — element vhm_thm_proc
 * Khối "Quy trình làm việc": ảnh nền tối phủ lớp màu, tiêu đề + gạch trang trí,
 * ảnh minh hoạ, hộp trắng chứa các bước (icon + tiêu đề + mô tả) và nút CTA.
 * Dựng bằng flex/grid (responsive) thay cho absolute px của bản gốc.
 * Màu/ảnh đổ qua --thm-proc-* trên thẻ gốc. Scope dưới .thm-proc.
 * ========================================================================= */

@font-face {
	font-family: "THM Megante";
	src: url("https://w.ladicdn.com/5dadc2a03bf9ab4ea2cc8ccb/svn-megante-20231018093528-hgdbo.otf");
	font-display: swap;
}

.thm-proc,
.thm-proc * {
	box-sizing: border-box;
}

.thm-proc {
	position: relative;
	width: 100%;
	padding: 50px 15px 60px;
	background-image: var(--thm-proc-bg, none);
	background-size: cover;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	overflow: hidden;
}

.thm-proc__overlay {
	position: absolute;
	inset: 0;
	background-color: var(--thm-proc-overlay, #264b9c);
	opacity: 0.8;
	pointer-events: none;
}

.thm-proc__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

/* -------- Tiêu đề -------- */
.thm-proc__head {
	margin-bottom: 30px;
	text-align: center;
}

.thm-proc__title {
	margin: 0;
	font-family: "THM Megante", Arial, sans-serif;
	font-weight: bold;
	font-size: 30px;
	line-height: 1.4;
	color: #ffffff;
	text-transform: uppercase;
	animation: thmFadeInDown 1s ease 0s 1;
}

.thm-proc__bracket {
	display: block;
	width: 121px;
	height: 2px;
	margin: 12px auto 0;
	background-color: #ffffff;
}

/* -------- Ảnh minh hoạ + hộp phủ -------- */
.thm-proc__stage {
	position: relative;
	width: 100%;
}

.thm-proc__stage--with-photo {
	display: grid;
}

.thm-proc__stage--with-photo > .thm-proc__photo,
.thm-proc__stage--with-photo > .thm-proc__box {
	grid-area: 1 / 1;
}

.thm-proc__stage--with-photo > .thm-proc__photo {
	height: 100%;
	min-height: 100%;
}

.thm-proc__photo {
	position: relative;
	z-index: 0;
	width: 100%;
	margin: 0;
	aspect-ratio: 1200 / 780;
	overflow: hidden;
}

.thm-proc__photo-bg {
	position: absolute;
	inset: 0;
	background-image: var(--thm-proc-photo, none);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
}

/* -------- Hộp trắng chứa các bước -------- */
.thm-proc__box {
	position: relative;
	padding: 40px 30px;
	z-index: 1;
}

.thm-proc__stage--with-photo > .thm-proc__box {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: clamp(28px, 4vw, 50px) clamp(18px, 5vw, 72px);
	padding: clamp(28px, 4vw, 46px) clamp(18px, 4vw, 44px);
}

.thm-proc__box-bg {
	position: absolute;
	inset: 0;
	background-color: var(--thm-proc-box, #ffffff);
	border: 1.5px solid rgba(163, 133, 78, 0.9);
	opacity: 0.92;
}

.thm-proc__steps {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px 24px;
	width: 100%;
}

/* -------- Một bước -------- */
.thm-proc__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.thm-proc__step-icon {
	position: relative;
	width: 77px;
	height: 77px;
	margin-bottom: 16px;
	flex: 0 0 auto;
}

.thm-proc__step-icon-box {
	position: absolute;
	inset: 0;
	border: 2px solid var(--thm-proc-icon, #000000);
	border-radius: 10px;
}

.thm-proc__step-icon-svg {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	bottom: 12px;
}

.thm-proc__step-icon-svg svg {
	display: block;
	width: 100%;
	height: 100%;
	/* CSS thắng thuộc tính fill nội tuyến của SVG → đổi màu icon qua biến. */
	fill: var(--thm-proc-icon, #000000);
}

.thm-proc__step-icon-svg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.thm-proc__step-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: bold;
	line-height: 1.5;
	color: #000000;
}

.thm-proc__step-desc {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: #000000;
}

@media (min-width: 992px) {
	.thm-proc__steps {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.thm-proc__step {
		grid-column: span 2;
	}

	.thm-proc__step:nth-child(3n + 1):last-child {
		grid-column: 3 / span 2;
	}

	.thm-proc__step:nth-child(3n + 1):nth-last-child(2) {
		grid-column: 2 / span 2;
	}
}

/* -------- Nút CTA -------- */
.thm-proc__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 281px;
	max-width: 100%;
	min-height: 44px;
	margin: 36px auto 0;
	padding: 10px 18px;
	background-color: var(--thm-proc-btn, #e00101);
	color: #ffffff;
	font-size: 14px;
	font-weight: bold;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.15s linear, opacity 0.15s linear;
}

.thm-proc__btn:hover {
	color: #ffffff;
	opacity: 0.92;
}

.thm-proc__btn:active {
	transform: translateY(2px);
}

@keyframes thmFadeInDown {
	0% { opacity: 0; transform: translateY(-20px); }
	100% { opacity: 1; transform: translateY(0); }
}

/* -------- Tablet (< 992px): 2 cột -------- */
@media (max-width: 991px) {
	.thm-proc__steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.thm-proc__photo {
		aspect-ratio: 4 / 3;
	}
}

/* -------- Mobile (< 600px): 1 cột -------- */
@media (max-width: 599px) {
	.thm-proc__title {
		font-size: 25px;
	}

	.thm-proc__bracket {
		width: 63px;
	}

	.thm-proc__steps {
		grid-template-columns: 1fr;
	}

	.thm-proc__box {
		padding: 28px 18px;
	}

	.thm-proc__stage--with-photo > .thm-proc__box {
		margin: 18px 14px;
		padding: 28px 18px;
	}

	.thm-proc__step-title {
		font-size: 17px;
	}

	.thm-proc__step-desc {
		font-size: 15px;
	}

	.thm-proc__photo {
		aspect-ratio: 3 / 4;
	}
}

/* -------------------------------------------------------------------------
 * Chế độ UX Builder ("chip viền builder"): các bước hiện thành chip CÓ VIỀN
 * trong hộp để người dùng dễ nhìn/kéo-thả/sửa. Frontend giữ layout thật.
 * ---------------------------------------------------------------------- */
.thm-proc__builder-items {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.thm-proc__builder-note {
	margin: 0;
	color: #333;
	font-size: 13px;
	font-style: italic;
	opacity: 0.85;
}

.thm-proc__b-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 14px;
	border: 1px dashed rgba(0, 0, 0, 0.35);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.6);
	color: #111;
}

.thm-proc__b-icon {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.thm-proc__b-icon svg {
	width: 100%;
	height: 100%;
	fill: #111;
}

.thm-proc__b-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.thm-proc__b-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.thm-proc__b-tag {
	align-self: flex-start;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--fs-color-primary, #264b9c);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.thm-proc__b-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

.thm-proc__b-desc {
	font-size: 13px;
	line-height: 1.5;
	color: #444;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
