.gallery-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 0;
}

.gallery-item {
	background: white;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 3px 10px rgba(0,0,0,0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
}

	.gallery-item:hover {
		transform: translateY(-5px);
		box-shadow: 0 6px 15px rgba(0,0,0,0.15);
	}

.gallery-img {
	width: 100%;
	max-height: 600px;
	object-fit: cover;
	display: block;
}

.gallery-caption {
	display: none;
	padding: 15px;
	text-align: center;
	font-size: 14px;
	color: #666;
}

/* Стиль для скрытия оригинальных изображений */
.gallery-original-images img {
	display: none;
}

/* Модальное окно */
.gallery-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.9);
	overflow: auto;
}

.gallery-modal-img {
	display: block;
	margin: 40px auto 20px auto;
	max-width: 90%;
	max-height: 92vh;
	border-radius: 5px;
}

.gallery-modal-caption {
	display: none;
	color: #fff;
	text-align: center;
	padding: 15px;
	font-size: 18px;
}

.gallery-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #fff;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: color 0.3s ease;
}

	.gallery-close:hover {
		color: #ccc;
	}

/* Навигация в модальном окне */
.gallery-prev, .gallery-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: white;
	font-size: 30px;
	font-weight: bold;
	padding: 15px;
	cursor: pointer;
	user-select: none;
	transition: 0.3s;
	z-index: 100;
}

.gallery-prev {
	left: 20px;
	padding-right: 17px;
}

.gallery-next {
	right: 20px;
	padding-left: 16px;
}

	.gallery-prev:hover, .gallery-next:hover {
		background-color: rgba(0,0,0,0.8);
	}

/* Анимация */
@keyframes zoom {
	from {
		transform: scale(0.8);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

.gallery-modal-img {
	animation: zoom 0.3s;
}

/* Адаптивность */
@media (max-width: 768px) {
	.gallery {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	}

	.gallery-modal {
		margin-top: 0;
	}

	.gallery-modal-img {
		position: absolute;
		top: 61%;
		transform: translateY(-50%);
		max-width: 92%;
		height: auto;
		margin: auto 15px;
	}

	.gallery-close {
		top: 80px;
	}

	.gallery-prev, .gallery-next {
		font-size: 20px;
		padding: 10px;
	}
}
