/*
 * BB/POWER Bausteinbibliothek. Klassen an Standard-Blöcken (Gutenberg: "Zusätzliche CSS-Klasse",
 * Elementor: Erweitert > CSS-Klassen). Farben und Schriften kommen aus dem Theme bzw. dem Elementor-Kit.
 */
:root {
	--bbp-accent: var(--e-global-color-primary, var(--wp--preset--color--primary, var(--wp--preset--color--contrast, #1d4ed8)));
	--bbp-accent-2: var(--e-global-color-secondary, var(--wp--preset--color--secondary, #0f766e));
	--bbp-text: var(--e-global-color-text, var(--wp--preset--color--contrast, #1f2937));
	--bbp-bg: var(--wp--preset--color--base, #ffffff);
	--bbp-muted: color-mix(in srgb, var(--bbp-text) 8%, var(--bbp-bg));
	--bbp-radius: 12px;
	--bbp-gap: clamp(16px, 2.5vw, 32px);
	--bbp-pad: clamp(40px, 7vw, 96px);
	--bbp-shadow: 0 6px 24px rgb(0 0 0 / 8%);
}

/* Hero */
.bbp-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--bbp-gap);
	min-height: clamp(360px, 60vh, 640px);
	padding: var(--bbp-pad) clamp(20px, 5vw, 64px);
	border-radius: var(--bbp-radius);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}
.bbp-hero h1, .bbp-hero .elementor-heading-title { max-width: 18ch; margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
.bbp-hero p { max-width: 55ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.bbp-hero--center { align-items: center; text-align: center; }
.bbp-hero--center h1, .bbp-hero--center p { margin-left: auto; margin-right: auto; }
.bbp-hero--dark { color: #fff; background-color: var(--bbp-text); }
.bbp-hero--dark::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 65%), rgb(0 0 0 / 25%)); z-index: 0; }
.bbp-hero--dark > * { position: relative; z-index: 1; }
.bbp-hero--dark h1, .bbp-hero--dark .elementor-heading-title, .bbp-hero--dark p { color: #fff; }

/* Abschnittskopf */
.bbp-section-head { max-width: 760px; margin: 0 auto var(--bbp-gap); text-align: center; }
.bbp-section-head h2 { margin-bottom: .4em; }
.bbp-section-head p { opacity: .85; }

/* Kacheln (Text) */
.bbp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--bbp-gap); }
.bbp-tiles > * { margin: 0 !important; padding: clamp(20px, 3vw, 32px); border-radius: var(--bbp-radius); background: var(--bbp-muted); transition: transform .2s ease, box-shadow .2s ease; }
.bbp-tiles > *:hover { transform: translateY(-3px); box-shadow: var(--bbp-shadow); }
.bbp-tiles--overlay > * { position: relative; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background-size: cover; background-position: center; overflow: hidden; }
.bbp-tiles--overlay > *::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / 70%), rgb(0 0 0 / 5%)); }
.bbp-tiles--overlay > * > * { position: relative; color: inherit; }

/* Bildkacheln */
.bbp-image-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--bbp-gap); }
.bbp-image-tiles figure, .bbp-image-tiles img { margin: 0; width: 100%; border-radius: var(--bbp-radius); }
.bbp-image-tiles img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Vorteile */
.bbp-usp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--bbp-gap); padding: var(--bbp-gap) 0; }
.bbp-usp > * { margin: 0 !important; padding-left: 1rem; border-left: 3px solid var(--bbp-accent); }
.bbp-usp strong, .bbp-usp h3, .bbp-usp h4 { display: block; margin: 0 0 .3em; }

/* Ablauf / Schritte */
.bbp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--bbp-gap); counter-reset: bbp-step; }
.bbp-steps > * { margin: 0 !important; position: relative; padding: 3.2rem 1.25rem 1.25rem; border-radius: var(--bbp-radius); background: var(--bbp-muted); counter-increment: bbp-step; }
.bbp-steps > *::before { content: counter(bbp-step); position: absolute; top: 1rem; left: 1.25rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--bbp-accent); }

/* Aktionsbanner */
.bbp-promo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--bbp-gap); padding: clamp(24px, 4vw, 48px); border-radius: var(--bbp-radius); color: #fff; background: var(--bbp-accent); }
.bbp-promo h2, .bbp-promo h3, .bbp-promo p, .bbp-promo .elementor-heading-title { margin: 0; color: #fff; }
.bbp-promo .wp-block-button__link, .bbp-promo .elementor-button { background: #fff; color: var(--bbp-accent); }

/* Logos / Partner */
.bbp-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(24px, 5vw, 64px); }
.bbp-logos img { max-height: 56px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .2s, opacity .2s; }
.bbp-logos img:hover { filter: none; opacity: 1; }

/* Stimmen / Bewertungen (nur echte, belegbare Aussagen) */
.bbp-testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--bbp-gap); }
.bbp-testimonials > * { margin: 0 !important; padding: 1.5rem; border-radius: var(--bbp-radius); background: var(--bbp-bg); box-shadow: var(--bbp-shadow); }

/* FAQ */
.bbp-faq details { border-bottom: 1px solid color-mix(in srgb, var(--bbp-text) 15%, transparent); padding: 1rem 0; }
.bbp-faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.bbp-faq summary::after { content: "+"; float: right; }
.bbp-faq details[open] summary::after { content: "–"; }

/* SEO-Text */
.bbp-seo-text { max-width: 75ch; margin-left: auto; margin-right: auto; line-height: 1.7; }
.bbp-seo-text h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

/* Abstand und Hintergrund für Abschnitte */
.bbp-section { padding-top: var(--bbp-pad) !important; padding-bottom: var(--bbp-pad) !important; }
.bbp-section--muted { background: var(--bbp-muted); }

@media (prefers-reduced-motion: reduce) {
	.bbp-tiles > *, .bbp-logos img { transition: none; }
}
