/* Testimonials-Karussell – TechRiders
   ----------------------------------------------------------------------- */

.trt-carousel {
	--trt-card-width: 340px;
	--trt-gap: 24px;
	--trt-radius: 24px;
	--trt-overlay: rgba(10, 11, 13, 0.85);
	--trt-overlay-height: 60%;

	position: relative;
}

.trt-viewport {
	overflow: hidden;
	touch-action: pan-y;
}

.trt-carousel[data-drag="yes"] .trt-viewport {
	cursor: grab;
}

.trt-carousel[data-drag="yes"].is-dragging .trt-viewport {
	cursor: grabbing;
}

.trt-track {
	display: flex;
	will-change: transform;
}

.trt-slide {
	flex: 0 0 var(--trt-card-width);
	width: var(--trt-card-width);
	margin-right: var(--trt-gap);
}

/* Karte
   ----------------------------------------------------------------------- */

.trt-card {
	position: relative;
	width: 100%;
	aspect-ratio: 34 / 54;
	overflow: hidden;
	border-radius: var(--trt-radius);
	background-color: #17181c;
	isolation: isolate;
}

.trt-card__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	-webkit-user-drag: none;
	user-select: none;
}

/* Das Poster bleibt sichtbar, bis das Video startet – kein Opacity-Wechsel nötig. */
.trt-card__video {
	background-color: #17181c;
}

.trt-card__scrim {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--trt-overlay-height);
	background: linear-gradient(to top, var(--trt-overlay) 0%, transparent 100%);
	pointer-events: none;
	z-index: 1;
}

.trt-card__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	padding: 32px 24px;
	pointer-events: none;
	/* Verhindert, dass beim Ziehen der Kartentext markiert wird –
	   die Markierungsfarbe des Themes würde sonst über der Karte liegen. */
	-webkit-user-select: none;
	user-select: none;
}

.trt-card__logo {
	height: 48px;
	width: auto;
	max-width: 70%;
	object-fit: contain;
	margin-bottom: 20px;
	transition: opacity 0.3s ease;
}

.trt-card__quote {
	min-height: 96px;
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.25px;
	quotes: none;
	transition: opacity 0.3s ease;
}

.trt-card__quote::before,
.trt-card__quote::after {
	content: none;
}

.trt-card__footer {
	display: block;
	width: 100%;
}

/* Name und Rolle nutzen die volle Kartenbreite – der Play-Button sitzt
   jetzt oben und nimmt hier keinen Platz mehr weg. */
.trt-card__person {
	display: block;
	width: 100%;
}

.trt-card__name {
	margin: 0;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.29;
	letter-spacing: -0.1px;
}

.trt-card__role {
	margin: 4px 0 0;
	color: rgba(255, 255, 255, 0.75);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.29;
	letter-spacing: -0.25px;
}

/* Play-Button
   ----------------------------------------------------------------------- */

/* Der Play-Button sitzt oben auf der Kachel und erscheint erst beim Hovern. */
.trt-card__play {
	position: absolute;
	top: 20px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px 10px 10px;
	border-radius: 999px;
	background: rgba(25, 26, 30, 0.45);
	outline: 1.58px solid rgba(255, 255, 255, 0.25);
	outline-offset: -1.58px;
	backdrop-filter: blur(9.49px);
	-webkit-backdrop-filter: blur(9.49px);
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.trt-carousel--play-right .trt-card__play {
	right: 20px;
	transform: translateY(-6px);
}

.trt-carousel--play-left .trt-card__play {
	left: 20px;
	transform: translateY(-6px);
}

.trt-carousel--play-center .trt-card__play {
	left: 50%;
	transform: translate(-50%, -6px);
}

/* Einblenden beim Überfahren der Karte – und bei Tastaturfokus, damit der
   Button auch ohne Maus erreichbar bleibt. */
.trt-card--video:hover .trt-card__play,
.trt-card--video:focus-within .trt-card__play {
	opacity: 1;
	transform: translateY(0);
}

.trt-carousel--play-center .trt-card--video:hover .trt-card__play,
.trt-carousel--play-center .trt-card--video:focus-within .trt-card__play {
	transform: translate(-50%, 0);
}

/* Touchgeräte kennen kein Hovern – dort bleibt der Button dauerhaft sichtbar,
   sonst wäre er nie zu sehen. */
@media (hover: none) {
	.trt-card--video .trt-card__play {
		opacity: 1;
		transform: translateY(0);
	}

	.trt-carousel--play-center .trt-card--video .trt-card__play {
		transform: translate(-50%, 0);
	}
}

/* Ohne Beschriftung bleibt der Button rund statt oval. */
.trt-card__play-label:empty {
	display: none;
}

.trt-card__play:not(:has(.trt-card__play-label:not(:empty))) {
	padding: 10px;
}

.trt-card__play svg {
	width: 28px;
	height: 28px;
	display: block;
	flex-shrink: 0;
}

/* Die Klickfläche ist ein <button> und liegt formatfüllend über der Karte.
   Theme- und Kit-Regeln wie `button:hover { background: … }` würden die Karte
   sonst einfärben, deshalb hier alle Zustände hart zurücksetzen. */
.trt-card__hit,
.trt-card__hit:hover,
.trt-card__hit:focus,
.trt-card__hit:active,
.trt-card__hit:visited {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: none;
}

.trt-card__hit:focus-visible {
	outline: 3px solid #4262f0;
	outline-offset: -3px;
	border-radius: var(--trt-radius);
}

/* Text weicht dem Play-Button */

.trt-carousel--hover-reveal .trt-card--video:hover .trt-card__logo,
.trt-carousel--hover-reveal .trt-card--video:hover .trt-card__quote,
.trt-carousel--hover-reveal .trt-card--video:focus-within .trt-card__logo,
.trt-carousel--hover-reveal .trt-card--video:focus-within .trt-card__quote {
	opacity: 0;
}

/* Pfeile
   ----------------------------------------------------------------------- */

.trt-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(25, 26, 30, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.trt-arrow:hover {
	background: rgba(25, 26, 30, 0.8);
}

.trt-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.trt-arrow svg {
	width: 22px;
	height: 22px;
}

.trt-arrow--prev {
	left: 12px;
}

.trt-arrow--next {
	right: 12px;
}

/* Lightbox
   ----------------------------------------------------------------------- */

.trt-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(8, 9, 11, 0.92);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.trt-lightbox.is-open {
	opacity: 1;
}

.trt-lightbox__video {
	max-width: min(420px, 100%);
	max-height: 100%;
	width: auto;
	border-radius: 20px;
	background: #000;
	outline: none;
}

/* YouTube und Vimeo liefern 16:9 im Querformat und brauchen mehr Breite
   als die hochformatigen Loop-Videos. */
.trt-lightbox__video--embed {
	width: min(960px, 100%);
	max-width: min(960px, 100%);
	aspect-ratio: 16 / 9;
	height: auto;
	max-height: min(85vh, 100%);
	border: 0;
}

.trt-lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.trt-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.22);
}

/* Barrierefreiheit
   ----------------------------------------------------------------------- */

.trt-card__hit .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.trt-card__logo,
	.trt-card__quote,
	.trt-card__play,
	.trt-card__video,
	.trt-lightbox {
		transition: none;
	}
}
