/* =========================================================================
 * Einzelbeitrag – „Aktuelles" Single (Editorial-Layout)
 * -------------------------------------------------------------------------
 * Kopf (Titel + Story-Chip + Lesezeit + Hero) + editorialer Zweispalter wie
 * „Projekt Update Idee" (Node 560:656): links Abschnitts-Label, rechts Inhalt
 * (Fließtext mit Inline-Links, 4×2-Raster, Großbild). Cremefarbene Lightbox
 * über ALLE Artikelbilder.
 * ========================================================================= */

/* Ganze Beitragsseite auf den Figma-Hintergrund (nur wenn Template aktiv). */
body.lm-beitrag-view {
	background: #edece8;
	/* Nordost-Pfeil als wiederverwendbare Maske (für ::after hinter den Links). */
	--lm-ne-arrow: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E" );
}

.lm-beitrag {
	position: relative;              /* Bezug für die Sticky-Steuerelemente */
	width: min( 92vw, 1264px );
	margin-inline: auto;
	padding-top: 2.5rem;            /* Head weiter oben */
	padding-bottom: 7rem;
	color: #000;
}

/* =========================================================================
 * 1) Kopf: Titel → Chips → Hero
 * ========================================================================= */
/* Teilen + Schließen – außerhalb des Artikels im linken Seitenrand.
   Position steuert JS: beim Laden mit der Unterkante des Titelbilds bündig,
   heftet beim Scrollen an und parkt am Ende des Artikel-Containers (nicht im
   Footer). Werte hier sind der Fallback ohne JS (fest unten links). */
.lm-beitrag__sticky {
	position: fixed;
	left: clamp( 1rem, 4vw, 3rem );
	bottom: clamp( 1rem, 4vw, 3rem );
	z-index: 60;
	display: flex;
	gap: 0.75rem;
	width: max-content;
}
.lm-beitrag__sticky-btn {
	box-sizing: border-box;   /* Pfeil (<a>) sonst 4px größer als Teilen (<button>) */
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 999px;
	border: 2px solid #000;
	background: #edece8;
	color: #000;
	display: grid;
	place-items: center;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.lm-beitrag__sticky-btn:hover { background: #000; color: #edece8; }
.lm-beitrag__sticky-btn svg { width: 1.4rem; height: 1.4rem; display: block; }
.lm-beitrag__sticky-share.is-copied { background: #ff4c00; border-color: #ff4c00; color: #fff; }

.lm-beitrag__title {
	margin: 0;
	font-family: var( --lm-mono );
	font-weight: 700;
	font-size: clamp( 2.25rem, 5vw, 3.125rem ); /* 50px */
	line-height: 1.1;
	max-width: 62rem;
}
.lm-beitrag__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 2rem 0 3rem;
}
/* Chips: ohne Rahmen/Outline (wie Figma) – nur Icon + Text. */
.lm-beitrag__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	padding: 0;
	font-family: var( --lm-mono );
	font-weight: 700;
	font-size: 0.8rem; /* ≈ 12.5px */
	line-height: 1;
	white-space: nowrap;
	color: #000;
}
/* kleines gedrehtes Quadrat vor dem Label (wie Figma) */
.lm-beitrag__chip-star {
	width: 10px;
	height: 10px;
	background: #000;
	transform: rotate( 13deg );
	flex: 0 0 auto;
}

.lm-beitrag__hero {
	margin: 0 0 5rem;
}
.lm-beitrag__hero img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1076 / 467;
	object-fit: cover;
	border-radius: 20px;
}

/* =========================================================================
 * 2) Editorialer Body – Zweispalter (Label links, Inhalt rechts)
 * ========================================================================= */
.lm-be-ed { margin-top: 1rem; }

.lm-be-ed__row {
	display: grid;
	grid-template-columns: 22% 1fr;
	column-gap: 8%;
	align-items: start;              /* Aside kompakt → als Ganzes sticky */
	padding: 0 0 3.5rem;
}
/* Überschrift + Editorial-Infos als EINE sticky Einheit oben → scrollen zusammen,
   Headline läuft nie über die Editorial-Elemente. */
.lm-be-ed__aside {
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 6rem;
	align-self: start;
}
/* Abschnitts-Label: fett, KEIN Outline/Border (auch nicht vom Theme/UAGB). */
.lm-be-ed__label {
	font-family: var( --lm-mono );
	font-weight: 700;
	font-size: 1.5rem;   /* 24px */
	line-height: 1.17;
	margin: 0;
	border: 0;
	outline: 0;
	-webkit-text-stroke: 0;
	text-shadow: none;
	background: none;
}
/* Editorial-Infos (Elemente + Linksammlung) direkt unter der Überschrift, mit
   etwas Abstand – nicht am Fuß. 20% schmaler; Label/Headline bleibt voll breit. */
.lm-be-ed__asideblocks { margin-top: 2.5rem; padding-right: 20%; }
.lm-be-ed__asidefoot { margin-top: 2.5rem; padding-right: 20%; }
.lm-be-ed__asideblocks + .lm-be-ed__asidefoot { margin-top: 1.5rem; }
.lm-be-ed__links { list-style: none; margin: 3rem 0 0; padding: 0; font-size: 0.95rem; line-height: 1.4; }
.lm-be-ed__links li + li { margin-top: 0.35rem; }
.lm-be-ed__links a { color: #6b6b6b; text-decoration: none; transition: color 0.15s ease; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
/* Hover/aktiv: schwarz + schwarzer Unterstrich + „fett"-Optik OHNE Breitenänderung
   (Textschatten statt font-weight → das Wort bricht nicht neu um). */
.lm-be-ed__links a:hover,
.lm-be-ed__links a.is-active {
	color: #000;
	text-shadow: 0.02em 0 0 currentColor, -0.02em 0 0 currentColor;
	text-decoration: underline;
	text-decoration-color: #000;
}

/* 45°-Pfeil (nach Nordost) hinter den Links in der linken Spalte – nur zweispaltig
   (die Aside-Liste ist im Einspalten-/Mobile-Breakpoint display:none, daher greift
   das ::after dort nicht → keine Mobile-Änderung). Pfeil in Linkfarbe (currentColor
   via mask), rückt beim Hover leicht nach Nordost. */
.lm-be-ed__asidefoot .lm-be-ed__links a::after {
	content: "";
	display: inline-block;
	width: 0.62em;
	height: 0.62em;
	margin-left: 0.3em;
	vertical-align: baseline;
	background-color: currentColor;
	-webkit-mask: var( --lm-ne-arrow ) center / contain no-repeat;
	mask: var( --lm-ne-arrow ) center / contain no-repeat;
	transition: transform 0.15s ease;
}
.lm-be-ed__asidefoot .lm-be-ed__links a:hover::after,
.lm-be-ed__asidefoot .lm-be-ed__links a.is-active::after {
	transform: translate( 0.1em, -0.1em );
}

/* -------------------------------------------------------------------------
 * Download-Karte für Dokumente (aus core/file) – Variante 1:
 *   Umriss mit globalem Stroke, oben die Dokument-Miniatur (PDF-Vorschau von
 *   WP, sonst generisches Icon) mit Innenabstand, unten Titel + Download-Icon
 *   rechts (bricht bei langem Titel darunter). Mehrere Karten brechen um.
 * ------------------------------------------------------------------------- */
/* Download-Card: Radius identisch zu den Bildern (Media-Token). */
.lm-be-ed__doc {
	display: inline-flex;
	flex-direction: column;
	width: 15rem;
	max-width: 100%;
	margin: 0.25rem 0.75rem 0.25rem 0;
	border: 1.5px solid var( --lm-black, #000 );
	border-radius: var( --lm-radius-media, 10px );
	overflow: hidden;
	text-decoration: none;
	color: var( --lm-black, #000 );
	background: #fff;
	vertical-align: top;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.lm-be-ed__doc:hover {
	box-shadow: 6px 6px 0 #000;      /* harter schwarzer Schatten */
	transform: translate( -2px, -2px );
}
/* Option: ganze Card per „Zusätzliche CSS-Klasse" is-multiply überblenden. */
.lm-be-ed__doc.is-multiply { mix-blend-mode: multiply; }
.lm-be-ed__doc-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.9rem;
	background: #f4f3ef;
	aspect-ratio: 4 / 3;
	border-bottom: 1.5px solid var( --lm-black, #000 );
}
/* Vorschau wird vollständig eingepasst (fit – nichts wird abgeschnitten). */
.lm-be-ed__doc-thumb img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.12 );
}
.lm-be-ed__doc-ico { display: flex; color: #6b6b6b; }
.lm-be-ed__doc-ico svg { width: 3rem; height: 3rem; }
.lm-be-ed__doc-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.35rem 0.75rem;
	padding: 0.7rem 0.85rem;
}
.lm-be-ed__doc-title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 700;
	hyphens: auto;
	-webkit-hyphens: auto;
	overflow-wrap: break-word;
}
.lm-be-ed__doc-dl { flex: 0 0 auto; display: flex; }
.lm-be-ed__doc-dl svg { width: 1.3rem; height: 1.3rem; }

/* Gebündelte „Links“-Liste am Artikelende – nur im Mobile-/Einspalten-Breakpoint
   sichtbar (siehe Media Query). Schrift/Farbe wie die normale Link-Liste. */
.lm-be-ed__endlinks { display: none; }
.lm-be-ed__endlinks-title { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.75rem; font-family: var( --lm-mono ); font-weight: 700; font-size: 1.15rem; }
/* Kleiner schwarzer Punkt davor (wie der Marker vor der Kategorie). */
.lm-be-ed__endlinks-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #000; flex: 0 0 auto; }
/* In der End-Liste wird der Eintrag beim Hovern zusätzlich unterstrichen. */
.lm-be-ed__endlinks .lm-be-ed__links a:hover,
.lm-be-ed__endlinks .lm-be-ed__links a.is-active { text-decoration: underline; }

.lm-be-ed__content > * { margin-top: 0; margin-bottom: 1.75rem; }
.lm-be-ed__content > *:last-child { margin-bottom: 0; }
.lm-be-ed__content p {
	font-size: 1.0625rem; /* 17px – editorial, gut lesbar */
	line-height: 1.6;
	font-weight: 500;
}
/* Aufzählungslisten – gleiche Typografie wie der Fließtext. */
.lm-be-ed__content ul,
.lm-be-ed__content ol {
	font-size: 1.0625rem;
	line-height: 1.6;
	font-weight: 500;
	margin: 0 0 1.75rem;
	padding-left: 1.25rem;
}
.lm-be-ed__content li { margin: 0 0 0.4rem; }
.lm-be-ed__content li:last-child { margin-bottom: 0; }
.lm-be-ed__content ul { list-style: disc; }
.lm-be-ed__content ol { list-style: decimal; }

/* Zentrale Frage (H3 im Inhalt): fett + „ungerade" orange Wellen-Linie (fest). */
.lm-be-ed__frage {
	margin: 0 0 1.75rem;
	font-weight: 700;
	font-size: clamp( 1.35rem, 2vw, 1.6rem );
	line-height: 1.25;
}
.lm-be-ed__frage strong { font-weight: 700; position: relative; }
.lm-be-ed__frage strong::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.18em;
	height: 0.42em;
	background: url( "data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%2010'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,4.5%20C62,8.5%20138,8.5%20200,4.5'%20fill='none'%20stroke='%23FF4C00'%20stroke-width='2.4'/%3E%3C/svg%3E" ) left center / 100% 100% no-repeat;
	pointer-events: none;
}

/* In-Text-Links: fett, NICHT unterstrichen. „Ungerade" orange Linie (Verein-
   Stil) wird on hover von links (0) nach rechts (100) gezeichnet – clip-path,
   damit die Wellenform nicht verzerrt. */
/* Alle Inhalts-Links: fett, ohne feste Linie (E-Mail bleibt so). */
.lm-be-ed__content a {
	font-weight: 700;
	color: #000;
	text-decoration: none;
	position: relative;
}
/* Inline-Text-Links lesen sich wie Fließtext (keine orange Linie, nicht fett).
   Die klickbaren Links stehen gebündelt in der linken Spalte (Quellen-/Linkliste),
   damit es keine verwirrende Doppelung gibt. */
.lm-be-ed__content a.lm-be-ed__inlink {
	font-weight: 700;               /* Text-Links: fett + unterstrichen */
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}
.lm-be-ed__content a.lm-be-ed__inlink:hover,
.lm-be-ed__content a.lm-be-ed__inlink:focus-visible {
	color: #ff4c00;
}

/* Bild-Raster (Spaltenzahl aus dem Galerie-Block, Fallback 4) */
.lm-be-ed__grid {
	display: grid;
	grid-template-columns: repeat( var( --lm-cols, 4 ), 1fr );
	gap: 15px;
	margin-top: 2.5rem;
	margin-bottom: 2.25rem;
}
.lm-be-ed__grid img {
	display: block;
	width: 100%;
	aspect-ratio: 152 / 134;
	object-fit: cover;
	border-radius: var( --lm-radius-media, 10px );
	cursor: zoom-in;
}

/* Bild-Element: Spalten aus Bild + Überschrift (max 3 pro Reihe, --lm-cols).
   Liegt in der Artikelspalte (bezieht die linke Label-Spalte nicht ein). */
.lm-be-ed__imgcols {
	display: grid;
	grid-template-columns: repeat( var( --lm-cols, 2 ), 1fr );
	gap: 16px 24px;
	margin: 2.5rem 0 2.25rem;
}
.lm-be-ed__imgcol { margin: 0; }
.lm-be-ed__imgcol img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: var( --lm-radius-media, 10px );
	cursor: zoom-in;
}
/* Standard „fit" (ganzes Bild, cremefarben gefüllt) · „fill" (cover) per CSS-Klasse */
.lm-be-ed__imgcol[data-fit="contain"] img { object-fit: contain; object-position: center; background: #edece8; }
.lm-be-ed__imgcol[data-fit="cover"] img { object-fit: cover; object-position: left center; }
.lm-be-ed__imgcaption {
	margin: 0.65rem 0 0;
	font-size: 1.0625rem;   /* Fließtextgröße */
	line-height: 1.35;
	font-weight: 700;       /* bold */
	color: #000;
}
@media ( max-width: 700px ) {
	.lm-be-ed__imgcols { grid-template-columns: repeat( 2, 1fr ); }
}
@media ( max-width: 460px ) {
	.lm-be-ed__imgcols { grid-template-columns: 1fr; }
}

/* Großbild – Format/Seitenverhältnis kommt aus dem Editor (kein CSS-Zwang).
   Nur Abstand (über den Content-Fluss) + Radius bleiben aus dem CSS. */
.lm-be-ed__figure { margin: 0; border-radius: var( --lm-radius-media, 10px ); overflow: hidden; line-height: 0; }
.lm-be-ed__figure img {
	display: block;
	width: 100%;
	height: auto;
	cursor: zoom-in;
}

/* Zitat – eingerückt, ohne senkrechten Strich. Abstand wie bei Bildern.
   (Grund-Optik global in style.css: .lm-quote) */
.lm-be-ed__quotewrap {
	margin: 5rem 0 4.5rem; /* doppelter Abstand oben/unten ums Zitat */
}
.lm-be-ed__quotewrap .wp-block-quote,
.lm-be-ed__quotewrap blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	padding-inline-start: var( --lm-quote-indent, 2.5rem );
	font-style: normal;
}
.lm-be-ed__quotewrap blockquote p {
	font-weight: 700;
	font-size: clamp( 1.2rem, 1.8vw, 1.5rem );
	line-height: 1.3;
	margin: 0 0 0.5rem;
}
.lm-be-ed__quotewrap cite {
	display: block;
	font-style: normal;
	font-size: 0.95rem;
	color: #6b6b6b;
	margin-top: 0.4rem;
}

/* Call-to-Action-Button – identisch zu „Mitmachen" (orange, weißer Text). */
.lm-be-ed__content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lm-be-ed__content .wp-block-button__link {
	display: inline-block;
	padding: 16px 36px;
	border: 0;
	border-radius: 8px;
	background: #ff4c00;
	color: #000;                     /* Text schwarz */
	font-family: var( --lm-mono );
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
}
/* Hover bewusst offen – wird später global festgelegt. */

/* =========================================================================
 * 3) Lightbox – cremefarben (Website-Hintergrund), alle Artikelbilder
 * ========================================================================= */
.lm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 4vmin;
	background: rgba( 237, 236, 232, 0.97 );
}
.lm-lightbox.is-open { display: flex; }
.lm-lightbox__stage { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lm-lightbox__img {
	max-width: 92vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	background: #edece8;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.22 );
}
.lm-lightbox__cap {
	position: absolute;
	left: 4vmin;
	bottom: 4vmin;
	margin: 0;
	color: #000;
	font-size: 1.125rem;
	line-height: 1.5;
	text-align: left;
	max-width: 48ch;
}
.lm-lightbox__close,
.lm-lightbox__nav {
	position: absolute;
	background: none;
	border: none;
	color: #000;
	cursor: pointer;
	line-height: 1;
	opacity: 0.7;
	transition: opacity 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}
.lm-lightbox__close:hover,
.lm-lightbox__nav:hover { opacity: 1; }
.lm-lightbox__close { top: 14px; right: 20px; padding: 6px 12px; }
.lm-lightbox__nav { top: 50%; transform: translateY( -50% ); padding: 8px 16px; }
.lm-lightbox__prev { left: 12px; }
.lm-lightbox__next { right: 12px; }
.lm-lightbox__close svg { width: 1.75rem; height: 1.75rem; display: block; }
.lm-lightbox__nav svg { width: 2.25rem; height: 2.25rem; display: block; }
.lm-lightbox__count {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX( -50% );
	color: #000;
	font-family: var( --lm-mono );
	font-size: 0.9rem;
	opacity: 0.75;
}
.lm-lightbox.is-single .lm-lightbox__nav,
.lm-lightbox.is-single .lm-lightbox__count { display: none; }

/* =========================================================================
 * 4) Responsive
 * ========================================================================= */
@media ( max-width: 900px ) {
	.lm-be-ed__row { grid-template-columns: 1fr; row-gap: 1rem; }
	.lm-be-ed__grid { grid-template-columns: repeat( 2, 1fr ); }
	/* Einspaltig: Aside NICHT mehr sticky – sonst klebt die Abschnitts-Überschrift
	   (+ Kontakt) beim Scrollen fest und überlagert die Bilder/den Inhalt. */
	.lm-be-ed__aside { position: static; top: auto; }
	/* Einspaltig: alle Links gebündelt am Artikelende; die Pro-Abschnitt-Listen
	   im Aside ausblenden. */
	.lm-be-ed__endlinks { display: block; margin-top: 3rem; }
	.lm-be-ed__asidefoot .lm-be-ed__links { display: none; }
}
@media ( max-width: 600px ) {
	.lm-beitrag { padding-top: 3.5rem; width: 90vw; }
	.lm-beitrag__hero { margin-bottom: 2.5rem; }
}

/* =========================================================================
 * Boxen (core/columns mit Text) – Stil wie Leitbild/Satzung auf Verein Update.
 * 1–3 Boxen pro Reihe, alle gleich hoch (grid + align-items:stretch), Button
 * unten angedockt. Headline optional (einfach die Überschrift weglassen).
 * ========================================================================= */
.lm-be-ed__boxes {
	display: grid;
	grid-template-columns: repeat( var( --lm-cols, 1 ), 1fr );
	gap: 1.75rem;
	align-items: stretch;
	margin: 2.5rem 0;
}
.lm-be-ed__box {
	display: flex;
	flex-direction: column;
	border: 1.5px solid #000;
	border-radius: var( --lm-radius-card, 20px );
	padding: 2rem 1.75rem;
	background: transparent;
}
.lm-be-ed__box-title {
	font-weight: 700;
	font-size: clamp( 1.35rem, 2vw, 1.7rem );
	line-height: 1.15;
	margin: 0 0 1.1rem;
}
.lm-be-ed__box-body { font-size: 1.0625rem; line-height: 1.6; font-weight: 500; }
.lm-be-ed__box-body p { margin: 0 0 1rem; }
.lm-be-ed__box-body > *:last-child { margin-bottom: 0; }
.lm-be-ed__box-foot { margin-top: auto; padding-top: 1.5rem; }   /* Button an den unteren Rand */
.lm-be-ed__box-foot .wp-block-buttons { margin: 0; }
.lm-be-ed__box-foot .wp-block-button__link { color: #000; }

/* Zwei große Bilder nebeneinander (Höhe ~ wie das große Einzelbild). */
.lm-be-ed__duo {
	display: grid;
	grid-template-columns: repeat( 2, 1fr );
	gap: 1rem;
	margin: 2.5rem 0 2.25rem;
}
.lm-be-ed__duo img {
	display: block;
	width: 100%;
	aspect-ratio: 328 / 303;
	object-fit: cover;
	border-radius: var( --lm-radius-media, 10px );
}

@media ( max-width: 760px ) {
	.lm-be-ed__boxes { grid-template-columns: 1fr; }
	.lm-be-ed__box-foot { margin-top: 1.5rem; }
	.lm-be-ed__duo { grid-template-columns: 1fr; }
}
