/* Bürgerinitiative Wallhausen — campaign design system */

@import url("single-post.css");

:root {
	--biw-primary: #1a4d3e;
	--biw-primary-dark: #0f3329;
	--biw-secondary: #2d6a4f;
	--biw-accent: #c8862a;
	--biw-accent-hover: #a66e22;
	--biw-alert: #b44332;
	--biw-text: #1c2421;
	--biw-text-muted: #4a5652;
	--biw-surface: #f4f7f5;
	--biw-border: #d8e0dc;
	--biw-radius: 12px;
	--biw-shadow: 0 8px 24px rgba(15, 51, 41, 0.08);
	--biw-focus: 0 0 0 3px rgba(200, 134, 42, 0.45);

	--theme-palette-color-1: #1a4d3e;
	--theme-palette-color-2: #2d6a4f;
	--theme-palette-color-3: #4a5652;
	--theme-palette-color-4: #1c2421;
	--theme-palette-color-5: #d8e0dc;
	--theme-palette-color-6: #f4f7f5;
	--theme-palette-color-7: #fafbfa;
	--theme-palette-color-8: #ffffff;
}

body {
	color: var(--biw-text);
}

/* Primary CTA block style */
.wp-block-button.is-style-biw-cta .wp-block-button__link {
	background: var(--biw-accent);
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
}

.wp-block-button.is-style-biw-cta .wp-block-button__link:hover {
	background: var(--biw-accent-hover);
	color: #fff;
}

/* Homepage sections */
.biw-startseite > .wp-block-group {
	padding-top: clamp(3rem, 6vw, 5rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.biw-startseite > .wp-block-group.biw-section-alt {
	background: var(--biw-surface);
}

.biw-startseite > .wp-block-cover.biw-hero {
	padding-top: 0;
	padding-bottom: 0;
	min-height: clamp(420px, 72vh, 720px);
}

.biw-hero .wp-block-cover__background {
	background-color: transparent !important;
	background-image: none !important;
	opacity: 1 !important;
}

.biw-hero .wp-block-cover__inner-container {
	max-width: 42rem;
	position: relative;
	z-index: 1;
}

.biw-hero h1 {
	text-wrap: balance;
	line-height: 1.15;
	font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
	color: #fff;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.biw-hero .biw-eyebrow {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 0.75rem;
}

.biw-hero .biw-lead {
	font-size: clamp(1.05rem, 1.5vw + 0.9rem, 1.25rem);
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.92);
	max-width: 38rem;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/*
 * Homepage hero (Gutenberg core/cover, sibling of .biw-startseite — not a child):
 * scrim via ::after so dimRatio:0 / has-background-dim-0 cannot zero out the overlay.
 */
body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) {
	isolation: isolate;
}

body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(12, 20, 28, 0.45);
	z-index: 1;
	pointer-events: none;
}

body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) h1,
body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .biw-lead,
body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .biw-eyebrow,
body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .biw-trust-chips,
body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .biw-trust-chips span,
body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .wp-block-cover__inner-container > p:not(.biw-lead):not(.biw-trust-chips) {
	color: #fff;
	text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .biw-lead {
	max-width: 38rem;
}

body.home .wp-block-cover.biw-hero:not(.biw-projekt-landing) .wp-block-cover__inner-container a {
	color: #fff;
	text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.biw-trust-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin-top: 1.25rem;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.8);
}

.biw-trust-chips span:not(:last-child)::after {
	content: "·";
	margin-left: 1rem;
	opacity: 0.6;
}

.biw-section-title {
	font-size: clamp(1.5rem, 2vw + 1rem, 2.125rem);
	margin-bottom: 0.5rem;
}

.biw-section-intro {
	color: var(--biw-text-muted);
	max-width: 42rem;
	margin-bottom: 2rem;
}

.biw-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.25rem;
}

.biw-stat-card {
	background: #fff;
	border: 1px solid var(--biw-border);
	border-radius: var(--biw-radius);
	padding: 1.5rem;
	box-shadow: var(--biw-shadow);
}

.biw-stat-card strong {
	display: block;
	font-size: 1.75rem;
	color: var(--biw-primary);
	line-height: 1.2;
	margin-bottom: 0.35rem;
}

.biw-stat-card span {
	font-size: 0.9375rem;
	color: var(--biw-text-muted);
	line-height: 1.45;
}

.biw-card {
	background: #fff;
	border: 1px solid var(--biw-border);
	border-radius: var(--biw-radius);
	box-shadow: var(--biw-shadow);
	overflow: hidden;
	height: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
	.biw-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 12px 32px rgba(15, 51, 41, 0.12);
	}
}

.biw-card-body {
	padding: 1.25rem 1.5rem 1.5rem;
}

.biw-card-body h3 {
	font-size: 1.125rem;
	margin: 0 0 0.5rem;
}

.biw-card-body p {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--biw-text-muted);
}

.biw-pill {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: var(--biw-primary);
	color: #fff;
	padding: 0.25rem 0.6rem;
	border-radius: 4px;
	margin-bottom: 0.75rem;
}

/* FAQ — card grid (native core/details, no JS) */
.biw-faq {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	margin-top: 1.25rem;
	margin-bottom: 2rem;
	padding: clamp(1.5rem, 3.5vw, 2.25rem);
	background: var(--biw-surface, #f4f7f5);
	border: 1px solid var(--biw-border, #d8e0dc);
	border-radius: calc(var(--biw-radius, 12px) + 2px);
	box-sizing: border-box;
}

[data-prefix="single_blog_post"] .entry-content .biw-faq {
	max-width: var(--biw-single-wide, 72rem);
	margin-left: auto;
	margin-right: auto;
}

.biw-faq > .wp-block-details,
.biw-faq > details.wp-block-details,
.biw-faq > details {
	margin: 0;
}

.biw-faq details {
	background: #fff;
	border: 1px solid var(--biw-border, #d8e0dc);
	border-radius: var(--biw-radius, 12px);
	box-shadow: var(--biw-shadow, 0 8px 24px rgba(15, 51, 41, 0.08));
	overflow: hidden;
	transition:
		box-shadow 0.22s ease,
		transform 0.22s ease,
		border-color 0.22s ease;
}

@media (prefers-reduced-motion: no-preference) {
	.biw-faq details:hover {
		transform: translateY(-3px);
		box-shadow: 0 14px 36px rgba(15, 51, 41, 0.11);
		border-color: rgba(26, 77, 62, 0.22);
	}
}

.biw-faq details[open] {
	border-color: rgba(26, 77, 62, 0.35);
	box-shadow: 0 12px 32px rgba(15, 51, 41, 0.1);
}

.biw-faq summary {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	cursor: pointer;
	list-style: none;
	font-family: var(--theme-heading-font-family, "Source Serif 4", Georgia, serif);
	font-size: clamp(1rem, 0.5vw + 0.95rem, 1.125rem);
	font-weight: 600;
	line-height: 1.4;
	color: var(--biw-primary-dark, #0f3329);
	padding: 1.25rem 1.35rem 1.25rem 1.5rem;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.biw-faq details[open] summary {
	color: var(--biw-primary, #1a4d3e);
	background: linear-gradient(180deg, rgba(244, 247, 245, 0.65) 0%, #fff 100%);
	border-bottom: 1px solid var(--biw-border, #d8e0dc);
}

.biw-faq summary::-webkit-details-marker {
	display: none;
}

.biw-faq summary::marker {
	content: "";
}

.biw-faq summary::after {
	content: "";
	flex-shrink: 0;
	width: 0.625rem;
	height: 0.625rem;
	margin-top: 0.35rem;
	border-right: 2px solid var(--biw-primary, #1a4d3e);
	border-bottom: 2px solid var(--biw-primary, #1a4d3e);
	transform: rotate(45deg);
	transition: transform 0.28s ease, margin-top 0.28s ease;
}

.biw-faq details[open] summary::after {
	transform: rotate(-135deg);
	margin-top: 0.55rem;
}

.biw-faq summary:focus-visible {
	outline: none;
	box-shadow: inset var(--biw-focus, 0 0 0 3px rgba(200, 134, 42, 0.45));
	border-radius: var(--biw-radius, 12px);
}

.biw-faq details > :not(summary) {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	padding: 0 1.5rem;
	transition:
		max-height 0.38s ease,
		opacity 0.28s ease,
		padding 0.28s ease;
}

.biw-faq details[open] > :not(summary) {
	max-height: 40rem;
	opacity: 1;
	padding: 0 1.5rem 1.35rem;
}

.biw-faq details p {
	margin: 0.75rem 0 0;
	font-size: 1rem;
	line-height: 1.65;
	color: var(--biw-text-muted, #4a5652);
}

.biw-faq details p:first-of-type {
	margin-top: 0.35rem;
}

@supports (interpolate-size: allow-keywords) {
	.biw-faq details::details-content {
		height: 0;
		opacity: 0;
		overflow: hidden;
		transition:
			height 0.38s ease,
			opacity 0.28s ease,
			content-visibility 0.38s allow-discrete;
	}

	.biw-faq details[open]::details-content {
		height: auto;
		opacity: 1;
	}

	.biw-faq details > :not(summary) {
		max-height: none;
		opacity: 1;
		padding: 0 1.5rem 1.35rem;
		transition: none;
	}

	.biw-faq details:not([open]) > :not(summary) {
		max-height: 0;
		opacity: 0;
		padding: 0 1.5rem;
	}
}

@media (max-width: 781px) {
	.biw-faq {
		grid-template-columns: minmax(0, 1fr);
		gap: 1rem;
		padding: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.biw-faq details,
	.biw-faq summary,
	.biw-faq summary::after,
	.biw-faq details > :not(summary) {
		transition: none;
	}

	.biw-faq details:hover {
		transform: none;
	}
}

.biw-cta-band {
	background: var(--biw-primary-dark) !important;
	color: #e8edea;
}

.biw-cta-band h2,
.biw-cta-band h3 {
	color: #fff;
}

.biw-cta-band p {
	color: rgba(232, 237, 234, 0.88);
}

.biw-cta-card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--biw-radius);
	padding: 1.5rem;
	height: 100%;
}

.biw-announcement {
	background: var(--biw-accent);
	color: #fff;
	text-align: center;
	font-size: 0.9375rem;
	padding: 0.65rem 1rem;
}

.biw-announcement a {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
}

[data-header*="type-1"] .ct-header [data-id="button"] .ct-button {
	border-radius: 6px;
	font-weight: 600;
}

[data-header*="type-1"] .ct-header [data-id="menu"] > ul > li > a {
	text-transform: none;
	font-size: 14px;
	font-weight: 600;
}

[data-footer*="type-1"] [data-row="bottom"] {
	font-size: 0.875rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
	outline: none;
	box-shadow: var(--biw-focus);
}

.ct-search-form input::placeholder {
	opacity: 0.7;
}

.home .entries,
.page-template-default.page-id-197 .entries,
.ct-footer [data-id="trending"],
.ct-footer .ct-widget:is([data-id="trending"], .ct-trending-block) {
	display: none;
}

@media (max-width: 781px) {
	.biw-hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.biw-hero .wp-block-button {
		width: 100%;
	}
}

/* Das Projekt — landing hub (one in-hero H1; no duplicate page title / BI eyebrow) */
body.biw-projekt-landing-page [data-prefix="single_page"] .hero-section,
body.biw-projekt-landing-page [data-prefix="single_page"] .entry-header {
	display: none;
}

.biw-projekt-landing .biw-hero .biw-eyebrow {
	display: none !important;
}

/*
 * Das Projekt hero: core/cover block (img.wp-block-cover__image-background, object-fit: cover).
 * Blocksy page hero is hidden; not a theme background hero.
 */
.biw-startseite.biw-projekt-landing > .wp-block-cover.biw-hero {
	min-height: clamp(420px, 42vh, 500px) !important;
}

.biw-projekt-landing .biw-hero .wp-block-cover__image-background {
	object-fit: cover;
	/* Village in view; less foreground field than center 52% */
	object-position: center 35%;
}

.biw-projekt-landing .biw-hero .wp-block-cover__background {
	background: linear-gradient(
		180deg,
		rgba(15, 25, 35, 0.45) 0%,
		rgba(15, 25, 35, 0.4) 100%
	) !important;
	opacity: 1 !important;
}

.biw-projekt-landing .biw-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
}

.biw-projekt-landing .biw-hero h1,
.biw-projekt-landing .biw-hero .biw-lead {
	text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.biw-projekt-landing .biw-hero .biw-trust-chips {
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

/* Planungsstand — solid secondary CTA (readable on aerial hero) */
.biw-projekt-landing .biw-hero .wp-block-button.biw-projekt-hero-btn-secondary .wp-block-button__link,
.biw-projekt-landing .biw-hero .wp-block-button.is-style-outline .wp-block-button__link {
	background: #fff;
	color: #243746;
	border: none;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	font-weight: 600;
	padding: 0.65em 1.25em;
}

.biw-projekt-landing .biw-hero .wp-block-button.biw-projekt-hero-btn-secondary .wp-block-button__link:hover,
.biw-projekt-landing .biw-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: #f7f9fb;
	color: #1a2a38;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

@media (max-width: 999.98px) {
	.biw-startseite.biw-projekt-landing > .wp-block-cover.biw-hero {
		min-height: clamp(420px, 40vh, 480px) !important;
	}

	.biw-projekt-landing .biw-hero .wp-block-cover__image-background {
		object-position: center 34%;
	}
}

@media (max-width: 781px) {
	.biw-startseite.biw-projekt-landing > .wp-block-cover.biw-hero {
		min-height: clamp(400px, 46vh, 460px) !important;
	}

	.biw-projekt-landing .biw-hero .wp-block-cover__image-background {
		object-position: center 33%;
	}
}

.biw-projekt-landing .biw-section-intro.has-text-align-center {
	margin-left: auto;
	margin-right: auto;
}

.biw-projekt-landing .biw-key-fact {
	height: 100%;
	background: var(--biw-surface);
	border-left: 4px solid var(--biw-primary);
}

.biw-projekt-landing .biw-themen-hub {
	padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.biw-projekt-landing .biw-themen-grid .wp-block-column {
	display: flex;
}

.biw-projekt-landing .biw-themen-grid .wp-block-column > .wp-block-group {
	flex: 1;
	width: 100%;
}

.biw-projekt-landing .biw-topic-card {
	display: flex;
	flex-direction: column;
}

.biw-projekt-landing .biw-topic-card > p:first-of-type {
	margin: 0 0 0.35rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--biw-primary);
}

.biw-projekt-landing .biw-topic-card h3 {
	font-size: 1.2rem;
	margin: 0 0 0.65rem;
	line-height: 1.3;
}

.biw-projekt-landing .biw-topic-card > p:not(:first-of-type) {
	flex: 1;
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	color: var(--biw-text-muted);
	line-height: 1.55;
}

.biw-projekt-landing .biw-topic-card .wp-block-buttons {
	margin-top: auto;
	padding-top: 0.25rem;
}

@media (max-width: 781px) {
	.biw-projekt-landing .biw-themen-grid + .biw-themen-grid {
		margin-top: 0 !important;
	}
}
