/*
 * Abgleich mit dem Original (docs/parity-report.md, D-105).
 * Aussehen der Plugin-Blöcke ohne Änderung am Plugin: Der Vorsatz `body` sorgt dafür, dass diese Regeln
 * die Block-Styles schlagen, egal in welcher Reihenfolge sie geladen werden.
 * Nur theme.json-Variablen. Die Highlight-Bänder bleiben bewusst über die volle Breite (Malte, D-105).
 */

/* Hero: Höhe aus dem Inhalt, im Original unabhängig von der Fensterhöhe (ersetzt D-063). */
body .diconsus-hero {
	align-items: flex-start;
	min-height: var(--wp--custom--hero--min-height);
}

body .diconsus-hero__inner {
	margin-top: var(--wp--custom--hero--content-offset);
}

@media (max-width: 640px) {

	body .diconsus-hero {
		min-height: var(--wp--custom--hero--min-height-mobile);
	}

	/* Lange Wörter trennen, statt die Seite breiter zu machen. */
	body .diconsus-hero__heading,
	body .diconsus-checklist__heading {
		-webkit-hyphens: auto;
		hyphens: auto;
		overflow-wrap: break-word;
	}
}

/*
 * Listen mit Häkchen: als Block statt Flex. Als Flex-Kind zerreißt das hochgestellte ® den Satz in Spalten.
 */
body .diconsus-hero__item,
body .diconsus-checklist__item,
body .has-check .diconsus-media-text__item {
	display: block;
	position: relative;
	padding-left: 35px;
}

body .has-icon .diconsus-media-text__item {
	display: block;
	position: relative;
	padding-left: calc(var(--wp--custom--media-text--icon-size, 32px) + 15px);
}

body .diconsus-hero__item::before,
body .diconsus-checklist__item::before,
body .has-check .diconsus-media-text__item::before,
body .has-icon .diconsus-media-text__item::before {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
}

/* FAQ: Frage als Block mit dem Plus rechts, aus demselben Grund. */
body .diconsus-faq-item__question {
	display: block;
	position: relative;
	padding-right: 40px;
}

body .diconsus-faq-item__question::after {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
}

/* Überschriften */
body .diconsus-checklist__heading {
	line-height: var(--wp--custom--checklist--heading-line-height);
}

body .diconsus-cta-person__heading {
	line-height: var(--wp--custom--cta-person--heading-line-height);
}

body .diconsus-story-slider__heading {
	line-height: var(--wp--custom--story-slider--heading-line-height);
}

body .diconsus-story-slide__title {
	font-weight: var(--wp--custom--story-slider--title-weight);
}

/* Navigator */
body .diconsus-navigator__inner {
	width: min(var(--wp--custom--navigator--width), calc(100% - var(--wp--style--root--padding-left, 0px) - var(--wp--style--root--padding-right, 0px)));
}

body .diconsus-navigator__eyebrow {
	margin-bottom: var(--wp--custom--navigator--eyebrow-margin);
}

body .diconsus-navigator__heading {
	line-height: var(--wp--custom--navigator--heading-line-height);
}

body .diconsus-navigator__step {
	margin-bottom: var(--wp--custom--navigator--step-margin);
}

body .diconsus-navigator__question {
	font-size: var(--wp--custom--navigator--question-size);
	line-height: 1.4;
}

/* Karten-Raster */
body .diconsus-card-grid__cards {
	row-gap: var(--wp--custom--card--row-gap);
}

/* Highlight-Band: Innenmaße wie im Original, Fläche volle Breite. */
body .diconsus-highlight-band__heading {
	line-height: var(--wp--custom--highlight-band--heading-line-height);
}

body .diconsus-highlight-band.is-style-subtle {
	--wp--custom--highlight-band--text-width: var(--wp--custom--highlight-band--subtle-text-width);
	padding-block: var(--wp--custom--highlight-band--subtle-section-padding);
}

body .diconsus-highlight-band.is-style-subtle .diconsus-highlight-band__heading {
	font-size: var(--wp--custom--highlight-band--subtle-heading-size);
	line-height: var(--wp--custom--highlight-band--subtle-heading-line-height);
}

/* Schritte */
body .diconsus-steps__actions {
	margin-top: var(--wp--custom--steps--actions-margin);
}

body .diconsus-step__title {
	line-height: var(--wp--custom--steps--title-line-height);
}

body .diconsus-step__list {
	margin-top: var(--wp--custom--steps--list-gap);
	padding-left: var(--wp--custom--steps--list-indent);
}

body .diconsus-step__list li + li {
	margin-top: var(--wp--custom--steps--list-gap);
}

/* Icon-Karten */
body .diconsus-icon-cards__heading {
	max-width: var(--wp--custom--icon-cards--heading-width);
}

/* Karten ohne Link stehen als sichtbare Karten da (CMDB), Link-Karten erscheinen erst beim Hover (Architekturberatung). */
body .diconsus-icon-cards--grid .diconsus-icon-cards__cards:not(:has(.is-link)) {
	gap: var(--wp--custom--icon-cards--grid-gap);
}

body .diconsus-icon-cards--grid .diconsus-icon-card:not(.is-link) {
	background: var(--wp--custom--icon-cards--grid-background);
	box-shadow: var(--wp--custom--icon-cards--grid-shadow);
}

body .diconsus-icon-cards--list .diconsus-icon-card__text {
	margin-top: var(--wp--custom--icon-cards--list-text-margin);
}

/* Stichpunkte unter dem Titel sind kleiner und enger (Architekturberatung, Leistungen). */
body .diconsus-icon-cards--list .diconsus-icon-card__list {
	font-size: var(--wp--preset--font-size--small);
}

body .diconsus-icon-cards--list .diconsus-icon-card__list li + li {
	margin-top: 0;
}

/* Checkliste: Überschrift schmal, darunter Liste und Button nebeneinander. */
@media (min-width: 960px) {

	body .diconsus-checklist__inner {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: center;
		gap: 0 var(--wp--custom--checklist--column-gap);
		width: min(var(--wp--custom--checklist--wide-width), calc(100% - var(--wp--style--root--padding-left, 0px) - var(--wp--style--root--padding-right, 0px)));
	}

	body .diconsus-checklist__heading {
		grid-column: 1 / -1;
		width: min(var(--wp--custom--checklist--width), 100%);
		margin-inline: auto;
	}

	body .diconsus-checklist__list {
		max-width: none;
	}

	body .diconsus-checklist__button {
		margin-top: 0;
	}

	body .diconsus-checklist__button .wp-block-button__link {
		display: block;
		text-align: center;
	}
}

/* Kapitel der Erfolgsstories */
body .diconsus-media-text--heading {
	--wp--custom--media-text--width: var(--wp--style--global--wide-size);
}

body .diconsus-media-text--heading .diconsus-media-text__text {
	font-size: var(--wp--preset--font-size--base);
}

body .diconsus-fact-sheet ~ .diconsus-media-text--heading .diconsus-media-text__text {
	font-size: var(--wp--custom--media-text--aside-text-size);
	line-height: var(--wp--custom--media-text--aside-line-height);
}

body .diconsus-fact-sheet ~ .diconsus-media-text--heading .diconsus-media-text__eyebrow {
	font-size: var(--wp--custom--media-text--aside-eyebrow-size);
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}

/* Steckbrief */
body .diconsus-fact-sheet__logo {
	width: 100%;
	max-width: var(--wp--custom--fact-sheet--logo-width);
	max-height: var(--wp--custom--fact-sheet--logo-max-height);
	object-fit: contain;
	object-position: left top;
}

body .diconsus-fact-sheet__fact dt {
	font-size: var(--wp--custom--fact-sheet--label-size);
	font-weight: 400;
}

body .diconsus-fact-sheet__note-label {
	font-weight: 400;
}

body .diconsus-fact-sheet__heading {
	font-size: var(--wp--custom--fact-sheet--heading-size);
	font-weight: 600;
}

body .diconsus-fact-sheet__text {
	line-height: var(--wp--custom--media-text--aside-line-height);
}

/* Handy: zwei Karten nebeneinander, kleinerer Innenabstand. */
@media (max-width: 640px) {

	body .diconsus-icon-cards--grid .diconsus-icon-cards__cards:not(:has(.is-link)) {
		grid-template-columns: repeat(auto-fit, minmax(var(--wp--custom--icon-cards--grid-column-mobile), 1fr));
	}

	body .diconsus-icon-cards--grid .diconsus-icon-card:not(.is-link) {
		padding: var(--wp--custom--icon-cards--grid-padding-mobile);
	}
}

/*
 * Hero mit Überzeile (Erfolgsstories, Karriere, KMU NOW, Partner, Sponsoring): Höhe aus dem Inhalt,
 * Text eingerückt. Überzeile normal gesetzt mit Linie; ohne Button, denn „Über uns“ behält die Versalien.
 */
body .diconsus-hero:has(.diconsus-hero__eyebrow):not(:has(.diconsus-hero__button)) .diconsus-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	min-width: min(var(--wp--custom--hero--eyebrow-line-width), 100%);
	margin-bottom: 10px;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.4;
	text-transform: none;
}

body .diconsus-hero:has(.diconsus-hero__eyebrow):not(:has(.diconsus-hero__button)) .diconsus-hero__eyebrow::after {
	content: "";
	flex: 1;
	border-top: 1px solid currentcolor;
	opacity: 0.3;
}

@media (max-width: 959px) {

	body .diconsus-hero:has(.diconsus-hero__eyebrow):not(:has(.diconsus-hero__button)) .diconsus-hero__eyebrow {
		min-width: 0;
		margin-inline: auto;
	}

	body .diconsus-hero:has(.diconsus-hero__eyebrow):not(:has(.diconsus-hero__button)) .diconsus-hero__eyebrow::after {
		display: none;
	}

	body .diconsus-hero:has(.diconsus-hero__eyebrow) .diconsus-hero__inner {
		min-height: 0;
		margin-top: var(--wp--custom--hero--story-content-offset-mobile);
	}
}

@media (min-width: 960px) {

	body .diconsus-hero:has(.diconsus-hero__eyebrow) {
		min-height: 0;
		padding-bottom: var(--wp--custom--hero--eyebrow-padding-bottom);
	}

	body .diconsus-hero:has(.diconsus-hero__eyebrow) .diconsus-hero__inner {
		min-height: 0;
		margin-top: var(--wp--custom--hero--story-content-offset);
		padding-inline: var(--wp--custom--hero--story-inset);
	}

	/* Erfolgsstory: Der Steckbrief ragt in den Hero. */
	body .diconsus-hero:has(+ .diconsus-fact-sheet) {
		min-height: var(--wp--custom--hero--story-min-height);
		padding-bottom: var(--wp--custom--hero--story-padding-bottom);
	}

	body .diconsus-hero + .diconsus-fact-sheet {
		position: relative;
		z-index: 3;
		margin-top: calc(var(--wp--custom--fact-sheet--overlap) * -1);
		padding-top: 0;
	}

	body .diconsus-fact-sheet__inner {
		grid-template-columns: minmax(0, var(--wp--custom--fact-sheet--card-width)) minmax(0, var(--wp--custom--fact-sheet--text-width));
		justify-content: space-between;
		gap: 0;
		width: min(var(--wp--style--global--wide-size), calc(100% - var(--wp--style--root--padding-left, 0px) - var(--wp--style--root--padding-right, 0px)));
	}

	body .diconsus-fact-sheet__content {
		padding-top: var(--wp--custom--fact-sheet--content-offset);
	}
}

/* Rechtstexte: schmale Textspalte (Impressum, Datenschutz, Cookie-Richtlinie, D-115). */
body .diconsus-legal {
	max-width: var(--wp--custom--layout--narrow);
	margin-inline: auto;
	padding-block: var(--wp--preset--spacing--50);
}

/* Unter dem Seitentitel: linksbündig. !important wegen der Zentrierung im Layout „constrained“. */
body .diconsus-legal--start {
	margin-left: 0 !important;
	padding-block: var(--wp--preset--spacing--20) 0;
}

body .diconsus-legal h2 {
	margin-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--10);
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: break-word;
}

body .diconsus-legal h3,
body .diconsus-legal h4 {
	margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--10);
}

/* Footer */
body .diconsus-footer__top,
body .diconsus-footer__sitemap,
body .diconsus-footer__bottom {
	width: min(var(--wp--custom--footer--width), calc(100% - var(--wp--style--root--padding-left, 0px) - var(--wp--style--root--padding-right, 0px)));
}

body .diconsus-footer__heading {
	font-size: var(--wp--custom--footer--heading-size);
}
