.mg-43077-container {
	column-count: 3;
	column-gap: 15px;
}

.mg-43077-item {
	break-inside: avoid;
	margin-bottom: 15px;
	cursor: pointer;
	overflow: hidden;
}

.mg-43077-img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

/* Lightbox Styles */
.mg-43077-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 99999;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mg-43077-lightbox.active {
	opacity: 1;
	visibility: visible;
}

.mg-43077-lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90vh;
}

.mg-43077-lightbox-content {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
    max-height: 80vh; /* Leave room for caption */
}

.mg-43077-lightbox-img {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	opacity: 0;
	transform: scale(0.95);
	transition: opacity 0.3s ease, transform 0.3s ease;
	user-select: none;
}

.mg-43077-lightbox-img.loaded {
	opacity: 1;
	transform: scale(1);
}

.mg-43077-lightbox-caption {
    color: #fff;
    margin-top: 15px;
    font-size: 16px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    max-width: 100%;
}

.mg-43077-lightbox-close,
.mg-43077-lightbox-prev,
.mg-43077-lightbox-next {
	position: absolute;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 30px;
	cursor: pointer;
	padding: 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10;
	transition: transform 0.2s ease, opacity 0.2s ease;
	opacity: 0.7;
}

.mg-43077-lightbox-close:hover,
.mg-43077-lightbox-prev:hover,
.mg-43077-lightbox-next:hover {
	opacity: 1;
	transform: scale(1.1);
}

.mg-43077-lightbox-close {
	top: 20px;
	right: 20px;
	font-size: 40px;
	line-height: 1;
}

.mg-43077-lightbox-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.mg-43077-lightbox-prev:hover {
	transform: translateY(-50%) scale(1.1);
}

.mg-43077-lightbox-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.mg-43077-lightbox-next:hover {
	transform: translateY(-50%) scale(1.1);
}

.mg-43077-lightbox-loader {
	position: absolute;
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255,255,255,0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: mg-spin 1s ease-in-out infinite;
}

@keyframes mg-spin {
	to { transform: rotate(360deg); }
}