/**
 * Frontend-Styles fuer AutoContent.
 * Block "Aehnliche Beitraege" (Shortcode [w24mf_ac_related]).
 */

.w24mf-ac-related {
	margin: 40px 0;
}

.w24mf-ac-related__title {
	font-size: 1.6em;
	line-height: 1.25;
	margin: 0 0 24px;
	font-weight: 600;
}

.w24mf-ac-related__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.w24mf-ac-related__card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e6e8eb;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.w24mf-ac-related__card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
	transform: translateY(-2px);
	border-color: #d0d5da;
}

.w24mf-ac-related__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f2f4f6;
}

.w24mf-ac-related__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}

.w24mf-ac-related__card:hover .w24mf-ac-related__img {
	transform: scale(1.04);
}

.w24mf-ac-related__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px;
}

.w24mf-ac-related__name {
	font-size: 1.15em;
	line-height: 1.3;
	margin: 0 0 12px;
	font-weight: 600;
}

.w24mf-ac-related__name a {
	color: inherit;
	text-decoration: none;
}

.w24mf-ac-related__name a:hover {
	text-decoration: underline;
}

.w24mf-ac-related__excerpt {
	font-size: .95em;
	line-height: 1.55;
	color: #4a5568;
	margin: 0 0 20px;
}

.w24mf-ac-related__more {
	display: inline-block;
	align-self: flex-start;
	margin-top: auto;
	padding: 10px 20px;
	border: 1px solid #2496ef;
	border-radius: 6px;
	color: #2496ef;
	background: transparent;
	font-size: .95em;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}

.w24mf-ac-related__more:hover,
.w24mf-ac-related__more:focus {
	background: #2496ef;
	color: #fff;
}

@media (max-width: 900px) {
	.w24mf-ac-related__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.w24mf-ac-related__grid {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
 * Abstand ueber dem FAQ-Block.
 *
 * Divi gibt Ueberschriften weder Aussenabstand noch Rand (der Reset setzt
 * margin:0 fuer h1-h6). Der FAQ-Block wurde zudem erst NACH add_hr_before_h2()
 * an den Artikel gehaengt und bekam deshalb als einziger Abschnitt weder die
 * blaue Trennlinie noch sonst einen Abstand: "Haeufig gestellte Fragen" begann
 * unmittelbar unter dem letzten Absatz. Die einzelnen Fragen tragen ihren
 * Abstand seit jeher inline (32 px), nur der Block selbst hatte keinen.
 *
 * Die Regel wirkt ueber die eigene Klasse und damit auf jedem Theme - und auf
 * allen bereits erzeugten Artikeln, ohne deren gespeicherten Text anzufassen.
 * ---------------------------------------------------------------------- */

.w24mf-ac-faq,
section.w24mf-ac-faq {
	margin-top: 40px;
}

.w24mf-ac-faq > h2,
section.w24mf-ac-faq > h2 {
	margin-top: 0;
}

/*
 * WARUM DIE ZWEITE, LAENGERE FASSUNG JEDES SELEKTORS?
 *
 * Die Fliesstext-Themes der Portale (wertaugtwas.de `.sl-prose`,
 * dienstleister-portal.com `.dp-prose`) setzen den Abstand zwischen zwei
 * Bloecken mit `.sl-prose > :where(*) + :where(*) { margin-top: 1.25em }`.
 * `:where()` zaehlt null, die Regel liegt damit bei 0-1-0 -- gleichauf mit
 * einer einzelnen Plugin-Klasse. Bei Gleichstand gewinnt das spaeter geladene
 * Stylesheet, und das ist immer das Theme: gemessen 21,25 px statt 40 px, der
 * FAQ-Block war dort so weit vom Text entfernt wie zwei Absaetze voneinander.
 * `section.w24mf-ac-faq` (0-1-1) entscheidet es ohne !important.
 */

/* -------------------------------------------------------------------------
 * Abstand ueber den Zwischenueberschriften (Klasse aus HeadingSpacing).
 *
 * ABSICHTLICH NUR EINE KLASSE, ohne `h2` davor. Die Regel soll dort greifen,
 * wo das Theme zu Ueberschriftenabstaenden schweigt -- Divi setzt `margin:0`
 * fuer h1-h6, dort klebt die Ueberschrift ohne diese 40 px am Absatz. Wo das
 * Theme etwas sagt, soll sie zurueckstehen: `.sl-prose :where(h2)` auf
 * wertaugtwas.de gibt 2,5 em (gemessen 65 px), liegt mit 0-1-0 gleichauf und
 * gewinnt als spaeter geladenes Stylesheet. Mit `h2.w24mf-ac-h2` (0-1-1)
 * waeren die Ueberschriften dort von 65 auf 40 px zusammengerueckt.
 *
 * Der FAQ-Block oben macht es umgekehrt (`section.w24mf-ac-faq`, 0-1-1) --
 * dort setzt das Theme nur seinen allgemeinen Blockabstand von 1,25 em, und
 * der ist fuer den Wechsel in einen neuen Abschnitt zu wenig.
 * ---------------------------------------------------------------------- */

.w24mf-ac-h2 {
	margin-top: 40px;
}

/* -------------------------------------------------------------------------
 * Kurzfassung "Das Wichtigste in Kuerze" und Inhaltsverzeichnis (1.114.0).
 *
 * Beide Bloecke baut ArticleOutline. Die Akzentfarbe des Kastens kommt als
 * Inline-Stil aus autocontent.cta_accent, damit er zur CTA-Box derselben
 * Website passt; ohne Einstellung gilt das Blau hier.
 *
 * `aside.` und `nav.` (0-1-1) aus demselben Grund wie beim FAQ-Block: Die
 * Fliesstext-Themes setzen Blockabstaende mit 0-1-0 und werden spaeter
 * geladen.
 * ---------------------------------------------------------------------- */

aside.w24mf-ac-kurz {
	margin: 0 0 1.8em;
	padding: 1.2em 1.5em 1.1em;
	background: #f3f5f9;
	border-left: 5px solid #0c71c3;
	border-radius: 8px;
}

aside.w24mf-ac-kurz .w24mf-ac-kurz__titel,
nav.w24mf-ac-toc .w24mf-ac-toc__titel {
	margin: 0 0 .6em;
	padding: 0;
	font-size: .8em;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.3;
}

aside.w24mf-ac-kurz ul {
	margin: 0;
	padding: 0 0 0 1.2em;
	list-style: disc;
}

aside.w24mf-ac-kurz li {
	margin: 0 0 .45em;
	line-height: 1.55;
}

aside.w24mf-ac-kurz li:last-child {
	margin-bottom: 0;
}

nav.w24mf-ac-toc {
	margin: 2em 0 0;
	padding: 1.1em 1.5em 1em;
	border: 1px solid #e1e5ea;
	border-radius: 8px;
}

nav.w24mf-ac-toc ol {
	margin: 0;
	padding: 0 0 0 1.3em;
	list-style: decimal;
}

nav.w24mf-ac-toc li {
	margin: 0 0 .3em;
	line-height: 1.5;
}

nav.w24mf-ac-toc a {
	text-decoration: none;
}

nav.w24mf-ac-toc a:hover,
nav.w24mf-ac-toc a:focus {
	text-decoration: underline;
}

/* Sprungziel nicht unter einer festen Kopfleiste verschwinden lassen. */
h2[id^="ac-"] {
	scroll-margin-top: 110px;
}

/* -------------------------------------------------------------------------
 * Tabellen und Listen aus dem Rohtext (1.115.0, ArticleOutline).
 *
 * Der Rahmen scrollt waagerecht, damit eine dreispaltige Tabelle auf dem
 * Handy nicht die Seite sprengt.
 * ---------------------------------------------------------------------- */

div.w24mf-ac-tabelle {
	margin: 1.6em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

div.w24mf-ac-tabelle table {
	width: 100%;
	min-width: 480px;
	margin: 0;
	border-collapse: collapse;
	border: 1px solid #dfe3e8;
	font-size: .92em;
	line-height: 1.45;
}

div.w24mf-ac-tabelle th,
div.w24mf-ac-tabelle td {
	padding: .7em .9em;
	border: 1px solid #dfe3e8;
	text-align: left;
	vertical-align: top;
}

div.w24mf-ac-tabelle thead th {
	background: #eef1f6;
	font-weight: 700;
}

div.w24mf-ac-tabelle tbody th {
	background: #f7f8fa;
	font-weight: 600;
}

ul.w24mf-ac-liste,
ol.w24mf-ac-liste {
	margin: 0 0 1.2em;
	padding-left: 1.3em;
}

ul.w24mf-ac-liste {
	list-style: disc;
}

ol.w24mf-ac-liste {
	list-style: decimal;
}

ul.w24mf-ac-liste li,
ol.w24mf-ac-liste li {
	margin: 0 0 .45em;
}
