/*
 * BBA Facelift Layer (2026)
 * Loaded after the parent theme and the Customizer inline styles.
 * Design tokens first, then component overrides section by section.
 * Brand constraints: green #85bc22, BBA logo, Open Sans.
 */

/* Drei wählbare Colorsets. Umschalten zur Abstimmung mit BBA über
   ?palette=naturwarm|frisch|erdig (facelift-palette.js setzt die
   Body-Klasse und merkt sich die Wahl in localStorage).
   Default = „Naturwarm": Wiesengrün + Weizen-Gold, Creme-Flächen. */
:root {
	--bba-green: #85bc22;       /* Marke — Fläche/Akzent, trägt KEIN Weiß (2,28:1) */
	--bba-green-dark: #6da214;
	/* Dunkles Marken-Grün: Linkfarbe auf hellen Flächen UND Buttonfläche mit
	   weißer Schrift. Von #55810e nachgezogen — das lag mit 4,48:1 knapp unter
	   AA; #4e750d liefert 5,3:1 als Text und 5,4:1 mit Weiß darauf. */
	--bba-green-deep: #4e750d;
	--bba-green-tint: #eef5e0;
	--bba-gold: #d9a441;        /* Akzent 2 */
	--bba-gold-deep: #8c6412;   /* dunkel genug für Text auf hellen Flächen */
	--bba-gold-tint: #f7ecd4;
	--bba-ink: #26301e;
	--bba-text: #4c5443;
	--bba-muted: #687159;       /* besteht 4.5:1 auf Weiß */
	--bba-field: #f8f6ef;
	--bba-line: #e7e4d6;
	--bba-radius: 12px;
	--bba-radius-sm: 8px;
	--bba-shadow: 0 1px 2px rgba(38, 48, 30, .06), 0 8px 24px rgba(38, 48, 30, .08);
	--bba-shadow-lift: 0 2px 4px rgba(38, 48, 30, .08), 0 16px 40px rgba(38, 48, 30, .14);
}

/* Colorset „Frisch": kühleres Salbei/Weiß, Pinie, Limette als Akzent 2 */
body.bba-palette-frisch {
	--bba-gold: #9ccb3b;
	--bba-gold-deep: #5f8c1c;
	--bba-gold-tint: #edf7d8;
	--bba-ink: #1f3a24;
	--bba-text: #44523f;
	--bba-muted: #74856c;
	--bba-field: #eef3e6;
	--bba-line: #dde7d2;
}

/* Colorset „Erdig": Ackerboden-Braun als Akzent 2, Papierton, Humus-Tinte */
body.bba-palette-erdig {
	--bba-gold: #8a6a45;
	--bba-gold-deep: #6b4f34;
	--bba-gold-tint: #efe6da;
	--bba-ink: #2b2a24;
	--bba-text: #55524a;
	--bba-muted: #857f72;
	--bba-field: #f6f2ea;
	--bba-line: #e8e2d4;
}

/* ------------------------------------------------------------------
   1. Base typography
   ------------------------------------------------------------------ */

body {
	font-size: 17px;
	line-height: 1.7;
	color: var(--bba-text);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--bba-ink);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

p { line-height: 1.7; }

a { transition: color .15s ease; }

::selection { background: var(--bba-green-tint); color: var(--bba-ink); }

:focus-visible {
	outline: 2px solid var(--bba-green-dark);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* ------------------------------------------------------------------
   1b. Homepage hero (child index-slider.php)
   Wheat field photo (warm gold, matches the palette) + a dark-green
   gradient panel on the left for legible white text. The two-segment
   field-strip rule reappears as the section signature.
   ------------------------------------------------------------------ */

.bba-hero {
	position: relative;
	overflow: hidden;
	min-height: 500px;
	display: flex;
	align-items: center;
}

.bba-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 60%;
	z-index: 0;
}

/* Green-to-transparent wash from the left so the copy stays readable
   while the wheat field shows through on the right. */
.bba-hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(100deg,
			rgba(30, 42, 18, .82) 0%,
			rgba(30, 42, 18, .62) 38%,
			rgba(30, 42, 18, .12) 66%,
			rgba(30, 42, 18, 0) 100%);
}

.bba-hero .container { position: relative; z-index: 2; width: 100%; }

.bba-hero-inner { max-width: 620px; padding: 40px 0; }

.bba-hero-eyebrow {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #dcecb8;
	margin: 0 0 14px;
}

.bba-hero-title {
	font-size: 46px;
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: #fff;
	margin: 0;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.bba-hero-rule {
	display: block;
	width: 74px;
	height: 5px;
	margin: 22px 0 20px;
	border-radius: 3px;
	background: linear-gradient(to right,
		var(--bba-green) 0 46px,
		transparent 46px 56px,
		var(--bba-gold) 56px 74px);
}

.bba-hero-text {
	font-size: 18px;
	line-height: 1.6;
	color: #eef3e6;
	margin: 0 0 30px;
	max-width: 30em;
	text-shadow: 0 1px 10px rgba(0, 0, 0, .3);
}

.bba-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.bba-hero-btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: var(--bba-radius-sm);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.bba-hero-btn--primary {
	background: var(--bba-green);
	color: #fff;
	box-shadow: 0 8px 24px rgba(109, 162, 20, .4);
}

.bba-hero-btn--primary:hover {
	background: var(--bba-green-dark);
	color: #fff;
	transform: translateY(-2px);
}

.bba-hero-btn--ghost {
	background: rgba(255, 255, 255, .12);
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, .7);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.bba-hero-btn--ghost:hover {
	background: #fff;
	color: var(--bba-ink);
	transform: translateY(-2px);
}

@media (max-width: 767px) {
	.bba-hero { min-height: 440px; }
	/* Vertical, not diagonal. Mobile stacks the copy full-width over the
	   bright lower half of the wheat field, where the diagonal wash was
	   thinnest — it left the body text at ~3.4:1, below AA. A straight
	   top-to-bottom scrim covers every column equally, so the text zone
	   stays above 5:1 regardless of how wide the line boxes run. */
	.bba-hero-overlay {
		background: linear-gradient(180deg,
			rgba(30, 42, 18, .68) 0%,
			rgba(30, 42, 18, .56) 30%,
			rgba(30, 42, 18, .72) 52%,
			rgba(30, 42, 18, .84) 100%);
	}
	.bba-hero-title { font-size: 32px; }
	/* Pure white rather than the desktop off-white: buys ~8% contrast over
	   the photo, so the scrim can stay light enough to keep the field visible. */
	.bba-hero-text { font-size: 16px; color: #fff; }
	.bba-hero-btn { padding: 12px 22px; font-size: 15px; }
	.bba-hero-actions { gap: 10px; }
	/* The outline button sits lowest of all — over the brightest part of
	   the photo. Solid keyline plus a dark backdrop instead of the
	   translucent white one, which washed out against the wheat. */
	.bba-hero-btn--ghost {
		background: rgba(30, 42, 18, .45);
		border-color: #fff;
	}
}

/* Tablet / narrow desktop: the diagonal wash applies again from 768px up,
   but the copy column is still nearly viewport-wide, so the lines run into
   the bright wheat on the right — measured 2.93:1 at 768px, 3.71:1 at 991px,
   still 4.94:1 at 1200px. Blend a vertical scrim over the diagonal one until
   the layout is wide enough for the wash alone to carry the text. */
@media (min-width: 768px) and (max-width: 1199px) {
	.bba-hero-overlay {
		background:
			linear-gradient(180deg,
				rgba(30, 42, 18, .30) 0%,
				rgba(30, 42, 18, .42) 45%,
				rgba(30, 42, 18, .60) 100%),
			linear-gradient(100deg,
				rgba(30, 42, 18, .82) 0%,
				rgba(30, 42, 18, .62) 38%,
				rgba(30, 42, 18, .12) 66%,
				rgba(30, 42, 18, 0) 100%);
	}
	.bba-hero-text { color: #fff; }
}

/* The outline button keeps failing further up the range than the body copy
   (4.39:1 at 1200px) because it sits lowest, over the brightest part of the
   photo. Same dark backdrop as on mobile until the wash is dense enough. */
@media (min-width: 768px) and (max-width: 1439px) {
	.bba-hero-btn--ghost {
		background: rgba(30, 42, 18, .42);
		border-color: #fff;
	}
}

/* ------------------------------------------------------------------
   2. Section rhythm + signature heading treatment
   The short two-segment rule under section titles echoes field strips
   seen from above — the one deliberate flourish of this facelift.
   ------------------------------------------------------------------ */

.service-section,
.blog-section,
.portfolio-section { padding: 72px 0; }

.blog-section { background: var(--bba-field); }

.section-heading-title { margin: 0 auto 44px; }

.section-heading-title h1,
.section-heading-title h2 {
	font-size: 34px;
	font-weight: 700;
	color: var(--bba-ink);
	margin: 0 0 6px;
}

.section-heading-title h1::after,
.section-heading-title h2::after {
	content: "";
	display: block;
	width: 54px;
	height: 4px;
	margin: 18px auto 0;
	border-radius: 2px;
	background: linear-gradient(to right,
		var(--bba-green) 0 34px,
		transparent 34px 42px,
		var(--bba-gold) 42px 54px);
}

.section-heading-title p {
	font-size: 17px;
	line-height: 1.65;
	color: var(--bba-muted);
	max-width: 720px;
	margin: 14px auto 0;
}

/* Section titles that are links (Aktuelles, Referenzen) must not pick up
   the Customizer link color. */
.section-heading-title h1 a,
.section-heading-title h2 a { color: inherit; }

.section-heading-title h1 a:hover,
.section-heading-title h2 a:hover {
	color: var(--bba-green-dark);
	text-decoration: none;
}

/* ------------------------------------------------------------------
   3. Top bar (green brand strip) — calmer and more compact
   ------------------------------------------------------------------ */

.top-contact-detail-section { padding: 14px 0 10px; }

.top-contact-detail-section .contact-area { padding: 4px 0; margin: 0; }

.top-contact-detail-section .contact-icon {
	margin: 2px 14px 0 0;
}

.top-contact-detail-section .contact-icon i {
	font-size: 17px;
	width: 38px;
	height: 38px;
	line-height: 36px;
	text-align: center;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
}

/* Dark green text on the brand strip: white on #85bc22 never passes
   WCAG contrast, ink on it reads at ~8:1 and still looks on-brand. */
.top-contact-detail-section h6 {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .8;
	margin: 0 0 2px;
	color: #1e2a12;
}

.top-contact-detail-section h4,
.top-contact-detail-section h4 a {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	color: #1e2a12;
	margin: 0;
}

.top-contact-detail-section h4 a:hover { text-decoration: underline; }

/* The Customizer link color must not leak into the green strip
   (e.g. the encoded mailto link). */
.top-contact-detail-section a,
.top-contact-detail-section a:visited { color: #1e2a12; }

.top-contact-detail-section .contact-icon i {
	color: #1e2a12;
	border-color: rgba(30, 42, 18, .35);
	background: rgba(255, 255, 255, .22);
}

/* Email-encoder injects green lock icons via JS — visual noise.
   (Option show_encoded_check is also disabled; this is the belt.) */
i.eeb-encoded.dashicons-lock { display: none !important; }

/* ------------------------------------------------------------------
   4. Navigation
   ------------------------------------------------------------------ */

.navbar.header-preset2 {
	background: #fff;
	border: 0;
	box-shadow: 0 1px 0 var(--bba-line), 0 6px 18px rgba(34, 42, 28, .05);
}

.navbar.header-preset2 .navbar-nav > li > a {
	font-size: 15px;
	font-weight: 600;
	color: var(--bba-ink);
	letter-spacing: 0;
	transition: color .15s ease, box-shadow .15s ease;
}

.navbar.header-preset2 .navbar-nav > li > a:hover,
.navbar.header-preset2 .navbar-nav > li > a:focus,
.navbar.header-preset2 .navbar-nav > li.current-menu-item > a,
.navbar.header-preset2 .navbar-nav > li.current_page_item > a {
	color: var(--bba-green-dark);
	box-shadow: inset 0 -3px 0 var(--bba-green);
	background: transparent;
}

/* The Customizer paints dropdowns brand-green with dark text and hard
   item borders — unreadable. Force the clean white panel. !important is
   needed because those Customizer rules are inlined per-element. */
.navbar.header-preset2 .dropdown-menu {
	background: #fff !important;
	border: 1px solid var(--bba-line) !important;
	border-radius: var(--bba-radius-sm);
	box-shadow: var(--bba-shadow) !important;
	padding: 8px 0;
	margin-top: 4px;
}

.navbar.header-preset2 .dropdown-menu > li,
.navbar.header-preset2 .dropdown-menu > li > a {
	border: 0 !important;
}

.navbar.header-preset2 .dropdown-menu > li > a {
	background: transparent !important;
	font-size: 14.5px;
	font-weight: 500;
	padding: 9px 20px !important;
	color: var(--bba-text) !important;
	transition: background .12s ease, color .12s ease;
}

.navbar.header-preset2 .dropdown-menu > li > a:hover,
.navbar.header-preset2 .dropdown-menu > li > a:focus,
.navbar.header-preset2 .dropdown-menu > li.active > a {
	background: var(--bba-green-tint) !important;
	color: var(--bba-ink) !important;
}

/* ------------------------------------------------------------------
   5. Buttons (blog "weiterlesen", forms, generic)
   ------------------------------------------------------------------ */

a.blog-btn-sm,
.blog-btn-sm a,
.blog-btn a,
.contact-form-group input[type="submit"],
input[type="submit"],
button[type="submit"] {
	display: inline-block;
	background: var(--bba-green);
	color: #fff;
	font-size: 14.5px;
	font-weight: 600;
	padding: 10px 22px;
	border: 0;
	border-radius: var(--bba-radius-sm);
	transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

a.blog-btn-sm:hover,
.blog-btn-sm a:hover,
.blog-btn a:hover,
.contact-form-group input[type="submit"]:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background: var(--bba-green-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(109, 162, 20, .35);
}

/* ------------------------------------------------------------------
   6. Homepage: Förderprogramm cards (service section)
   Markup: .portfolio-area > a > .portfolio-image + .portfolio-caption
   ------------------------------------------------------------------ */

.service-section .row:last-child {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch; /* 'normal' did not stretch here — be explicit */
}

.service-section .portfolio-area {
	float: none;
	display: flex;
	margin-bottom: 30px;
	height: auto;
}

.service-section .portfolio-area > a { height: 100%; }

.service-section .portfolio-area > a {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	overflow: hidden;
	box-shadow: var(--bba-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}

.service-section .portfolio-area > a:hover {
	transform: translateY(-4px);
	box-shadow: var(--bba-shadow-lift);
	text-decoration: none;
}

.service-section .portfolio-image {
	position: relative;
	height: auto; /* parent sets 100% which defeats the aspect-ratio */
	flex: 0 0 auto;
	overflow: hidden;
	aspect-ratio: 3 / 2;
}

.service-section .portfolio-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.service-section .portfolio-area > a:hover .portfolio-image img {
	transform: scale(1.04);
}

/* The dark hover overlay with FA icons reads dated — retire it. */
.service-section .portfolio-showcase-overlay { display: none; }

.service-section .portfolio-caption {
	background: #fff;
	text-align: center;
	padding: 20px 22px 24px;
	flex: 1 1 auto;
	overflow: visible; /* parent theme sets auto → stray inner scrollbars */
	height: auto;
	min-height: 0;
}

.service-section .portfolio-caption h4 {
	font-size: 18px;
	font-weight: 700;
	color: var(--bba-ink);
	margin: 0 0 6px;
	padding: 0;
}

.service-section .portfolio-caption p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--bba-muted);
	margin: 0;
	padding: 0;
}

/* ------------------------------------------------------------------
   7. Homepage: Aktuelles teasers
   ------------------------------------------------------------------ */

/* Equal-height card pairs with the read-more button pinned bottom.
   Note: the button div sits inside a <p> in the template; browsers hoist
   it out, so in the DOM it is a direct child of .media-body. */
.blog-section .row:last-child {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.blog-section .row:last-child > [class*="col-"] {
	float: none;
	display: flex;
	margin-bottom: 30px;
}

.blog-section .blog-sm-area {
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	box-shadow: var(--bba-shadow);
	padding: 24px 26px;
	width: 100%;
	transition: transform .2s ease, box-shadow .2s ease;
}

.blog-section .blog-sm-area .media {
	display: flex;
	align-items: flex-start;
	height: 100%;
}

.blog-section .blog-sm-area .media-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: auto;
}

.blog-section .blog-btn-area-sm { margin-top: auto; padding-top: 14px; }

.blog-section .blog-sm-area:hover {
	transform: translateY(-3px);
	box-shadow: var(--bba-shadow-lift);
}

.blog-section .blog-post-sm {
	font-size: 13px;
	color: var(--bba-muted);
	margin-bottom: 8px;
}

.blog-section .blog-post-sm a { color: var(--bba-gold-deep); }

.blog-section .media-body h3 {
	font-size: 19px;
	line-height: 1.35;
	margin: 0 0 8px;
}

.blog-section .media-body h3 a { color: var(--bba-ink); }
.blog-section .media-body h3 a:hover { color: var(--bba-green-dark); text-decoration: none; }

.blog-section .media-body p {
	font-size: 15px;
	color: var(--bba-text);
	margin-bottom: 0;
}

.blog-section .blog-sm-box {
	max-width: 180px;
	margin-right: 20px;
}

.blog-section .blog-sm-box img {
	border-radius: var(--bba-radius-sm);
	object-fit: cover;
}

@media (max-width: 767px) {
	.blog-section .blog-sm-area .media { flex-direction: column; }

	.blog-section .blog-sm-box {
		max-width: 100%;
		float: none;
		margin: 0 0 14px;
	}
}

/* ------------------------------------------------------------------
   8. Homepage: Referenzen (portfolio section, Bootstrap carousel)
   Same card language as the Förderprogramm tiles. The carousel needs
   its .item rows flexed for equal heights — but only in states where
   Bootstrap shows them (active/next/prev), never the base .item.
   ------------------------------------------------------------------ */

/* Parent theme puts overflow:auto on every caption → stray scrollbars */
.portfolio-caption { overflow: visible !important; }

.portfolio-section .carousel-inner > .item.active,
.portfolio-section .carousel-inner > .item.next,
.portfolio-section .carousel-inner > .item.prev {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.portfolio-section .portfolio-area {
	float: none;
	display: flex;
	flex-direction: column; /* image + caption are direct children here */
	margin-bottom: 30px;
	height: auto;
}

.portfolio-section .portfolio-area {
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	overflow: hidden;
	box-shadow: var(--bba-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}

.portfolio-section .portfolio-area:hover {
	transform: translateY(-3px);
	box-shadow: var(--bba-shadow-lift);
}

.portfolio-section .portfolio-image {
	position: relative;
	height: auto; /* parent sets 100% which defeats the aspect-ratio */
	flex: 0 0 auto;
	overflow: hidden;
	aspect-ratio: 3 / 2;
}

.portfolio-section .portfolio-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.portfolio-section .portfolio-showcase-overlay {
	background: linear-gradient(to top, rgba(34, 42, 28, .75), rgba(34, 42, 28, .15) 60%, transparent);
}

.portfolio-section .portfolio-caption {
	background: #fff;
	padding: 16px 18px 20px;
	flex: 1 1 auto;
}

.portfolio-section .portfolio-caption h4 {
	font-size: 16.5px;
	margin: 0 0 4px;
}

.portfolio-section .portfolio-caption p {
	font-size: 14px;
	color: var(--bba-muted);
	margin: 0;
}

.portfolio-section a.project-prev,
.portfolio-section a.project-next {
	background-color: var(--bba-green);
	border-radius: 50%;
	transition: background-color .15s ease;
}

.portfolio-section a.project-prev:hover,
.portfolio-section a.project-next:hover { background-color: var(--bba-green-dark); }

/* ------------------------------------------------------------------
   8b. Referenzen archive page (.portfolio-tabs-section, 4-col grid)
   Same card language; the grid was ragged floats before.
   ------------------------------------------------------------------ */

.tab-content .tab-pane .row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.tab-content .portfolio-area {
	float: none;
	display: flex;
	flex-direction: column;
	margin-bottom: 30px;
	height: auto;
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	overflow: hidden;
	box-shadow: var(--bba-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}

.tab-content .portfolio-area:hover {
	transform: translateY(-3px);
	box-shadow: var(--bba-shadow-lift);
}

/* Bootstrap's col padding would break the flush card image */
.tab-content .portfolio-area.col-md-3,
.tab-content .portfolio-area[class*="col-"] {
	padding: 0;
	margin-left: 15px;
	margin-right: 15px;
	width: calc(25% - 30px);
}

@media (max-width: 991px) {
	.tab-content .portfolio-area[class*="col-"] { width: calc(50% - 30px); }
}

@media (max-width: 600px) {
	.tab-content .portfolio-area[class*="col-"] { width: calc(100% - 30px); }
}

.tab-content .portfolio-image {
	position: relative;
	height: auto; /* parent sets 100% which defeats the aspect-ratio */
	flex: 0 0 auto;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.tab-content .portfolio-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tab-content .portfolio-showcase-overlay {
	background: linear-gradient(to top, rgba(34, 42, 28, .75), rgba(34, 42, 28, .15) 60%, transparent);
}

.tab-content .portfolio-caption {
	background: #fff;
	padding: 16px 18px 20px;
	flex: 1 1 auto;
	text-align: center;
}

.tab-content .portfolio-caption h4 { margin: 0 0 4px; }

.tab-content .portfolio-caption h4 a {
	color: var(--bba-ink);
	font-size: 16.5px;
	font-weight: 700;
	text-decoration: none;
}

.tab-content .portfolio-caption h4 a:hover { color: var(--bba-green-dark); }

.tab-content .portfolio-caption p {
	font-size: 14px;
	color: var(--bba-muted);
	margin: 0;
}

/* PDF affordance: cards whose title links to a project sheet say so */
.tab-content .portfolio-caption h4 a[href$=".pdf"]::after,
.portfolio-section .portfolio-caption h4 a[href$=".pdf"]::after {
	content: "PDF";
	display: inline-block;
	vertical-align: 2px;
	margin-left: 7px;
	padding: 1px 7px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--bba-gold-deep);
	background: var(--bba-gold-tint);
	border-radius: 999px;
}

/* Inline PDF viewer modal */
.bba-pdf-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}

.bba-pdf-modal.is-open { display: block; }

body.bba-pdf-noscroll { overflow: hidden; }

.bba-pdf-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(38, 48, 30, .28);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.bba-pdf-sheet {
	position: absolute;
	inset: 4vh 6vw;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--bba-radius);
	box-shadow: var(--bba-shadow-lift);
	overflow: hidden;
}

.bba-pdf-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 14px 12px 20px;
	border-bottom: 1px solid var(--bba-line);
	background: var(--bba-field);
}

.bba-pdf-title {
	font-size: 15.5px;
	color: var(--bba-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bba-pdf-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.bba-pdf-open {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--bba-green-deep) !important;
	text-decoration: none !important;
}

.bba-pdf-open:hover { color: var(--bba-green-dark) !important; }

.bba-pdf-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bba-text);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.bba-pdf-close:hover { background: var(--bba-line); color: var(--bba-ink); }

.bba-pdf-frame {
	flex: 1 1 auto;
	width: 100%;
	border: 0;
	background: #525659; /* matches the browser PDF viewer chrome */
}

/* Filter tabs above the grid → quiet chips */
.portfolio-tabs {
	text-align: center;
	margin: 6px 0 28px;
	padding: 0;
}

.portfolio-tabs .nav-link {
	display: inline-block;
	background: var(--bba-green-tint);
	color: var(--bba-green-deep) !important;
	font-size: 14px;
	font-weight: 600;
	padding: 7px 18px;
	border-radius: 999px;
	text-decoration: none !important;
}

.portfolio-tabs .nav-link.active,
.portfolio-tabs .nav-link:hover {
	background: var(--bba-green);
	color: #fff !important;
}

/* ------------------------------------------------------------------
   9. Callout „Beratungsgespräch" (footer contact strip)
   ------------------------------------------------------------------ */

.footer-contact-detail-section {
	background: var(--bba-green-tint);
	border-top: 1px solid var(--bba-line);
	padding: 64px 0 48px;
}

.footer-section-heading-title h1,
.footer-section-heading-title h2 {
	font-size: 28px;
	color: var(--bba-ink);
}

.footer-contact-area .media { display: flex; align-items: center; }

.footer-contact-icon { margin: 0 18px 0 0; }

.footer-contact-icon i {
	font-size: 20px;
	width: 52px;
	height: 52px;
	line-height: 50px;
	text-align: center;
	color: var(--bba-green-deep);
	background: var(--bba-green-tint);
	border: 1px solid var(--bba-line);
	border-radius: 50%;
}

.footer-contact-area h6,
.footer-contact-area .footer-contact-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bba-gold-deep);
	margin: 0 0 3px;
}

.footer-contact-area h4,
.footer-contact-area h4 a,
.footer-contact-area .footer-contact-value,
.footer-contact-area .footer-contact-value a {
	font-size: 17px;
	font-weight: 700;
	color: var(--bba-ink);
	margin: 0;
}

.footer-contact-area h4 a:hover,
.footer-contact-area .footer-contact-value a:hover { color: var(--bba-green-dark); text-decoration: none; }

/* ------------------------------------------------------------------
   10. Footer
   ------------------------------------------------------------------ */

/* Light, friendly footer: cream surface, ink titles with a small
   field-strip accent, quiet copyright bar. */
.footer-section {
	background: var(--bba-field);
	border-top: 1px solid var(--bba-line);
	color: var(--bba-text);
	padding: 56px 0 40px;
}

.footer-section .footer-widget-title,
.footer-section .footer-widget-title h3,
.footer-section h3 {
	color: var(--bba-ink);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .01em;
}

.footer-section .footer-widget-title::after {
	content: "";
	display: block;
	width: 26px;
	height: 3px;
	margin-top: 10px;
	border-radius: 2px;
	background: linear-gradient(to right,
		var(--bba-green) 0 16px,
		transparent 16px 20px,
		var(--bba-gold) 20px 26px);
}

.footer-section a { color: var(--bba-text); }
.footer-section a:hover { color: var(--bba-green-dark); text-decoration: none; }

.footer-section .textwidget,
.footer-section li,
.footer-section p {
	font-size: 15px;
	line-height: 1.8;
	color: var(--bba-text);
}

.footer-copyright-section {
	background: #eceadd;
	color: var(--bba-muted);
	font-size: 13.5px;
	padding: 16px 0;
}

.footer-copyright-section a { color: var(--bba-text); }
.footer-copyright-section a:hover { color: var(--bba-green-dark); }

body.bba-palette-frisch .footer-copyright-section { background: #e2ebd6; }
body.bba-palette-erdig .footer-copyright-section { background: #ece5d7; }

/* ------------------------------------------------------------------
   11. Subpage hero (page title section)
   ------------------------------------------------------------------ */

.page-title-section .overlay {
	background: linear-gradient(to right, rgba(34, 42, 28, .35), rgba(34, 42, 28, .08));
	padding: 64px 0 58px;
}

.page-title h1 {
	font-size: 38px;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.page-breadcrumb,
.page-breadcrumb a { font-size: 14px; }

/* The banner is a pale field (custom-light), but the theme colours the
   breadcrumb white (built for the old dark banner). The links carry their
   own readable colour, yet the current (non-link) crumb and the "/"
   separators stayed white — invisible on the light field. Mute them. */
.page-breadcrumb > li { color: var(--bba-muted); }
.page-breadcrumb > li a { color: var(--bba-muted); }
.page-breadcrumb > li a:hover { color: var(--bba-green-dark); }
.page-breadcrumb > li + li::before { color: var(--bba-muted); }
.page-breadcrumb > li:last-child { color: var(--bba-text); }

/* The image/structure hero previews keep a dark field — restore white there. */
body.bba-hero-bild .page-breadcrumb > li,
body.bba-hero-bild .page-breadcrumb > li a,
body.bba-hero-bild .page-breadcrumb > li:last-child,
body.bba-hero-bild .page-breadcrumb > li + li::before,
body.bba-hero-struktur .page-breadcrumb > li,
body.bba-hero-struktur .page-breadcrumb > li a,
body.bba-hero-struktur .page-breadcrumb > li:last-child,
body.bba-hero-struktur .page-breadcrumb > li + li::before { color: rgba(255, 255, 255, .9); }

/* ------------------------------------------------------------------
   11b. Subpage-hero VARIANTS (preview via ?hero=…, facelift-hero.js)
   Toggle-only, for the BBA sign-off. No parameter = current state above.
   The green base colour comes from custom-light.php on .page-title-section;
   each variant overrides it there. Pick one, then fold it into 11. above.
   ------------------------------------------------------------------ */

/* --- A) „schlank": lower height, deep-green field, lime only as accent --- */
body.bba-hero-schlank .page-title-section {
	background: linear-gradient(135deg, #3f5a1e 0%, #2c3f16 100%);
}
body.bba-hero-schlank .page-title-section .overlay {
	background: none;
	padding: 40px 0 34px;
}
body.bba-hero-schlank .page-title h1 {
	font-size: 30px;
	padding-left: 16px;
	border-left: 4px solid var(--bba-green);
	text-shadow: none;
}

/* --- B) „bild": shared aerial photo behind the title, green-dark scrim --- */
body.bba-hero-bild .page-title-section {
	background-image:
		linear-gradient(to right, rgba(20, 28, 12, .78), rgba(20, 28, 12, .42)),
		url(img/hero-default.webp);
	background-size: cover;
	background-position: center 40%;
}
body.bba-hero-bild .page-title-section .overlay {
	background: none;
	padding: 60px 0 54px;
}
body.bba-hero-bild .page-title h1 {
	text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

/* --- C) „struktur": keep the green field, add a diagonal edge + texture --- */
body.bba-hero-struktur .page-title-section {
	position: relative;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 0 100%);
	/* faint diagonal field-rows texture, low opacity, brand-green tinted */
	background-image:
		repeating-linear-gradient(
			115deg,
			rgba(255, 255, 255, .05) 0 2px,
			rgba(255, 255, 255, 0) 2px 26px
		);
}
body.bba-hero-struktur .page-title-section .overlay {
	padding: 58px 0 66px; /* extra bottom room for the diagonal cut */
}

/* --- D) „hell": light field, dark title, green only as a keyline accent --- */
body.bba-hero-hell .page-title-section {
	background: #f1f4ea;
	border-bottom: 3px solid var(--bba-green);
}
body.bba-hero-hell .page-title-section .overlay {
	background: none;
	padding: 46px 0 40px;
}
body.bba-hero-hell .page-title h1 {
	color: var(--bba-ink);
	font-size: 34px;
	padding-left: 16px;
	border-left: 4px solid var(--bba-green);
	text-shadow: none;
}
body.bba-hero-hell .page-breadcrumb,
body.bba-hero-hell .page-breadcrumb a { color: var(--bba-muted); }
body.bba-hero-hell .page-breadcrumb a:hover { color: var(--bba-green-dark); }

/* ------------------------------------------------------------------
   12. Content pages (Förderprogramme etc.)
   ------------------------------------------------------------------ */

.page-builder { padding-top: 8px; }

/* --- Reading experience on the content column (.col-md-8/-9) ---------
   Info pages are scanned for hard facts (Fördersätze, Fristen). Anchor
   the headings, cap the line length, brand the list markers, highlight
   <strong> facts. Editor-centered headings are normalized: they float
   detached above left-aligned copy. */

.page-builder .col-md-8 h2,
.page-builder .col-md-9 h2 {
	font-size: 26px;
	margin: 44px 0 16px;
	padding-left: 14px;
	border-left: 4px solid var(--bba-green);
	text-align: left !important;
}

.page-builder .col-md-8 h2:first-child,
.page-builder .col-md-9 h2:first-child { margin-top: 0; }

/* Section cards (grouped by facelift-sections.js) — separate the long
   content blocks of Förderprogramm pages into readable, framed sections. */
.bba-doc-section {
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	padding: 26px 30px 28px;
	margin: 0 0 22px;
	box-shadow: var(--bba-shadow);
	max-width: none;
}

.bba-doc-section > *:first-child { margin-top: 0; }
.bba-doc-section > *:last-child { margin-bottom: 0; }

/* The section title is whatever heading opens the card (h2 on some
   pages, h3 on others) — give it the section-title look with the green
   edge, regardless of level. */
.page-builder .bba-doc-section > h2:first-child,
.page-builder .bba-doc-section > h3:first-child,
.page-builder .bba-doc-section > h4:first-child {
	font-size: 23px;
	padding-left: 14px;
	border-left: 4px solid var(--bba-green);
	text-align: left !important;
}

/* Headings inside a card (subsections, e.g. h4 under an h3) stay quiet. */
.page-builder .bba-doc-section h4 {
	font-size: 17px;
	font-weight: 700;
	color: var(--bba-ink);
	margin: 22px 0 8px;
	padding-left: 0;
	border-left: 0;
}

/* The BBA-services section is the sales part — lift it with a tinted
   surface and a green edge so it stands out from the info sections. */
.bba-doc-section.bba-doc-section--services {
	background: var(--bba-green-tint);
	border-color: transparent;
	border-left: 4px solid var(--bba-green);
}

@media (max-width: 767px) {
	.bba-doc-section { padding: 20px 20px 22px; }
}

/* ------------------------------------------------------------------
   12c. Full-width prose pages, carded (Kontakt #137, Karriere #2779)
   fullwidth.php drops content into .col-md-12 with no sidebar and no
   card, so these pages read edge-to-edge. Give them the same white
   card + reading width as the sidebar content column. Scoped by page
   id on purpose: the Berater page (#3975) is also full-width but
   renders the map shortcode (its own wrapper) and must stay uncarded.
   ------------------------------------------------------------------ */
body.page-id-137 .page-builder .col-md-12 .blog-lg-area-left,
body.page-id-2779 .page-builder .col-md-12 .blog-lg-area-left {
	max-width: 960px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	box-shadow: var(--bba-shadow);
	padding: 36px 44px 40px;
}

body.page-id-137 .col-md-12 .blog-lg-area-left > *:first-child,
body.page-id-2779 .col-md-12 .blog-lg-area-left > *:first-child { margin-top: 0; }

/* Reading width for the prose (the map breaks out of this, see below). */
body.page-id-137 .blog-lg-area-left > p,
body.page-id-137 .blog-lg-area-left > ul,
body.page-id-137 .blog-lg-area-left > .wp-block-columns,
body.page-id-2779 .blog-lg-area-left > p,
body.page-id-2779 .blog-lg-area-left > ul { max-width: 70ch; }

/* Section-style headings (green edge, like the content pages). */
body.page-id-137 .blog-lg-area-left h3,
body.page-id-2779 .blog-lg-area-left h3 {
	font-size: 22px;
	margin: 32px 0 12px;
	padding-left: 14px;
	border-left: 4px solid var(--bba-green);
	text-align: left;
}
body.page-id-137 .blog-lg-area-left h3:first-child,
body.page-id-2779 .blog-lg-area-left h3:first-child { margin-top: 0; }

/* The consultant map on Kontakt sits inside the page card — drop its own
   off-white chrome and let it use the full card width. */
body.page-id-137 .bba-karte-wrapper {
	max-width: none;
	margin-top: 24px;
	background: transparent;
	box-shadow: none;
	padding: 0;
}

@media (max-width: 767px) {
	body.page-id-137 .page-builder .col-md-12 .blog-lg-area-left,
	body.page-id-2779 .page-builder .col-md-12 .blog-lg-area-left {
		padding: 22px 20px 26px;
	}
}

.page-builder .col-md-8 h3,
.page-builder .col-md-9 h3 {
	font-size: 20px;
	margin: 32px 0 12px;
	text-align: left !important;
}

.page-builder .col-md-8 p,
.page-builder .col-md-9 p {
	max-width: 70ch;
	font-size: 17px;
	line-height: 1.7;
	margin-bottom: 14px;
}

.page-builder .col-md-8 ul,
.page-builder .col-md-8 ol,
.page-builder .col-md-9 ul,
.page-builder .col-md-9 ol {
	max-width: 70ch;
	font-size: 17px;
	margin-bottom: 16px;
}

/* Brand list markers: crisp geometric squares (a glyph scales badly and
   floats at the line top), tighter rhythm so short fact lines read as
   one group instead of scattered lines. */
.page-builder .col-md-8 ul,
.page-builder .col-md-9 ul {
	list-style: none;
	padding-left: 24px;
}

.page-builder .col-md-8 ul li,
.page-builder .col-md-9 ul li {
	position: relative;
	margin-bottom: 6px;
	line-height: 1.6;
}

.page-builder .col-md-8 ul li::before,
.page-builder .col-md-9 ul li::before {
	content: "";
	position: absolute;
	left: -21px;
	top: .55em;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--bba-green);
}

/* Nested lists become a grouped, tinted block (e.g. Förderstaffeln) */
.page-builder .col-md-8 ul ul,
.page-builder .col-md-9 ul ul {
	margin: 8px 0 4px;
	padding: 10px 14px 10px 34px;
	background: var(--bba-field);
	border-radius: var(--bba-radius-sm);
}

.page-builder .col-md-8 ul ul li,
.page-builder .col-md-9 ul ul li { margin-bottom: 4px; }

.page-builder .col-md-8 ul ul li:last-child,
.page-builder .col-md-9 ul ul li:last-child { margin-bottom: 0; }

.page-builder .col-md-8 ul ul li::before,
.page-builder .col-md-9 ul ul li::before {
	background: transparent;
	border: 2px solid var(--bba-gold);
	border-radius: 50%;
	width: 8px;
	height: 8px;
	top: .5em;
}

/* Editors sometimes create consecutive one-item nested lists —
   merge those visually into a single tinted block. */
.page-builder .col-md-8 li > ul:has(+ ul),
.page-builder .col-md-9 li > ul:has(+ ul) {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	margin-bottom: 0;
	padding-bottom: 5px;
}

.page-builder .col-md-8 li > ul + ul,
.page-builder .col-md-9 li > ul + ul {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	margin-top: 0;
	padding-top: 5px;
}

/* Facts marked <strong> should pop when scanning */
/* Only short inline emphasis (amounts, deadlines) gets the gold chip —
   the .bba-hl marker is set by facelift-sections.js. Whole bold
   sentences stay plain bold, no highlighter-marker effect. */
.page-builder strong.bba-hl {
	color: var(--bba-ink);
	background: var(--bba-gold-tint);
	padding: 0 3px;
	border-radius: 3px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* Editors leave hashtag lines at the end of Förderprogramm pages
   (# Stallbauförderung # …) — a leftover that reads like raw tags.
   The .bba-tagline marker (set by JS) turns them into quiet chips. */
.page-builder .bba-tagline {
	font-size: 0;           /* collapse the whitespace between #tokens */
	font-style: normal;
	margin-top: 26px;
	padding-top: 18px;
	border-top: 1px solid var(--bba-line);
	max-width: none;
}

.page-builder .bba-tagline .bba-tag {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: var(--bba-green-deep);
	background: var(--bba-green-tint);
	border-radius: 999px;
	padding: 4px 12px;
	margin: 0 8px 8px 0;
}

/* Scroll-to-top: round floating brand button instead of a square tab */
.hc_scrollup {
	width: 46px !important;
	height: 46px !important;
	right: 24px !important;
	bottom: 24px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	background: var(--bba-green) !important;
	box-shadow: 0 6px 18px rgba(38, 48, 30, .28) !important;
	opacity: .92 !important;
	transition: background .15s ease, transform .15s ease, opacity .15s ease;
}

.hc_scrollup:hover {
	background: var(--bba-green-dark) !important;
	opacity: 1 !important;
	transform: translateY(-2px);
}

.hc_scrollup i { font-size: 18px !important; line-height: 46px !important; }

/* Captions: readable, tied to the image with the gold accent */
.page-builder .wp-caption-text,
.page-builder figcaption {
	font-size: 14.5px;
	color: var(--bba-muted);
	background: var(--bba-field);
	border-left: 3px solid var(--bba-gold);
	padding: 8px 12px;
	margin-top: 0;
	text-align: left;
}

.page-builder .wp-caption img,
.page-builder figure img { border-radius: var(--bba-radius) var(--bba-radius) 0 0; }

/* Prose links. The exclusion list has to name every button-ish link, or the
   green link colour lands on something that already has its own surface.
   `.dlm-download-button` / `.wp-element-button` are the Gutenberg block
   variant Download Monitor renders on some pages — it keeps the editor's dark
   default background, so the green text measured 2.22:1 on it. */
.page-builder a:not(.download-link):not(.dlm-download-button):not(.wp-element-button):not([class*="btn"]):not(.hover_thumb):not(.nav-link) {
	color: var(--bba-green-deep);
	text-decoration: underline;
	text-decoration-color: var(--bba-green);
	text-underline-offset: 3px;
}

.page-builder a:not(.download-link):not(.dlm-download-button):not(.wp-element-button):not([class*="btn"]):not(.hover_thumb):not(.nav-link):hover { color: var(--bba-green-dark); }

/* Give that block-button variant the same look as the classic download
   button, so both render identically wherever editors used either one. */
a.dlm-download-button.wp-block-button__link,
a.dlm-download-button.wp-block-button__link:hover,
a.dlm-download-button.wp-block-button__link:focus {
	background-color: var(--bba-green-deep);
	color: #fff;
	border-radius: var(--bba-radius-sm);
	text-decoration: none;
}

a.dlm-download-button.wp-block-button__link:hover { background-color: var(--bba-ink); }
a.dlm-download-button.wp-block-button__link * { color: #fff; }

.page-builder table {
	width: 100%;
	border-collapse: collapse;
	margin: 20px 0;
	font-size: 15.5px;
}

.page-builder table th {
	background: var(--bba-green-tint);
	color: var(--bba-ink);
	font-weight: 700;
	text-align: left;
	padding: 10px 14px;
	border: 1px solid var(--bba-line);
}

.page-builder table td {
	padding: 10px 14px;
	border: 1px solid var(--bba-line);
}

.page-builder table tr:nth-child(even) td { background: var(--bba-field); }

.page-builder blockquote {
	border-left: 4px solid var(--bba-green);
	background: var(--bba-field);
	border-radius: 0 var(--bba-radius-sm) var(--bba-radius-sm) 0;
	padding: 18px 22px;
	font-size: 16.5px;
	color: var(--bba-text);
}

.sidebar-widget-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--bba-ink);
}

/* Widget links pointing at the page you're already on (Recent Posts on
   its own single view): render as "you are here", not a dead self-link. */
.page-builder .col-md-4 a[aria-current="page"],
.widget a[aria-current="page"] {
	color: var(--bba-ink) !important;
	font-weight: 700;
	pointer-events: none;
	text-decoration: none !important;
	cursor: default;
}

/* ------------------------------------------------------------------
   12b. Download Monitor buttons (blue boxes with green text by default)
   ------------------------------------------------------------------ */

a.download-link.download-button {
	display: block;
	background: var(--bba-green);
	border: 0;
	border-radius: var(--bba-radius-sm);
	padding: 16px 24px;
	text-align: center;
	transition: background .15s ease, box-shadow .15s ease;
}

a.download-link.download-button:hover {
	background: var(--bba-green-dark);
	box-shadow: 0 6px 16px rgba(109, 162, 20, .35);
}

a.download-link.download-button,
a.download-link.download-button * {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

a.download-link.download-button .download-info,
a.download-link.download-button small {
	font-weight: 400;
	opacity: .85;
}

/* Plain download links (sidebar, footer lists) */
.widget a.download-link,
.page-builder a.download-link:not(.download-button) {
	color: var(--bba-green-deep);
}

/* ------------------------------------------------------------------
   13. Blog list + single
   ------------------------------------------------------------------ */

.blog-sm-box img { border-radius: var(--bba-radius-sm); }

/* Archive/blog list: modern editorial layout (rendered by the child
   content.php). Pattern from well-designed news listings: no sidebar,
   the newest post featured full-width, the rest as an image-top card
   grid with clamped excerpts and quiet read-more links. */

body.archive .page-builder .row > .col-md-4,
body.search .page-builder .row > .col-md-4,
body.blog .page-builder .row > .col-md-4 { display: none; }

body.archive .page-builder .row > .col-md-8,
body.search .page-builder .row > .col-md-8,
body.blog .page-builder .row > .col-md-8 {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	align-items: stretch;
	padding: 56px 0 64px; /* breathing room below the green banner and above the footer */
}

/* Anything that is not a card (pagination, comments nav) spans full width */
body.archive .page-builder .row > .col-md-8 > :not(.bba-article-card),
body.search .page-builder .row > .col-md-8 > :not(.bba-article-card),
body.blog .page-builder .row > .col-md-8 > :not(.bba-article-card) {
	grid-column: 1 / -1;
}

.bba-article-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	box-shadow: var(--bba-shadow);
	overflow: hidden;
	margin-bottom: 0;
	transition: transform .2s ease, box-shadow .2s ease;
}

.bba-article-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--bba-shadow-lift);
}

.bba-article-thumb {
	position: relative;
	flex: 0 0 auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--bba-field);
}

.bba-article-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.bba-article-card:hover .bba-article-thumb img { transform: scale(1.04); }

/* Banners with baked-in text and square logos: letterbox, don't crop */
.bba-article-thumb.bba-thumb-contain img {
	object-fit: contain;
	padding: 16px;
}

.bba-article-card:hover .bba-article-thumb.bba-thumb-contain img { transform: none; }

.bba-article-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 20px 22px 22px;
	min-width: 0;
}

/* Featured: the newest post gets the full row, image left, more type */
.bba-article-card:first-child {
	grid-column: 1 / -1;
	flex-direction: row;
}

.bba-article-card:first-child .bba-article-thumb {
	flex: 0 0 52%;
	aspect-ratio: auto;
	min-height: 340px;
}

.bba-article-card:first-child .bba-article-body {
	padding: 34px 38px;
	justify-content: center;
}

.bba-article-card:first-child .bba-article-title { font-size: 27px; }

.bba-article-card:first-child .bba-article-excerpt {
	font-size: 16.5px;
	-webkit-line-clamp: 4;
}

.bba-article-meta {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bba-gold-deep);
	margin-bottom: 6px;
}

.page-builder .bba-article-meta a {
	color: var(--bba-gold-deep);
	text-decoration: none;
}

.bba-article-sep { margin: 0 4px; color: var(--bba-muted); }

/* High specificity on purpose: the content-column h2 anchor bar and the
   :not()-heavy link underline rule must not reach into article cards. */
.page-builder .col-md-8 h2.bba-article-title,
.page-builder .col-md-9 h2.bba-article-title,
.bba-article-title {
	font-size: 21px;
	line-height: 1.3;
	margin: 0 0 8px;
	padding-left: 0;
	border-left: 0;
}

.page-builder .bba-article-card a,
.bba-article-card a {
	text-decoration: none !important;
}

.page-builder .bba-article-title a,
.bba-article-title a {
	color: var(--bba-ink) !important;
}

.page-builder .bba-article-title a:hover,
.bba-article-title a:hover { color: var(--bba-green-dark) !important; }

.bba-article-excerpt {
	font-size: 15px;
	line-height: 1.6;
	color: var(--bba-text);
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bba-article-card .blog-btn-area-sm { margin-top: auto; }

/* Featured / event card (:first-child) is vertically centered (justify-content:
   center). Pinning the read-more to the bottom via margin-top:auto fought that
   and left a void under short copy — keep it with the centered text block. */
.bba-article-card:first-child .blog-btn-area-sm { margin-top: 16px; }

.bba-article-locked {
	color: var(--bba-muted);
	font-style: italic;
	font-size: 14.5px;
}

.bba-article-locked .bba-lock { font-style: normal; margin-right: 4px; }

/* Event cards: fact list instead of prose excerpt */
.bba-event-facts {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	max-width: none;
}

.bba-event-facts li {
	position: relative;
	padding-left: 26px;
	font-size: 15px;
	color: var(--bba-text);
	margin-bottom: 6px;
	line-height: 1.5;
}

/* Beat .page-builder .col-md-8 ul li::before (the green square bullet)
   with crisp icon glyphs drawn via ::before per fact type. */
.page-builder .bba-event-facts { list-style: none; padding-left: 0; max-width: none; }

.page-builder .bba-event-facts li::before {
	display: block;
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 17px;
	height: 17px;
	background: var(--bba-green-deep);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.page-builder .bba-event-facts li.bba-ef-date::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M7 2v2H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-3V2h-2v2H9V2H7zm13 8v10H4V10h16z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M7 2v2H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-3V2h-2v2H9V2H7zm13 8v10H4V10h16z'/%3E%3C/svg%3E");
}

.page-builder .bba-event-facts li.bba-ef-time::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1-13h-2v6l5 3 1-1.7-4-2.3V7z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1-13h-2v6l5 3 1-1.7-4-2.3V7z'/%3E%3C/svg%3E");
}

.page-builder .bba-event-facts li.bba-ef-place::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E");
}

.bba-event-facts .bba-ef-date { font-weight: 600; color: var(--bba-ink); }

/* Event card without a poster: branded date-badge tile */
.bba-thumb-event {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--bba-green) 0%, var(--bba-green-deep) 100%);
}

.bba-event-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #fff;
	border-radius: var(--bba-radius);
	box-shadow: 0 8px 24px rgba(38, 48, 30, .2);
	padding: 14px 22px;
	line-height: 1;
}

.bba-event-badge-month {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bba-green-deep);
	margin-bottom: 4px;
}

.bba-event-badge-day {
	font-size: 38px;
	font-weight: 700;
	color: var(--bba-ink);
}

/* Quiet read-more link instead of a chunky button per card */
.bba-article-card a.blog-btn-sm {
	background: transparent;
	color: var(--bba-green-deep);
	font-size: 14.5px;
	font-weight: 600;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
}

.bba-article-card a.blog-btn-sm::after {
	content: " →";
	transition: transform .15s ease;
	display: inline-block;
}

.bba-article-card a.blog-btn-sm:hover {
	background: transparent;
	color: var(--bba-green-dark);
	transform: none;
	box-shadow: none;
}

.bba-article-card a.blog-btn-sm:hover::after { transform: translateX(3px); }

@media (max-width: 991px) {
	body.archive .page-builder .row > .col-md-8,
	body.search .page-builder .row > .col-md-8,
	body.blog .page-builder .row > .col-md-8 {
		grid-template-columns: repeat(2, 1fr);
	}

	.bba-article-card:first-child { flex-direction: column; }
	.bba-article-card:first-child .bba-article-thumb { aspect-ratio: 16 / 9; min-height: 0; }
	.bba-article-card:first-child .bba-article-body { padding: 22px 24px; }
	.bba-article-card:first-child .bba-article-title { font-size: 22px; }
}

@media (max-width: 640px) {
	body.archive .page-builder .row > .col-md-8,
	body.search .page-builder .row > .col-md-8,
	body.blog .page-builder .row > .col-md-8 {
		grid-template-columns: 1fr;
	}
}

/* Single post: quiet meta line under the hero (the duplicate in-content
   title was removed in content.php) */
.bba-single-meta {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bba-gold-deep);
	margin: 2px 0 16px;
}

.page-builder .bba-single-meta a {
	color: var(--bba-gold-deep);
	text-decoration: none;
}

.bba-single .media-body > img,
.bba-single .wp-post-image { margin-bottom: 20px; }

.blog-lg-area-left img,
.blog-lg-area-right img,
.blog-lg-area-full img { border-radius: var(--bba-radius); }

/* ------------------------------------------------------------------
   14. Beraterkarte (.bba-* — plugin files stay untouched)
   Composition: map and panel share one warm surface; the panel gets a
   fixed height with internal scrolling so the section no longer leaves
   a huge white gap under the 400px imagemap (which must NOT be scaled —
   the <area> click coordinates are pixel-bound).
   ------------------------------------------------------------------ */

/* SVG-Karte (skalierbar): Grid-Platzierung macht das Plugin-CSS
   (bba-frontend.css) — hier nur die warme Kachel-Optik. */
@media (min-width: 768px) {
	.bba-karte-wrapper {
		background: var(--bba-field);
		border: 1px solid var(--bba-line);
		border-radius: var(--bba-radius);
		padding: 32px;
		margin-top: 10px;
	}

	/* Karte in heller Kachel; durch die transparenten SVG-Ränder scheint
	   der Grund, so hebt sich Bayern von der Umgebung ab. */
	#bba-karte {
		background: linear-gradient(160deg, #dce3e6, #d3dade);
		border: 1px solid var(--bba-line);
		border-radius: var(--bba-radius);
		box-shadow: var(--bba-shadow);
	}

	.bba-panel {
		align-self: start;
		background: #fff;
	}

	.bba-person.active { transform: none !important; }
}

.bba-panel {
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	box-shadow: var(--bba-shadow);
}

.bba-panel .bba-panel-title {
	background: var(--bba-green);
	color: #1e2a12;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
	padding: 12px 16px;
	position: sticky;
	top: 0;
	z-index: 2;
	border-radius: 0;
}

.bba-panel > .bba-panel-title:first-child { border-radius: var(--bba-radius) var(--bba-radius) 0 0; }

/* PLZ search: give the entry point real presence */
.bba-panel .bba-plz-search {
	background: var(--bba-green-tint);
	padding: 14px 16px 12px;
	border-bottom: 1px solid var(--bba-line);
}

#bba-plz-input {
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius-sm);
	padding: 11px 40px 11px 14px;
	font-size: 16px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

#bba-plz-input:focus {
	border-color: var(--bba-green);
	box-shadow: 0 0 0 3px rgba(133, 188, 34, .25);
	outline: none;
}

.bba-plz-hint {
	color: var(--bba-muted);
	font-size: 12.5px;
}

/* Region indicator: quiet eyebrow instead of a second green bar */
.bba-panel .bba-panel-region {
	background: transparent;
	color: var(--bba-muted);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: 14px 16px 6px;
	margin-bottom: 0;
}

#bba-berater-list { padding: 0 10px 12px; }

.bba-person {
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius-sm);
	box-shadow: none;
	padding: 10px 14px;
	margin-bottom: 6px;
	transition: box-shadow .15s ease, background .15s ease;
}

.bba-person:hover { box-shadow: var(--bba-shadow); background: var(--bba-field); }

.bba-person.active {
	border-left: 3px solid var(--bba-green);
	box-shadow: var(--bba-shadow);
}

/* Contrast fix: consultant names were light gray on white. */
.bba-person .bba-person-name,
.bba-person .bba-person-name span {
	color: var(--bba-ink);
	font-weight: 600;
	font-size: 14.5px;
}

.bba-person-name::after { color: var(--bba-green) !important; font-size: 16px !important; }

.bba-person-avatar img {
	border-radius: 50%;
	border: 2px solid var(--bba-green-tint);
	object-fit: cover;
	/* Faces in these portraits sit near the vertical center — keep the
	   crop close to center (a small upward bias for headroom). Earlier
	   values like 35% pushed the crop up onto foreheads/hair. */
	object-position: center 48%;
}

/* Larger, sharper photo on the expanded consultant.
   The round mask is the .bba-person-avatar container — the plugin gives it a
   fixed 64px box with overflow:hidden. It has to grow with the image, or the
   enlarged photo gets clipped back to the old 64px box and only its top-left
   corner stays visible (faces cut off at the forehead). */
.bba-person.active .bba-person-avatar {
	width: 104px;
	height: 104px;
}

.bba-person.active .bba-person-avatar img {
	width: 100%;
	height: 100%;
	border-width: 3px;
	box-shadow: 0 4px 14px rgba(38, 48, 30, .16);
}

.bba-badge {
	background: var(--bba-green-tint);
	color: var(--bba-green-deep);
	border-radius: 999px;
	font-weight: 600;
}

.bba-contact-label { color: var(--bba-muted); }
.bba-contact-row a { color: var(--bba-green-deep); }
.bba-contact-row a:hover { color: var(--bba-green-dark); }

/* Mobile: dropdown selectors instead of the map */
.bba-mobile-selector select {
	padding: 11px 14px;
	font-size: 16px;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius-sm);
	color: var(--bba-text);
}

/* ------------------------------------------------------------------
   15. Forms (contact page, comments)
   ------------------------------------------------------------------ */

.contact-form-group input,
.contact-form-group-textarea textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.contact-form-group input:focus,
.contact-form-group-textarea textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
	border-color: var(--bba-green);
	box-shadow: 0 0 0 3px rgba(133, 188, 34, .2);
	outline: none;
}

/* ------------------------------------------------------------------
   16. Responsive refinements
   ------------------------------------------------------------------ */

@media (max-width: 991px) {
	.service-section,
	.blog-section,
	.portfolio-section { padding: 56px 0; }

	.section-heading-title h1,
	.section-heading-title h2 { font-size: 29px; }
}

@media (max-width: 767px) {
	body { font-size: 16px; }

	.service-section,
	.blog-section,
	.portfolio-section { padding: 44px 0; }

	.section-heading-title h1,
	.section-heading-title h2 { font-size: 25px; }

	.page-title h1 { font-size: 28px; }

	/* Compact top bar on phones: keep the Berater CTA prominent,
	   tuck contact rows closer together. */
	.top-contact-detail-section { padding: 8px 0 6px; }
	.top-contact-detail-section .contact-area { padding: 3px 0; }
	.top-contact-detail-section .contact-icon i {
		font-size: 14px;
		width: 30px;
		height: 30px;
		line-height: 28px;
	}
	.top-contact-detail-section h6 { font-size: 10px; margin: 0; }
	.top-contact-detail-section h4,
	.top-contact-detail-section h4 a { font-size: 14.5px; }

	.footer-contact-detail-section { padding: 44px 0 32px; }
}

/* Parent theme zooms hover images to 1.20 — too aggressive for cards. */
.service-section .portfolio-area:hover img,
.portfolio-section .portfolio-area:hover img,
.tab-content .portfolio-area:hover img {
	transform: scale(1.04);
}

/* ------------------------------------------------------------------
   16. Contrast corrections (measured audit 2026-07-30)
   Sweep over 13 pages × desktop/mobile, sampling only text on solid
   backgrounds. Nearly every failure traced back to one of a handful of
   colour pairs, so these are token-level fixes rather than one-offs.

   Note on specificity: Autoptimize aggregates all stylesheets into one
   bundle and the parent theme lands AFTER this file in it. Same-weight
   overrides here therefore lose. Where that happened the selector is
   deliberately made heavier (`html body …`) instead of relying on order.
   ------------------------------------------------------------------ */

/* Body copy: the parent theme sets `body { color: #8f969c }` (3:1 on white)
   after this file, which also cascaded into every consultant contact row.
   `html body` outranks a bare `body` no matter who is loaded last. */
html body { color: var(--bba-text); }

/* Footer link lists: parent rule `.footer-widget-column ul li a` (#727272 on
   the #f8f6ef footer = 4.45:1) beat the facelift's `.footer-section a`.
   This was the single largest group — 278 occurrences across 12 pages. */
html body .footer-widget-column ul li a,
html body .footer-widget-column ul li a:visited { color: var(--bba-text); }

html body .footer-widget-column ul li a:hover { color: var(--bba-green-deep); }

/* Consultant panels: plugin CSS sets #888 (3.54:1) / inherits the grey body
   colour on the values. Both need a heavier selector than the plugin's. */
html body .bba-person .bba-contact-label { color: var(--bba-muted); }
html body .bba-person .bba-contact-row { color: var(--bba-text); }

/* Kooperationspartner chip was 4.43:1 at 10px — the smallest text on the
   page needs the most contrast, not the least. */
html body .bba-badge { color: var(--bba-green-deep); font-size: 11px; }

/* Green surfaces carrying white text.
   The brand green #85bc22 cannot carry white (2.28:1) — it is a mid-tone.
   These four surfaces move to the darker brand green (5.4:1 with white);
   #85bc22 stays in use everywhere it carries dark text or is decoration
   only (panel titles, list bullets, rules, hover accents).
   Alternative considered: keep #85bc22 and switch the label to --bba-ink
   (6.0:1). Rejected — white-on-green is the established BBA button look. */
.bba-hero-btn--primary,
a.blog-btn-sm,
.blog-btn-sm a,
.blog-btn a,
.contact-form-group input[type="submit"],
input[type="submit"],
button[type="submit"],
a.download-link.download-button,
.portfolio-tabs .nav-link.active,
.portfolio-tabs .nav-link:hover {
	background: var(--bba-green-deep);
}

.bba-hero-btn--primary:hover,
a.blog-btn-sm:hover,
.blog-btn-sm a:hover,
.blog-btn a:hover,
.contact-form-group input[type="submit"]:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
a.download-link.download-button:hover {
	background: var(--bba-ink);
}

/* Active main-nav item: parent theme paints it #85bc22 and keeps the label
   white (2.28:1) — the one nav element on every page that failed. */
/* !important is unavoidable here: the Customizer's own inline CSS declares
   `.navbar-default .navbar-nav > .active > a { background-color: #85bc22
   !important }`, which no amount of specificity can outrank. */
html body .navbar .navbar-nav > .active > a,
html body .navbar .navbar-nav > .active > a:hover,
html body .navbar .navbar-nav > .active > a:focus,
html body .navbar-default .navbar-nav > .active > a,
html body .navbar-default .navbar-nav > .active > a:hover,
html body .navbar-default .navbar-nav > .active > a:focus {
	background-color: var(--bba-green-deep) !important;
	color: #fff !important;
}

/* Parent theme paints every `ul li` #727272 (4.3–4.45:1 on the tinted and
   cream surfaces). Element-only selector, so any class-based colour — hero
   copy, badges, buttons — still wins over this. */
html body ul li,
html body p { color: var(--bba-text); }

/* ------------------------------------------------------------------
   17. Sidebar widgets as cards
   The content column is already a card (.bba-doc-section) while the
   sidebar stayed a flat tinted strip with square corners. Same surface,
   radius, border and shadow as the content cards, one card per widget so
   the blocks read as separate.
   ------------------------------------------------------------------ */

.sidebar-section-right {
	background: transparent;
	border: 0;
	padding: 8px 0 0;
}

.sidebar-widget {
	background: #fff;
	border: 1px solid var(--bba-line);
	border-radius: var(--bba-radius);
	box-shadow: var(--bba-shadow);
	padding: 22px 24px 24px;
	margin: 0 0 20px;
}

.sidebar-widget:last-child { margin-bottom: 0; }

/* Title gets the same green edge as a content card heading, one size down. */
.sidebar-widget .sidebar-widget-title {
	margin: 0 0 14px;
	padding-left: 12px;
	border-left: 4px solid var(--bba-green);
}

.sidebar-widget .sidebar-widget-title h1,
.sidebar-widget .sidebar-widget-title h2,
.sidebar-widget .sidebar-widget-title h3,
.sidebar-widget .sidebar-widget-title h4 {
	margin: 0;
	font-size: 17px;
	line-height: 1.3;
}

/* Task 11: the widget lists were cramped — give the rows room and a
   hairline separator instead of packing them together. */
.sidebar-widget ul { margin: 0; padding: 0; list-style: none; }

.sidebar-widget ul li {
	padding: 9px 0;
	border-bottom: 1px solid var(--bba-line);
}

.sidebar-widget ul li:last-child { padding-bottom: 0; border-bottom: 0; }
.sidebar-widget ul li:first-child { padding-top: 0; }

@media (max-width: 767px) {
	.sidebar-widget { padding: 18px 20px 20px; }
}
