/* ============================================================
   Taxonomy Term Grid
   Palette matches the site: ink #2F3E46 · teal #527C91
   ============================================================ */

.tax-grid-wrap {
	--tg-ink: #2f3e46;
	--tg-teal: #527c91;
	--tg-teal-dark: #41647550;
	--tg-border: #ececec;
}

.tax-grid {
	display: grid;
	grid-template-columns: repeat(var(--tg-cols-d, 3), minmax(0, 1fr));
	gap: 30px;
}

.tax-grid__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--tg-border);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 2px rgba(21, 33, 40, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tax-grid__card:hover,
.tax-grid__card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(21, 33, 40, 0.13);
	outline: none;
}

/* Image */
.tax-grid__media {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #e8ecec;
	overflow: hidden;
}
.tax-grid__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.tax-grid__card:hover .tax-grid__media img {
	transform: scale(1.04);
}

/* Body */
.tax-grid__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1 1 auto;
	padding: 24px;
}
.tax-grid__title {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--tg-ink);
}
.tax-grid__meta {
	font-size: 16px;
	line-height: 1.45;
	color: var(--tg-teal);
}

/* Learn more */
.tax-grid__more {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 18px;
	font-size: 16px;
	font-weight: 400;
	color: var(--tg-teal);
}
.tax-grid__more-icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tg-teal);
	color: #fff;
	transition: transform 0.2s ease, background 0.2s ease;
}
.tax-grid__card:hover .tax-grid__more-icon {
	background: #416475;
	transform: translate(2px, -2px);
}

/* Pagination */
.tax-grid__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 34px;
}
.tax-grid__page {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--tg-border);
	background: #fff;
	color: var(--tg-ink);
	text-decoration: none;
	font-weight: 600;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tax-grid__page:hover {
	border-color: var(--tg-teal);
	color: var(--tg-teal);
}
.tax-grid__page.is-current {
	background: var(--tg-teal);
	border-color: var(--tg-teal);
	color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.tax-grid {
		grid-template-columns: repeat(var(--tg-cols-t, 2), minmax(0, 1fr));
		gap: 24px;
	}
}
@media (max-width: 600px) {
	.tax-grid {
		grid-template-columns: repeat(var(--tg-cols-m, 1), minmax(0, 1fr));
		gap: 20px;
	}
	.tax-grid__title {
		font-size: 20px;
	}
}
