/* Galería ficha: miniaturas encajonadas (cover) + lightbox proporción real */

.ficha-galeria {
	width: 100%;
}

.ficha-galeria > .row {
	row-gap: 0.75rem;
}

.ficha-galeria-item {
	display: block;
	position: relative;
	z-index: 1;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 4 / 3;
	margin: 0;
	border: 1px solid rgba(0, 185, 142, 0.2);
	border-radius: 0.35rem;
	background: #eef0f3;
	cursor: zoom-in;
	text-decoration: none;
}

.ficha-galeria-item:hover {
	opacity: 0.92;
}

.ficha-galeria-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	pointer-events: none;
}

.mfp-bg {
	z-index: 10050 !important;
}

.mfp-wrap {
	z-index: 10051 !important;
}

.mfp-content {
	z-index: 10052 !important;
}

.mfp-preloader {
	z-index: 10053 !important;
}

/* Lightbox: tamaño/proporción real, ajustado al viewport sin deformar */
.mfp-ficha-lightbox img.mfp-img {
	width: auto !important;
	height: auto !important;
	max-width: min(96vw, 1400px);
	max-height: calc(100vh - 80px);
	object-fit: contain;
	padding: 0;
}

.mfp-ficha-lightbox .mfp-figure:after {
	top: 0;
	bottom: 0;
}

.mfp-ficha-lightbox .mfp-bottom-bar {
	margin-top: 0.75rem;
	position: relative;
	top: auto;
}

.mfp-ficha-lightbox .mfp-close {
	color: #fff;
	opacity: 0.9;
}

.mfp-ficha-lightbox .mfp-arrow {
	opacity: 0.85;
}
