/*
 * Virtina child: post card (shared component, no page prefix).
 * Used by the blog page grid and the related posts on a single post. Colors come from tokens.
 */

:root {
	--vch-color-post-focus: #000;
}

/* The same card as the home blog slider. */

.vch-post {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: 25px;
	background: var(--vch-color-track);
}

.vch-post__media {
	aspect-ratio: 2 / 1;
	overflow: hidden;
	background: var(--vch-color-tint-rose);
}

.vch-post__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.vch-post:hover .vch-post__image {
	transform: scale(1.04);
}

.vch-post__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 12px;
	padding: 24px 28px 32px;
}

.vch-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--vch-color-text-muted);
}

.vch-post__category {
	font-weight: 600;
	color: var(--vch-color-accent-rose);
}

.vch-post__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	font-size: 20px;
	line-height: 1.35;
	color: var(--vch-color-text);
}

/* The title link covers the whole card, so the card is one big target. */
.vch-post__link {
	color: inherit;
	text-decoration: none;
}

.vch-post__link::after {
	content: '';
	position: absolute;
	inset: 0;
}

.vch-post__link:focus-visible {
	outline: none;
}

.vch-post:focus-within {
	outline: 2px solid var(--vch-color-post-focus);
	outline-offset: 3px;
}

.vch-post__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: 15px;
	line-height: 1.5;
	letter-spacing: -0.02em;
	color: var(--vch-color-text-muted);
}

.vch-post__more {
	margin-top: auto;
	padding-top: 4px;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 899px) {
	.vch-post__body {
		padding: 20px 22px 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vch-post__image {
		transition: none;
	}

	.vch-post:hover .vch-post__image {
		transform: none;
	}
}

/* News items: the whole text shows on the card and the card is not a link. */
.vch-post--static .vch-post__title,
.vch-post--static .vch-post__excerpt {
	display: block;
	overflow: visible;
	-webkit-line-clamp: unset;
}

.vch-post--static:hover .vch-post__image {
	transform: none;
}

.vch-post__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
