.hvl-case-gallery {
	--cg-fit-a: color-mix(in srgb, var(--e-global-color-primary, #08739f) 8%, #fff);
	--cg-fit-b: #eef0f6;
	--cg-focus: var(--e-global-color-primary, #08739f);
	display: grid;
	gap: 16px;
}

@media (min-width: 810px) {
	.hvl-case-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-auto-rows: 220px;
	}

	.hvl-case-gallery > :first-child {
		grid-column: span 2;
		grid-row: span 2;
	}

	.hvl-case-gallery .is-wide {
		grid-column: span 2;
	}
}

.hvl-case-gallery button.hvl-case-gallery__item {
	display: block;
	overflow: hidden;
	margin: 0;
	border: 0;
	border-radius: 22px;
	padding: 0;
	background: #eef0f5;
	box-shadow: none;
	cursor: zoom-in;
}

.hvl-case-gallery button.hvl-case-gallery__item:hover,
.hvl-case-gallery button.hvl-case-gallery__item:focus {
	background: #eef0f5;
	box-shadow: none;
}

.hvl-case-gallery button.hvl-case-gallery__item:focus-visible {
	outline: 2px solid var(--cg-focus);
	outline-offset: 3px;
}

.hvl-case-gallery .hvl-case-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 0;
	object-fit: cover;
	object-position: top left;
	transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.hvl-case-gallery .hvl-case-gallery__item:hover img {
	transform: scale(1.02);
}

.hvl-case-gallery button.hvl-case-gallery__item.is-fit,
.hvl-case-gallery button.hvl-case-gallery__item.is-fit:hover,
.hvl-case-gallery button.hvl-case-gallery__item.is-fit:focus {
	display: grid;
	place-items: center;
	min-height: 180px;
	padding: 22px;
	background: linear-gradient(170deg, var(--cg-fit-a), var(--cg-fit-b));
}

.hvl-case-gallery .hvl-case-gallery__item.is-fit img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 176px;
	border-radius: 10px;
	object-fit: contain;
	box-shadow: 0 12px 30px -16px rgba(20, 22, 29, 0.35);
}

.hvl-case-gallery__slot {
	display: grid;
	place-items: center;
	min-height: 180px;
	border-radius: 22px;
	padding: 20px;
	box-shadow: inset 0 0 0 1.5px rgba(20, 22, 29, 0.12);
}

.hvl-case-lightbox {
	--cg-backdrop: rgba(10, 10, 12, 0.88);
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	border: 0;
	padding: 64px 16px 24px;
	background: transparent;
}

.hvl-case-lightbox[open] {
	display: grid;
	place-items: center;
}

@media (min-width: 810px) {
	.hvl-case-lightbox {
		padding: 72px 96px 32px;
	}
}

.hvl-case-lightbox::backdrop {
	background: var(--cg-backdrop, rgba(10, 10, 12, 0.88));
}

.hvl-case-lightbox__fig {
	display: grid;
	justify-items: center;
	gap: 14px;
	max-width: 100%;
	margin: 0;
}

.hvl-case-lightbox__fig img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(1100px, 100%);
	max-height: calc(100dvh - 170px);
	border-radius: 16px;
	background: #fff;
}

.hvl-case-lightbox__cap {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 14px;
	max-width: 60ch;
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	color: #d2d2d7;
}

.hvl-case-lightbox__count {
	font-variant-numeric: tabular-nums;
	color: #86868b;
}

.hvl-case-lightbox button,
.hvl-case-lightbox button:focus {
	position: fixed;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	padding: 0;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.hvl-case-lightbox button[hidden] {
	display: none;
}

.hvl-case-lightbox button:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.22);
	box-shadow: none;
}

.hvl-case-lightbox button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hvl-case-lightbox button svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hvl-case-lightbox .hvl-case-lightbox__close {
	top: 12px;
	right: 12px;
}

.hvl-case-lightbox .hvl-case-lightbox__nav {
	top: calc(50% - 22px);
}

.hvl-case-lightbox .hvl-case-lightbox__nav--prev {
	left: 12px;
}

.hvl-case-lightbox .hvl-case-lightbox__nav--next {
	right: 12px;
}

@media (min-width: 810px) {
	.hvl-case-lightbox .hvl-case-lightbox__close {
		top: 20px;
		right: 24px;
	}

	.hvl-case-lightbox .hvl-case-lightbox__nav--prev {
		left: 24px;
	}

	.hvl-case-lightbox .hvl-case-lightbox__nav--next {
		right: 24px;
	}
}

@media (max-width: 809px) {
	.hvl-case-lightbox .hvl-case-lightbox__nav {
		top: auto;
		bottom: 16px;
	}
}
