/* Galerie Sexy Wonderland - automatische Einblendung, Bildindex und Grossansicht */

.swg-intro {
	margin: 0 0 14px 0;
	color: #666666;
}

/* ---------- Buehne mit automatischer Einblendung ---------- */

.swg-buehne-auto {
	position: relative;
	aspect-ratio: 4 / 3;
	margin: 0 0 10px 0;
	overflow: hidden;
	border-radius: 3px;
	background: #0d0b0d;
	cursor: zoom-in;
	box-shadow: 0 8px 26px rgba(0, 0, 0, .22);
}

.swg-dia {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1.4s ease-in-out;
}

.swg-dia.an {
	opacity: 1;
}

/* unscharfer Hintergrund aus demselben Bild, damit Hochformate ohne schwarze Balken wirken */
.swg-dia .grund {
	position: absolute;
	inset: -30px;
	background: center / cover no-repeat;
	filter: blur(22px) brightness(.45) saturate(1.2);
}

.swg-dia img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform: scale(1);
	transition: transform 7s linear;
}

.swg-dia.quer img {
	object-fit: cover;
}

.swg-dia.an img,
.swg-dia.aus img {
	transform: scale(1.06);
}

/* ausgeblendete Bilder ohne Rueckwaerts-Zoom zuruecksetzen */
.swg-dia:not(.an):not(.aus) img {
	transition: none;
}

.swg-unterzeile {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 40px 16px 16px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
	color: #ffffff;
	pointer-events: none;
}

.swg-unterzeile b {
	font-weight: normal;
	font-size: 19px;
	letter-spacing: .02em;
}

.swg-unterzeile b:before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 2px;
	margin: 0 10px 5px 0;
	background: #F6AD37;
	vertical-align: middle;
}

.swg-unterzeile em {
	font-style: normal;
	font-size: 12px;
	letter-spacing: .12em;
	color: rgba(255, 255, 255, .75);
}

/* Fortschritt bis zum naechsten Bild */
.swg-takt {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 4;
	height: 3px;
	width: 0;
	background: #F6AD37;
}

.swg-takt.laeuft {
	width: 100%;
	transition: width linear;
}

.swg-buehne-auto .swg-knopf {
	z-index: 5;
	width: 44px;
	height: 44px;
	background: rgba(0, 0, 0, .4);
	opacity: 0;
	transition: opacity .3s, background .2s;
}

.swg-buehne-auto:hover .swg-knopf,
.swg-buehne-auto .swg-knopf:focus-visible {
	opacity: 1;
}

.swg-auto-zurueck { left: 12px; top: 50%; transform: translateY(-50%); }
.swg-auto-weiter  { right: 12px; top: 50%; transform: translateY(-50%); }

.swg-pause-hinweis {
	position: absolute;
	top: 12px;
	left: 14px;
	z-index: 5;
	padding: 3px 9px;
	border-radius: 20px;
	background: rgba(0, 0, 0, .45);
	color: #ffffff;
	font-size: 11px;
	letter-spacing: .08em;
	opacity: 0;
	transition: opacity .3s;
	pointer-events: none;
}

.swg-buehne-auto.pausiert .swg-pause-hinweis {
	opacity: 1;
}

/* ---------- Bildindex: alle Fotos als Kacheln ---------- */

.swg {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	margin: 0 0 18px 0;
}

.swg a {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #1a1a1a;
	border-radius: 3px;
	text-decoration: none;
	outline: none;
}

.swg img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .4s;
}

.swg a:hover img,
.swg a:focus-visible img {
	transform: scale(1.06);
	filter: brightness(1.08);
}

.swg a:focus-visible {
	box-shadow: 0 0 0 3px #F6AD37;
}

/* das gerade eingeblendete Foto ist im Index markiert */
.swg a:after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 3px;
	box-shadow: inset 0 0 0 0 #F6AD37;
	transition: box-shadow .4s;
	pointer-events: none;
}

.swg a.jetzt:after {
	box-shadow: inset 0 0 0 3px #F6AD37;
}

.swg span {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px 8px 6px 8px;
	background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
	color: #ffffff;
	font-size: 11px;
	letter-spacing: .02em;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Grossansicht ---------- */

.swg-box {
	position: fixed;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	z-index: 9999;
	--z: 1;
	display: none;
	background: rgba(10, 8, 10, .985);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #ffffff;
	font-family: Trebuchet MS, Geneva, Arial, Helvetica, sans-serif;
	-webkit-user-select: none;
	user-select: none;
}

.swg-box.offen {
	display: flex;
	flex-direction: column;
	animation: swg-ein .25s ease-out;
}

@keyframes swg-ein {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.swg-buehne {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: calc(16px * var(--z)) calc(84px * var(--z)) 0;
}

.swg-buehne img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 10px 50px rgba(0, 0, 0, .6);
	transition: opacity .25s;
}

.swg-buehne img.laedt {
	opacity: 0;
}

.swg-leiste {
	flex: 0 0 auto;
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 14px;
	padding: calc(12px * var(--z)) 16px calc(4px * var(--z));
	font-size: calc(17px * var(--z));
}

.swg-leiste b {
	font-weight: normal;
}

.swg-leiste em {
	font-style: normal;
	color: #F6AD37;
	font-size: .8em;
	letter-spacing: .08em;
}

/* Filmstreifen */
.swg-streifen {
	flex: 0 0 auto;
	display: flex;
	justify-content: center;
	gap: 6px;
	padding: calc(8px * var(--z)) 16px calc(16px * var(--z));
	gap: calc(6px * var(--z));
	overflow-x: auto;
}

.swg-streifen button {
	flex: 0 0 auto;
	width: calc(56px * var(--z));
	height: calc(56px * var(--z));
	padding: 0;
	border: 2px solid transparent;
	border-radius: 3px;
	background: #000000 center / cover no-repeat;
	opacity: .45;
	cursor: pointer;
	transition: opacity .2s, border-color .2s;
}

.swg-streifen button:hover { opacity: .85; }

.swg-streifen button.aktiv {
	opacity: 1;
	border-color: #F6AD37;
}

/* Knoepfe */
.swg-knopf {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(52px * var(--z));
	height: calc(52px * var(--z));
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #ffffff;
	cursor: pointer;
	transition: background .2s;
}

.swg-knopf:hover,
.swg-knopf:focus-visible {
	background: #F6AD37;
	color: #1a1a1a;
	outline: none;
}

.swg-knopf svg {
	width: 46%;
	height: 46%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.swg-zurueck { left: calc(14px * var(--z)); top: 50%; transform: translateY(-50%); }
.swg-weiter  { right: calc(14px * var(--z)); top: 50%; transform: translateY(-50%); }
.swg-zu      { right: calc(14px * var(--z)); top: calc(14px * var(--z)); z-index: 2; }

/* Schmaler Bildschirm (Handy): Pfeile ueber das Bild legen, Filmstreifen weg */
.swg-box.schmal .swg-buehne { padding: calc(64px * var(--z)) 0 0; }
.swg-box.schmal .swg-zurueck,
.swg-box.schmal .swg-weiter { background: rgba(0, 0, 0, .45); }
.swg-box.schmal .swg-streifen { display: none; }
.swg-box.schmal .swg-leiste { padding-bottom: calc(22px * var(--z)); }

@media (prefers-reduced-motion: reduce) {
	.swg img, .swg-buehne img, .swg-dia img { transition: none; }
	.swg-dia.an img { transform: none; }
	.swg-box.offen { animation: none; }
}
