/**
 * OPENGRADIENT homepage category section (see inc/og-home-categories.php).
 * Wide desktop: intro (38%) beside six circular tiles (62%), both vertically centred.
 * Narrower: intro above the tiles; six tiles in a row, then three columns on phones, two on very small screens.
 */

.og-cat-section.e-con > .e-con-inner {
	display: grid;
	grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
	align-items: center;
	gap: 20px 40px;
}

@media (max-width: 1199px) {
	.og-cat-section.e-con > .e-con-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

/* Tiles */
.og-cats {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	align-items: start;
	gap: 18px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.og-cats__item {
	min-width: 0;
	margin: 0;
}

.og-cats__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 4px 2px 6px;
	border-radius: 10px;
	color: #242424;
	text-align: center;
	text-decoration: none;
}

.og-cats__photo {
	display: block;
	flex: none;
	width: 80px;
	height: 80px;
	overflow: hidden;
	border-radius: 50%;
	background: #f1efec;
}

.og-cats__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(var(--og-zoom, 1));
	transform-origin: var(--og-focus, 50% 50%);
	transition: transform 0.35s ease;
}

.og-cats__label {
	display: block;
	max-width: 100%;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
}

.og-cats__link:hover {
	color: #000;
}

.og-cats__link:hover .og-cats__photo img {
	transform: scale(calc(var(--og-zoom, 1) * 1.06));
}

.og-cats__link:hover .og-cats__label {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.og-cats__link:focus-visible {
	outline: 2px solid #111211;
	outline-offset: 2px;
}

@media (min-width: 1200px) {
	.og-cats__photo {
		width: 84px;
		height: 84px;
	}
}

@media (max-width: 767px) {
	.og-cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 16px;
	}

	.og-cats__photo {
		width: 76px;
		height: 76px;
	}
}

@media (max-width: 339px) {
	.og-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.og-cats__photo img {
		transition: none;
	}
}
