:root {
	--kl-gallery-bg: #faf8f6;
	--kl-gallery-radius: 12px;
	--kl-gallery-ease: cubic-bezier(.22, 1, .36, 1);
}

.kl-gallery,
.kl-gallery * {
	box-sizing: border-box;
}

.kl-gallery {
	position: relative;
	display: flow-root;
	clear: both;
	isolation: isolate;
	width: 100%;
}

.kl-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	align-items: start;
}

.kl-gallery__column {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.kl-gallery__staging {
	display: none;
}

.kl-gallery__item {
	width: 100%;
	margin: 0;
	opacity: 1;
	transform: translateY(0);
}

.kl-gallery__item.is-pending {
	display: none;
	opacity: 0;
	transform: translateY(34px);
}

.kl-gallery__item.is-revealing {
	display: block;
	opacity: 0;
	transform: translateY(34px);
}

.kl-gallery__open {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--kl-gallery-radius);
	overflow: hidden;
	background: #eee9e5;
	cursor: zoom-in;
}

.kl-gallery__media {
	position: relative;
	display: block;
	width: 100%;
	height: 0;
	padding-bottom: var(--kl-item-ratio);
	overflow: hidden;
}

.kl-gallery__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .9s var(--kl-gallery-ease);
}

.kl-gallery__open:hover .kl-gallery__image,
.kl-gallery__open:focus-visible .kl-gallery__image {
	transform: scale(1.045);
}

.kl-gallery__open:focus-visible,
.kl-gallery__more:focus-visible,
.kl-lightbox button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.kl-gallery__more-wrap {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 112px;
	margin-top: 22px;
	z-index: 3;
}

.kl-gallery__more {
	position: relative;
	min-height: 48px;
	padding: 12px 26px;
	border: 1px solid #24211f;
	border-radius: 999px;
	background: var(--kl-gallery-bg);
	color: #24211f;
	font: inherit;
	font-size: 14px;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, transform .25s ease;
}

.kl-gallery__more:hover {
	background: #24211f;
	color: #fff;
	transform: translateY(-2px);
}

.kl-gallery__more-wrap.is-finished {
	animation: kl-gallery-fade-out .45s ease forwards;
}

body.kl-lightbox-open {
	overflow: hidden;
}

.kl-lightbox[hidden] {
	display: none;
}

.kl-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 28px;
}

.kl-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 16, 15, .94);
	opacity: 0;
	transition: opacity .35s ease;
}

.kl-lightbox__stage {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr) 54px;
	align-items: center;
	width: min(1380px, 100%);
	height: min(900px, calc(100vh - 56px));
	opacity: 0;
	transform: scale(.975);
	transition: opacity .4s ease, transform .4s var(--kl-gallery-ease);
}

.kl-lightbox.is-open .kl-lightbox__backdrop,
.kl-lightbox.is-open .kl-lightbox__stage {
	opacity: 1;
}

.kl-lightbox.is-open .kl-lightbox__stage {
	transform: scale(1);
}

.kl-lightbox__image-wrap {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 0;
	height: 100%;
}

.kl-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	opacity: 1;
	transition: opacity .18s ease, transform .3s var(--kl-gallery-ease);
}

.kl-lightbox__image.is-changing {
	opacity: 0;
	transform: scale(.985);
}

.kl-lightbox__close,
.kl-lightbox__nav {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.kl-lightbox__close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	width: 48px;
	height: 48px;
	font-size: 38px;
	font-weight: 200;
	line-height: 1;
}

.kl-lightbox__nav {
	width: 48px;
	height: 48px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	font-size: 22px;
	transition: background-color .2s ease, border-color .2s ease;
}

.kl-lightbox__nav:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, .12);
}

.kl-lightbox__count {
	position: absolute;
	right: 0;
	bottom: -24px;
	left: 0;
	color: rgba(255, 255, 255, .75);
	font-size: 12px;
	letter-spacing: .12em;
	text-align: center;
}

@keyframes kl-gallery-fade-out {
	to {
		opacity: 0;
		transform: translateY(10px);
	}
}

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

	.kl-gallery__column {
		gap: 14px;
	}
}

@media (max-width: 560px) {
	.kl-gallery:not(.is-initialized) .kl-gallery__grid > .kl-gallery__item:nth-child(n+5) {
		display: none;
	}

	.kl-gallery__grid {
		display: flex;
		flex-direction: column;
		gap: 14px;
		height: auto !important;
		min-height: 0;
		width: 100%;
		overflow: visible;
	}

	.kl-gallery__item,
	.kl-gallery__open,
	.kl-gallery__media {
		width: 100%;
		height: 290px !important;
		min-height: 290px;
		max-height: 290px;
	}

	.kl-gallery__media {
		padding-bottom: 0 !important;
	}

	.kl-gallery__more-wrap {
		width: 100%;
		margin-top: 18px;
	}

	.kl-lightbox {
		padding: 14px;
	}

	.kl-lightbox__stage {
		display: block;
		height: calc(100vh - 28px);
	}

	.kl-lightbox__image-wrap {
		height: 100%;
		padding: 52px 0 70px;
	}

	.kl-lightbox__nav {
		position: absolute;
		bottom: 8px;
		z-index: 2;
	}

	.kl-lightbox__prev {
		left: calc(50% - 58px);
	}

	.kl-lightbox__next {
		right: calc(50% - 58px);
	}

	.kl-lightbox__count {
		bottom: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kl-gallery__item,
	.kl-gallery__image,
	.kl-lightbox__backdrop,
	.kl-lightbox__stage,
	.kl-lightbox__image {
		transition-duration: .01ms !important;
	}
}
