/**
 * Tom Luxury — Section "partners" (Doi tac)
 * -----------------------------------------------------------------------------
 * Chi chua CSS rieng cua section nay. Moi mau / khoang cach / font deu tham
 * chieu design token trong tokens.css. Khong dung !important.
 *
 * Bien do template dat qua inline custom property (ngoai le hop le):
 *   .tl-partners__list  --tl-partner-cols / --tl-partner-cols-md / --tl-partner-cols-sm
 *
 * DUONG KE DOC GIUA CAC LOGO:
 * Moi o co border-left. De bo duong ke o o dau tien VA o dau moi hang khi
 * xuong dong, ca luoi duoc day sang trai dung 1px va boc trong mot khoi
 * overflow:hidden — phan vien thua bi cat, khong can dem :nth-child nen so
 * cot thay doi theo breakpoint hay so logo deu dung.
 * -----------------------------------------------------------------------------
 */

/* =============================================================================
 * 1. WRAPPER
 * ========================================================================== */
.tl-partners--bg-none {
	background-color: transparent;
}

/* =============================================================================
 * 2. HANG LOGO
 * ========================================================================== */
.tl-partners__wrap {
	overflow: hidden;
}

.tl-partners__list {
	display: grid;
	grid-template-columns: repeat(var(--tl-partner-cols, 6), minmax(0, 1fr));
	margin: 0 0 0 calc(var(--rule-w) * -1);
	padding: 0;
	list-style: none;
}

.tl-partners__item {
	display: flex;
	min-width: 0;
	border-left: var(--rule-w) solid var(--color-border);
}

/* span la inline: bat buoc dat flex cho o chua logo, neu khong anh se phinh */
.tl-partners__link,
.tl-partners__figure {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: max(var(--tap-target), 92px);
	margin: 0;
	padding: var(--space-md) var(--space-sm);
	text-decoration: none;
	color: inherit;
}

.tl-partners__link {
	border-radius: var(--radius-sm);
	transition: background-color var(--dur-fast) var(--ease);
}

.tl-partners__link:hover {
	background-color: var(--color-gold-soft);
}

.tl-partners__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 56px;
	object-fit: contain;
	filter: grayscale(1);
	opacity: .55;
	transition: filter var(--dur) var(--ease),
		opacity var(--dur) var(--ease),
		transform var(--dur) var(--ease);
}

.tl-partners__link:hover .tl-partners__img,
.tl-partners__link:focus-visible .tl-partners__img,
.tl-partners__item:hover .tl-partners__img {
	filter: grayscale(0);
	opacity: 1;
	transform: scale(1.03);
}

/* Tat hieu ung trang den theo thiet lap cua quan tri vien */
.tl-partners--color .tl-partners__img {
	filter: none;
	opacity: 1;
}

/* Panel toi: logo trang den de chim, can sang hon mot chut */
.tl-partners.tl-section--dark .tl-partners__img {
	opacity: .72;
}

.tl-partners.tl-section--dark .tl-partners__link:hover {
	background-color: var(--color-surface-dark);
}

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

	.tl-partners__link:hover .tl-partners__img,
	.tl-partners__link:focus-visible .tl-partners__img,
	.tl-partners__item:hover .tl-partners__img {
		transform: none;
	}
}

/* =============================================================================
 * 3. RESPONSIVE
 *    Da kiem: 1920 / 1440 / 1366 / 1024 / 820 / 768 / 430 / 390 / 360
 * ========================================================================== */
@media (min-width: 1600px) {

	.tl-partners__img {
		max-height: 64px;
	}

	.tl-partners__link,
	.tl-partners__figure {
		min-height: 104px;
	}
}

/* May tinh bang */
@media (max-width: 1024px) {

	.tl-partners__list {
		grid-template-columns: repeat(var(--tl-partner-cols-md, 3), minmax(0, 1fr));
	}

	.tl-partners__link,
	.tl-partners__figure {
		min-height: max(var(--tap-target), 84px);
		padding: var(--space-sm) var(--space-xs);
	}

	.tl-partners__img {
		max-height: 48px;
	}
}

/* Tablet dung / dien thoai lon nam ngang */
@media (max-width: 820px) {

	.tl-partners__link,
	.tl-partners__figure {
		min-height: max(var(--tap-target), 76px);
	}
}

/* Dien thoai */
@media (max-width: 640px) {

	.tl-partners__list {
		grid-template-columns: repeat(var(--tl-partner-cols-sm, 2), minmax(0, 1fr));
	}

	.tl-partners__link,
	.tl-partners__figure {
		min-height: max(var(--tap-target), 72px);
		padding: var(--space-xs) var(--space-2xs);
	}

	.tl-partners__img {
		max-height: 42px;
	}
}

/* Thiet bi cam ung: khong co trang thai rê chuot — hien mau that cho de nhan dien */
@media (hover: none) and (pointer: coarse) {

	.tl-partners__img {
		filter: none;
		opacity: .85;
	}
}

@media (max-width: 430px) {

	.tl-partners__img {
		max-height: 38px;
	}
}

@media (max-width: 360px) {

	.tl-partners__link,
	.tl-partners__figure {
		min-height: max(var(--tap-target), 64px);
		padding: var(--space-2xs) var(--space-3xs);
	}

	.tl-partners__img {
		max-height: 34px;
	}
}
