/*
 * Block: top categories. Reference: section py-14 on #F5F5F5; one white box (1px #EBEBEB, shadow-card);
 * 1 column, 2 (md), 3 (lg). Cells: p-6 (p-7 from sm), 112px image (128px from sm), name 15px/500,
 * child links 12.5px, and a "view all" link with a small circle.
 */

.kd-home .kd-sec--categories {
	padding-block: 56px;
	background: var(--kd-tint);
}

.kd-home .kd-cat-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	background: #ffffff;
	border: 1px solid #ebebeb;
	border-radius: var(--kd-radius-sm);
	box-shadow: var(--kd-shadow-card);
}

.kd-home .kd-cat-cell {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
	padding: 24px;
	border-block-end: 1px solid #f0f0f0;
	transition: background-color 0.2s var(--kd-ease);
}

.kd-home .kd-cat-cell:hover {
	background: rgba(250, 250, 250, 0.6);
}

@media (min-width: 640px) {
	.kd-home .kd-cat-cell {
		padding: 28px;
	}
}

.kd-home .kd-cat-cell__top {
	display: flex;
	align-items: center;
	gap: 20px;
	min-width: 0;
}

.kd-home .kd-cat-cell__media {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 112px;
	height: 112px;
}

@media (min-width: 640px) {
	.kd-home .kd-cat-cell__media {
		width: 128px;
		height: 128px;
	}
}

.kd-home .kd-cat-cell__img {
	max-height: 112px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	transition: transform 0.3s var(--kd-ease);
}

@media (min-width: 640px) {
	.kd-home .kd-cat-cell__img {
		max-height: 112px;
	}
}

.kd-home .kd-cat-cell:hover .kd-cat-cell__img {
	transform: scale(1.05);
}

.kd-home .kd-cat-cell__info {
	flex: 1;
	min-width: 0;
}

.kd-home .kd-cat-cell__name {
	margin-block-end: 10px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	color: #222222;
}

.kd-home .kd-cat-cell__name a:hover {
	color: var(--kd-brand);
}

.kd-home .kd-cat-cell__links {
	display: grid;
	gap: 6px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--kd-muted);
}

.kd-home .kd-cat-cell__links a {
	display: block;
	transition: color 0.2s var(--kd-ease);
}

.kd-home .kd-cat-cell__links a:hover {
	color: var(--kd-brand);
}

.kd-home .kd-cat-cell__more {
	display: flex;
	justify-content: flex-end;
	margin-block-start: 12px;
}

.kd-home .kd-cat-cell__more a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #222222;
	transition: color 0.2s var(--kd-ease);
}

.kd-home .kd-cat-cell__more a:hover {
	color: var(--kd-brand);
}

.kd-home .kd-cat-cell__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border-radius: 9999px;
	background: var(--kd-brand);
	color: #ffffff;
}

.kd-home .kd-cat-cell__dot svg {
	width: 8px;
	height: 8px;
}

/* Fade re-run, from the reference's arrow buttons */
.kd-home .kd-cat-grid.is-fading {
	animation: kd-fade-in 0.35s ease-out both;
}

/* md: two columns; the last row has no bottom border */
@media (min-width: 768px) {
	.kd-home .kd-cat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.kd-home .kd-cat-cell:nth-child(n + 5) {
		border-block-end: 0;
	}
}

/* lg: three columns; dividers between columns, none on the last row */
@media (min-width: 1024px) {
	.kd-home .kd-cat-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.kd-home .kd-cat-cell:nth-child(n + 4) {
		border-block-end: 0;
	}
	.kd-home .kd-cat-cell:nth-child(3n + 1),
	.kd-home .kd-cat-cell:nth-child(3n + 2) {
		border-inline-start: 1px solid #f0f0f0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kd-home .kd-cat-grid.is-fading {
		animation: none;
	}
}
