/* Lichtfaenger Galerien – passt sich den Farben des Themes an, funktioniert aber auch allein. */
.lfg, .lfg-uebersicht, .lfg-leuchtkasten, .lfg-ansage, .lfg-passwort, .lfg-geschuetzt, .lfg-hinweis {
	--lfg-nacht: var(--lf-nacht, #0b0a08);
	--lfg-stich: var(--lf-stich, #3a3226);
	--lfg-kerze: var(--lf-kerze, #d8b878);
	--lfg-asche: var(--lf-asche, #9a8f7c);
	--lfg-papier: var(--lf-pergament, #e9dfcb);
	--lfg-kapitaelchen: var(--wp--preset--font-family--fell-sc, Georgia, serif);
}
.lfg { position: relative; margin-block: 2.5rem; }
.lfg img { display: block; max-width: 100%; height: auto; }
.lfg__link { display: block; cursor: zoom-in; outline-offset: 4px; }
.lfg__link:focus-visible { outline: 1px solid var(--lfg-kerze); }
.lfg__legende { font-family: var(--lfg-kapitaelchen); letter-spacing: .2em; font-size: .78rem; color: var(--lfg-asche); text-align: center; margin-top: .7rem; }
.lfg-hinweis { border: 1px dashed var(--lfg-stich, #888); padding: 1rem; font-style: italic; }

/* Abdunkeln – Licht beim Überfahren */
.lfg--raster img, .lfg--masonry img { filter: brightness(.72) contrast(1.04); transition: filter .9s ease; }
.lfg--raster .lfg__bild:hover img, .lfg--masonry .lfg__bild:hover img, .lfg__link:focus-visible img { filter: none; }

/* Raster: gleich große Kacheln (der Ausschnitt bleibt mittig, für exakte Bildausschnitte Masonry wählen) */
.lfg--raster { display: grid; grid-template-columns: repeat(var(--lfg-spalten), 1fr); gap: var(--lfg-abstand); }
.lfg--raster .lfg__bild { margin: 0; }
.lfg--raster img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Masonry: Originalformate in Spalten */
.lfg--masonry { columns: var(--lfg-spalten) 240px; column-gap: var(--lfg-abstand); }
.lfg--masonry .lfg__bild { break-inside: avoid; margin: 0 0 var(--lfg-abstand); }
.lfg--masonry img { width: 100%; }

/* Gleitende Layouts */
.lfg__buehne { overflow: hidden; padding-bottom: .2rem; position: relative; touch-action: pan-y; }
.lfg__spur { display: flex; align-items: center; gap: var(--lfg-abstand); transition: transform .9s cubic-bezier(.2,.7,.1,1); will-change: transform; }
.lfg__bild { margin: 0; flex: 0 0 auto; }
.lfg--karussell .lfg__bild { max-width: 86%; }
.lfg--karussell .lfg__bild img, .lfg--slider .lfg__bild img { width: auto; height: auto; max-height: var(--lfg-hoehe); max-width: 100%; object-fit: contain; }
.lfg--karussell .lfg__bild { opacity: .28; filter: brightness(.6); transition: opacity .9s, filter .9s; }
.lfg--karussell .lfg__bild.ist-aktiv { opacity: 1; filter: none; }
.lfg--slider .lfg__spur { gap: 0; }
.lfg--slider .lfg__bild { width: 100%; display: flex; flex-direction: column; align-items: center; }
.lfg--slider .lfg__bild img { max-width: 100%; }
.lfg--ueberblend .lfg__spur { display: grid; transform: none !important; }
.lfg--ueberblend .lfg__bild { grid-area: 1 / 1; opacity: 0; transition: opacity 1.6s ease, visibility 0s 1.6s; visibility: hidden; display: flex; flex-direction: column; align-items: center; }
.lfg--ueberblend .lfg__bild.ist-aktiv { opacity: 1; visibility: visible; transition: opacity 1.6s ease; }
.lfg--ueberblend .lfg__bild img { height: var(--lfg-hoehe); width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 700px) {
	.lfg--karussell .lfg__bild img, .lfg--slider .lfg__bild img, .lfg--ueberblend .lfg__bild img { height: auto; max-height: 70vh; width: auto; max-width: 86vw; }
}

.lfg__pfeil {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	background: rgba(11,10,8,.35); border: 1px solid var(--lfg-stich); color: var(--lfg-papier);
	width: 3rem; height: 3rem; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .3s, color .3s, border-color .3s;
}
.lfg__pfeil:hover, .lfg__pfeil:focus-visible { background: var(--lfg-kerze); color: var(--lfg-nacht); border-color: var(--lfg-kerze); outline: none; }
.lfg__pfeil--zurueck { left: .5rem; }
.lfg__pfeil--vor { right: .5rem; }
@media (max-width: 700px) { .lfg__pfeil { top: 35vh; } }
.lfg__fuss { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; }
.lfg__zaehler { font-family: var(--lfg-kapitaelchen); letter-spacing: .3em; font-size: .78rem; color: var(--lfg-asche); }
.lfg__pause { background: none; border: 0; color: var(--lfg-asche); cursor: pointer; font-size: .9rem; }
.lfg__pause:hover { color: var(--lfg-kerze); }

/* Galerie-Übersicht */
.lfg-uebersicht { display: grid; grid-template-columns: repeat(var(--lfg-spalten), 1fr); gap: clamp(1rem, 3vw, 2.2rem); margin-block: 2.5rem; }
@media (max-width: 781px) { .lfg-uebersicht { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .lfg-uebersicht { grid-template-columns: 1fr; } }
.lfg-kachel { display: block; text-decoration: none; color: inherit; }
.lfg-kachel__bild { display: block; overflow: hidden; aspect-ratio: 4 / 5; background: #050403; box-shadow: 0 0 0 1px var(--lfg-stich), 0 0 90px rgba(216,184,120,.12); }
.lfg-kachel__bild img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.8); transform: scale(1.02); transition: filter 1s ease, transform 1.6s ease; }
.lfg-kachel:hover .lfg-kachel__bild img, .lfg-kachel:focus-visible .lfg-kachel__bild img { filter: none; transform: scale(1); }
.lfg-kachel__leer { display: grid; place-items: center; height: 100%; color: var(--lfg-kerze); font-size: 2rem; }
.lfg-kachel__text { display: block; text-align: center; margin-top: 1.3rem; }
.lfg-kachel__titel { display: block; font-family: var(--lfg-kapitaelchen); letter-spacing: .2em; color: var(--lfg-kerze); }
.lfg-kachel__meta { display: block; font-style: italic; color: var(--lfg-asche); font-size: .95rem; margin-top: .3rem; }

/* Kundengalerie: Passwortformular */
.lfg-geschuetzt, .lfg-passwort { max-width: 440px; margin: 2rem auto; text-align: center; }
.lfg-passwort label { display: block; font-family: var(--lfg-kapitaelchen); letter-spacing: .2em; font-size: .8rem; color: var(--lfg-asche); margin-top: 1.4rem; }
.lfg-passwort input { width: 100%; margin-top: .4rem; background: rgba(21,19,15,.75); border: 0; border-bottom: 1px solid var(--lfg-stich); color: var(--lfg-papier); padding: .6rem .2rem; font: inherit; text-align: center; }
.lfg-passwort input:focus { outline: none; border-color: var(--lfg-kerze); }
.lfg-passwort button { margin-top: 1.6rem; background: transparent; color: var(--lfg-kerze); border: 1px solid var(--lfg-kerze); padding: .75rem 2.2rem; font-family: var(--lfg-kapitaelchen); letter-spacing: .25em; cursor: pointer; }
.lfg-passwort button:hover { background: var(--lfg-kerze); color: var(--lfg-nacht); }

/* Leuchtkasten */
.lfg-leuchtkasten {
	position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 4vh 4vw;
	background: radial-gradient(circle at 50% 40%, rgba(40,32,22,.96), rgba(5,4,3,.99) 70%);
	opacity: 0; pointer-events: none; transition: opacity .5s ease; touch-action: pan-y;
}
.lfg-leuchtkasten.ist-offen { opacity: 1; pointer-events: auto; }
.lfg-leuchtkasten figure { margin: 0; text-align: center; }
.lfg-leuchtkasten img { max-width: 92vw; max-height: 84vh; box-shadow: 0 0 0 1px var(--lfg-stich), 0 0 120px rgba(216,184,120,.15); transform: scale(.97); filter: brightness(.35) blur(3px); transition: transform .7s ease, filter 1.1s ease; }
.lfg-leuchtkasten.ist-offen img.ist-geladen { transform: scale(1); filter: none; }
.lfg-leuchtkasten figcaption { margin-top: .9rem; font-family: var(--lfg-kapitaelchen); letter-spacing: .2em; font-size: .8rem; color: var(--lfg-asche); min-height: 1em; }
.lfg-leuchtkasten button { position: absolute; background: none; border: 0; color: var(--lfg-asche); font: 300 2.6rem/1 Georgia, serif; cursor: pointer; padding: 1rem; transition: color .3s; }
.lfg-leuchtkasten button:hover, .lfg-leuchtkasten button:focus-visible { color: var(--lfg-kerze); outline: none; }
.lfg-leuchtkasten .lfg-zu { top: .6rem; right: 1rem; }
.lfg-leuchtkasten .lfg-zurueck { left: .5vw; top: 50%; transform: translateY(-50%); }
.lfg-leuchtkasten .lfg-vor { right: .5vw; top: 50%; transform: translateY(-50%); }
.lfg-leuchtkasten .lfg-zaehler { position: absolute; bottom: 1.2rem; left: 0; right: 0; text-align: center; font-family: var(--lfg-kapitaelchen); letter-spacing: .3em; font-size: .78rem; color: var(--lfg-asche); }
html.lfg-gesperrt { overflow: hidden; }

/* Ankündigungsleiste */
.lfg-ansage { position: relative; z-index: 5; text-align: center; padding: .55rem 1rem; background: rgba(0,0,0,.55); border-bottom: 1px solid var(--lfg-stich); font-family: var(--lfg-kapitaelchen); letter-spacing: .25em; font-size: .78rem; color: var(--lfg-kerze); }
.lfg-ansage a { color: inherit; text-decoration: none; }
.lfg-ansage a:hover { color: var(--lfg-papier); }

.lfg-baustelle { min-height: 100svh !important; }

@media (prefers-reduced-motion: reduce) {
	.lfg__spur, .lfg__bild, .lfg-leuchtkasten, .lfg-leuchtkasten img, .lfg-kachel__bild img { transition: none !important; }
}

/* ---------- Bildschutz ---------- */
.lfg-schutz img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* Unsichtbare Deckschicht: ein Rechtsklick trifft sie statt des Bildes – auch ohne JavaScript gibt es kein „Bild sichern“ */
.lfg-schutz .lfg__link, .lfg-schutz .lfg-kachel__bild, .lfg-schutz .lfg-leuchtkasten figure, .lfg-schutz .wp-block-image:not(:has(a)) { position: relative; }
.lfg-schutz .lfg__link::after, .lfg-schutz .lfg-kachel__bild::after, .lfg-schutz .lfg-leuchtkasten figure::after, .lfg-schutz .wp-block-image:not(:has(a))::after { content: ""; position: absolute; inset: 0; z-index: 2; background: transparent; -webkit-touch-callout: none; }
/* Zeichen im Leuchtkasten – steht auf jedem Bildschirmfoto mit drauf */
.lfg-leuchtkasten .lfg-rahmen { position: relative; display: inline-block; line-height: 0; }
.lfg-leuchtkasten .lfg-rahmen[data-zeichen]::before { content: attr(data-zeichen); position: absolute; right: .9rem; bottom: .8rem; line-height: 1.2; z-index: 3; pointer-events: none; font-family: var(--lfg-kapitaelchen); letter-spacing: .2em; font-size: .72rem; color: rgba(255,250,240,.55); text-shadow: 0 0 6px rgba(0,0,0,.8); opacity: 0; transition: opacity 1s ease .4s; }
.lfg-leuchtkasten.ist-offen .lfg-rahmen[data-zeichen]::before { opacity: 1; }
/* Bildschirmfoto-Schutz: Bilder verschwinden, solange die Tastenkürzel gedrückt sind oder das Fenster den Fokus verloren hat */
.lfg-verdeckt img { filter: brightness(0) blur(24px) !important; transition: none !important; }
.lfg-verdeckt .lfg-leuchtkasten .lfg-rahmen::before { opacity: 1 !important; }
/* Drucken: keine Bilder */
@media print {
	.lfg-schutz img { visibility: hidden !important; }
	.lfg-schutz body::after { content: "Die Bilder dieser Seite sind urheberrechtlich geschützt und werden nicht gedruckt."; display: block; margin-top: 2rem; font-style: italic; }
}
