.gallery-wrapper {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	overflow-x: hidden;
}

.gallery-wrapper img {
	max-width: 100%;
	transition: all 0.2s ease-in-out;
}

.gallery-wrapper .gallery-img img {
	cursor: pointer;
}

.gallery-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	z-index: 2;
	position: relative;
}

.gallery-popup.active + .gallery-overlay {
	content: "";
	position: fixed;
	width: auto;
	height: auto;
	inset: 0;
	background-color: rgb(0 0 0 / 75%);
	z-index:999999;
	overflow: hidden;
}

.gallery-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: auto;
	height:auto;
	padding: 0px;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index:9999999;
	animation: showPopUp 0.45s linear;
}

.gallery-popup .close,
.gallery-popup .next,
.gallery-popup .prev {
	position: absolute;
	top: 0;
	right: 2rem;
	margin-left: auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-popup img {
	width:auto;
	height: auto;
	object-fit: cover;
}

.gallery-popup .close {
	width: 30px;
	height: 30px;
	cursor: pointer;
	top: -40px;
	right: 0;font-size: 24px;
}

.gallery-popup .next {
	right: 0px;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	font-size: 30px;
	cursor: pointer;
	padding: 10px;
	background-color: rgb(255 255 255 / 75%);
}

.gallery-popup .prev {
	left: 0px;
	right: auto;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	font-size: 30px;
	cursor: pointer;
	padding: 10px;
	background-color: rgb(255 255 255 / 75%);
}

.gallery-wrapper .gallery-inner {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(4, 1fr);
	position: relative;
	z-index: 4;
}

@keyframes showPopUp {
	0% {
		opacity: 0;
		visibility: hidden;
	}
	50% {
		opacity: 0.5;
		visibility: visible;
	}
	100% {
		opacity: 1;
		visibility: visible;
	}
}

@keyframes imgTransitionNext {
	50% {
		opacity: 0.95;
		visibility: visible;
	}
    100%{
		opacity: 1;
        visibility: visible;
	}
}


@keyframes imgTransitionPrev {
	50% {
		opacity: 0.95;
		visibility: visible;
	}
    100%{
		opacity: 1;
        visibility: visible;
	}
}

@media only screen and (max-width: 1280px) {
	.gallery-wrapper .gallery-inner {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media only screen and (max-width: 768px) {
	.gallery-wrapper .gallery-inner {
		grid-template-columns: repeat(2, 1fr);
	}

	.gallery-popup .next {
		right: 0px;
	}
	.gallery-popup .prev {
		left: 0px;
	}
	
	.gallery-popup {
		top: 60px !important;
		left: 50% !important;
		transform: translate(-50%, 0%);
		height: calc(350px - 60px)
	}
}

@media only screen and (max-width: 600px) {
	.gallery-wrapper .gallery-inner {
		grid-template-columns: repeat(1, 1fr);
	}
}