/* Leksands Shortcodes — post cards.
   No colours here on purpose: titles render as <h3> and links as <a>,
   so they inherit the theme's typography and colours. Only layout,
   spacing and image framing is defined below. */

.lk-postlist {
	--lk-gap: 1.25rem;
	display: grid;
	grid-template-columns: repeat(var(--lk-cols, 3), 1fr);
	gap: 2.5rem var(--lk-gap);
	margin: 2rem 0;
}

.lk-postlist--cols-1 { --lk-cols: 1; }
.lk-postlist--cols-2 { --lk-cols: 2; }
.lk-postlist--cols-3 { --lk-cols: 3; }
.lk-postlist--cols-4 { --lk-cols: 4; }
.lk-postlist--cols-5 { --lk-cols: 5; }
.lk-postlist--cols-6 { --lk-cols: 6; }

.lk-card {
	display: flex;
	flex-direction: column;
}

.lk-card__media {
	display: block;
	margin-bottom: 1rem;
	overflow: hidden;
}

.lk-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.lk-card__media:hover .lk-card__img {
	transform: scale(1.03);
}

.lk-card__title {
	margin: 0 0 0.75rem;
}

.lk-card__title a {
	color: inherit;
	text-decoration: none;
}

.lk-card__title a:hover {
	text-decoration: underline;
}

.lk-card__more {
	margin-top: auto;
	font-weight: 700;
	text-decoration: none;
}

.lk-card__more:hover {
	text-decoration: underline;
}

@media (max-width: 782px) {
	.lk-postlist {
		grid-template-columns: 1fr;
	}
}
