.hr2g-gallery {
	--hr2g-gap: 12px;
	width: 100%;
	min-width: 0;
	max-width: none;
	box-sizing: border-box;
}

.hr2g-gallery__grid {
	display: grid !important;
	grid-template-columns: repeat(var(--hr2g-columns, 4), minmax(0, 1fr)) !important;
	grid-auto-flow: row !important;
	width: 100% !important;
	min-width: 0 !important;
	gap: var(--hr2g-gap);
	box-sizing: border-box;
}

.hr2g-gallery__figure {
	display: block !important;
	position: relative !important;
	min-width: 0;
	width: 100% !important;
	max-width: none;
	box-sizing: border-box;
	overflow: hidden;
	margin: 0;
	float: none !important;
}

.hr2g-gallery__trigger {
	display: block;
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #f1f1f1;
	border-radius: 3px;
	aspect-ratio: 1 / 1;
	border: 0 !important;
	border-bottom: 0 !important;
	background-image: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.hr2g-gallery__trigger--thumbnail {
	width: min(100%, var(--hr2g-thumbnail-width, 150px));
	aspect-ratio: var(--hr2g-thumbnail-width, 150px) / var(--hr2g-thumbnail-height, 150px);
	margin-right: auto;
	margin-left: auto;
}

.hr2g-gallery__trigger::before,
.hr2g-gallery__trigger::after {
	display: none !important;
	content: none !important;
}

.hr2g-gallery__trigger img {
	display: block;
	position: static !important;
	inset: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transition: transform 180ms ease;
}

.hr2g-gallery__trigger:hover img,
.hr2g-gallery__trigger:focus-visible img {
	transform: scale(1.025);
}

.hr2g-gallery__caption {
	margin-top: 5px;
	font-size: 0.875em;
	line-height: 1.35;
	text-align: center;
}

.hr2g-lightbox {
	position: fixed;
	inset: 0;
	margin: auto;
	width: min(96vw, 1400px);
	max-width: none;
	max-height: 96vh;
	padding: 50px 64px 44px;
	border: 0;
	background: rgba(15, 15, 15, 0.98);
	color: #fff;
}

.hr2g-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.88);
}

.hr2g-lightbox__figure {
	display: flex;
	min-height: 60vh;
	max-height: 82vh;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0;
}

.hr2g-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.hr2g-lightbox__caption {
	margin-top: 12px;
	color: #fff;
	text-align: center;
}

.hr2g-lightbox__close,
.hr2g-lightbox__previous,
.hr2g-lightbox__next {
	position: absolute;
	border: 0;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	font: inherit;
}

.hr2g-lightbox__close {
	top: 10px;
	right: 12px;
	width: 40px;
	height: 40px;
	font-size: 30px;
	line-height: 1;
}

.hr2g-lightbox__previous,
.hr2g-lightbox__next {
	top: 50%;
	width: 42px;
	height: 54px;
	transform: translateY(-50%);
	font-size: 28px;
}

.hr2g-lightbox__previous {
	left: 10px;
}

.hr2g-lightbox__next {
	right: 10px;
}

.hr2g-lightbox__count {
	position: absolute;
	right: 0;
	bottom: 9px;
	left: 0;
	margin: 0;
	color: rgba(255, 255, 255, 0.75);
	text-align: center;
	font-size: 13px;
}

.hr2g-notice {
	padding: 12px 16px;
	border-left: 4px solid #dba617;
	background: #fff8e5;
}

@media (max-width: 1024px) {
	.hr2g-gallery__grid {
		grid-template-columns: repeat(var(--hr2g-mobile-columns, 2), minmax(0, 1fr)) !important;
		gap: 8px;
		width: 100% !important;
	}
}

@media (max-width: 720px) {
	.hr2g-lightbox {
		width: 100vw;
		max-height: 100vh;
		padding: 48px 44px 42px;
	}

	.hr2g-lightbox__figure {
		min-height: 50vh;
	}

	.hr2g-lightbox__previous {
		left: 2px;
	}

	.hr2g-lightbox__next {
		right: 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hr2g-gallery__trigger img {
		transition: none;
	}
}
