.hef-event-gallery {
	--hef-gallery-gold: #fda909;
	--hef-gallery-ink: #111111;
	margin: 44px 0 34px;
	padding: 34px;
	background: #fff8e8;
	border-radius: 10px;
}

.hef-event-gallery__heading {
	margin: 0 0 24px;
}

.hef-event-gallery__eyebrow {
	display: block;
	margin-bottom: 7px;
	color: #d98e00;
	font: 700 12px/1.3 Montserrat, Arial, sans-serif;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.hef-event-gallery__heading h2 {
	margin: 0;
	color: var(--hef-gallery-ink);
	font: 800 clamp(26px, 3vw, 38px)/1.15 Montserrat, Arial, sans-serif;
}

.hef-event-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.hef-event-gallery__item {
	min-width: 0;
	margin: 0;
}

.hef-event-gallery__link {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #fff;
	border: 1px solid #eadfc9;
	border-radius: 7px;
	box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

.hef-event-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
	box-sizing: border-box;
	transition: transform .2s ease;
}

.hef-event-gallery__link:hover .hef-event-gallery__image,
.hef-event-gallery__link:focus .hef-event-gallery__image {
	transform: scale(1.02);
}

.hef-event-gallery__zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: rgba(17,17,17,.88);
	border-radius: 50%;
	color: #fff;
	pointer-events: none;
}

.hef-event-gallery__zoom svg {
	width: 18px;
	height: 18px;
}

.hef-event-gallery__item figcaption {
	margin: 8px 4px 0;
	color: #555;
	font: 400 13px/1.5 "Open Sans", Arial, sans-serif;
}

/* Lightweight image viewer */
.hef-event-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 30px;
	background: rgba(0,0,0,.88);
	box-sizing: border-box;
}

.hef-event-gallery-lightbox.is-open {
	display: flex;
}

.hef-event-gallery-lightbox__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(1200px, 96vw);
	max-height: 94vh;
}

.hef-event-gallery-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 84vh;
	width: auto;
	height: auto;
	background: #fff;
	border-radius: 5px;
}

.hef-event-gallery-lightbox__caption {
	max-width: 900px;
	margin-top: 12px;
	color: #fff;
	font: 400 14px/1.5 "Open Sans", Arial, sans-serif;
	text-align: center;
}

.hef-event-gallery-lightbox__close {
	position: absolute;
	top: -18px;
	right: -18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: var(--hef-gallery-gold);
	border: 0;
	border-radius: 50%;
	color: #111;
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

body.hef-gallery-lightbox-open {
	overflow: hidden;
}

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

@media (max-width: 600px) {
	.hef-event-gallery {
		margin: 32px 0 24px;
		padding: 22px 16px;
	}

	.hef-event-gallery__grid {
		grid-template-columns: 1fr;
	}

	.hef-event-gallery__link {
		aspect-ratio: auto;
		min-height: 220px;
	}

	.hef-event-gallery-lightbox {
		padding: 18px;
	}

	.hef-event-gallery-lightbox__close {
		top: 8px;
		right: 8px;
	}
}