/* =========================================================================
 * X3SALES DV Clients — element vhm_thm_clients
 * Khối "Khách hàng tiêu biểu": ảnh nền tối + lớp phủ màu, tiêu đề, lưới logo.
 * Lưới bằng CSS grid (responsive) thay absolute px. Màu/ảnh đổ qua --thm-clients-*.
 * Scope dưới .thm-clients.
 * ========================================================================= */

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

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

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

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

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

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

.thm-clients__title {
	margin: 0;
	font-family: "THM Megante", Arial, sans-serif;
	font-weight: bold;
	font-size: 30px;
	line-height: 1.6;
	color: var(--thm-clients-title, #ffffff);
	text-transform: uppercase;
	text-align: center;
	animation: thmFadeInDown 1s ease 0s 1;
}

.thm-clients__bracket {
	display: block;
	width: 121px;
	height: 2px;
	margin: 10px auto 0;
	background-color: var(--thm-clients-title, #ffffff);
}

/* -------- Lưới logo -------- */
.thm-clients__grid {
	display: grid;
	grid-template-columns: repeat(var(--thm-clients-cols, 4), 1fr);
	gap: 11px;
}

.thm-clients__logo {
	display: block;
	aspect-ratio: 292 / 122;
	border-radius: 6px;
	overflow: hidden;
}

.thm-clients__logo-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

/* -------- Tablet (≤ 991px): 3 cột -------- */
@media (max-width: 991px) {
	.thm-clients__title {
		font-size: 25px;
	}

	.thm-clients__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* -------- Mobile (≤ 575px): 2 cột -------- */
@media (max-width: 575px) {
	.thm-clients__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* -------------------------------------------------------------------------
 * Chế độ UX Builder ("chip viền builder"): logo hiện thành chip CÓ VIỀN
 * (thumbnail) để dễ nhìn/kéo-thả/sửa. Frontend giữ lưới thật.
 * ---------------------------------------------------------------------- */
.thm-clients__builder-note {
	margin: 0 0 14px;
	color: #fff;
	font-size: 13px;
	font-style: italic;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.thm-clients__builder-items {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.thm-clients__b-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 160px;
	padding: 10px;
	border: 1px dashed rgba(255, 255, 255, 0.85);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: #111;
}

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

.thm-clients__b-thumb {
	width: 100%;
	aspect-ratio: 292 / 122;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
	border-radius: 4px;
}

.thm-clients__b-text {
	width: 100%;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
