/* ttz Project Showcase */

.ttzps {
	--ttzps-pad: clamp(16px, 3.2vw, 48px);
	position: relative;
	width: 100%;
	height: var(--ttzps-height, 100vh);
	min-height: 320px;
	overflow: hidden;
	background: #000;
	color: var(--ttzps-color, #fff);
	isolation: isolate;
}

@supports (height: 100svh) {
	.ttzps:not([style*="--ttzps-height"]) {
		height: 100svh;
	}
}

/* Buttons vom Theme entkoppeln */
.ttzps button,
.ttzps-overlay button {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	padding: 0;
	min-height: 0;
	width: auto;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	text-transform: none;
	text-shadow: none;
	cursor: pointer;
}

.ttzps button:focus-visible,
.ttzps-overlay button:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

/* Slides */
.ttzps__slides,
.ttzps__slide {
	position: absolute;
	inset: 0;
}

.ttzps__slide {
	background-color: #000;
	background-position: center;
	background-size: cover;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease, visibility 0s linear .8s;
}

.ttzps__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .8s ease, visibility 0s;
	z-index: 1;
}

.ttzps__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.ttzps--shade::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 40%;
	background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
	pointer-events: none;
	z-index: 2;
}

/* Bedienleiste unten (Maße nach Vorlage bei 1570 px Breite) */
.ttzps__ui {
	position: absolute;
	left: clamp(20px, 4.9vw, 96px);
	right: clamp(20px, 3vw, 64px);
	bottom: clamp(36px, 14vh, 150px);
	z-index: 3;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 32px;
	font-size: clamp(22px, 2.05vw, var(--ttzps-num-size, 40px));
	line-height: 1;
}

.ttzps__nums {
	display: flex;
	align-items: baseline;
	gap: 0 1.9em;
	font-size: 1em;
	flex: 0 1 auto;
	min-width: 0;
}

.ttzps .ttzps__num {
	font-size: 1em;
	font-weight: 600;
	line-height: 1;
	opacity: .7;
	padding: 8px 2px;
	margin: -8px -2px;
	transition: opacity .25s ease;
	font-variant-numeric: tabular-nums;
}

.ttzps .ttzps__num:hover,
.ttzps .ttzps__num.is-active {
	opacity: 1;
}

.ttzps__captions {
	flex: 0 1 auto;
	min-width: 0;
}

.ttzps__caption {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 0 1.3em;
	animation: ttzps-in .6s ease both;
}

.ttzps__caption[hidden] {
	display: none;
}

.ttzps .ttzps__title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: 1em;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
}

.ttzps .ttzps__more {
	font-size: .59em;
	line-height: 1;
	white-space: nowrap;
	padding: 8px 0;
	margin: -8px 0;
	transition: opacity .25s ease;
}

.ttzps .ttzps__more:hover {
	opacity: .7;
}

/* Fortschrittsbalken: einer, am unteren Bildrand */
.ttzps__progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	z-index: 4;
	background: rgba(255, 255, 255, .18);
	pointer-events: none;
}

.ttzps__fill {
	position: absolute;
	inset: 0;
	background: var(--ttzps-accent, #fff);
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}

/* Vollbild: ganzes Fenster, Seite nicht scrollbar, Header transparent */
.ttzps.ttzps--fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	margin: 0;
	z-index: 1;
	visibility: visible;
}

html:has(body.ttzps-fullscreen),
body.ttzps-fullscreen {
	overflow: hidden !important;
	height: 100% !important;
	overscroll-behavior: none;
}

body.ttzps-fullscreen {
	background: #000 !important;
}

body.ttzps-fullscreen #ajax-content-wrap .container-wrap,
body.ttzps-fullscreen #footer-outer,
body.ttzps-fullscreen #to-top {
	visibility: hidden;
}

body.ttzps-fullscreen #header-space {
	display: none !important;
}

body.ttzps-fullscreen #header-outer,
body.ttzps-fullscreen #header-outer.small-nav,
body.ttzps-fullscreen #header-outer.scrolled-down,
body.ttzps-fullscreen #header-outer #top,
body.ttzps-fullscreen #header-secondary-outer {
	background: transparent !important;
	background-color: transparent !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

body.ttzps-fullscreen #header-outer {
	position: fixed !important;
	z-index: 9998 !important;
}

body.ttzps-fullscreen #header-outer .bg-color-stripe {
	display: none !important;
}

/* Overlay */
.ttzps-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: var(--ttzps-overlay-bg, #000);
	color: var(--ttzps-overlay-color, #fff);
	opacity: 0;
	transition: opacity .35s ease;
}

.ttzps-overlay[hidden] {
	display: none;
}

.ttzps-overlay.is-open {
	opacity: 1;
}

.ttzps-overlay__scroll {
	position: absolute;
	inset: 0;
	display: flex;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

/* Breite richtet sich nach der Fensterhöhe, damit Titel, Video und Text
   auf dem Desktop ohne Scrollen sichtbar sind. */
.ttzps-overlay__inner {
	--ttzps-ov-pad: clamp(16px, 4vw, 48px);
	--ttzps-ratio: 1.7778;
	width: min(960px, calc(100vw - 2 * var(--ttzps-ov-pad)), calc((100vh - 280px) * var(--ttzps-ratio)));
	width: min(960px, calc(100vw - 2 * var(--ttzps-ov-pad)), calc((100dvh - 280px) * var(--ttzps-ratio)));
	min-width: min(520px, calc(100vw - 2 * var(--ttzps-ov-pad)));
	margin: auto;
	padding: 72px 0 48px;
}

.ttzps-overlay .ttzps-overlay__title {
	margin: 0 0 18px;
	padding: 0;
	color: inherit;
	font-size: clamp(22px, 2.05vw, 34px);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: 0;
}

.ttzps-overlay__media {
	position: relative;
	aspect-ratio: var(--ttzps-ratio, 1.7778);
	background: #000;
}

.ttzps-overlay__media video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}

.ttzps-overlay__text {
	margin-top: 20px;
	max-width: 720px;
	font-size: clamp(15px, 1.05vw, 17px);
	line-height: 1.55;
	color: inherit;
	opacity: .85;
}

.ttzps-overlay__text > :first-child {
	margin-top: 0;
}

.ttzps-overlay__text > :last-child {
	margin-bottom: 0;
}

.ttzps-overlay__text p {
	margin: 0 0 .8em;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.ttzps-overlay__text h1,
.ttzps-overlay__text h2,
.ttzps-overlay__text h3,
.ttzps-overlay__text h4,
.ttzps-overlay__text a {
	color: inherit;
}

.ttzps-overlay .ttzps-overlay__close {
	position: fixed;
	top: clamp(14px, 2.4vw, 32px);
	right: clamp(14px, 2.4vw, 32px);
	z-index: 2;
	width: 44px;
	height: 44px;
}

.ttzps-overlay__close span,
.ttzps-overlay__close span::after {
	position: absolute;
	left: 10px;
	right: 10px;
	top: 50%;
	height: 2px;
	margin-top: -1px;
	background: currentColor;
	transform: rotate(45deg);
}

.ttzps-overlay__close span::after {
	content: "";
	left: 0;
	right: 0;
	transform: rotate(-90deg);
}

body.ttzps-lock {
	overflow: hidden;
}

@keyframes ttzps-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

/* Smartphone/Tablet hoch: Titel oben, Nummern darunter über die volle Breite (wie bisherige Seite) */
@media (max-width: 767px) {
	.ttzps__ui {
		left: 24px;
		right: 24px;
		bottom: clamp(40px, 9vh, 80px);
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 28px;
		font-size: 22px;
	}

	.ttzps__nums {
		justify-content: space-between;
		gap: 0;
		padding: 0 20px;
	}

	.ttzps__caption {
		justify-content: flex-start;
		gap: 0 20px;
	}

	.ttzps .ttzps__more {
		font-size: 14px;
	}

	.ttzps-overlay__inner {
		width: calc(100vw - 32px);
		min-width: 0;
		padding: 64px 0 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ttzps__slide,
	.ttzps-overlay,
	.ttzps__caption {
		transition: none;
		animation: none;
	}
}
