/* ==========================================================================
   Projekt-Slider 1.1
   --------------------------------------------------------------------------
   EINSTELLUNGEN: Diese Werte kannst du anpassen. Am besten nicht hier,
   sondern unter Divi > Theme-Optionen > Benutzerdefiniertes CSS, indem du
   ".projekt-slider { ... }" mit den gewünschten Werten dort einträgst.
   So bleiben deine Änderungen bei einem Plugin-Update erhalten.

   Größen mit "cqw" wachsen mit der Breite des Sliders mit
   (1cqw = 1 % der Sliderbreite).
   ========================================================================== */

:where(.projekt-slider) {
	/* Farben */
	--ps-blau: #1d5672;                            /* Pfeile, Akkordeon-Titel, Icons */
	--ps-kasten: rgba(29, 86, 114, 0.85);          /* Hintergrund der Headline-Kästen */
	--ps-text-hell: #ffffff;                       /* Schrift auf dem Bild */
	--ps-text-dunkel: #333333;                     /* Fließtext im Akkordeon */
	--ps-balken-oben: #ffffff;                     /* geschlossene Akkordeon-Balken: Verlauf oben */
	--ps-balken-unten: #e6e9eb;                    /* ... und unten */
	--ps-abdunkeln: 0.12;                          /* 0 = Bild unverändert, 0.5 = deutlich dunkler */

	/* Schrift */
	--ps-schrift: inherit;                         /* z. B. "Roboto Condensed", sans-serif */
	--ps-zeilenhoehe-headline: 1.17;               /* so wählen, dass die Kästen sich gerade berühren */

	/* Größen Folie 1 */
	--ps-headline-groesse: clamp(26px, 6.2cqw, 130px);
	--ps-meta-groesse: clamp(13px, 2.3cqw, 44px);

	/* Größen Folie 2 */
	--ps-headline-klein: clamp(22px, 3.4cqw, 72px);
	--ps-meta-klein: clamp(12px, 1.95cqw, 38px);
	--ps-akkordeon-titel: clamp(16px, 2.3cqw, 44px);
	--ps-akkordeon-text: clamp(14px, 1.95cqw, 34px);

	/* Format */
	--ps-format: 16 / 9;                           /* Seitenverhältnis der Folien (Desktop) */
	--ps-hoehe-mobil: 460px;                       /* Mindesthöhe der Folien auf dem Handy */
	--ps-pfeil-breite: 31px;
	--ps-pfeil-strich: 3.5;                        /* Strichstärke der Pfeile */
	--ps-pfeil-abstand: 64px;                      /* Platz links/rechts für die Pfeile */
}

/* ==========================================================================
   Ab hier: Aufbau. Nur ändern, wenn du weißt, was du tust.
   ========================================================================== */

.projekt-slider {
	position: relative;
	padding: 0 var(--ps-pfeil-abstand);
	font-family: var(--ps-schrift);
	box-sizing: border-box;
}

.projekt-slider *,
.projekt-slider *::before,
.projekt-slider *::after {
	box-sizing: border-box;
}

.projekt-slider__swiper {
	overflow: hidden;
	container-type: inline-size;
}

/* ---------- Folien ---------- */

.ps-folie {
	position: relative;
	aspect-ratio: var(--ps-format);
	background-color: #556;
	background-size: cover;
	background-position: center;
	color: var(--ps-text-hell);
	overflow: hidden;
}

.ps-folie::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--ps-abdunkeln));
	pointer-events: none;
}

.ps-intro,
.ps-detail {
	position: relative;
	z-index: 1;
	height: 100%;
}

/* ---------- Branche / Projektaufgabe ---------- */

.ps-meta {
	display: flex;
	flex-direction: column;
	font-size: var(--ps-meta-groesse);
	line-height: 1.18;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.ps-branche {
	font-weight: 700;
}

.ps-aufgabe {
	font-weight: 300;
}

/* ---------- Headline: jede Textzeile bekommt ihren eigenen Kasten ---------- */

.projekt-slider .ps-headline {
	margin: 0;
	padding: 0;
	color: var(--ps-text-hell);
	font-family: inherit;
	font-size: var(--ps-headline-groesse);
	line-height: var(--ps-zeilenhoehe-headline);
	text-transform: uppercase;
	letter-spacing: 0.005em;
	hyphens: auto;
	-webkit-hyphens: auto;
	overflow-wrap: break-word;
}

.ps-headline__1,
.ps-headline__2 {
	display: block;
}

.ps-headline__1 > span,
.ps-headline__2 > span {
	display: inline;
	padding: 0 0.28em;
	background: var(--ps-kasten);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.ps-headline__1 {
	font-weight: 300;
}

.ps-headline__2 {
	font-weight: 700;
}

.ps-headline__1 + .ps-headline__2 {
	margin-top: 0.16em;
}

/* ---------- Folie 1 ---------- */

.ps-intro {
	display: flex;
	flex-direction: column;
	padding: 3.4cqw 4.1cqw;
}

.ps-intro .ps-meta {
	padding-left: 0.2em;
}

.ps-intro .ps-headline {
	margin-top: auto;
	margin-bottom: auto;
	padding-top: 4cqw;
	max-width: 96%;
}

/* ---------- Folie 2 ---------- */

.ps-detail {
	display: grid;
	grid-template-columns: 34% 1fr;
}

.ps-detail__links {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 1.6cqw 1.6cqw 1.6cqw 2.2cqw;
}

.ps-detail__links .ps-meta {
	font-size: var(--ps-meta-klein);
}

.projekt-slider .ps-detail__links .ps-headline {
	font-size: var(--ps-headline-klein);
	margin-top: auto;
	margin-bottom: auto;
	padding-top: 2cqw;
}

.ps-detail__rechts {
	min-width: 0;
	min-height: 0;
	padding: 1.6cqw 1.75cqw 1.75cqw 0;
}

/* ---------- Akkordeon ---------- */

.ps-akkordeon {
	display: flex;
	flex-direction: column;
	gap: 1.05cqw;
	height: 100%;
	min-height: 0;
}

.ps-acc {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: linear-gradient(180deg, var(--ps-balken-oben) 0%, var(--ps-balken-oben) 15%, var(--ps-balken-unten) 100%);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.ps-acc.is-animiert {
	overflow: hidden;
}

.ps-acc.is-open {
	flex: 1 1 auto;
	background: #fff;
}

.projekt-slider .ps-acc__titel {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	width: 100%;
	padding: 0.95em 0.9em 0.95em 1.05em;
	cursor: pointer;
	color: var(--ps-blau);
	font-family: inherit;
	font-size: var(--ps-akkordeon-titel);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-align: left;
}

.ps-acc.is-open .ps-acc__titel {
	cursor: default;
	padding-bottom: 0.5em;
}

.projekt-slider .ps-acc__titel:focus-visible {
	outline: 3px solid var(--ps-blau);
	outline-offset: -3px;
}

/* Plus-Icon: gefüllter Kreis mit weißem Plus */
.ps-acc__icon {
	position: relative;
	flex: 0 0 auto;
	width: 1.42em;
	height: 1.42em;
	border-radius: 50%;
	background: var(--ps-blau);
}

.ps-acc__icon::before,
.ps-acc__icon::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 62%;
	height: 11%;
	background: #fff;
	transform: translate(-50%, -50%);
}

.ps-acc__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.ps-acc.is-open .ps-acc__icon {
	display: none;
}

.ps-acc__inhalt[hidden] {
	display: none;
}

.ps-acc__inhalt {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	margin: 0 1.2cqw 1.6cqw 0;
	padding: 0 2.6cqw 0 calc(var(--ps-akkordeon-titel) * 1.05);
	color: var(--ps-text-dunkel);
	font-size: var(--ps-akkordeon-text);
	font-weight: 300;
	line-height: 1.7;
}

/* Scrollbalken: schmal und grau, mit kleinen Pfeilen (Chrome, Edge, Safari) */
.ps-acc__inhalt::-webkit-scrollbar {
	width: 10px;
}

.ps-acc__inhalt::-webkit-scrollbar-track {
	background: transparent;
}

.ps-acc__inhalt::-webkit-scrollbar-thumb {
	background: #a5a5a5;
	border: 3px solid #fff;
	border-radius: 6px;
}

.ps-acc__inhalt::-webkit-scrollbar-button:single-button {
	display: block;
	height: 12px;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 8px 6px;
}

.ps-acc__inhalt::-webkit-scrollbar-button:single-button:vertical:decrement {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6'%3E%3Cpolygon points='4,0 8,6 0,6' fill='%23a5a5a5'/%3E%3C/svg%3E");
}

.ps-acc__inhalt::-webkit-scrollbar-button:single-button:vertical:increment {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6'%3E%3Cpolygon points='0,0 8,0 4,6' fill='%23a5a5a5'/%3E%3C/svg%3E");
}

/* Firefox */
@supports not selector(::-webkit-scrollbar) {
	.ps-acc__inhalt {
		scrollbar-width: thin;
		scrollbar-color: #a5a5a5 transparent;
	}
}

.ps-acc__text > *:first-child {
	margin-top: 0;
}

.ps-acc__text > *:last-child {
	margin-bottom: 0;
}

.ps-acc__text p {
	margin: 0 0 1em;
	padding: 0;
}

.ps-acc__text strong,
.ps-acc__text b {
	font-weight: 700;
	color: #222;
}

.ps-acc__text h3,
.ps-acc__text h4 {
	margin: 0.8em 0 0.1em;
	padding: 0;
	color: #222;
	font-size: 1em;
	font-weight: 700;
	font-style: italic;
	text-transform: uppercase;
}

/* ---------- Pfeile (Chevrons) ---------- */

.projekt-slider .ps-pfeil {
	all: unset;
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ps-pfeil-breite);
	height: calc(var(--ps-pfeil-breite) * 1.75);
	transform: translateY(-50%);
	color: var(--ps-blau);
	cursor: pointer;
	transition: opacity 0.2s, transform 0.2s;
}

.projekt-slider .ps-pfeil svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.projekt-slider .ps-pfeil polyline {
	fill: none;
	stroke: currentColor;
	stroke-width: var(--ps-pfeil-strich);
	stroke-linecap: round;
	stroke-linejoin: round;
}

.projekt-slider .ps-pfeil:hover {
	opacity: 0.75;
}

.projekt-slider .ps-pfeil:focus-visible {
	outline: 3px solid var(--ps-blau);
	outline-offset: 4px;
}

.projekt-slider .ps-pfeil.swiper-button-disabled {
	opacity: 0.25;
	cursor: default;
}

.projekt-slider .ps-pfeil--zurueck {
	left: calc((var(--ps-pfeil-abstand) - var(--ps-pfeil-breite)) / 2);
}

.projekt-slider .ps-pfeil--weiter {
	right: calc((var(--ps-pfeil-abstand) - var(--ps-pfeil-breite)) / 2);
}

/* ---------- Tablet / Handy ---------- */

@media (max-width: 980px) {
	:where(.projekt-slider) {
		--ps-pfeil-breite: 16px;
		--ps-pfeil-abstand: 28px;
		--ps-headline-groesse: clamp(26px, 8cqw, 60px);
		--ps-headline-klein: clamp(22px, 6.5cqw, 44px);
		--ps-meta-groesse: clamp(13px, 3.6cqw, 22px);
		--ps-meta-klein: clamp(12px, 3.4cqw, 20px);
		--ps-akkordeon-titel: clamp(16px, 4.2cqw, 24px);
		--ps-akkordeon-text: clamp(15px, 3.8cqw, 19px);
	}

	.ps-folie {
		aspect-ratio: auto;
		min-height: var(--ps-hoehe-mobil);
	}

	.ps-intro {
		min-height: var(--ps-hoehe-mobil);
		padding: 24px 20px;
	}

	.ps-detail {
		grid-template-columns: 1fr;
	}

	.ps-detail__links {
		padding: 22px 20px 20px;
	}

	.projekt-slider .ps-detail__links .ps-headline {
		padding-top: 18px;
	}

	.ps-detail__rechts {
		padding: 0 12px 12px;
	}

	.ps-akkordeon {
		height: auto;
		gap: 8px;
	}

	.ps-acc__inhalt {
		max-height: 55vh;
		margin: 0 6px 16px 0;
		padding: 0 14px 0 1.05em;
	}
}
