/* ------------------------------------------------------------------
 * gallery.css -- photo gallery grid (see js/gallery.js).
 * Responsive masonry-ish grid of thumbnails that open in the shared
 * lightbox. In-theme: cream cards, coral hover, soft shadow.
 * Non-destructive layer: remove this <link> + js/gallery.js to revert.
 * ------------------------------------------------------------------ */

.section-gallery {
	padding: 8px 20px 24px;
	text-align: center;
}
.gallery-lead {
	max-width: 62ch;
	margin: 0 auto 20px;
	color: #444;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
	margin: 0 auto;
	max-width: 1000px;
}

.gallery-item {
	margin: 0;
	line-height: 0;
}
.gallery-item a {
	display: block;
	position: relative;
	overflow: hidden;
	background: #000;
	box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.22);
	border-radius: 2px;
}
.gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	/* Bias the crop upward so portraits keep faces, not just torsos. */
	object-position: center 28%;
	transition: transform 0.35s ease, opacity 0.35s ease;
}
.gallery-item a:hover img,
.gallery-item a:focus-visible img {
	transform: scale(1.05);
	opacity: 0.85;
}
.gallery-item figcaption {
	line-height: 1.4;
	font-size: 0.85rem;
	color: #666;
	padding: 6px 2px 0;
	text-align: center;
}

/* Collapsed-by-default toggle (see js/gallery.js) — keeps the gallery
 * unobtrusive; matches the Termine "Frühere Auftritte" toggle. */
.gallery-grid[hidden] { display: none; }
.gallery-toggle-wrap {
	text-align: center;
	margin: 4px 0 6px;
}
.gallery-toggle {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	padding: 9px 18px;
	background: transparent;
	border: 1px solid #d9beb2;
	border-radius: 3px;
	color: #bf553a;
	font-family: mensch, Tahoma, sans-serif;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}
.gallery-toggle:hover,
.gallery-toggle:focus-visible {
	background: #f2e7e0;
	border-color: #bf553a;
}
.gallery-toggle::after {
	content: "\25be";              /* ▾ chevron, flips when open */
	font-size: .9em;
	transition: transform .2s ease;
}
.gallery-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.gallery-more {
	margin-top: 22px;
}

/* Empty / loading state */
.gallery-empty {
	display: block;
}
.gallery-placeholder {
	color: #777;
	font-style: italic;
	margin: 12px 0;
}

@media (max-width: 767px) {
	.gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 10px;
	}
}
