.hv-gallery {
	--hv-gallery-accent: #8a5a2b;
	--hv-gallery-border: #ded8d0;
	--hv-gallery-surface: #fff;
	--hv-gallery-text: #26221e;
	--hv-gallery-muted: #6d655d;
	box-sizing: border-box;
	color: var(--hv-gallery-text);
	margin-block: 2rem;
}

.hv-gallery *,
.hv-gallery *::before,
.hv-gallery *::after {
	box-sizing: inherit;
}

.hv-gallery [hidden] {
	display: none !important;
}

.hv-gallery .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.hv-gallery__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	justify-content: center;
	margin-block-end: 1.5rem;
}

.hv-gallery__filter {
	appearance: none;
	background: transparent;
	border: 1px solid var(--hv-gallery-border);
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	line-height: 1;
	padding: 0.75rem 1.05rem;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.hv-gallery__filter:hover {
	border-color: var(--hv-gallery-accent);
}

.hv-gallery__filter.is-active {
	background: var(--hv-gallery-accent);
	border-color: var(--hv-gallery-accent);
	color: #fff;
}

.hv-gallery__filter:focus-visible,
.hv-gallery__photo-link:focus-visible,
.hv-gallery-lightbox button:focus-visible,
.hv-gallery__map-link a:focus-visible,
.hv-gallery__placeholder a:focus-visible {
	outline: 3px solid #1976d2;
	outline-offset: 3px;
}

.hv-gallery__grid {
	display: grid;
	gap: clamp(1rem, 2vw, 1.75rem);
	grid-template-columns: repeat(var(--hv-gallery-columns, 3), minmax(0, 1fr));
}

.hv-gallery__item {
	background: var(--hv-gallery-surface);
	border: 1px solid var(--hv-gallery-border);
	border-radius: 0.875rem;
	box-shadow: 0 0.35rem 1.2rem rgb(24 18 12 / 8%);
	min-width: 0;
	overflow: hidden;
}

.hv-gallery__media {
	aspect-ratio: 4 / 3;
	background: #ede9e4;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.hv-gallery__photo-link {
	display: block;
	height: 100%;
	position: relative;
	width: 100%;
}

.hv-gallery__cover {
	display: block;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
	width: 100%;
}

.hv-gallery__photo-link:hover .hv-gallery__cover {
	transform: scale(1.025);
}

.hv-gallery__count {
	background: rgb(24 20 16 / 82%);
	border-radius: 999px;
	bottom: 0.75rem;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 650;
	line-height: 1;
	padding: 0.48rem 0.7rem;
	position: absolute;
	right: 0.75rem;
}

.hv-gallery__embed iframe {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

.hv-gallery__placeholder {
	align-items: center;
	color: var(--hv-gallery-muted);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	justify-content: center;
	padding: 1.5rem;
	text-align: center;
}

.hv-gallery__placeholder .dashicons {
	font-size: 2.75rem;
	height: 2.75rem;
	width: 2.75rem;
}

.hv-gallery__placeholder a {
	color: var(--hv-gallery-accent);
	font-weight: 650;
}

.hv-gallery__map-link {
	background: rgb(255 255 255 / 92%);
	border-radius: 999px;
	bottom: 0.75rem;
	font-size: 0.8125rem;
	font-weight: 650;
	left: 50%;
	margin: 0;
	padding: 0.5rem 0.8rem;
	position: absolute;
	transform: translateX(-50%);
	white-space: nowrap;
	z-index: 2;
}

.hv-gallery__map-link a {
	color: var(--hv-gallery-accent);
	text-decoration: none;
}

.hv-gallery__body {
	padding: 1.1rem 1.15rem 1.2rem;
}

.hv-gallery__title {
	color: inherit;
	font-size: clamp(1.05rem, 1.5vw, 1.3rem);
	line-height: 1.25;
	margin: 0;
}

.hv-gallery__description {
	color: var(--hv-gallery-muted);
	font-size: 0.9375rem;
	line-height: 1.55;
	margin-block-start: 0.65rem;
}

.hv-gallery__description > :first-child {
	margin-block-start: 0;
}

.hv-gallery__description > :last-child {
	margin-block-end: 0;
}

.hv-gallery__albums {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0.85rem 0 0;
	padding: 0;
}

.hv-gallery__albums li {
	background: #f3efe9;
	border-radius: 999px;
	color: #5e554c;
	font-size: 0.75rem;
	line-height: 1;
	padding: 0.4rem 0.6rem;
}

.hv-gallery-lightbox {
	background: transparent;
	border: 0;
	color: #fff;
	height: 100%;
	margin: auto;
	max-height: 100%;
	max-width: 100%;
	padding: 0;
	width: 100%;
}

.hv-gallery-lightbox::backdrop {
	background: rgb(10 9 8 / 92%);
}

.hv-gallery-lightbox__inner {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	padding: clamp(3.5rem, 7vw, 5rem) clamp(1rem, 5vw, 4rem);
	position: relative;
	width: 100%;
}

.hv-gallery-lightbox__close {
	align-items: center;
	appearance: none;
	background: rgb(255 255 255 / 12%);
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 2rem;
	height: 2.75rem;
	justify-content: center;
	line-height: 1;
	padding: 0 0 0.2rem;
	position: absolute;
	right: 1rem;
	top: 1rem;
	width: 2.75rem;
	z-index: 2;
}

.hv-gallery-lightbox__slides {
	height: 100%;
	width: 100%;
}

.hv-gallery-lightbox__slide {
	align-items: center;
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	margin: 0;
	width: 100%;
}

.hv-gallery-lightbox__slide img {
	display: block;
	max-height: calc(100vh - 10rem);
	max-width: 100%;
	object-fit: contain;
}

.hv-gallery-lightbox__slide figcaption {
	color: #fff;
	font-size: 0.875rem;
	margin-block-start: 0.75rem;
	max-width: 60rem;
	text-align: center;
}

.hv-gallery-lightbox__controls {
	align-items: center;
	bottom: 1rem;
	display: flex;
	gap: 1rem;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
}

.hv-gallery-lightbox__controls button {
	appearance: none;
	background: rgb(255 255 255 / 12%);
	border: 1px solid rgb(255 255 255 / 35%);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 1.25rem;
	height: 2.6rem;
	width: 2.6rem;
}

.hv-gallery-lightbox__counter {
	font-variant-numeric: tabular-nums;
	min-width: 4rem;
	text-align: center;
}

@media (max-width: 900px) {
	.hv-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hv-gallery--columns-1 .hv-gallery__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 580px) {
	.hv-gallery__grid {
		grid-template-columns: 1fr;
	}

	.hv-gallery__filter {
		padding: 0.68rem 0.9rem;
	}

	.hv-gallery-lightbox__inner {
		padding-inline: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hv-gallery__filter,
	.hv-gallery__cover {
		transition: none;
	}
}
