/**
 * Related posts below a post (UP-30).
 *
 * Styled like the "Weitere Artikel zum Thema" cards of benelux.net (Elementor
 * Pro's Posts widget, skin "Cards"): white cards with a soft shadow, the title
 * in the serif heading font and red, a grey excerpt, a read-more link and the
 * date in a footer. Fonts come from the Elementor kit where it sets them.
 * Rules are scoped twice so they win over the kit's h2, h3 and link styles.
 */

.bnx-related {
	--bnx-related-red: #c8102e;
	--bnx-related-ink: #2d2926;
	--bnx-related-grey: #777;
	--bnx-related-serif: var(--e-global-typography-secondary-font-family, "Alegreya"), Georgia, serif;
	--bnx-related-sans: var(--e-global-typography-text-font-family, "Figtree"), system-ui, sans-serif;
	container-type: inline-size;
	margin-top: 60px;
	font-family: var(--bnx-related-sans);
}

.bnx-related .bnx-related__heading {
	margin: 0 0 40px;
	color: var(--bnx-related-ink);
	font-family: var(--bnx-related-serif);
	font-size: var(--e-global-typography-secondary-font-size, 36px);
	font-weight: 400;
	line-height: 1.5;
}

.bnx-related__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 35px 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bnx-related__card {
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	border-radius: 3px;
	background: #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
	transition: box-shadow 0.25s;
}

.bnx-related__card:hover,
.bnx-related__card:focus-within {
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
}

.bnx-related__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 20px 30px 0;
}

.bnx-related .bnx-related__title {
	margin: 0 0 25px;
	font-family: var(--bnx-related-serif);
	font-size: 24px;
	font-weight: 400;
	line-height: 1.5;
}

.bnx-related .bnx-related__title a,
.bnx-related .bnx-related__more {
	color: var(--bnx-related-red);
	font: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

/* Repeats the font: the kit's a:hover would set another. */
.bnx-related .bnx-related__title a:hover,
.bnx-related .bnx-related__title a:focus {
	color: var(--bnx-related-ink);
	font: inherit;
}

.bnx-related .bnx-related__more:hover {
	color: var(--bnx-related-ink);
	font-family: var(--bnx-related-sans);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
}

.bnx-related .bnx-related__title a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.bnx-related .bnx-related__excerpt {
	margin: 0 0 25px;
	color: var(--bnx-related-grey);
	font-size: 18px;
	line-height: 1.5;
}

.bnx-related .bnx-related__more {
	margin-bottom: 20px;
	font-family: var(--bnx-related-sans);
	font-size: 18px;
	line-height: 1.5;
	text-transform: uppercase;
}

.bnx-related .bnx-related__meta {
	margin: 0;
	padding: 15px 30px;
	border-top: 1px solid #eaeaea;
	color: #adadad;
	font-size: 12px;
	line-height: 1.3;
}

/* Two columns where the list is narrow (tablets, the text column), one on phones. */
@container (max-width: 760px) {
	.bnx-related__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (max-width: 480px) {
	.bnx-related__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.bnx-related .bnx-related__heading {
		margin-bottom: 25px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bnx-related__card,
	.bnx-related .bnx-related__title a,
	.bnx-related .bnx-related__more {
		transition: none;
	}
}
