/*
 * Teufelskerle Galerie – Übersicht, Albumseite, Großansicht.
 * Farben und Kontur kommen aus dem Theme (--tkt-…), mit Rückfallwerten.
 */

.tkg,
.tkg-bilder {
	--tkg-schwarz: var(--tkt-schwarz, #111);
	--tkg-rot: var(--tkt-rot, #E3001B);
	--tkg-papier: var(--tkt-papier, #F4F1EE);
	--tkg-mass: var(--tkt-mass, #FAF046);
	--tkg-leise: var(--tkt-leise, #4A4441);
}

/* ---------- Übersicht ---------- */
.tkg-saisons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 8px;
}

.tkg-saisons a {
	padding: 6px 14px;
	border: 2px solid var(--tkg-schwarz);
	border-radius: 999px;
	background: #fff;
	color: var(--tkg-schwarz);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: background .12s ease;
}

.tkg-saisons a:hover,
.tkg-saisons a:focus-visible { background: var(--tkg-mass); outline: none; }

.tkg-saison { margin-top: 48px; scroll-margin-top: 100px; }
.tkg-saison > h2 { margin: 0 0 18px; }

.tkg-alben {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
	gap: 24px;
}

.tkg-album {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 3px solid var(--tkg-schwarz);
	border-radius: 18px;
	background: #fff;
	box-shadow: 6px 6px 0 var(--tkg-schwarz);
	color: var(--tkg-schwarz);
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease;
}

.tkg-album:hover,
.tkg-album:focus-visible {
	transform: translate(-2px, -2px);
	box-shadow: 8px 8px 0 var(--tkg-rot);
	outline: none;
}

.tkg-album__bild {
	display: block;
	aspect-ratio: 4 / 3;
	border-bottom: 3px solid var(--tkg-schwarz);
	background: var(--tkg-papier);
}

.tkg-album__bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tkg-album__text { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.tkg-album__titel { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.tkg-album__info { color: var(--tkg-leise); font-size: .9rem; }

/* ---------- Albumseite ---------- */
.tkg-meta { color: var(--tkt-leise, #4A4441); font-weight: 600; }

.tkg-bilder {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(45%, 180px), 1fr));
	gap: 10px;
	margin: 28px auto;
	padding: 0;
	list-style: none;
}

.tkg-bilder li { margin: 0; }

.tkg-bilder a {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	border: 2px solid var(--tkg-schwarz);
	border-radius: 10px;
	background: var(--tkg-papier);
}

.tkg-bilder img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s ease;
}

.tkg-bilder a:hover img,
.tkg-bilder a:focus-visible img { transform: scale(1.05); }
.tkg-bilder a:focus-visible { outline: 3px solid var(--tkg-rot); outline-offset: 2px; }

/* ---------- Großansicht ---------- */
.tkg-gross {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(17, 17, 17, .97);
	color: #fff;
	overscroll-behavior: contain;
}

.tkg-gross::backdrop { background: rgba(0, 0, 0, .7); }

.tkg-gross__bild {
	position: absolute;
	inset: 56px 12px 56px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
}

.tkg-gross__bild img {
	max-width: 100%;
	max-height: calc(100% - 34px);
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	touch-action: pan-y pinch-zoom;
}

.tkg-gross__bild figcaption { min-height: 24px; max-width: 760px; font-size: 15px; text-align: center; color: #ddd; }

.tkg-gross__zahl {
	position: absolute;
	top: 16px;
	left: 18px;
	margin: 0;
	font: 700 15px/1.6 var(--wp--preset--font-family--inter, sans-serif);
	color: #ddd;
}

.tkg-gross button {
	position: absolute;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: rgba(17, 17, 17, .6);
	color: #fff;
	cursor: pointer;
	transition: background .12s ease;
}

.tkg-gross button:hover,
.tkg-gross button:focus-visible { background: var(--tkt-rot, #E3001B); outline: none; }
.tkg-gross button svg { width: 22px; height: 22px; }
.tkg-gross__zu { top: 8px; right: 10px; }
.tkg-gross__zurueck { top: 50%; left: 12px; transform: translateY(-50%); }
.tkg-gross__vor { top: 50%; right: 12px; transform: translateY(-50%); }

@media (max-width: 600px) {
	.tkg-gross__zurueck,
	.tkg-gross__vor { top: auto; bottom: 8px; transform: none; }
	.tkg-gross__bild { inset: 56px 6px 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.tkg-album,
	.tkg-bilder img { transition: none; }
}
.tkg-gross button[hidden] { display: none; }

/* Breite Blöcke: nie bis an den Rand, wenn das Fenster schmaler als 1200 px ist. */
.tkg.alignwide,
.tkg-bilder.alignwide {
	box-sizing: border-box;
	width: auto;
	max-width: min(1200px, calc(100% - 2 * var(--tkt-rand, 20px))) !important;
	margin-inline: auto !important;
}
