/* Tam Nhất — Features grid / mobile slider */

.tamnhat-fgrid-section {
	background-color: transparent;
	border-top: 1px solid #eaeaea;
	border-bottom: 1px solid #eaeaea;
	padding: 20px 0;
	width: 100%;
}

.tamnhat-fgrid {
	display: grid;
	grid-template-columns: repeat(var(--tn-fgrid-cols, 5), 1fr);
	width: 100%;
}

.tamnhat-fcard {
	padding: 15px;
	text-align: center;
	border-right: 1px solid #eaeaea;
	box-sizing: border-box;
}

.tamnhat-fcard:last-child {
	border-right: none !important;
}

.tamnhat-fcard-icon {
	margin-bottom: 15px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.tamnhat-fcard:hover .tamnhat-fcard-icon {
	transform: translateY(-3px);
}

.tamnhat-fcard-icon img {
	max-height: 40px;
	width: auto;
}

.tamnhat-fcard-title {
	font-weight: 700 !important;
	text-transform: uppercase;
	margin-bottom: 8px !important;
	line-height: 1.3 !important;
}

.tamnhat-fcard-desc {
	line-height: 1.4 !important;
	margin-bottom: 0 !important;
}

/* Mobile: horizontal slider */
@media (max-width: 849px) {
	.tamnhat-fgrid-section {
		padding: 12px 0 8px;
		border-bottom: none;
	}

	.tamnhat-fgrid {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 16px;
		-webkit-overflow-scrolling: touch;
		gap: 0;
		padding: 0 16px 12px;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.tamnhat-fgrid::-webkit-scrollbar {
		display: none;
	}

	.tamnhat-fcard {
		flex: 0 0 78%;
		max-width: 78%;
		scroll-snap-align: center;
		border-right: 1px solid #eaeaea !important;
		border-bottom: none !important;
		padding: 18px 14px;
	}

	.tamnhat-fcard:last-child {
		border-right: none !important;
		margin-right: 16px;
	}
}

@media (max-width: 549px) {
	.tamnhat-fcard {
		flex: 0 0 82%;
		max-width: 82%;
	}
}
