.fancybox-gallery-section {
	margin: 1rem 0 2rem;
}

.fancybox-gallery-section__title {
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	font-weight: 500;
	color: #21302f;
	margin: 0;
	line-height: 1.25;
}

.fancybox-gallery-section__title span {
	color: #f8b34b;
}

.fancybox-gallery-section h2 span {
	color: #f8b34b;
}

.fancybox-gallery-section__lead {
	max-width: 900px;
	margin: 0 auto 1rem;
	text-align: center;
}

.fancybox-gallery-section__hr {
	margin: 1.25rem 0 1.75rem;
	opacity: 0.35;
}

.fancybox-gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.65rem;
}

@media (min-width: 576px) {
	.fancybox-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 0.75rem;
	}
}

@media (min-width: 992px) {
	.fancybox-gallery-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 0.85rem;
	}
}

.fancybox-gallery-item {
	position: relative;
	display: block;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #21302f;
	box-shadow: 0 4px 14px rgba(33, 48, 47, 0.12);
	text-decoration: none;
}

.fancybox-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.fancybox-gallery-item__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(33, 48, 47, 0.55), transparent 50%);
	opacity: 0.75;
	transition: opacity 0.3s ease;
}

.fancybox-gallery-item__icon {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f8b34b;
	color: #21302f;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.fancybox-gallery-item:hover img {
	transform: scale(1.06);
}

.fancybox-gallery-item:hover .fancybox-gallery-item__overlay {
	opacity: 1;
}

.fancybox-gallery-item:hover .fancybox-gallery-item__icon {
	opacity: 1;
	transform: scale(1);
}

/* Карусель на главной — клик открывает Fancybox */
.fancybox-carousel .carousel-item a {
	display: block;
	cursor: zoom-in;
}

.fancybox-carousel .carousel-item img {
	cursor: zoom-in;
}

/* Страничные фото в статьях */
.fancybox-content-image {
	display: block;
	margin: 1.5rem auto;
	max-width: 100%;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(33, 48, 47, 0.15);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fancybox-content-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.35s ease;
}

.fancybox-content-image:hover {
	box-shadow: 0 12px 28px rgba(33, 48, 47, 0.22);
}

.fancybox-content-image:hover img {
	transform: scale(1.02);
}

/* Кнопки Fancybox в стиле сайта */
.fancybox-toolbar {
	background: rgba(33, 48, 47, 0.92) !important;
}

.fancybox-button {
	background: rgba(248, 179, 75, 0.15) !important;
}

.fancybox-button:hover {
	background: #f8b34b !important;
	color: #21302f !important;
}

.fancybox-navigation .fancybox-button {
	background: rgba(33, 48, 47, 0.75) !important;
}

.fancybox-navigation .fancybox-button:hover {
	background: #f8b34b !important;
}

.fancybox-caption {
	background: linear-gradient(to top, rgba(33, 48, 47, 0.95), transparent);
	font-size: 0.95rem;
}

.fancybox-thumbs__list a::before {
	border-color: #f8b34b !important;
}
