/**
 * Zultner Theme – Front-End Styles.
 * Ergänzt theme.json um Block-Styles und Modul-Feinheiten.
 */

/* ---------------------------------------------------------------------------
 * Heading: gelber Highlight-Underline  (Block-Style "zultner-underline")
 * Legt einen gelben Marker hinter die untere Hälfte der Textzeilen.
 * ------------------------------------------------------------------------- */
.zultner-hl,
.wp-block-heading.is-style-zultner-underline mark {
	background-color: transparent;
	background-image: linear-gradient(
		transparent 12%,
		var( --wp--preset--color--brand-yellow ) 12%,
		var( --wp--preset--color--brand-yellow ) 90%,
		transparent 90%
	);
	color: inherit;
	padding: 0 0.06em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

/* ---------------------------------------------------------------------------
 * Group als Karte  (Block-Style "zultner-card")
 * ------------------------------------------------------------------------- */
.wp-block-group.is-style-zultner-card {
	background-color: var( --wp--preset--color--light-grey );
	border-radius: 2px;
	overflow: hidden;
}

/* ---------------------------------------------------------------------------
 * Bild als Produkt-Fläche  (Block-Style "zultner-product")
 * ------------------------------------------------------------------------- */
.wp-block-image.is-style-zultner-product {
	background-color: var( --wp--preset--color--light-grey );
}
.wp-block-image.is-style-zultner-product img {
	mix-blend-mode: multiply;
}

/* ---------------------------------------------------------------------------
 * Referenzen / Logo-Slider
 * ------------------------------------------------------------------------- */
.zultner-ref-logo img { width: 225px; height: auto; }

/* Track: horizontal scrollbar mit scroll-snap; JS-Pfeile scrollen kartenweise */
.zultner-slider__track {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.zultner-slider__track::-webkit-scrollbar { display: none; }
.zultner-slider__track > * {
	flex: 0 0 calc( ( 100% - 2 * var( --wp--preset--spacing--40 ) ) / 3 );
	scroll-snap-align: start;
	margin: 0;
}
/* "X/N ‹ ›"-Navigation */
.zultner-slider-nav { display: flex; gap: 1px; margin: 0; }
.zultner-slider-nav button {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; border: 0; cursor: pointer;
	border-radius: 0;
	background-color: var( --wp--preset--color--brand-yellow );
	color: var( --wp--preset--color--black );
	font-size: 22px; line-height: 1;
}
.zultner-slider-nav button:hover { filter: brightness( 0.92 ); }
/* Gelbe Fortschrittslinie – Breite via JS (--zultner-progress) */
.zultner-slider-progress {
	height: 8px;
	min-height: 8px;
	background-image: linear-gradient(
		to right,
		var( --wp--preset--color--brand-yellow ) var( --zultner-progress, 33% ),
		transparent var( --zultner-progress, 33% )
	);
}
@media ( max-width: 781px ) {
	.zultner-slider__track > * { flex-basis: 82%; }
}

/* ---------------------------------------------------------------------------
 * Pfeil-Link  (Block-Style "zultner-arrow-link")
 * "Zu den Produkten →" / "Mehr erfahren →"
 * ------------------------------------------------------------------------- */
.is-style-zultner-arrow-link,
.is-style-zultner-arrow-link a {
	font-weight: 900;
	text-decoration: none;
}
.is-style-zultner-arrow-link a::after {
	content: " →";
	white-space: nowrap;
}
.is-style-zultner-arrow-link a:hover {
	text-decoration: underline;
	text-decoration-color: var( --wp--preset--color--brand-yellow );
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * Play-Link  (Block-Style "zultner-play-link")  "Mehr erfahren ▶"
 * ------------------------------------------------------------------------- */
.is-style-zultner-play-link,
.is-style-zultner-play-link a {
	font-weight: 900;
	text-decoration: none;
}
.is-style-zultner-play-link a::after {
	content: " \25B6";
	font-size: 0.72em;
	vertical-align: 0.05em;
	white-space: nowrap;
}
.is-style-zultner-play-link a:hover {
	text-decoration: underline;
	text-decoration-color: var( --wp--preset--color--brand-yellow );
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * Gelbe Grafik-Formen über Bildern (Blog-Grid)
 * Klassen: is-shape-square | is-shape-slash | is-shape-ring
 * ------------------------------------------------------------------------- */
.wp-block-image.is-shape-square,
.wp-block-image.is-shape-slash,
.wp-block-image.is-shape-ring {
	position: relative;
}
.wp-block-image.is-shape-square::after,
.wp-block-image.is-shape-slash::after,
.wp-block-image.is-shape-ring::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-repeat: no-repeat;
}
.wp-block-image.is-shape-square::after {
	background-image: url( "../img/shape-square.svg" );
	background-size: 42% auto;
	background-position: 50% 45%;
}
.wp-block-image.is-shape-slash::after {
	background-image: url( "../img/shape-slash.svg" );
	background-size: auto 82%;
	background-position: 62% 50%;
}
.wp-block-image.is-shape-ring::after {
	background-image: url( "../img/shape-ring.svg" );
	background-size: 40% auto;
	background-position: 55% 45%;
}

/* ---------------------------------------------------------------------------
 * Text-/Inline-Links: gelbe Unterstreichung bei Hover (global, siehe theme.json).
 * Verstärkt die Optik aus dem Design.
 * ------------------------------------------------------------------------- */
.entry-content a:not(.wp-element-button):hover,
.wp-block-post-content a:not(.wp-element-button):hover {
	text-decoration-color: var( --wp--preset--color--brand-yellow );
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * Header – sticky (per CSS statt Block-Attribut, damit der Block valide bleibt)
 * ------------------------------------------------------------------------- */
/* Sticky auf dem Template-Part-Wrapper (dessen Elternteil = volle Seitenhöhe),
   nicht auf der inneren Gruppe – sonst greift sticky nur im kurzen Wrapper. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}
/* Nav: Graphik Black 20px wie im Figma-Design */
.zultner-header .wp-block-navigation,
.zultner-header .wp-block-navigation .wp-block-navigation-item__content {
	font-size: 20px;
	font-weight: 900;
}
/* Gelbe Unterstreichung beim Hover/aktiven Menüpunkt */
.zultner-header .wp-block-navigation-item__content {
	padding-bottom: 6px;
	border-bottom: 4px solid transparent;
	text-decoration: none;
}
.zultner-header .wp-block-navigation-item__content:hover,
.zultner-header .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var( --wp--preset--color--brand-yellow );
	text-decoration: none;
}
.zultner-header .wp-block-button__link { font-size: 20px; padding-top: 13px; padding-bottom: 13px; white-space: nowrap; }

/* Submenu / Sprachleiste (aktive Sprache weiß, andere gedimmt) */
.zultner-lang {
	margin: 0;
	font-size: 15px;
	font-weight: 900;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: var( --wp--preset--color--white );
	line-height: 22px;
}
.zultner-lang a {
	color: var( --wp--preset--color--mid-grey );
	text-decoration: none;
}
.zultner-lang a:hover { color: var( --wp--preset--color--white ); text-decoration: none; }
.zultner-lang a[aria-current] { color: var( --wp--preset--color--white ); }

/* ---------------------------------------------------------------------------
 * Responsive Sichtbarkeit (Block-Styles "Nur Desktop" / "Nur Mobil")
 * Für Desktop-/Mobil-Medien in jedem Modul.
 * ------------------------------------------------------------------------- */
@media ( max-width: 781px ) {
	.is-style-zultner-only-desktop { display: none !important; }
	/* Ausgeblendeter Desktop-Block soll keinen Blockabstand hinterlassen:
	   der direkt folgende Mobil-Block rückt an dessen Position auf. */
	.is-style-zultner-only-desktop + .is-style-zultner-only-mobile { margin-block-start: 0 !important; }
}
@media ( min-width: 782px ) {
	.is-style-zultner-only-mobile { display: none !important; }
}

/* ---------------------------------------------------------------------------
 * CTA-Leiste (im Footer verankert) – "Zum Partnerprogramm"
 * ------------------------------------------------------------------------- */
.zultner-cta-bar .zultner-cta-label a,
.zultner-cta-bar .zultner-cta-arrow a {
	color: var( --wp--preset--color--black );
	text-decoration: none;
}
.zultner-cta-bar .wp-block-group {
	align-items: center;
}
.zultner-cta-bar .zultner-cta-label {
	margin: 0;
	letter-spacing: 0.02em;
	line-height: 1;
	display: flex;
	align-items: center;
}
.zultner-cta-bar .zultner-cta-arrow {
	margin: 0;
	line-height: 1;
	display: flex;
	align-items: center;
}
.zultner-cta-bar:hover .zultner-cta-arrow a { transform: translateX( 4px ); }
.zultner-cta-bar .zultner-cta-arrow a { display: inline-block; transition: transform 0.2s ease; }

/* Play-Links in einer Flex-Zeile (Kontaktformular / Standorte) auf einer Baseline. */
.zultner-teaser .wp-block-group:has( > .is-style-zultner-play-link ) {
	align-items: baseline;
}
.is-style-zultner-play-link {
	margin: 0;
	line-height: 1.2;
}

/* ---------------------------------------------------------------------------
 * Logo
 * ------------------------------------------------------------------------- */
.zultner-logo img { display: block; height: auto; width: 198px; }
/* Weiße Logo-Variante (Footer) – schwarze Wortmarke invertieren. */
.zultner-logo--white img { filter: brightness(0) invert(1); width: 200px; }
.zultner-logo-elements img { display: block; height: auto; width: 80px; }

/* ---------------------------------------------------------------------------
 * Eyebrow / Kicker (kleine Label-Zeile über Headings)
 * ------------------------------------------------------------------------- */
.zultner-eyebrow {
	font-size: var( --wp--preset--font-size--x-small );
	font-weight: 900;
	letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------------------
 * Kundenstimmen-Intro: 4px schwarze Trennlinie (Figma)
 * ------------------------------------------------------------------------- */
.entry-content hr.wp-block-separator,
.wp-block-post-content hr.wp-block-separator,
.wp-block-post-content hr.wp-block-separator.has-background:not(.is-style-dots) {
	height: 4px;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * Video-/Bildmodul mit 20% Abdunkelung (Figma "Video")
 * ------------------------------------------------------------------------- */
.wp-block-image.is-style-zultner-video { position: relative; }
.wp-block-image.is-style-zultner-video::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.2 );
	pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Kategorien-Grid: Zeilenabstand 64px + Hover-Unterstreichung am Bild
 * ------------------------------------------------------------------------- */
.zultner-cats.wp-block-group { row-gap: 64px !important; }
.zultner-cats .wp-block-image { position: relative; }
.zultner-cats .wp-block-image img { display: block; }
.zultner-cats .wp-block-image::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 8px;
	background: var( --wp--preset--color--brand-yellow );
	opacity: 0;
	transition: opacity 0.15s ease;
}
.zultner-cats > .wp-block-group:hover .wp-block-image::after { opacity: 1; }
@media ( max-width: 781px ) {
	.zultner-cats.wp-block-group {
		grid-template-columns: 1fr !important;
		row-gap: 40px !important;
	}
}

/* ---------------------------------------------------------------------------
 * Vorteile: gelber Pfeil nach unten, Fließtext max. 646px (Figma)
 * Zentrierte Vertikalachse: Headline, Text und Pfeil auf einer Linie.
 * ------------------------------------------------------------------------- */
.zultner-vorteile {
	text-align: center;
}
.zultner-vorteile > .wp-block-group {
	display: flex;
	flex-direction: column;
	align-items: center;
}
.zultner-vorteile .wp-block-heading,
.zultner-vorteile p {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}
.zultner-arrow-down {
	display: flex;
	justify-content: center;
	margin-top: 8px;
	margin-bottom: 8px;
}
.zultner-arrow-down img { width: 33px; height: 64px; display: block; }
.zultner-arrow-down-klein {
	display: flex;
	justify-content: center;
}
.zultner-arrow-down-klein img { width: 17px !important; height: 33px; display: block; }
.zultner-vorteile p { max-width: 646px; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------------------
 * Teaser 2-spaltig: Fließtext max. 533px, Spaltenabstand 142px (Figma).
 * Der Gap liegt hier statt im Block-Attribut, weil WP clamp()-Werte im
 * blockGap nicht zuverlässig ausgibt.
 * ------------------------------------------------------------------------- */
.zultner-teaser p:not(.is-style-zultner-play-link) { max-width: 533px; }
.wp-block-columns.zultner-teaser { column-gap: clamp(40px, 9.8vw, 142px); }

/* ---------------------------------------------------------------------------
 * Mein Zultner: Copy max. 674px, linksbündig zur Content-Spalte
 * (gleiche linke Kante wie Headline/Button). Zuvor margin-left:0 am
 * alignfull-Constrained-Kind → Text hing links am Viewport-Rand.
 * ------------------------------------------------------------------------- */
.zultner-shop-copy {
	max-width: 674px;
	width: 100%;
	margin-left: max(
		0px,
		calc((100% - min(100%, var(--wp--style--global--content-size, 1320px))) / 2)
	) !important;
	margin-right: auto !important;
}

/* ---------------------------------------------------------------------------
 * Bildmodul mit zentrierten Logo-Elementen (Figma: 999px auf 1320px Breite)
 * ------------------------------------------------------------------------- */
.zultner-logo-cover .zultner-logo-cover__elements { width: 75.7%; margin-left: auto; margin-right: auto; }
.zultner-logo-cover .zultner-logo-cover__elements img { width: 100%; height: auto; }

/* ---------------------------------------------------------------------------
 * Footer-Navigation: weiße Links, keine Unterstreichung
 * ------------------------------------------------------------------------- */
.zultner-footer .wp-block-navigation .wp-block-navigation-item__content { color: var( --wp--preset--color--white ); }
.zultner-footer-legal a {
	color: var( --wp--preset--color--white );
	text-decoration: none;
}
.zultner-footer-legal a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
 * Content-Zonen (Briefing: Problem / Lösung / Prozess / Case / CTA)
 * Die Klassen dienen dem GTM-/GA4-Tracking (Sichtbarkeits-Trigger je Zone) –
 * kein eigenes Styling nötig, aber die Klassen nicht entfernen!
 * .zultner-zone--problem | --solution | --process | --case | --cta
 * ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
 * Prozess-Modul 1-2-3 (große Ziffern, gelbe Zwischenzeile)
 * ------------------------------------------------------------------------- */
.zultner-prozess-nr {
	font-size: clamp(56px, 6.7vw, 96px);
	font-weight: 900;
	line-height: 1;
	margin: 0;
}
.zultner-prozess-label { color: var( --wp--preset--color--brand-yellow ); }

/* ---------------------------------------------------------------------------
 * Zitat-Modul
 * ------------------------------------------------------------------------- */
.zultner-zitat cite { font-style: normal; font-weight: 500; display: block; margin-top: 12px; }

/* ---------------------------------------------------------------------------
 * Gelbe Ergebnis-Kacheln (Zultnerman)
 * ------------------------------------------------------------------------- */
.zultner-kachel-gelb {
	background: var( --wp--preset--color--brand-yellow );
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
/* WP is-layout-flow überschreibt oft flex → figure zentriert die 55%-Bilder */
.zultner-kachel-gelb .wp-block-image {
	text-align: center;
	width: 100%;
}
.zultner-kachel-gelb img { width: 55%; height: auto; }

/* ---------------------------------------------------------------------------
 * Blog: einheitliche Karten (Grid, feste Bildratio, kein Overflow)
 * ------------------------------------------------------------------------- */
.zultner-blog .wp-block-post-template.is-layout-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	align-items: start;
}
.zultner-blog .wp-block-post {
	min-width: 0;
	max-width: 100%;
}
.zultner-blog-card {
	width: 100%;
	min-width: 0;
}
.zultner-blog-card__media,
.zultner-blog-card .wp-block-post-featured-image,
.zultner-blog-card .wp-block-post-featured-image a,
.zultner-blog-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	max-width: 100%;
}
.zultner-blog-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	height: auto;
}
.zultner-blog-card__cat,
.zultner-blog-card__cat a,
.zultner-blog-single .zultner-blog-card__cat,
.zultner-blog-single .zultner-blog-card__cat a {
	color: var( --wp--preset--color--brand-grey );
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	font-weight: 500;
}
.zultner-blog-card__title,
.zultner-blog-card__title a {
	overflow-wrap: anywhere;
	word-break: break-word;
	text-decoration: none;
	font-weight: 900;
}
.zultner-blog-featured .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.zultner-blog-single__meta {
	color: var( --wp--preset--color--brand-grey );
}
.zultner-blog-single__content {
	font-size: var( --wp--preset--font-size--medium );
	line-height: 1.5;
}
.zultner-blog-single__content > * + * {
	margin-top: 1.25em;
}
.zultner-blog-pagination .wp-block-query-pagination-next {
	font-weight: 900;
}
.zultner-blog-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 48px;
}
.zultner-blog-load-more {
	appearance: none;
	border: 0;
	cursor: pointer;
	background: var( --wp--preset--color--brand-yellow );
	color: var( --wp--preset--color--black );
	font-weight: 900;
	font-size: var( --wp--preset--font-size--medium );
	letter-spacing: 0.4px;
	padding: 16px 40px;
	line-height: 1.2;
}
.zultner-blog-load-more:hover {
	filter: brightness( 0.95 );
}
.zultner-blog-load-more.is-loading {
	opacity: 0.65;
	cursor: wait;
}
.zultner-blog-load-sentinel {
	height: 1px;
	width: 100%;
	pointer-events: none;
}
@media ( max-width: 781px ) {
	.zultner-blog .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr;
	}
}
@media ( min-width: 782px ) and ( max-width: 1100px ) {
	.zultner-blog .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
