/* Anpassungen für raumholz – ergänzt main.css der Vorlage "Solid State" */

:root {
	--holz: #a35b26;        /* Markenbraun aus dem Logo */
	--holz-hell: #c08a5c;
}

/* Hintergrundbild kommt aus images/bg.jpg (von der Vorlage vorgesehen) */

/* Runde Bilder: Fotos quadratisch zuschneiden, sonst entstehen Ellipsen */
.wrapper.spotlight .image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}

/* Logo statt Icon im Banner */
#banner .logo img {
	display: block;
	width: 22em;
	max-width: 80%;
	height: auto;
}

#banner .intro {
	font-size: 1.25em;
	max-width: 32em;
}

/* Handy: Banner kürzer (kleinerer Text, kein Knopf), damit das Hintergrundbild
   weniger vergrößert wird und Lukas (links) und Bernhard zu sehen sind */
@media screen and (max-width: 736px) {
	/* Bildausschnitt etwas nach links (Mitte zwischen beiden liegt bei ca. 47 %) */
	#banner {
		background-position: center, 38% center;
	}

	#banner .intro {
		font-size: 0.95em;
	}

	/* Kontaktbereich ist auf dem Handy über 1000 px hoch – mit "cover" wäre nur
	   ein Viertel der Bildbreite zu sehen. Stattdessen: Bild oben, so breit, dass
	   beide drauf sind, nach unten in den dunklen Grund ausgeblendet.
	   Bildhöhe = 175vw * 854/1280 ≈ 117vw */
	#footer {
		background-image:
			linear-gradient(to top, rgba(37, 34, 32, 0.82), rgba(37, 34, 32, 0.82)),
			linear-gradient(to bottom, rgba(37, 34, 32, 0) 55%, #252220 100%),
			url("../../images/bg.jpg");
		background-size: auto, 100% 117vw, 175vw auto;
		background-position: center, 47% 0, 47% 0;
		background-repeat: no-repeat;
	}

	#banner .actions {
		display: none;
	}

	#banner .intro:last-of-type {
		margin-bottom: 0;
	}
}

/* Schriftzug aus dem Logo in der Kopfzeile */
#header h1 img.wortmarke {
	display: inline-block;
	height: 1.5rem;
	width: auto;
	vertical-align: middle;
	position: relative;
	top: -0.1em;
}

/* Zurück-Pfeil links neben dem Seitentitel der Unterseiten */
#wrapper > header h2 {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

#wrapper > header h2 .zurueck {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	border: 0;
	border-radius: 100%;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
	font-size: 0.8em;
	text-decoration: none;
	transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#wrapper > header h2 .zurueck:hover {
	background-color: var(--holz);
	box-shadow: inset 0 0 0 2px var(--holz);
}

#wrapper > header h2 .zurueck .icon:before {
	line-height: 1;
}

/* Die Vorlage macht jedes <span> in Überschriften dünn – hier nicht gewollt */
#wrapper > header h2 > span,
h2 .marke {
	font-weight: inherit;
}

/* Lange Titel (z. B. "Datenschutzerklärung") dürfen am Handy nicht überlaufen */
#wrapper > header h2 > span {
	min-width: 0;
	overflow-wrap: break-word;
	hyphens: auto;
}

@media screen and (max-width: 480px) {
	#wrapper > header h2 {
		font-size: 1.35em;
		letter-spacing: 0.1em;
	}
}

/* Markenname immer klein, auch in Überschriften mit Großbuchstaben */
.marke {
	text-transform: none;
	letter-spacing: 0.02em;
}

/* Hauptbutton in Markenfarbe */
.button.primary,
input[type="submit"].primary {
	background-color: var(--holz) !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

.button.primary:hover {
	background-color: var(--holz-hell) !important;
}

/* Materialangaben unter den Meisterstücken */
.material {
	font-family: Raleway, Helvetica, sans-serif;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-size: 0.9em;
	opacity: 0.8;
}

/* Footer-Logo */
#footer .footer-logo {
	width: 12em;
	max-width: 60%;
	height: auto;
	margin-bottom: 2em;
}

/* Rechtstexte gut lesbar */
.rechtstext h3 {
	margin-top: 2em;
}

.rechtstext p,
.rechtstext li {
	line-height: 1.7;
}

/* Bildergalerie auf Unterseiten */
/* Spalten-Layout: Bilder behalten ihr Format (Hochformat wird nicht beschnitten) */
.galerie {
	columns: 3 14em;
	column-gap: 1.5em;
	margin-bottom: 2em;
}

/* Jedes Bild steckt in einem Link auf die Großansicht (a.lupe) */
.galerie > a {
	display: block;
	margin: 0 0 1.5em 0;
	break-inside: avoid;
	border: 0;
	cursor: zoom-in;
	overflow: hidden;
}

.galerie img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease, opacity 0.2s ease;
}

.galerie > a:hover img,
.galerie > a:focus-visible img {
	transform: scale(1.03);
}

.galerie > a:focus-visible {
	outline: solid 2px var(--holz-hell);
	outline-offset: 3px;
}

/* Festes Raster: zeilenweise gefüllt, Spaltenzahl und Seitenverhältnis kommen aus config.py.
   Einheitliches Format, damit die Zeilen bündig abschließen (minimaler Beschnitt bei Abweichung). */
.galerie.raster {
	columns: auto;
	display: grid;
	grid-template-columns: repeat(var(--spalten, 2), 1fr);
	gap: 1.5em;
}

.galerie.raster > a {
	margin: 0;
}

.galerie.raster img {
	aspect-ratio: var(--format, auto);
	object-fit: cover;
}

@media screen and (max-width: 480px) {
	.galerie.raster {
		grid-template-columns: 1fr;
	}
}

/* ---------- Großansicht (Lightbox), gesteuert von raumholz.js ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 20000; /* über Kopfzeile (10000) und Menü */
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 18, 17, 0.95);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.lightbox[hidden] {
	display: none;
}

.lightbox.offen {
	opacity: 1;
}

.lightbox figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: calc(100vw - 10em);
}

.lightbox img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 7em);
	width: auto;
	height: auto;
	object-fit: contain;
	transition: opacity 0.2s ease;
}

.lightbox img.laedt {
	opacity: 0;
}

.lightbox figcaption {
	margin-top: 0.9em;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.9em;
	line-height: 1.5;
	text-align: center;
}

.lightbox figcaption .zaehler {
	color: rgba(255, 255, 255, 0.45);
	margin-left: 0.75em;
	white-space: nowrap;
}

/* Buttons: Vorlagen-Stil für <button> komplett zurücksetzen */
.lightbox button {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3em;
	height: 3em;
	border-radius: 100%;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
	color: #ffffff;
	font-size: 1em;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.lightbox button:hover,
.lightbox button:focus-visible {
	background-color: var(--holz);
	box-shadow: inset 0 0 0 2px var(--holz);
}

.lightbox button:focus-visible {
	outline: solid 2px #ffffff;
	outline-offset: 3px;
}

.lightbox button:before {
	line-height: 1;
}

.lightbox .lb-schliessen { top: 1.25em; right: 1.25em; }
.lightbox .lb-zurueck    { left: 1.5em;  top: 50%; transform: translateY(-50%); }
.lightbox .lb-weiter     { right: 1.5em; top: 50%; transform: translateY(-50%); }

.lightbox.einzeln .lb-zurueck,
.lightbox.einzeln .lb-weiter {
	display: none;
}

/* Handy: Bild fast randlos, Pfeile unten statt seitlich */
@media screen and (max-width: 736px) {
	.lightbox figure {
		max-width: calc(100vw - 1em);
	}

	.lightbox img {
		max-height: calc(100vh - 11em);
	}

	.lightbox .lb-zurueck,
	.lightbox .lb-weiter {
		top: auto;
		bottom: 1.25em;
		transform: none;
	}

	.lightbox .lb-zurueck { left: calc(50% - 4em); }
	.lightbox .lb-weiter  { right: calc(50% - 4em); }
}

@media (prefers-reduced-motion: reduce) {
	.lightbox,
	.lightbox img,
	.galerie img {
		transition: none;
	}
}

.platzhalter {
	border: dashed 2px rgba(255, 255, 255, 0.25);
	padding: 1em 1.25em;
	opacity: 0.85;
}

/* Sprungziele (z. B. Rücksprung von Unterseiten) nicht unter der festen Kopfzeile verstecken */
#wrapper > section[id],
#kontakt {
	scroll-margin-top: 3.5em;
}

/* Kontaktangaben im Footer der Unterseiten nebeneinander (bricht am Handy um) */
#footer .inner ul.contact.reihe {
	width: 100%; /* Vorlage: 50 %, gedacht für ein Formular daneben – gibt es hier nicht */
}

ul.contact.reihe {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5em 3em;
}

ul.contact.reihe li {
	margin: 0;
	line-height: 2em;
}
