/**
 * Post cards — shared by the archive grid (css/blog/blog.css) and the related-posts
 * grid on single posts (css/blog/single.css), which had identical copies.
 */

.post-grid--related {
	margin-block-end: 0;
}

.post-card__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--color-surface, #fff);
	border: 1px solid var(--color-border, #e5e5e5);
	border-radius: var(--radius, 0.5rem);
	overflow: hidden;
}

.post-card--sticky .post-card__inner {
	border-color: var(--color-primary, #2563eb);
}

.post-card__sticky-badge {
	position: absolute;
	inset-block-start: 0.75rem;
	inset-inline-start: 0.75rem;
	z-index: 1;
	background: var(--color-primary, #2563eb);
	color: var(--color-primary-contrast, #fff);
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.25em 0.6em;
	border-radius: var(--radius, 0.5rem);
}

.post-card__image-link {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--color-border, #eee);
	overflow: hidden;
}

.post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.post-card__content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: var(--space-4, 1rem);
	gap: 0.5em;
}

.post-card__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	list-style: none;
	margin: 0;
	padding: 0;
}

.badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.2em 0.65em;
	border-radius: 999px;
	background: color-mix(in srgb, var(--color-primary, #2563eb) 12%, transparent);
	color: var(--color-primary, #2563eb);
	text-decoration: none;
}

.badge--tag {
	background: var(--color-bg, #f5f5f5);
	color: var(--color-muted, #666);
}

.post-card__title {
	font-size: 1.125rem;
	line-height: 1.35;
	margin: 0;
}

.post-card__title a {
	color: var(--color-text, #111);
	text-decoration: none;
}

.post-card__title a:hover,
.post-card__title a:focus-visible {
	color: var(--link-hover-color, var(--link-color));
}

.post-card__excerpt {
	color: var(--color-muted, #666);
	font-size: 0.9375rem;
	line-height: 1.5;
	margin: 0;
	flex-grow: 1;
}

.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3em;
	font-size: 0.8125rem;
	color: var(--color-muted, #666);
	margin-block-start: 0.25em;
}

.post-card__author a {
	color: inherit;
	text-decoration: none;
}

.post-card__separator {
	opacity: 0.6;
}

.post-card__inner:focus-within {
	outline: 2px solid var(--color-primary, #2563eb);
	outline-offset: 2px;
}
