/**
 * Baustein-Köpfe (.kb-baustein-hero): Verlaufsfläche mit Icon, Kicker und Titel + graues Infografik-Panel.
 * Genutzt auf /ki-beratung/ und /it-loesungen-fuer-unternehmen/; die Einblend-Animation setzt /js/kb-baustein.js.
 */

.kb-baustein {
	margin-top: 72px;
	scroll-margin-top: 120px;
}

.kb-baustein + .kb-baustein {
	margin-top: 140px;
}

/* Baustein-Kopf im Stil von „Gemeinsam stark“ (/unternehmen/partner/): Verlaufsfläche + Infografik-Panel */
.kb-baustein-hero {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	max-width: 90%;
	margin: 0 auto 32px;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
	border-radius: var(--uc-ki-card-radius, 5px);
	overflow: hidden;
}

.kb-baustein-hero--reverse .kb-baustein-hero__visual {
	order: 2;
}

.kb-baustein-hero__visual {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 340px;
	padding: 44px 48px;
	overflow: hidden;
	background: linear-gradient(135deg, #08a1c7, #0088a2);
	color: #ffffff;
	box-sizing: border-box;
}

.kb-baustein-hero__visual::before,
.kb-baustein-hero__visual::after {
	content: "";
	position: absolute;
	border-radius: 999px;
	border: 2px solid rgba(97, 250, 238, 0.16);
	pointer-events: none;
}

.kb-baustein-hero__visual::before {
	width: 420px;
	height: 420px;
	left: -120px;
	top: 80px;
}

.kb-baustein-hero__visual::after {
	width: 560px;
	height: 560px;
	right: -220px;
	bottom: -140px;
}

.kb-baustein-hero__visual > * {
	position: relative;
	z-index: 1;
}

.kb-baustein-hero__icon {
	position: absolute;
	top: 40px;
	right: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.28);
	color: #ffffff;
}

.kb-baustein-hero__icon svg {
	width: 30px;
	height: 30px;
}

.kb-baustein-kicker {
	display: inline-block;
	margin: 0 0 14px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.kb-baustein-title {
	margin: 0;
	max-width: 22ch;
	font-size: clamp(1.45rem, 1vw + 1.1rem, 1.9rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.kb-baustein-text {
	margin: 18px 0 0;
	max-width: 46ch;
	font-size: 1rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.86);
}

/* Infografik-Panel */
.kb-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 22px;
	margin: 0;
	padding: 40px 44px;
	background: #eef3f8 url("/img/Hintergrund_Partner_Logos.webp") center / cover no-repeat;
	border: 1px solid rgba(15, 23, 42, 0.08);
	box-sizing: border-box;
}

.kb-baustein-hero--reverse .kb-info {
	border-right: 0;
}

.kb-baustein-hero:not(.kb-baustein-hero--reverse) .kb-info {
	border-left: 0;
}

.kb-info__label {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #0088a2;
}

.kb-flow {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.kb-flow::before {
	content: "";
	position: absolute;
	top: 19px;
	left: 12.5%;
	right: 12.5%;
	height: 2px;
	background: linear-gradient(90deg, #08a1c7, rgb(103, 136, 255));
	opacity: 0.35;
}

.kb-flow li {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
}

.kb-flow__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #08a1c7, #0088a2);
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 600;
	box-shadow: 0 0 0 5px #eef3f8, 0 8px 18px rgba(8, 161, 199, 0.28);
}

.kb-flow__text {
	font-size: 0.9rem;
	font-weight: 600;
	color: #0f172a;
}

.kb-rows {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kb-rows li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.06);
	border-radius: var(--uc-ki-card-radius, 5px);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.kb-rows--classes li {
	position: relative;
	padding-left: 22px;
	overflow: hidden;
}

.kb-rows--classes li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
}

.kb-rows--classes li.kb-rows--ok::before {
	background: linear-gradient(180deg, #08a1c7, #0088a2);
}

.kb-rows--classes li.kb-rows--no::before {
	background: #e0524a;
}

.kb-rows__name {
	font-size: 0.95rem;
	font-weight: 600;
	color: #0f172a;
}

.kb-status {
	flex-shrink: 0;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.kb-status--ok {
	background: #e3f5f8;
	color: #00748a;
}

.kb-status--pilot {
	background: #fff4e0;
	color: #a15c00;
}

.kb-status--no {
	background: #fdecec;
	color: #c0362c;
}

.kb-info__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kb-info__chips span {
	padding: 6px 12px;
	border-radius: 999px;
	background: #ffffff;
	color: #334155;
	font-size: 0.8rem;
	font-weight: 600;
}

.kb-rule {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	align-items: center;
	gap: 28px;
}

.kb-rule__timer {
	position: relative;
	width: 112px;
	height: 112px;
}

.kb-rule__timer svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.kb-rule__track,
.kb-rule__progress {
	fill: none;
	stroke-width: 6;
}

.kb-rule__track {
	stroke: #dde5ee;
}

.kb-rule__progress {
	stroke: #08a1c7;
	stroke-linecap: round;
	stroke-dasharray: 176;
	stroke-dashoffset: 0;
}

.kb-rule__value {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	color: #0f172a;
}

.kb-rule__value small {
	margin-top: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
}

.kb-check {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kb-check li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.95rem;
	font-weight: 600;
	color: #0f172a;
}

.kb-check__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: linear-gradient(135deg, #08a1c7, #0088a2);
}

.kb-check__icon svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: #ffffff;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Einblenden beim Reinscrollen; Klasse kb-anim-armed setzt das Script unten (ohne JS bleibt alles sichtbar) */
.kb-baustein-hero.kb-anim-armed .kb-anim {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.45s ease, transform 0.45s ease;
	transition-delay: calc(var(--i, 0) * 110ms + 200ms);
}

.kb-baustein-hero.kb-anim-armed.is-inview .kb-anim {
	opacity: 1;
	transform: none;
}

.kb-baustein-hero.kb-anim-armed .kb-rule__progress {
	stroke-dashoffset: 176;
	transition: stroke-dashoffset 1.6s ease-out 0.3s;
}

.kb-baustein-hero.kb-anim-armed.is-inview .kb-rule__progress {
	stroke-dashoffset: 0;
}

@media (min-width: 993px) {
	body.page-ki-beratung #features .kb-baustein-hero {
		max-width: none;
		width: 100%;
	}
}

@media (max-width: 992px) {
	.kb-baustein-hero {
		grid-template-columns: 1fr;
	}

	.kb-baustein-hero--reverse .kb-baustein-hero__visual {
		order: 0;
	}

	.kb-baustein-hero__visual {
		min-height: 0;
		padding: 96px 32px 32px;
	}

	.kb-baustein-hero__icon {
		top: 28px;
		right: auto;
		left: 32px;
		width: 52px;
		height: 52px;
	}

	.kb-baustein-hero__icon svg {
		width: 24px;
		height: 24px;
	}

	.kb-info,
	.kb-baustein-hero--reverse .kb-info,
	.kb-baustein-hero:not(.kb-baustein-hero--reverse) .kb-info {
		padding: 28px 32px;
		border: 1px solid rgba(15, 23, 42, 0.08);
		border-top: 0;
	}
}

@media (max-width: 640px) {
	.kb-baustein {
		margin-top: 48px;
	}

	.kb-baustein + .kb-baustein {
		margin-top: 88px;
	}

	.kb-baustein-hero {
		max-width: 100%;
	}

	.kb-baustein-hero__visual {
		padding: 88px 22px 26px;
	}

	.kb-baustein-hero__icon {
		left: 22px;
		top: 24px;
	}

	.kb-info,
	.kb-baustein-hero--reverse .kb-info,
	.kb-baustein-hero:not(.kb-baustein-hero--reverse) .kb-info {
		padding: 24px 18px;
	}

	.kb-baustein-title {
		font-size: 1.35rem;
	}

	.kb-flow__dot {
		width: 34px;
		height: 34px;
		font-size: 0.85rem;
	}

	.kb-flow::before {
		top: 16px;
	}

	.kb-flow__text {
		font-size: 0.8rem;
	}

	.kb-rows li {
		padding: 10px 12px;
	}

	.kb-rows--classes li {
		padding-left: 18px;
	}

	.kb-rule {
		grid-template-columns: 84px minmax(0, 1fr);
		gap: 18px;
	}

	.kb-rule__timer {
		width: 84px;
		height: 84px;
	}

	.kb-rule__value {
		font-size: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kb-baustein-hero.kb-anim-armed .kb-anim,
	.kb-baustein-hero.kb-anim-armed .kb-rule__progress {
		opacity: 1;
		transform: none;
		stroke-dashoffset: 0;
		transition: none;
	}
}
