/*--------------------------------------------------------------
	LightGallery (bcbo/gallery) – Mobilista Motors Design
	Nutzt die globalen Design-Tokens aus layout.css (--red, --panel,
	--line, --font-display, --text ...) – helle Version, fällt aber auf feste Werte
	zurück, falls der Block mal ohne dieses Stylesheet läuft.
--------------------------------------------------------------*/

.mm-gallery-block{
	margin-bottom: clamp(2.4rem, 6vw, 4.6rem);
}

.mm-gallery-headline{
	font-family: var(--font-display, 'Oswald', sans-serif);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--text, #161616);
	margin: 0 0 1.6rem;
}

.js-gallery.layout-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

/* Jede Kachel bekommt ein festes Seitenverhältnis, damit Hochformat-
   Bilder die Reihe nicht in die Höhe ziehen */
.js-gallery.layout-tiles .gallery-item {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border: 1px solid var(--line, rgba(22,22,22,0.12));
	background: var(--panel, #f4f4f2);
	transition: transform .25s ease, border-color .25s ease;
}

.js-gallery.layout-tiles a.gallery-item:hover,
.js-gallery.layout-tiles a.gallery-item:focus-visible {
	transform: translateY(-4px);
	border-color: var(--red, #e30613);
}

.js-gallery.layout-tiles .gallery-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}


/*---- damit andere Elemente nicht Höhe bestimmen können */
.js-gallery {
	clear: both;
}


/*---- Logos: Boxhöhe folgt automatisch dem Bildformat, damit kein Leerraum entsteht ----- */
.js-gallery.layout-tiles.image-mode-contain {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.js-gallery.layout-tiles.image-mode-contain .gallery-item {
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: auto;
	min-width: 0;
	overflow: hidden;
	border-color: var(--line, rgba(22,22,22,0.12));
}

.js-gallery.layout-tiles.image-mode-contain .gallery-image {
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	padding: 1rem;
	box-sizing: border-box;
}


/*---- Mobil: immer zweispaltig, egal ob Fotos oder Logos ----- */
@media (max-width: 767px) {
	.js-gallery.layout-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
}
