/*
Theme Name: LmDR Niedersachsen (Astra)
Template: astra
Description: Child-Theme fuer die Landsmannschaft der Deutschen aus Russland, Landesgruppe Niedersachsen, basierend auf Astra.
Version: 4.4
*/

/* Slightly larger base font size site-wide, for readability - many
   visitors are older members of the association. */
html {
	font-size: 18px;
}

/*
 * The full-bleed hero image (.lmdr-hero-single) uses 100vw + negative
 * margins to break out to the true viewport edges - on a desktop browser
 * with a classic (space-reserving) scrollbar, 100vw measures WIDER than
 * the actually visible area by the scrollbar's own width, which used to
 * spill a few extra pixels past the right edge. scrollbar-gutter: stable
 * fixes that at the root by reserving the scrollbar's space up front, so
 * 100vw and the real visible width match exactly and nothing overflows in
 * the first place - this used to be patched with `overflow-x: hidden` on
 * html/body instead, but that turned out to be the reason .site-header's
 * `position: sticky` below silently did nothing: overflow-x:hidden forces
 * overflow-y to compute to auto (the CSS spec's "other axis" rule), which
 * makes html/body a scroll container in their own right - and a sticky
 * element positions itself against its NEAREST scrolling ancestor, so the
 * header ended up "sticking" to the top of that (invisible, coincidentally-
 * matching-the-viewport) box instead of the actual page scroll, which in
 * practice behaved exactly like position: static (scrolled away with
 * everything else, most noticeably on mobile). Confirmed by measuring the
 * header's getBoundingClientRect() while scrolled: it moved in lockstep
 * with scrollY instead of staying pinned at 0.
 */
html {
	scrollbar-gutter: stable;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: #fff;
}

.site-footer {
	background-color: #0a5d88;
	color: #fff;
}
/* Astra paints its own background on the inner footer row wrapper(s),
   covering the color set on .site-footer above - make those transparent
   so the blue shows through. */
.site-footer .ast-builder-grid-row-container {
	background-color: transparent;
}
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer p,
.site-footer a {
	color: #fff;
}
.site-footer a:hover {
	color: #F4F4F4;
}

/* Site title text next to the logo - hidden per user request; the new
   logo (in progress) will include the association name itself. */
.ast-site-title-wrap {
	display: none;
}

/* Infinite-scroll loading indicator on category/feed pages */
.lmdr-loading-indicator {
	text-align: center;
	color: #0a5d88;
	font-style: italic;
	padding: 2em 0;
}

/* Major section headings on the homepage ("Kultur" from the page's own
   block content, and "Aktivitäten der Landesgruppe" / the Ortsgruppe-page
   feed headings from lmdr_render_aktivitaeten_feed()) - both styled the
   same way so the page doesn't read as two different design systems:
   same accent-blue colour, same spacing rhythm above and below. The feed
   heading previously had margin-bottom: 0, so the article cards started
   immediately underneath it with no breathing room at all - explicitly
   set here rather than left to inherit. Margin-top trimmed down from an
   earlier 2.5em - it was making the gap between the end of one homepage
   section (the intro text, or the whole Kultur block) and the heading
   that starts the next one read as too much dead space, per Daniel's
   "less white space overall, tighter between things that belong
   together" note - some separation between distinct sections is still
   right, just not this much. */
#post-19 h2.wp-block-heading,
.lmdr-feed-heading {
	text-align: center;
	color: #0a5d88;
	margin-top: 1.5em;
	margin-bottom: 0.75em;
}

/* Homepage page title ("Start") - redundant now that the hero collage
   opens the page, so hidden on the front page only. Scoped to the exact
   page-19 article by id, NOT a generic ".entry-header" selector - the
   Aktivitäten feed cards below reuse the same "entry-header" class for
   their own titles, and a broad selector here hid every one of them. */
#post-19.type-page .entry-header {
	display: none;
}

/* Homepage hero - 3 images like the original lmdr-niedersachsen.de: two
   stacked on the left, one large on the right. Kept inside the site's
   content width (1200px, the same column the text below uses) instead of full-bleed - the source photos are only 800-1280px
   wide, so stretching them across a wide desktop screen made them look
   pixelated. Each image is displayed at or below its native size.
   astra_content_before (see functions.php) fires as a direct child of
   #page, a flex row, so the wrapper still needs the 100vw/negative-margin
   escape to span the full row; the grid inside is then centred. */
.lmdr-hero {
	width: 100vw;
	margin: 0 0 1.5em;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 20px 20px 0;
	box-sizing: border-box;
}
.lmdr-hero-grid {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 2fr;
	grid-template-rows: 1fr 1fr;
	gap: 8px;
	/* Cell shapes ~16:9 like the photos themselves, so object-fit: cover
	   barely crops (a 1:2 column split with this ratio gives left cells
	   of ~1.73:1 and a large right cell of ~1.7:1). */
	aspect-ratio: 2.55 / 1;
}
.lmdr-hero-grid img {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: cover;
	object-position: center 25%;
	display: block;
	margin: 0;
	border-radius: 6px;
}
.lmdr-hero-a { grid-column: 1; grid-row: 1; }
.lmdr-hero-b { grid-column: 1; grid-row: 2; }
.lmdr-hero-main { grid-column: 2; grid-row: 1 / span 2; }
/* Phone: large image on top, the two others side by side below it. */
@media (max-width: 600px) {
	.lmdr-hero {
		padding: 0;
		margin-bottom: 1em;
	}
	.lmdr-hero-grid {
		max-width: none;
		aspect-ratio: auto;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 220px 120px;
		gap: 4px;
	}
	.lmdr-hero-grid img {
		border-radius: 0;
	}
	.lmdr-hero-grid .lmdr-hero-main { grid-column: 1 / span 2; grid-row: 1; }
	.lmdr-hero-grid .lmdr-hero-a { grid-column: 1; grid-row: 2; }
	.lmdr-hero-grid .lmdr-hero-b { grid-column: 2; grid-row: 2; }
}

/* Kultur cards on the homepage - image on top, then consistent padding,
   with the button pinned to the same bottom line across all 4 cards
   regardless of how much text is in each one. Gutenberg's own columns
   layout computes align-items to "normal" rather than "stretch" here, so
   without forcing it explicitly the tallest card (the one with the most
   text) sets its own height and the rest stay shorter instead of matching
   it - force stretch so this holds even if the card text is edited later. */
.wp-block-columns:has(> .lmdr-kultur-card) {
	align-items: stretch;
}
.lmdr-kultur-card {
	display: flex;
	flex-direction: column;
	padding: 0 !important;
	overflow: hidden;
}
.lmdr-kultur-card img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	object-position: center 40%;
	display: block;
	margin: 0;
}
.lmdr-kultur-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px;
}
.lmdr-kultur-card-body .wp-block-buttons {
	margin-top: auto;
	padding-top: 16px;
}

/* No featured-image thumbnail on Aktivitäten cards at all (homepage
   feed, category archive, and Ortsgruppe pages all use this markup) -
   Daniel wants images to only ever appear inside the actual post, never
   as a preview "title image" above the heading on a card. Astra always
   prints the wrapping <div class="ast-blog-featured-section post-thumb">
   regardless, so this just hides the whole thing outright rather than
   only the empty case. */
.ast-blog-featured-section.post-thumb {
	display: none;
}

/* The "Aktivitäten" category link Astra prints on every card is dead
   weight - literally every post on this site belongs to that one
   category, so it never actually distinguishes anything. */
.ast-taxonomy-container.cat-links {
	display: none;
}

/* Ortsgruppe label on every card (lmdr_print_ortsgruppe_label() in
   functions.php, hooked to astra_blog_archive_title_before/title_meta_
   before - fires from inside the card's own padded box, directly above
   the title, so there's no ambiguity about which card it belongs to
   regardless of spacing between cards) - a small pill showing which
   group a post belongs to, needed on the combined feeds (Ortsverbände
   page, category archive, search results) where several different
   groups' posts sit side by side. margin-top: 0 is correct here (not a
   bug) - the card's own 20px padding already provides the space above
   it; an additional top margin would just add to that unnecessarily. */
.lmdr-ortsgruppe-label {
	display: inline-block;
	margin: 0 0 0.5em;
	padding: 0.2em 0.7em;
	background: #e7eff4;
	color: #0a5d88;
	border-radius: 3px;
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Card separation - a visible boundary per card so imageless cards (which
   no longer have a grey placeholder to visually anchor them) still read
   as distinct tiles in the feed grid, not a run-together wall of text. */
#lmdr-aktivitaeten-feed .ast-article-inner,
.ast-separate-container .ast-article-inner {
	border: 1px solid #E5E5E5;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

/*
 * WordPress's own default search.php template (not lmdr_render_
 * aktivitaeten_feed(), which every other feed on this site goes through)
 * renders its .ast-row as a multi-column flex grid - 2-3 cards side by
 * side - instead of the single full-width column used everywhere else.
 * With truncated preview text, a narrow 1/3-width card just looks empty.
 * Forcing the same single-column layout here for consistency (and so
 * cards actually have room to show their preview text/"Weiterlesen").
 */
.search-results .ast-row {
	display: block;
}
.search-results .ast-row article {
	width: 100%;
}

/*
 * Card body padding - Astra's own inner wrapper (.post-content) only ever
 * had horizontal padding (0 20px). It used to also get visual space above
 * the title from the featured-image thumbnail block sitting right before
 * it, but that block is now hidden entirely (see #52's removal of
 * .ast-blog-featured-section.post-thumb), and its margin/height went with
 * it - leaving almost no gap above the title while the left/right padding
 * stayed at 20px, so a card read as noticeably tighter on top than on the
 * sides. Matching all four sides to the same 20px both restores a proper
 * gap above the title and keeps it equal to the space below, per Daniel's
 * explicit rule (top >= sides, bottom roughly equal - equal on all four
 * trivially satisfies both).
 */
.ast-article-inner .post-content {
	padding: 20px;
}

/*
 * Every ":where(.entry-content, .ast-excerpt-container)" selector below is
 * one fix, applied everywhere at once: a single post page wraps its body
 * in <div class="entry-content">, but a CARD (homepage, Ortsverbände,
 * category/taxonomy archive) does NOT - astra_the_excerpt(), which our
 * astra_excerpt_type filter forces into full-content mode for every card,
 * wraps the exact same the_content() HTML in <div class="ast-excerpt-
 * container ast-blog-single-element"> instead. Every rule here that used
 * to read plain ".entry-content ..." therefore silently never matched on
 * any card at all - paragraph rhythm, quote styling, and (most visibly)
 * image centring/floating all rendered unstyled there, which is why a
 * photo could look correctly centred on its own single-post page but
 * pinned to the left edge in its card on the homepage: the "width: fit-
 * content; margin: auto" rule further down was quietly not applying.
 * :where() (not a plain comma-separated duplicate) so it still carries
 * zero specificity of its own, same as a bare class selector would.
 */

/* Article body paragraph rhythm - Astra's default ~1.6em bottom margin
   reads as too loose here, especially where imported content breaks a
   single quotation into many short one-line paragraphs (see .lmdr-quote
   below, produced by the_content filters in functions.php). */
:where(.entry-content, .ast-excerpt-container) p {
	margin: 0 0 1em;
	line-height: 1.65;
}

/* Multi-paragraph quotations, wrapped server-side (lmdr_style_quote_blocks
   in functions.php) whenever a paragraph run opens with „ and closes with
   " - set apart from the surrounding narrative with an accent border and
   tighter internal spacing, since the paragraphs inside are one continuous
   quotation rather than separate ideas. */
.lmdr-quote {
	clear: both;
	margin: 1.5em 0;
	padding: 0.25em 1.25em;
	border-left: 3px solid #0a5d88;
	font-style: italic;
	color: #333;
}
.lmdr-quote p {
	margin: 0 0 0.6em;
}
.lmdr-quote p:last-child {
	margin-bottom: 0;
}

/* The short "who said it" line right after a quote (flagged with this
   class by the same filter) - distinguished from regular body text so it
   doesn't read as just another paragraph of narrative. */
.lmdr-quote-attribution {
	margin-top: -0.4em !important;
	margin-bottom: 1.5em !important;
	font-style: normal;
	font-weight: 600;
	color: #0a5d88;
}
.lmdr-quote-attribution::before {
	content: "— ";
}

/* Closing "signed by" line at the end of an article (lmdr_style_trailing_
   signature in functions.php - e.g. "Der Vorstand", "Rosa Temkine"). A
   top border sets it apart as a sign-off rather than just another
   paragraph of narrative; styled like .lmdr-quote-attribution above (same
   accent colour/weight/em-dash) so the two read as one consistent
   "who said/wrote this" visual language across the site. */
.lmdr-signature {
	margin-top: 1.5em !important;
	padding-top: 0.75em;
	border-top: 1px solid #E5E5E5;
	font-style: normal;
	font-weight: 600;
	color: #0a5d88;
}
.lmdr-signature::before {
	content: "— ";
}

/* Small in-article images floated left/right (lmdr_float_narrow_images in
   functions.php adds these WP core alignment classes to figures under
   50% of the column width AND only when there's enough following text to
   actually wrap - see that function for why) so body text wraps around
   them instead of leaving an empty gap next to a small photo sitting in
   its own full-width block. Everything else (wide images, and narrow ones
   with no real text to wrap around, e.g. back-to-back photo-dump shots)
   gets the default centred/full-width block treatment instead. */
/* Astra gives every core-block <figure class="wp-block-image"> a default
   0 0 30px soft drop-shadow. Combined with the figure spanning the full
   620px content column while the photo inside it is often much narrower
   and just centred, that shadow rendered as a big soft white/grey glow
   sticking out well past the actual photo on every side - removing it
   here, plus dropping the figure to a fit-content box (instead of a full-
   width block with the image merely centred inside it) so its own edges
   always hug the image exactly, whatever the image's real size is. No
   border-radius anywhere in this group (neither figure nor img) per
   Daniel's request - a round image inside a square shadow/box was the
   other half of the "sticking out" look. */
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image {
	box-shadow: none;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignleft,
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignright {
	max-width: 50%;
	margin-top: 0.3em;
	margin-bottom: 1em;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignleft {
	float: left;
	margin-right: 1.5em;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignright {
	float: right;
	margin-left: 1.5em;
}
/* max-width, not width - width:100% forced every floated image to fill
   its float box regardless of how big the source photo actually is,
   which upscaled (and visibly blurred) any image whose real size was
   smaller than that box. max-width lets a genuinely large photo fill the
   box while a smaller one just shows at its own native size. */
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignleft img,
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignright img {
	max-width: 100%;
	height: auto;
	border-radius: 0;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image:not(.alignleft):not(.alignright) {
	width: fit-content;
	max-width: 100%;
	margin: 1.5em auto;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image:not(.alignleft):not(.alignright) img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 0;
}
:where(.entry-content, .ast-excerpt-container) h2,
:where(.entry-content, .ast-excerpt-container) h3,
:where(.entry-content, .ast-excerpt-container) h4 {
	clear: both;
}
/*
 * Some articles' own first content heading effectively works as a
 * subtitle - e.g. "Friedland 2008" opens with <h2>„Wenn wir das
 * vergessen, verlieren wir uns selbst"</h2> right under the real WP
 * title. On the single-post page that reads fine: WP's own title renders
 * as an <h1> around 36px, close enough to this h2's ~34px that the two
 * look like one consistent title block. On a CARD, Astra shrinks its own
 * title down to ~22.5px for the Aktivitäten grid, but that shrink never
 * touches headings inside the post content itself - so the same
 * subtitle kept rendering at its full ~34px there, visibly bigger than
 * the (already-shrunk) card title sitting right above it. Scoped to
 * .ast-excerpt-container only, never .entry-content, so a real single-
 * post page is untouched and only cards shrink to match.
 */
.ast-excerpt-container h2,
.ast-excerpt-container h3,
.ast-excerpt-container h4 {
	font-size: 1.25em;
}
:where(.entry-content, .ast-excerpt-container)::after {
	content: "";
	display: table;
	clear: both;
}

/* VadW-sourced image captions (lmdr_add_vadw_image_captions in
   functions.php, only added when the post's Quelle is known) - small and
   muted so it reads as an attribution line, not body text. Sits inside
   the same figure box as its image, so it's automatically centred under a
   standalone photo and left/right-aligned under a floated one without any
   extra positioning rules here. */
.lmdr-image-caption {
	font-size: 0.8em;
	font-style: italic;
	color: #767676;
	margin-top: 0.4em;
	text-align: center;
}
/*
 * Inside a Gutenberg gallery block (.wp-block-gallery, several images
 * side by side in one flex row), WordPress core's own CSS gives every
 * figcaption `position: absolute; bottom: 0; color: #fff` - an overlay
 * treatment meant for its own short default caption text sitting on top
 * of the photo. Our VadW captions were never designed for that (they're
 * meant to sit calmly below the image, like everywhere else this class
 * is used) - inside a gallery they inherited the overlay positioning
 * regardless, rendering on top of the photo instead of below it and in
 * white-on-photo instead of the muted grey used elsewhere. Restoring
 * normal in-flow positioning here undoes just that overlay behaviour,
 * without touching how WP's own default gallery captions look if this
 * theme ever uses those elsewhere. !important because WP core's rule
 * ships as inline CSS in <head> with slightly higher specificity (one
 * more tag selector) than this one - without it, core's rule kept
 * winning regardless of source order.
 */
.wp-block-gallery figure.wp-block-image .lmdr-image-caption {
	position: static !important;
	color: #767676 !important;
	background: none !important;
	padding: 0 !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	max-height: none !important;
}
/* The 45% float threshold is computed server-side against the DESKTOP
   content column (~620px) - on a phone-width column the same image is a
   much bigger fraction of the (much narrower) available text width, so
   wrapping there almost never leaves enough room to read either the text
   or the image. Simplest correct fix: floating is a desktop-only
   treatment - below this breakpoint every article image goes back to a
   plain centred block regardless of which alignment class it was given. */
@media (max-width: 600px) {
	:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignleft,
	:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignright {
		float: none;
		max-width: 100%;
		margin: 1.5em auto;
		text-align: center;
	}
	:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignleft img,
	:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.alignright img {
		margin: 0 auto;
	}
}

/* "Kultur"/"Landesverband" nav labels are dropdown-only (see the
   nav_menu_link_attributes filter in functions.php) - normal pointer cursor
   would wrongly suggest the label itself goes somewhere. */
.main-header-menu .menu-item > a[aria-disabled="true"] {
	cursor: default;
}

/* Desktop "Ortsverbände" dropdown (menu-item-643) - 13 direct entries
   (one per Ortsgruppe), several with their own further nested flyout
   (OG Hannover, OG Celle-Salzgitter, OG Neustadt-Nienburg each list their
   own sub-pages). As a single vertical list this ran taller than the
   viewport on common laptop screen heights, with no way to reach the
   items past the bottom edge - it just rendered off-screen. Flowing it
   into two columns instead fixes that without needing overflow/scroll
   (which would have needed extra care not to clip the nested flyouts,
   since those rely on positioning relative to an unclipped ancestor).
   Desktop-only (min-width matching Astra's own mobile breakpoint) - the
   mobile menu is a full-page accordion that already scrolls with the
   page normally, not a floating dropdown, so it never had this problem. */
@media (min-width: 601px) {
	.menu-item-643 > .sub-menu {
		column-count: 2;
		column-gap: 0;
		width: max-content;
		max-width: 90vw;
	}
}

/*
 * Astra hides a closed dropdown with `visibility: hidden` (not `display:
 * none`), keeping it absolutely positioned at its full open height right
 * below the header - normally invisible and harmless, but it still counts
 * toward the PAGE's scrollable area even while hidden, because visibility:
 * hidden (unlike display:none) doesn't remove an element from layout/
 * scroll-size calculations. On a short page (a 404, or any page with very
 * little content) this menu's own height was easily taller than the
 * visible viewport, which let the page scroll well past the footer into
 * blank space - confirmed by comparing documentElement.scrollHeight
 * (850px) against the actual visible content (720px) on a 404 test page,
 * and tracing the 130px gap to this exact element. Collapsing it to zero
 * height while closed removes that phantom scroll space; the open-state
 * selectors here mirror Astra's own exactly (hover/focus/.toggled-on) so
 * opening the menu still works completely normally, nested flyout
 * submenus included. Applied to every top-level dropdown (not just
 * Ortsverbände/menu-item-643, which is by far the tallest) since any of
 * them could cause the same phantom scroll on a short enough page.
 */
.main-header-menu > .menu-item > .sub-menu {
	max-height: 0;
	overflow: hidden;
}
.main-header-menu > .menu-item:hover > .sub-menu,
.main-header-menu > .menu-item.focus > .sub-menu,
.main-header-menu > .menu-item > .sub-menu.toggled-on {
	max-height: none;
	overflow: visible;
}

/* Prev/next post navigation at the bottom of a single post - Astra's
   default styling puts the title in a single-line ellipsis-truncated <p>
   ("Weiter Tag der Niedersachsen 2025 in Osn...") and lays previous/next
   side by side even on narrow screens, where the title then has so little
   width left it collapses to nothing. Let it wrap over multiple lines
   instead, and stack the two links full-width so there's room to read. */
.post-navigation .nav-links {
	display: flex !important;
	flex-direction: column;
	gap: 1.25em;
}
/*
 * !important on width/max-width here because Astra's own dynamic CSS
 * (inc/dynamic-css/navigation.php) ships a same-purpose rule -
 * ".single .post-navigation .nav-next, .single .post-navigation
 * .nav-previous { width: 50% }" - at EVERY breakpoint (mobile and
 * desktop both), and that selector has one more class in it (.single)
 * than this one, so it always won on specificity alone regardless of
 * source order: confirmed live, both links were rendering at 50% width
 * instead of the intended full width, just less noticeably wrong than
 * the text-align issue below. Same reasoning for display: flex above -
 * Astra's own ".single .post-navigation .nav-links" rule sets
 * "display: inline-flex" at the mobile breakpoint specifically.
 */
.post-navigation .nav-previous,
.post-navigation .nav-next {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0.9em 1.1em;
	border: 1px solid #E5E5E5;
	border-radius: 6px;
	box-sizing: border-box;
}
/*
 * Astra's own default gives .nav-next (and everything inside it - the
 * link, the label span, the title <p>) text-align: right, meant for the
 * old side-by-side layout where "Weiter" sits in a right-hand column. Now
 * that both links are stacked full-width in one column above, that
 * right-alignment just staggers "Weiter" over to the far edge while
 * "Zurück" stays left-aligned directly above it - the two ended up
 * looking unrelated/disconnected instead of reading as one simple
 * previous/next list. Forcing left alignment on all of it is what
 * actually fixes that (the flex-direction: column above only fixed the
 * stacking, not this).
 */
.post-navigation .nav-next,
.post-navigation .nav-next a,
.post-navigation .nav-next p {
	text-align: left !important;
}
/*
 * Astra's own dynamic CSS also still sets "padding-left: 20px" on
 * ".single .post-navigation .nav-next a" and "padding-right: 20px" on
 * "...nav-previous a" - spacing meant to keep the text clear of the
 * outer edge in the old side-by-side layout (text-align: right pushed
 * against the right edge, so it got left padding as breathing room; the
 * mirror for nav-previous). Overriding text-align above didn't touch
 * this padding, so "WEITER"'s label/link text still sat 20px further
 * right than "ZURÜCK"'s even after both were left-aligned and stacked -
 * visible as a small but real indent mismatch between the two boxes.
 */
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.post-navigation .nav-links p {
	display: block !important;
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: unset !important;
	height: auto !important;
	max-height: none !important;
	-webkit-line-clamp: unset !important;
	margin: 0.25em 0 0;
}

/* "Zurück" button at the end of a single post (lmdr_back_button in
   functions.php, replacing the related-posts module - see that hook for
   why). Same visual language as .lmdr-weiterlesen, just outlined instead
   of filled so the two don't read as the same action. */
.lmdr-back-button-wrap {
	margin-top: 2em;
}
.lmdr-back-button {
	display: inline-block;
	padding: 0.55em 1.4em;
	background: #fff;
	color: #0a5d88;
	border: 1px solid #0a5d88;
	border-radius: 4px;
	font-size: 0.95em;
	cursor: pointer;
}
.lmdr-back-button:hover {
	background: #e7eff4;
}

/* In-place "Weiterlesen" expand for long Aktivitäten cards
   (lmdr_truncate_long_cards in functions.php). The rest of the article is
   already in the page, just hidden - clicking the button (handled by a
   single delegated listener in infinite-scroll.js, so this works
   identically for cards appended later by infinite scroll) reveals it in
   place rather than navigating away, which is what keeps this compatible
   with infinite scroll at all. */
.lmdr-full-more {
	display: none;
}
.lmdr-weiterlesen {
	display: inline-block;
	margin: 0.5em 0 1em;
	padding: 0.55em 1.4em;
	background: #0a5d88;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.95em;
	cursor: pointer;
}
.lmdr-weiterlesen:hover {
	background: #084a6d;
}
.lmdr-weiterlesen[aria-expanded="true"] {
	display: none;
}

/* ---- Homepage spacing pass (v2.3) ----
   Astra pads every top-level Columns block by 54px (its default block
   padding), which made the Kultur cards narrower than the text column and
   hero above them and pushed them 54px away from the heading - removed.
   #primary also carries a 60px top margin that stacked on top of the
   hero's own bottom margin (87px of dead space between hero and intro
   text) - the hero already provides the gap on the front page. Card text
   gets one consistent rhythm: heading, small gap, text, then the button
   pinned to the bottom with a fixed minimum gap above it. */
.home.ast-plain-container.ast-no-sidebar #primary {
	margin-top: 0;
}
#post-19 .entry-content > .wp-block-columns {
	padding: 0;
}
.lmdr-kultur-card-body > *,
.lmdr-kultur-card-body > p.wp-block-paragraph {
	margin-block: 0 !important;
}
.lmdr-kultur-card-body .wp-block-heading {
	margin-bottom: 0.4em;
}
.lmdr-kultur-card-body .wp-block-buttons {
	margin-top: auto;
	padding-top: 1.1em;
}

/* Homepage welcome paragraph - set as a centred "lead" intro rather than a
   plain left-aligned body paragraph. */
#post-19 .entry-content > p.lmdr-intro {
	max-width: 880px;
	margin: 0 auto 0.5em;
	text-align: center;
	font-size: 1.2rem;
	line-height: 1.7;
	color: #1e293b;
}

/* The emblem card shows the whole coat of arms (never cropped) centred on a
   light panel instead of a cropped photo. */
.lmdr-kultur-card img.lmdr-card-emblem {
	object-fit: contain;
	object-position: center;
	padding: 16px;
	box-sizing: border-box;
	background: #fff;
}

/* Image captions - ONE style for every caption on the site, wherever it
   renders (single post, Aktivitäten card on the homepage/archive, gallery):
   smaller than body text, muted grey, centred directly under the photo
   with a little more space after it than before. NOT italic (Daniel).
   Covers both caption flavours: WordPress's own figcaption.wp-element-caption
   (posts built from newer VadW issues) and the older .lmdr-image-caption
   (per-attachment captions added by lmdr_add_vadw_image_captions). No
   .entry-content ancestor on purpose - the homepage cards wrap the post in
   .ast-excerpt-container instead, which a .entry-content selector missed. */
figure.wp-block-image figcaption.wp-element-caption,
figure.wp-block-image figcaption.lmdr-image-caption {
	font-size: 0.8rem;
	font-style: normal;
	line-height: 1.45;
	color: #6b6b6b;
	text-align: center;
	margin: 0.5em auto 1.5em;
	max-width: 100%;
}
.wp-block-gallery figure.wp-block-image figcaption.wp-element-caption,
.wp-block-gallery figure.wp-block-image figcaption.lmdr-image-caption {
	position: static !important;
	color: #6b6b6b !important;
	background: none !important;
	padding: 0 !important;
}

/* Homepage/archive card preview: the preview ends on its 2nd block, which
   can be a narrow photo that the article view floats left (text wraps
   around it there). In a card nothing follows it except the Weiterlesen
   button, which then sat beside the float. In the preview every photo is a
   plain centred block, floats are contained, and the button always starts
   on its own line below. */
.lmdr-preview {
	display: flow-root;
}
.lmdr-preview figure.wp-block-image.alignleft,
.lmdr-preview figure.wp-block-image.alignright {
	float: none;
	max-width: 100%;
	margin: 1.5em auto 0.5em;
	text-align: center;
}
.lmdr-preview figure.wp-block-image.alignleft img,
.lmdr-preview figure.wp-block-image.alignright img {
	margin: 0 auto;
}
.lmdr-weiterlesen {
	clear: both;
}

/* v3.4 (2026-11-18, Daniel): intro rewritten without "Willkommen auf der
   Webseite" - organisation name as a small blue kicker line above one
   sentence about what we do. Gap under the "Kultur" heading trimmed a
   little (21px -> 14px); the feed headings keep their spacing. */
#post-19 .entry-content > p.lmdr-intro .lmdr-intro-kicker {
	display: block;
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.3;
	color: #0a5d88;
}
/* v3.5: title made big (Daniel: the small uppercase line looked smaller
   than the text below it, and uppercase turned "e. V." into "E. V."),
   "Landesgruppe Niedersachsen" as its own second line. */
#post-19 .entry-content > p.lmdr-intro .lmdr-intro-sub {
	display: block;
	margin: 0.1em 0 0.6em;
	font-size: 1.15rem;
	font-weight: 600;
	color: #0a5d88;
}

/* v3.6: "Aus den Ortsgruppen" divider inside the homepage feed - spans the
   whole row and gets the same heading style as "Aktivitäten der Landesgruppe". */
#lmdr-aktivitaeten-feed .lmdr-feed-divider {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	grid-column: 1 / -1;
	margin: 1em 0 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

/* v3.8: Ortsgruppe chip on single article pages (linked). */
.lmdr-ortsgruppe-label-single a {
	color: inherit;
	text-decoration: none;
}
.lmdr-ortsgruppe-label-single a:hover {
	text-decoration: underline;
}

/* v3.9 (2026-11-18, Daniel): card preview with a narrow photo - photo
   floated left at the start, text beside it (see lmdr_truncate_long_cards).
   Weiterlesen: no extra bottom margin, so the space below the button
   matches the space to its left (card padding). */
.lmdr-preview figure.wp-block-image.lmdr-preview-float {
	float: left;
	width: fit-content;
	max-width: 40%;
	margin: 0.3em 1.5em 0.8em 0;
	text-align: left;
}
.lmdr-preview figure.wp-block-image.lmdr-preview-float img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0;
}
.lmdr-preview figure.lmdr-preview-float figcaption.wp-element-caption {
	text-align: left;
	margin: 0.4em 0 0;
}
.lmdr-preview-has-float > p:first-of-type {
	margin-top: 0;
}
.lmdr-weiterlesen {
	margin-bottom: 0;
}
@media (max-width: 600px) {
	.lmdr-preview figure.wp-block-image.lmdr-preview-float {
		float: none;
		max-width: 100%;
		margin: 0 auto 1em;
	}
	.lmdr-preview figure.lmdr-preview-float figcaption.wp-element-caption {
		text-align: center;
	}
}

/* v4.0: helpers for the wrap-fix script (functions.php, wp_footer). */
.lmdr-clear-float {
	clear: both;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.lmdr-unfloated {
	float: none;
	width: fit-content;
	max-width: 100%;
	margin: 1.5em auto;
}
:where(.entry-content, .ast-excerpt-container) figure.wp-block-image.lmdr-unfloated img {
	display: block;
	margin: 0 auto;
}

/* v4.2 (2026-11-23, Daniel): Kultur cards - the WHOLE card is clickable
   (image, heading and button), not only the button. Done with a
   "stretched link": the button's link gets an ::after that covers the
   whole card, so one real link per card (accessible, no duplicate links).
   Cards get a clear card look (white, rounded, soft shadow, lift on hover)
   so the emblem card and the two photo cards read as one consistent row. */
.lmdr-kultur-card {
	position: relative;
	background: #fff !important;
	border: 1px solid #e3e8ee;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(15, 40, 70, 0.08);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}
.lmdr-kultur-card:hover,
.lmdr-kultur-card:focus-within {
	box-shadow: 0 8px 22px rgba(15, 40, 70, 0.16);
	transform: translateY(-3px);
}
.lmdr-kultur-card .wp-block-button__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.lmdr-kultur-card img {
	transition: transform 0.35s ease;
}
.lmdr-kultur-card:hover img:not(.lmdr-card-emblem) {
	transform: scale(1.04);
}
.lmdr-kultur-card img.lmdr-card-emblem {
	background: linear-gradient(160deg, #eef5fa 0%, #dbe9f3 100%);
	padding: 22px;
}
.lmdr-kultur-card-body .wp-block-heading {
	transition: color 0.2s ease;
}
.lmdr-kultur-card:hover .wp-block-heading {
	color: #0a5d88;
}

/* v4.3: buttons removed from the Kultur cards (Daniel: the whole card is
   clickable, so the button is redundant). The heading link is now the
   stretched link covering the card. */
.lmdr-kultur-card a.lmdr-card-link {
	color: inherit;
	text-decoration: none;
}
.lmdr-kultur-card a.lmdr-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.lmdr-kultur-card:hover a.lmdr-card-link,
.lmdr-kultur-card a.lmdr-card-link:focus {
	color: #0a5d88;
}
.lmdr-kultur-card-body {
	padding: 18px 16px 20px;
	justify-content: center;
}
.lmdr-kultur-card-body .wp-block-heading {
	margin: 0 !important;
}

/* v4.4: intro sentence removed for now (Daniel, on hold) - the sub line
   is the last line of the intro, so drop its bottom gap. */
#post-19 .entry-content > p.lmdr-intro .lmdr-intro-sub {
	margin-bottom: 0;
}
