/* hrc-custom-fixes */

.hero-slideshow-fallback {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: background-image 0.5s ease-in-out;
}

.hero-slideshow-fallback > .elementor-background-overlay,
.hero-slideshow-fallback::before,
.hero-slideshow-fallback::after {
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	transition: background-image 0.5s ease-in-out;
}

#masthead,
#masthead.site-header,
#masthead.ast-sticky-active {
	position: relative;
	z-index: 1000 !important;
}

#hrc-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
	z-index: 9999;
	padding: 20px;
}

#hrc-lightbox.open {
	display: flex;
}

#hrc-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
}

#hrc-lightbox button {
	position: absolute;
	top: 16px;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border: 1px solid #fff;
	border-radius: 4px;
	padding: 8px 12px;
	cursor: pointer;
}

#hrc-lightbox .hrc-lightbox-caption {
	position: absolute;
	bottom: 16px;
	left: 24px;
	right: 24px;
	color: #fff;
	text-align: center;
	font-size: 16px;
}

#hrc-lightbox .hrc-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border: 1px solid #fff;
	border-radius: 4px;
	padding: 10px 14px;
	cursor: pointer;
	font-size: 20px;
}

#hrc-lightbox .hrc-nav-btn.prev { left: 16px; }
#hrc-lightbox .hrc-nav-btn.next { right: 16px; }

@media (min-width: 768px) and (max-width: 1024px) {
	.gallery,
	.gallery.hrc-tablet-work-gallery {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}

	.gallery .gallery-item,
	.gallery.hrc-tablet-work-gallery .gallery-item {
		float: none !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
	}

	.gallery .gallery-icon,
	.gallery .gallery-icon a,
	.gallery.hrc-tablet-work-gallery .gallery-icon,
	.gallery.hrc-tablet-work-gallery .gallery-icon a,
	.gallery.hrc-tablet-work-gallery .gallery-icon img {
		display: block;
		width: 100% !important;
	}

	.gallery .gallery-icon a,
	.gallery.hrc-tablet-work-gallery .gallery-icon a {
		aspect-ratio: 4 / 3;
		overflow: hidden;
		border-radius: 6px;
	}

	.gallery .gallery-icon img,
	.gallery.hrc-tablet-work-gallery .gallery-icon img {
		height: 100%;
		object-fit: cover;
	}
}

@media (max-width: 767px) {
	.gallery,
	.gallery.hrc-mobile-work-gallery {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.gallery .gallery-item,
	.gallery.hrc-mobile-work-gallery .gallery-item {
		float: none !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
	}

	.gallery .gallery-icon,
	.gallery .gallery-icon a,
	.gallery.hrc-mobile-work-gallery .gallery-icon,
	.gallery.hrc-mobile-work-gallery .gallery-icon a,
	.gallery.hrc-mobile-work-gallery .gallery-icon img {
		display: block;
		width: 100% !important;
	}

	.gallery .gallery-icon a,
	.gallery.hrc-mobile-work-gallery .gallery-icon a {
		aspect-ratio: 4 / 3;
		overflow: hidden;
		border-radius: 6px;
	}

	.gallery .gallery-icon img,
	.gallery.hrc-mobile-work-gallery .gallery-icon img {
		height: 100%;
		object-fit: cover;
	}
}

@media (max-width: 479px) {
	.gallery,
	.gallery.hrc-mobile-work-gallery {
		grid-template-columns: 1fr;
	}
}
