/**
 * MEC Eferding – Bild-Lightbox / Galerie
 */

/* Body-Scroll sperren, solange die Lightbox offen ist. */
html.mlb-locked,
html.mlb-locked body { overflow: hidden; }

/* Verlinkte Bilder im Inhalt: Zoom-Cursor als Hinweis. */
.entry-content .mlb-trigger { cursor: zoom-in; }

.mec-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 4vw, 48px);
	background: rgba(12, 9, 5, .92);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity .22s ease;
}
.mec-lightbox.is-open { display: flex; opacity: 1; }

/* Bühne (Bild + Unterschrift) */
.mec-lightbox .mlb-stage {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}
.mec-lightbox .mlb-img {
	display: block;
	max-width: min(94vw, 1400px);
	max-height: 82vh;
	width: auto;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 28px 64px rgba(0, 0, 0, .55);
	background: rgba(255, 255, 255, .04);
	opacity: 0;
	transform: scale(.98);
	transition: opacity .2s ease, transform .2s ease;
}
.mec-lightbox .mlb-img.is-ready { opacity: 1; transform: none; }

.mec-lightbox .mlb-cap {
	max-width: min(94vw, 900px);
	color: #f3ede2;
	font-size: .95rem;
	line-height: 1.5;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

/* Steuer-Buttons */
.mec-lightbox .mlb-close,
.mec-lightbox .mlb-nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #f3ede2;
	background: rgba(33, 27, 19, .55);
	border: 1px solid rgba(255, 235, 205, .18);
	border-radius: 999px;
	cursor: pointer;
	line-height: 1;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.mec-lightbox .mlb-close:hover,
.mec-lightbox .mlb-nav:hover {
	background: #cf3a2b;
	border-color: #cf3a2b;
}
.mec-lightbox .mlb-close:focus-visible,
.mec-lightbox .mlb-nav:focus-visible {
	outline: 2px solid #e0a94a;
	outline-offset: 2px;
}

.mec-lightbox .mlb-close {
	top: clamp(10px, 2.5vw, 24px);
	right: clamp(10px, 2.5vw, 24px);
	width: 46px;
	height: 46px;
	font-size: 30px;
}

.mec-lightbox .mlb-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 34px;
	padding-bottom: 4px;
}
.mec-lightbox .mlb-nav:hover { transform: translateY(-50%) scale(1.06); }
.mec-lightbox .mlb-prev { left: clamp(8px, 2vw, 28px); }
.mec-lightbox .mlb-next { right: clamp(8px, 2vw, 28px); }

/* Zähler */
.mec-lightbox .mlb-count {
	position: absolute;
	top: clamp(14px, 2.8vw, 28px);
	left: 50%;
	transform: translateX(-50%);
	color: #d8c9b4;
	font-size: .85rem;
	letter-spacing: .06em;
	font-variant-numeric: tabular-nums;
	background: rgba(33, 27, 19, .55);
	border: 1px solid rgba(255, 235, 205, .14);
	padding: 5px 12px;
	border-radius: 999px;
}

@media (max-width: 600px) {
	.mec-lightbox .mlb-nav { width: 44px; height: 44px; font-size: 28px; }
	.mec-lightbox .mlb-img { max-height: 74vh; }
}

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