
.mgm-frontend{width:100%;--mgm-columns:3;--mgm-row-gap:20px;--mgm-column-gap:20px;box-sizing:border-box}
.mgm-frontend *{box-sizing:border-box}
.mgm-frontend .mgm-group{width:100%;margin:0 0 50px}
.mgm-frontend .mgm-title{margin:0 0 25px}
.mgm-frontend .mgm-grid{display:grid;grid-template-columns:repeat(var(--mgm-columns),minmax(0,1fr));row-gap:var(--mgm-row-gap);column-gap:var(--mgm-column-gap);width:100%}
.mgm-frontend .mgm-layout-masonry{display:block;column-count:var(--mgm-columns);column-gap:var(--mgm-column-gap);width:100%}
.mgm-frontend .mgm-layout-masonry .mgm-item{break-inside:avoid;margin-bottom:var(--mgm-row-gap)}
.mgm-frontend .mgm-item{min-width:0;overflow:hidden}
.mgm-frontend .mgm-link{display:block;overflow:hidden;width:100%}
.mgm-frontend .mgm-image{display:block;width:100%;height:auto}
.mgm-frontend .mgm-empty{padding:20px;border:1px dashed #ccc}
.mgm-frontend .mgm-gallery-carousel{--mgm-carousel-gap:var(--mgm-column-gap,20px);width:100%}
@media(max-width:1024px){.mgm-frontend{--mgm-columns:2}}
@media(max-width:767px){.mgm-frontend{--mgm-columns:1}}

/* Elementor lightbox size + open effect — Style > Lightbox */
.elementor-lightbox.dialog-type-lightbox .dialog-widget-content{
	width:100%!important;
	max-width:100vw;
	animation:var(--mgm-lightbox-anim,mgm-lb-zoom) var(--mgm-lightbox-anim-duration,.35s) var(--mgm-lightbox-anim-ease,cubic-bezier(.22,1,.36,1)) both;
}
.elementor-lightbox .elementor-lightbox-item{padding:var(--mgm-lightbox-pad,2vh)}
.elementor-lightbox .elementor-lightbox-image,
.elementor-lightbox img.elementor-lightbox-image{
	max-width:var(--mgm-lightbox-max-w,96vw)!important;
	max-height:var(--mgm-lightbox-max-h,94vh)!important;
	width:auto!important;
	height:auto!important;
	object-fit:contain;
	transform-origin:center center;
	transition:transform var(--mgm-lightbox-hover-duration,.35s) var(--mgm-lightbox-anim-ease,cubic-bezier(.22,1,.36,1));
}
.elementor-lightbox .swiper-zoom-container{
	max-width:var(--mgm-lightbox-max-w,96vw);
	max-height:var(--mgm-lightbox-max-h,94vh);
	overflow:hidden;
}
/* Slide change: opacity only, so hover zoom can own transform */
.elementor-lightbox .swiper-slide-active .elementor-lightbox-image,
.elementor-lightbox .swiper-slide-active img.elementor-lightbox-image{
	animation:mgm-lb-fade var(--mgm-lightbox-anim-duration,.35s) var(--mgm-lightbox-anim-ease,cubic-bezier(.22,1,.36,1)) both;
}
.elementor-lightbox .elementor-lightbox-image:hover,
.elementor-lightbox img.elementor-lightbox-image:hover{
	transform:scale(var(--mgm-lightbox-hover-scale,1.15));
}

@keyframes mgm-lb-fade{
	from{opacity:0}
	to{opacity:1}
}
@keyframes mgm-lb-zoom{
	from{opacity:0;transform:scale(.88)}
	to{opacity:1;transform:scale(1)}
}
@keyframes mgm-lb-zoom-out{
	from{opacity:0;transform:scale(1.12)}
	to{opacity:1;transform:scale(1)}
}
@keyframes mgm-lb-slide-up{
	from{opacity:0;transform:translateY(40px)}
	to{opacity:1;transform:translateY(0)}
}
@keyframes mgm-lb-slide-down{
	from{opacity:0;transform:translateY(-40px)}
	to{opacity:1;transform:translateY(0)}
}

@media (prefers-reduced-motion:reduce){
	.elementor-lightbox.dialog-type-lightbox .dialog-widget-content,
	.elementor-lightbox .swiper-slide-active .elementor-lightbox-image,
	.elementor-lightbox .swiper-slide-active img.elementor-lightbox-image{
		animation:none!important;
	}
	.elementor-lightbox .elementor-lightbox-image:hover,
	.elementor-lightbox img.elementor-lightbox-image:hover{
		transform:none!important;
	}
}

