.uhg-gallery {
	--uhg-gap: clamp(16px, 2vw, 24px);
	--uhg-arrow-offset: 120px;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	margin-top: clamp(30px, 3.5vw, 46px);
	outline: none;
}

.uhg-gallery:focus-visible {
	outline: 2px solid rgba(var(--uh-cta-rgb, 155, 122, 67), 0.48);
	outline-offset: 8px;
}

.uhg-stage {
	--uhg-side-space: clamp(0px, calc(50vw - 50%), 58px);
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 42px;
	align-items: start;
	column-gap: clamp(10px, 1.35vw, 16px);
	width: calc(100% + var(--uhg-side-space) + var(--uhg-side-space));
	margin-inline: calc(0px - var(--uhg-side-space));
}

.uhg-viewport {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	overflow: hidden;
	touch-action: pan-y;
}

.uhg-track {
	display: flex;
	align-items: stretch;
	gap: var(--uhg-gap);
	transform: translate3d(0, 0, 0);
	transition: transform 420ms cubic-bezier(0.22, 0.68, 0.32, 1);
	will-change: transform;
}

.uhg-slide {
	box-sizing: border-box;
	flex: 0 0 calc((100% - (2 * var(--uhg-gap))) / 3);
	min-width: 0;
}

.uhg-figure {
	width: 100%;
	margin: 0;
}

.uhg-open {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	color: inherit;
	font: inherit;
	text-align: inherit;
	appearance: none;
	border: 0;
	border-radius: var(--uh-radius-media, 26px);
	background: transparent;
	box-shadow: none;
	cursor: zoom-in;
}

.uhg-open:focus-visible {
	outline: 2px solid rgba(var(--uh-cta-rgb, 155, 122, 67), 0.58);
	outline-offset: 4px;
}

.uhg-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: inherit;
	box-shadow: var(--uh-media-shadow, 0 18px 38px rgba(47, 41, 37, 0.10));
	transition: transform 240ms ease;
}

/* Portrait presentation is intentionally limited to the two page sections
 * that use vertical photographs. Other instances of the 3–2–1 gallery keep
 * the established 4:3 frame (for example the gift-edition gallery). */
.uh-english-tours-block .uhg-image,
.uh-about-gallery-block .uhg-image {
	aspect-ratio: 3 / 4;
}

.uhg-open:hover .uhg-image,
.uhg-open:focus-visible .uhg-image {
	transform: scale(1.012);
}

.uhg-caption {
	margin: 14px 0 0;
	color: var(--uh-muted, #807a75);
	font-family: "Gentium Book Plus", serif;
	font-size: var(--uh-font-caption, 16px);
	font-style: italic;
	line-height: 1.45;
	text-align: left;
}

.uhg-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: clamp(24px, 2.8vw, 34px);
}

.uhg-controls[hidden],
.uhg-arrow[hidden],
.uhg-lightbox[hidden],
.uhg-lightbox-caption[hidden] {
	display: none !important;
}

.uhg-arrow,
.uhg-lightbox-arrow,
.uhg-lightbox-close {
	display: grid;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	place-items: center;
	font: inherit;
	appearance: none;
	cursor: pointer;
}

.uhg-arrow {
	z-index: 3;
	width: 42px;
	height: 42px;
	margin-top: var(--uhg-arrow-offset);
	color: rgb(var(--uh-cta-rgb, 155, 122, 67));
	border: 1px solid rgba(var(--uh-cta-rgb, 155, 122, 67), 0.34);
	border-radius: 50%;
	background: rgba(255, 252, 247, 0.88);
	box-shadow: 0 7px 16px rgba(47, 41, 37, 0.06);
	transform: translateY(-50%);
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.uhg-prev {
	grid-column: 1;
	grid-row: 1;
}

.uhg-next {
	grid-column: 3;
	grid-row: 1;
}

.uhg-arrow:hover,
.uhg-arrow:focus-visible {
	border-color: rgba(var(--uh-cta-rgb, 155, 122, 67), 0.66);
	background: #fffdf9;
	transform: translateY(calc(-50% - 1px));
}

.uhg-arrow:focus-visible,
.uhg-dot:focus-visible,
.uhg-lightbox-arrow:focus-visible,
.uhg-lightbox-close:focus-visible {
	outline: 2px solid rgba(var(--uh-cta-rgb, 155, 122, 67), 0.58);
	outline-offset: 3px;
}

.uhg-arrow svg,
.uhg-lightbox-arrow svg,
.uhg-lightbox-close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.uhg-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
}

.uhg-dot {
	box-sizing: border-box;
	width: 9px;
	height: 9px;
	margin: 0;
	padding: 0;
	font: inherit;
	appearance: none;
	border: 0;
	border-radius: 50%;
	background: rgba(var(--uh-cta-rgb, 155, 122, 67), 0.30);
	box-shadow: none;
	cursor: pointer;
	transition: width 180ms ease, background 180ms ease;
}

.uhg-dot.is-active {
	width: 24px;
	border-radius: 999px;
	background: rgb(var(--uh-cta-rgb, 155, 122, 67));
}

.uhg-status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

body.uhg-lightbox-open {
	overflow: hidden !important;
}

.uhg-lightbox.uhg-lightbox-root {
	position: fixed !important;
	z-index: 2147483647 !important;
	inset: 0 !important;
	display: grid;
	isolation: isolate;
	contain: none !important;
	transform: none !important;
	touch-action: pan-y;
	grid-template-columns: 50px minmax(0, 1fr) 50px;
	align-items: center;
	column-gap: clamp(12px, 2vw, 28px);
	box-sizing: border-box;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	padding: clamp(22px, 4vw, 54px);
	background: rgba(251, 248, 242, 0.84);
	-webkit-backdrop-filter: blur(14px) saturate(0.92);
	backdrop-filter: blur(14px) saturate(0.92);
}

.uhg-lightbox-figure {
	grid-column: 2;
	grid-row: 1;
	max-width: min(1280px, 100%);
	max-height: 100%;
	margin: 0 auto;
	text-align: center;
}

.uhg-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: calc(100dvh - 150px);
	margin: 0 auto;
	object-fit: contain;
	border-radius: clamp(12px, 1.5vw, 20px);
	box-shadow:
		0 24px 64px rgba(92, 81, 73, 0.18),
		0 0 0 1px rgba(221, 210, 194, 0.34);
}

.uhg-lightbox-caption {
	max-width: 900px;
	margin: 16px auto 0;
	color: var(--uh-body, #5f5650);
	font-family: "Gentium Book Plus", serif;
	font-size: var(--uh-font-caption, 20px);
	font-style: italic;
	line-height: 1.4;
	text-align: center;
}

.uhg-lightbox-arrow,
.uhg-lightbox-close {
	width: 48px;
	height: 48px;
	color: rgb(var(--uh-cta-rgb, 155, 122, 67));
	border: 1px solid rgba(var(--uh-cta-rgb, 155, 122, 67), 0.38);
	border-radius: 50%;
	background: rgba(255, 252, 247, 0.76);
	box-shadow: 0 8px 22px rgba(92, 81, 73, 0.08);
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.uhg-lightbox-arrow:hover,
.uhg-lightbox-arrow:focus-visible,
.uhg-lightbox-close:hover,
.uhg-lightbox-close:focus-visible {
	border-color: rgba(var(--uh-cta-rgb, 155, 122, 67), 0.68);
	background: rgba(255, 252, 247, 0.96);
	transform: translateY(-1px);
}

.uhg-lightbox-prev {
	grid-column: 1;
	grid-row: 1;
}

.uhg-lightbox-next {
	grid-column: 3;
	grid-row: 1;
}

.uhg-lightbox-close {
	position: absolute;
	top: clamp(14px, 2vw, 26px);
	right: clamp(14px, 2vw, 26px);
	z-index: 2;
}

@media (max-width: 1024px) {
	.uhg-slide {
		flex-basis: calc((100% - var(--uhg-gap)) / 2);
	}
}

@media (max-width: 689px) {
	.uhg-gallery {
		--uhg-gap: 16px;
	}

	.uhg-stage {
		--uhg-side-space: clamp(0px, calc(50vw - 50%), 44px);
		grid-template-columns: 36px minmax(0, 1fr) 36px;
		column-gap: 8px;
	}

	.uhg-slide {
		flex-basis: 100%;
	}

	.uhg-arrow {
		width: 36px;
		height: 36px;
	}

	.uhg-lightbox {
		grid-template-columns: 40px minmax(0, 1fr) 40px;
		column-gap: 6px;
		padding: 64px 10px 24px;
	}

	.uhg-lightbox-image {
		max-height: calc(100dvh - 150px);
	}

	.uhg-lightbox-arrow,
	.uhg-lightbox-close {
		width: 40px;
		height: 40px;
	}

	.uhg-lightbox-caption {
		margin-top: 12px;
		font-size: clamp(16px, 4.6vw, 20px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.uhg-track,
	.uhg-image,
	.uhg-arrow,
	.uhg-dot,
	.uhg-lightbox-arrow,
	.uhg-lightbox-close {
		transition: none;
	}
}
