/* =========================================================
   MV GALERÍA PRO
   ========================================================= */

.mvgp-gallery {
	--mvgp-cols: 3;
	--mvgp-gap: 12px;
	--mvgp-radius: 8px;
	width: 100%;
}

/* ---------- CUADRÍCULA (todas iguales, se adaptan con cover) ---------- */
.mvgp-grid {
	display: grid;
	grid-template-columns: repeat(var(--mvgp-cols), 1fr);
	gap: var(--mvgp-gap);
}
.mvgp-grid .mvgp-item {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--mvgp-radius);
	margin: 0;
}
.mvgp-grid .mvgp-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;   /* <- esto hace que TODA foto llene su celda sin deformarse */
	object-position: center;
	display: block;
}

/* ---------- MASONRY (mosaico, respeta la proporción real) ---------- */
.mvgp-masonry {
	column-count: var(--mvgp-cols);
	column-gap: var(--mvgp-gap);
}
.mvgp-masonry .mvgp-item {
	position: relative;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	margin: 0 0 var(--mvgp-gap);
	overflow: hidden;
	border-radius: var(--mvgp-radius);
}
.mvgp-masonry .mvgp-item img {
	width: 100%;
	height: auto;
	display: block;
}

/* ---------- Base común: hover, zoom, overlay y leyenda ---------- */
.mvgp-item {
	cursor: pointer;
}
.mvgp-item img {
	transition: transform .55s cubic-bezier(.2, .8, .2, 1);
	will-change: transform;
}
.mvgp-item .mvgp-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 16px;
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
}
.mvgp-item .mvgp-caption {
	color: #fff;
	font-size: 14px;
	line-height: 1.35;
	transform: translateY(12px);
	transition: transform .35s ease;
}
.mvgp-item:hover img {
	transform: scale(1.07);
}
.mvgp-item:hover .mvgp-overlay {
	opacity: 1;
}
.mvgp-item:hover .mvgp-caption {
	transform: translateY(0);
}

/* =========================================================
   PLANTILLAS
   ========================================================= */

/* --- EJECUTIVA: elegante, minimal, bordes finos, gris oscuro --- */
.mvgp-tpl-ejecutiva { --mvgp-radius: 4px; }
.mvgp-tpl-ejecutiva .mvgp-overlay {
	background: linear-gradient(to top, rgba(17, 24, 39, .88), rgba(17, 24, 39, 0) 65%);
}
.mvgp-tpl-ejecutiva .mvgp-caption {
	font-weight: 500;
	letter-spacing: .02em;
}

/* --- EMPRESA: profesional, azul corporativo, sombra suave --- */
.mvgp-tpl-empresa { --mvgp-radius: 12px; }
.mvgp-tpl-empresa .mvgp-item {
	box-shadow: 0 6px 18px rgba(15, 23, 42, .10);
}
.mvgp-tpl-empresa .mvgp-overlay {
	background: linear-gradient(to top, rgba(30, 58, 138, .90), rgba(37, 99, 235, .10) 60%, transparent);
}
.mvgp-tpl-empresa .mvgp-caption {
	font-weight: 600;
}

/* --- TURISMO: vibrante, cálida, bordes grandes, texto con brillo --- */
.mvgp-tpl-turismo { --mvgp-radius: 16px; }
.mvgp-tpl-turismo .mvgp-overlay {
	background: linear-gradient(to top, rgba(180, 83, 9, .90), rgba(219, 39, 119, .18) 55%, transparent);
}
.mvgp-tpl-turismo .mvgp-caption {
	font-weight: 700;
	font-size: 16px;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.mvgp-tpl-turismo .mvgp-item:hover img {
	transform: scale(1.12);
}

/* --- MINIMAL: blanca, limpia, leyenda centrada sobre velo claro --- */
.mvgp-tpl-minimal { --mvgp-radius: 0px; }
.mvgp-tpl-minimal .mvgp-item {
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.mvgp-tpl-minimal .mvgp-overlay {
	background: rgba(255, 255, 255, .90);
	align-items: center;
	justify-content: center;
	text-align: center;
}
.mvgp-tpl-minimal .mvgp-caption {
	color: #111827;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: 13px;
}

/* --- OSCURA: dark, premium, borde luminoso --- */
.mvgp-tpl-oscura { --mvgp-radius: 10px; }
.mvgp-tpl-oscura .mvgp-item {
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 24px rgba(0, 0, 0, .35);
}
.mvgp-tpl-oscura .mvgp-overlay {
	background: linear-gradient(to top, rgba(2, 6, 23, .92), transparent 70%);
}
.mvgp-tpl-oscura .mvgp-caption {
	color: #f3f4f6;
	font-weight: 500;
}

/* =========================================================
   LIGHTBOX PROPIO
   ========================================================= */
.mvgp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
}
.mvgp-lightbox.is-open { display: flex; }
.mvgp-lb-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .93);
	backdrop-filter: blur(2px);
}
.mvgp-lb-figure {
	position: relative;
	z-index: 2;
	margin: 0;
	max-width: 92vw;
	max-height: 90vh;
	text-align: center;
	animation: mvgp-zoom .25s ease;
}
@keyframes mvgp-zoom {
	from { opacity: 0; transform: scale(.96); }
	to   { opacity: 1; transform: scale(1); }
}
.mvgp-lb-img {
	max-width: 92vw;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
	display: block;
	margin: 0 auto;
}
.mvgp-lb-cap {
	color: #e5e7eb;
	margin-top: 14px;
	font-size: 15px;
}
.mvgp-lb-close,
.mvgp-lb-prev,
.mvgp-lb-next {
	position: absolute;
	z-index: 3;
	background: rgba(255, 255, 255, .12);
	border: none;
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	font-size: 22px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
}
.mvgp-lb-close:hover,
.mvgp-lb-prev:hover,
.mvgp-lb-next:hover { background: rgba(255, 255, 255, .28); }
.mvgp-lb-close { top: 22px; right: 22px; }
.mvgp-lb-prev  { left: 22px; top: 50%; transform: translateY(-50%); }
.mvgp-lb-next  { right: 22px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
	.mvgp-lb-prev  { left: 8px; }
	.mvgp-lb-next  { right: 8px; }
	.mvgp-lb-close { top: 12px; right: 12px; }
}
