/* CARD-2: cards with pictures. The card frame comes from .wprk-card in base.css. */

/* A column, so the link can rest at the foot of the card whatever the length of the text. */
.wprk-card-2 .wprk-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.wprk-card-2 .wprk-card:hover,
.wprk-card-2 .wprk-card:focus-within {
	border-color: color-mix(in srgb, var(--wprk-heading) 30%, transparent);
}

/*
 * The picture runs to the top and side edges of the card, over its border, as
 * on the post cards in base.css. WordPress resets the top margin of a first
 * child with a two-class rule, hence the three classes here.
 */
.wprk-card-2 .wprk-card > .wprk-card-2__image {
	margin: calc(var(--wp--preset--spacing--40) * -1 - 1px) calc(var(--wp--preset--spacing--40) * -1 - 1px) var(--wp--preset--spacing--30);
}

.wprk-card-2 .wprk-card-2__image img {
	border-radius: var(--wp--custom--radius--lg) var(--wp--custom--radius--lg) 0 0;
	width: 100%;
}

.wprk-card-2 .wprk-card :where(h3) {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.3;
	overflow-wrap: break-word;
}

.wprk-card-2 .wprk-card > p {
	color: var(--wprk-muted);
}

/*
 * The link rests at the foot of the card. Its tap target is taller than its
 * text; the bottom margin gives that extra height back, so the card keeps an
 * even frame.
 */
.wprk-card-2 .wprk-card > .wp-block-buttons {
	margin-block: auto calc(var(--wp--preset--spacing--20) * -1);
	padding-block-start: var(--wp--preset--spacing--10);
}

@media (prefers-reduced-motion: no-preference) {
	.wprk-card-2 .wprk-card {
		transition: border-color 0.18s ease;
	}
}
