/*
 * CTA Banner ALB element - kl_cta_banner.php
 *
 * Desktop: photo (435px of 1210 in Figma) and orange panel (775px) side by side, 16px
 * outer radius; the photo stretches to the panel's height. Below 768px they stack with
 * the photo on top.
 * Layout "Buttons rechts" (.kl-cta--inline, Workplace Consulting "CTA box"): 300px tall,
 * 80px side padding, heading + text (782px of 1050) and the buttons 73px to their right.
 * Below 990px the buttons move under the text.
 *
 * Self-contained (fonts, colors, buttons) so the banner looks the same on pages without
 * "Neues Design". Selectors use "html #top #wrap_all .kl-cta" to beat Enfold's
 * theme-option CSS (e.g. "#top #wrap_all .main_color h2").
 */

@font-face {
	font-family: 'Host Grotesk';
	src: url('../../assets/fonts/host-grotesk-latin.woff2') format('woff2');
	font-weight: 300 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.kl-cta {
	--kl-cta-orange: #f08400;
	--kl-cta-edge: #d06200;
	--kl-cta-ink: #222;
	--kl-cta-white: #fff;
	--kl-cta-off-white: #f9f9f9;
	--kl-cta-radius: 16px;
	--kl-cta-font: 'Host Grotesk', 'Helvetica Neue', Helvetica, Arial, sans-serif;

	display: grid;
	grid-template-columns: 435fr 775fr;
	margin: 0;
	border-radius: var(--kl-cta-radius);
	overflow: hidden;
	font-family: var(--kl-cta-font);
}

.kl-cta--image-right {
	grid-template-columns: 775fr 435fr;
}

.kl-cta--image-right .kl-cta__media {
	order: 2;
}

.kl-cta--no-image {
	grid-template-columns: 1fr;
}

/* Photo */

.kl-cta__media {
	position: relative;
	min-height: 100%;
}

html #top #wrap_all .kl-cta .kl-cta__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
}

/* Panel */

.kl-cta__panel {
	display: flex;
	align-items: center;
	padding: 101px 72px 96px;
	background: var(--kl-cta-orange);
}

.kl-cta__content {
	width: 100%;
	max-width: 640px;
}

html #top #wrap_all .kl-cta :is(h2, h3).kl-cta__title {
	margin: 0;
	padding: 0;
	font-family: var(--kl-cta-font);
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: none;
	color: var(--kl-cta-white);
}

html #top #wrap_all .kl-cta--heading-large :is(h2, h3).kl-cta__title {
	font-size: clamp(28px, 1.25rem + 1.4vw, 40px);
	line-height: 1.1;
}

html #top #wrap_all .kl-cta--heading-normal :is(h2, h3).kl-cta__title {
	font-size: clamp(24px, 1.125rem + 0.98vw, 32px);
	line-height: 1.3;
}

html #top #wrap_all .kl-cta--heading-small :is(h2, h3).kl-cta__title {
	font-size: clamp(21px, 1.0625rem + 0.55vw, 26px);
	line-height: 1.3;
}

.kl-cta__text {
	margin-top: 24px;
}

.kl-cta--heading-small .kl-cta__text {
	margin-top: 13.59px;
}

html #top #wrap_all .kl-cta .kl-cta__text :is(p, li) {
	margin: 0 0 26.4px;
	font-family: var(--kl-cta-font);
	font-size: 16px;
	line-height: 26.4px;
	color: var(--kl-cta-white);
}

html #top #wrap_all .kl-cta .kl-cta__text :is(p, li):last-child {
	margin-bottom: 0;
}

html #top #wrap_all .kl-cta .kl-cta__text a {
	color: inherit;
	text-decoration: underline;
}

/* Buttons */

.kl-cta__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 40px;
}

html #top #wrap_all .kl-cta .kl-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 139px;
	max-width: 355px;
	height: 42px;
	padding: 0 26px;
	border-radius: 99px;
	font-family: var(--kl-cta-font);
	font-size: 13px;
	font-weight: 500;
	line-height: 15.6px;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

html #top #wrap_all .kl-cta .kl-cta__btn--solid {
	background: var(--kl-cta-white);
	border: 0;
	border-bottom: 1px solid var(--kl-cta-edge);
	color: var(--kl-cta-ink);
}

html #top #wrap_all .kl-cta a.kl-cta__btn--solid:is(:hover, :focus-visible) {
	background: #f4f4f4;
}

html #top #wrap_all .kl-cta .kl-cta__btn--outline {
	height: 40px;
	padding: 0 24px;
	background: transparent;
	border: 2px solid var(--kl-cta-white);
	color: var(--kl-cta-off-white);
}

html #top #wrap_all .kl-cta a.kl-cta__btn--outline:is(:hover, :focus-visible) {
	background: rgba(255, 255, 255, 0.15);
}

html #top #wrap_all .kl-cta a.kl-cta__btn:focus-visible {
	outline: 2px solid var(--kl-cta-white);
	outline-offset: 3px;
}

/* Layout "Buttons rechts" */

.kl-cta--inline .kl-cta__panel {
	min-height: 300px;
	box-sizing: border-box;
	padding: 56px 80px;
}

.kl-cta--inline .kl-cta__content {
	display: flex;
	align-items: center;
	gap: 73px;
	max-width: none;
}

.kl-cta--inline .kl-cta__copy {
	flex: 0 1 782px;
	min-width: 0;
}

.kl-cta--inline .kl-cta__buttons {
	flex: 0 0 auto;
	margin: 0 0 0 auto;
}

/* Tablet: less padding in the panel; inline buttons move under the text */

@media (max-width: 989px) {
	.kl-cta__panel,
	.kl-cta--inline .kl-cta__panel {
		padding: 56px 40px;
	}

	.kl-cta--inline .kl-cta__panel {
		min-height: 0;
	}

	.kl-cta--inline .kl-cta__content {
		display: block;
	}

	.kl-cta--inline .kl-cta__buttons {
		margin: 32px 0 0;
	}
}

/* Mobile: photo on top, panel below */

@media (max-width: 767px) {
	.kl-cta,
	.kl-cta--image-right {
		grid-template-columns: 1fr;
	}

	.kl-cta--image-right .kl-cta__media {
		order: 0;
	}

	.kl-cta__media {
		aspect-ratio: 4 / 3;
		min-height: 0;
	}

	.kl-cta__panel,
	.kl-cta--inline .kl-cta__panel {
		padding: 40px 24px;
	}

	.kl-cta__buttons {
		margin-top: 32px;
	}

	/* Long headings in a narrow column: one step smaller than on desktop */
	html #top #wrap_all .kl-cta--heading-large :is(h2, h3).kl-cta__title {
		font-size: 24px;
		line-height: 1.2;
	}

	html #top #wrap_all .kl-cta--heading-normal :is(h2, h3).kl-cta__title {
		font-size: 22px;
		line-height: 1.25;
	}

	html #top #wrap_all .kl-cta .kl-cta__btn {
		white-space: normal;
		max-width: 100%;
	}
}
