.alones-gallery,
.alones-gallery *,
.alones-gallery *::before,
.alones-gallery *::after {
	box-sizing: border-box;
}

.alones-gallery {
	--alones-gallery-gap: 12px;
	--alones-gallery-hero-height: 520px;
	--alones-gallery-thumb-height: 252px;
	--alones-gallery-hover-scale: 1.04;
	--alones-gallery-transition: 320ms;
	--alones-gallery-lightbox-slide-duration: 320ms;
	--alones-gallery-object-position: center center;
	--alones-gallery-image-fit: cover;
	--alones-gallery-desktop-height: max(
		var(--alones-gallery-hero-height),
		calc((var(--alones-gallery-thumb-height) * 2) + var(--alones-gallery-gap))
	);
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.alones-gallery__desktop-grid,
.alones-gallery__mobile,
.alones-gallery__mobile-strip {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.alones-gallery__desktop-grid {
	display: grid;
	grid-template-columns: 1.55fr 1fr;
	gap: var(--alones-gallery-gap);
	align-items: stretch;
	min-width: 0;
}

.alones-gallery__thumb-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: var(--alones-gallery-gap);
	min-width: 0;
	height: var(--alones-gallery-desktop-height);
}

.alones-gallery__item {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	cursor: pointer;
	background: transparent;
}

.alones-gallery__item:focus-visible,
.alones-gallery__view-all:focus-visible,
.alones-gallery__close:focus-visible,
.alones-gallery__nav:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.alones-gallery__item--hero {
	height: var(--alones-gallery-desktop-height);
}

.alones-gallery__item--thumb {
	height: calc((var(--alones-gallery-desktop-height) - var(--alones-gallery-gap)) / 2);
}

.alones-gallery--count-1 .alones-gallery__desktop-grid {
	grid-template-columns: minmax(0, 1fr);
}

.alones-gallery--count-2 .alones-gallery__thumb-grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
	height: var(--alones-gallery-desktop-height);
}

.alones-gallery--count-2 .alones-gallery__item--thumb {
	height: var(--alones-gallery-desktop-height);
}

.alones-gallery--count-3 .alones-gallery__thumb-grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: repeat(2, minmax(0, 1fr));
	height: var(--alones-gallery-desktop-height);
}

.alones-gallery--count-3 .alones-gallery__item--thumb {
	height: calc((var(--alones-gallery-desktop-height) - var(--alones-gallery-gap)) / 2);
}

.alones-gallery--count-4 .alones-gallery__thumb-grid {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: repeat(3, minmax(0, 1fr));
	height: var(--alones-gallery-desktop-height);
}

.alones-gallery--count-4 .alones-gallery__item--thumb {
	height: calc((var(--alones-gallery-desktop-height) - (var(--alones-gallery-gap) * 2)) / 3);
}

.alones-gallery__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.alones-gallery__image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: var(--alones-gallery-image-fit) !important;
	object-position: var(--alones-gallery-object-position) !important;
	transition: transform var(--alones-gallery-transition) ease;
}

.alones-gallery[data-hover-zoom="yes"] .alones-gallery__item:hover .alones-gallery__image,
.alones-gallery[data-hover-zoom="yes"] .alones-gallery__item:focus-visible .alones-gallery__image {
	transform: scale(var(--alones-gallery-hover-scale));
}

.alones-gallery__view-all {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(16, 16, 20, 0.72);
	background-image: none;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	max-width: calc(100% - 28px);
}

.alones-gallery__view-all small {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	min-height: 24px;
	padding: 4px 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	font-size: 12px;
	line-height: 1;
}

.alones-gallery__mobile {
	display: none;
}

.alones-gallery__item--mobile-hero {
	height: var(--alones-gallery-hero-height);
}

.alones-gallery__mobile-strip {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--alones-gallery-gap);
	margin-top: var(--alones-gallery-gap);
}

.alones-gallery__item--mobile-thumb {
	height: var(--alones-gallery-thumb-height);
}

.alones-gallery__lightbox[hidden] {
	display: none;
}

.alones-gallery__lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	background: rgba(8, 8, 12, 0.94);
}

.alones-gallery__lightbox-stage {
	position: relative;
	width: min(100%, 1400px);
	height: min(86vh, 980px);
	padding: 40px 54px;
	overflow: hidden;
}

.alones-gallery__lightbox-image {
	position: absolute;
	inset: 0;
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	margin: auto;
	object-fit: contain;
	border-radius: 14px;
	pointer-events: none;
	opacity: 1;
	transform: scale(1);
	will-change: opacity, transform;
	transition:
		opacity var(--alones-gallery-lightbox-slide-duration) ease,
		transform var(--alones-gallery-lightbox-slide-duration) ease;
}

.alones-gallery__lightbox-image.is-fade-out {
	opacity: 0;
	transform: scale(0.985);
}

.alones-gallery__lightbox-image.is-fade-in {
	opacity: 0;
	transform: scale(1.015);
}

.alones-gallery__counter {
	position: absolute;
	top: 0;
	left: 54px;
	z-index: 4;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}

.alones-gallery__close,
.alones-gallery__nav {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	box-shadow: none;
	background: rgba(255, 255, 255, 0.08);
	background-image: none;
	color: #fff;
	font-family: inherit;
	font-style: normal;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	text-shadow: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.alones-gallery__close {
	top: 18px;
	right: 18px;
	z-index: 5;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	font-size: 28px;
	line-height: 1;
}

.alones-gallery__nav {
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 52px;
	height: 52px;
	border-radius: 999px;
	font-size: 28px;
	line-height: 1;
}

.alones-gallery__nav--prev {
	left: 18px;
}

.alones-gallery__nav--next {
	right: 18px;
}

body.alones-gallery-lightbox-open {
	overflow: hidden;
	touch-action: none;
}

@media (max-width: 1024px) {
	.alones-gallery__desktop-grid {
		grid-template-columns: 1.3fr 1fr;
	}
}

@media (max-width: 767px) {
	.alones-gallery__desktop-grid {
		display: none;
	}

	.alones-gallery__mobile {
		display: block;
	}

	.alones-gallery__view-all {
		right: 10px;
		bottom: 10px;
		padding: 9px 12px;
		font-size: 13px;
		max-width: calc(100% - 20px);
	}

	.alones-gallery__lightbox {
		padding: 14px;
	}

	.alones-gallery__lightbox-stage {
		width: 100%;
		height: min(82vh, 860px);
		padding: 34px 14px;
	}

	.alones-gallery__counter {
		left: 14px;
		top: 6px;
	}

	.alones-gallery__nav--prev {
		left: 8px;
	}

	.alones-gallery__nav--next {
		right: 8px;
	}

	.alones-gallery__close {
		top: 8px;
		right: 8px;
	}
}