/* Section Lesomat: teaser row of hub articles (acf/section-lesomat).
   Mobile first: cards stacked, from 768px three columns. No hairlines on the cards:
   the headline already brings its two lines, a third set read as clutter.
   The whole card is tappable (title link stretched over the card), every card ends
   with a smaller "read more" button, the section CTA sits centred below the row.
   Typography follows the archive cards (css/article.css), which is not loaded on
   landing pages. */

/* Directly after an inverted (.contrastmode) section the top hairline would sit flush on
   the colour edge and read as part of that block. Give it the regular section gap. */
.contrastmode + .section__lesomat {
	padding-top: 8rem;
}

.section__lesomat__cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3.5rem;
	margin: 2rem 0 4rem;
}

.section__lesomat__card {
	position: relative;
	display: flex;
	flex-direction: column;
}

.section__lesomat__eyebrow {
	margin: 0;
	font-family: var(--font-prime-family);
	font-weight: var(--font-prime-weight);
	font-size: 0.8rem;
	text-transform: uppercase;
}

.section__lesomat__title {
	margin: 0 0 0.5rem;
	font-family: var(--font-prime-family);
	font-weight: var(--font-prime-weight-h);
	font-size: clamp(1.3rem, 2vw, 1.6rem);
	line-height: 1.2;
}

.section__lesomat__title a {
	color: rgb(var(--primary-color));
	text-decoration: none;
}

/* Stretched link: the card is one tap target, the link stays the accessible name. */
.section__lesomat__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.section__lesomat__title a:focus-visible {
	outline: none;
}

.section__lesomat__card:focus-within {
	outline: 2px solid rgb(var(--primary-color));
	outline-offset: 8px;
}

.section__lesomat__card:hover .section__lesomat__title a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.section__lesomat__meta {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	opacity: 0.55;
}

.section__lesomat__excerpt {
	margin: 0;
	font-weight: var(--font-prime-weight);
	line-height: 1.5;
	opacity: 0.85;
}

/* Card CTA: pushed to the card bottom so the buttons line up across the row.
   Smaller than the section CTA (same scale as the archive card on mobile), colours
   untouched so the contrast mode keeps working. */
.section__lesomat__readmore {
	margin: auto 0 0;
	padding-top: 1.5rem;
	text-align: right;
}

.section__lesomat__readmore .button {
	display: inline-block;
	width: auto;
	margin-top: 0;
	padding: 0.5rem 1rem 0.5rem 2.75rem;
	font-size: 1rem;
}

.section__lesomat__readmore .button svg {
	left: 1rem;
	width: 1rem;
}

/* The stretched link covers the card; hovering anywhere still turns the arrow. */
.section__lesomat__card:hover .section__lesomat__readmore .button svg {
	transform: rotate(45deg);
}

.section__lesomat__more {
	margin: 0;
	text-align: center;
}

.section__lesomat__more .button {
	display: inline-block;
	width: auto;
}

@media screen and (min-width: 768px) {
	.section__lesomat__cards {
		grid-template-columns: repeat(3, 1fr);
		gap: 2.5rem;
		margin-bottom: 4rem;
	}
}
