.news-gallery {
	margin: 32px 0;
}

.news-gallery__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.news-gallery__item {
	min-width: 0;
	margin: 0;
}

.news-gallery__button {
	width: 100%;
	padding: 0;
	overflow: hidden;
	display: block;
	border: 0;
	border-radius: var(--news-radius-md);
	background: var(--news-color-soft);
	cursor: zoom-in;
	aspect-ratio: 4 / 3;
}

.news-gallery__button:focus-visible {
	outline: 3px solid var(--news-color-primary);
	outline-offset: 3px;
}

.news-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 240ms ease;
}

.news-gallery__button:hover .news-gallery__image,
.news-gallery__button:focus-visible .news-gallery__image {
	transform: scale(1.025);
}

.news-gallery__caption {
	margin: 8px 2px 0;
	color: var(--news-color-muted);
	font-size: 13px;
	line-height: 1.45;
}

.news-lightbox {
	--news-lightbox-inset-top: max(18px, env(safe-area-inset-top, 0px));
	--news-lightbox-inset-right: max(18px, env(safe-area-inset-right, 0px));
	--news-lightbox-inset-bottom: max(18px, env(safe-area-inset-bottom, 0px));
	--news-lightbox-inset-left: max(18px, env(safe-area-inset-left, 0px));
	--news-lightbox-radius: 18px;
	inset: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: transparent;
	color: #ffffff;
	box-shadow: none;
}

@supports (height: 100dvh) {
	.news-lightbox {
		width: 100dvw;
		height: 100dvh;
	}
}

.news-lightbox::backdrop {
	background: rgba(2, 6, 23, 0.84);
}

html.news-lightbox-is-open,
html.news-lightbox-is-open body {
	overflow: hidden;
	overscroll-behavior: none;
}

.news-lightbox__viewport {
	width: 100%;
	height: 100%;
	padding:
		var(--news-lightbox-inset-top)
		var(--news-lightbox-inset-right)
		var(--news-lightbox-inset-bottom)
		var(--news-lightbox-inset-left);
	display: grid;
	place-items: center;
	overflow: hidden;
	overscroll-behavior: contain;
}

.news-lightbox__frame {
	position: relative;
	isolation: isolate;
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	opacity: var(--news-gallery-drag-opacity, 1);
	line-height: 0;
	touch-action: none;
	transform: translate3d(
		0,
		var(--news-gallery-drag-y, 0),
		0
	);
	transition:
		transform 180ms ease-out,
		opacity 180ms ease-out;
	user-select: none;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
}

.news-lightbox__frame--dragging {
	cursor: grabbing;
	transition: none;
	will-change: transform, opacity;
}

.news-lightbox__track {
	position: absolute;
	inset: 0;
	width: 300%;
	height: 100%;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	transform: translate3d(var(--news-gallery-track-x, -33.333333%), 0, 0);
	transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.news-lightbox__track--instant,
.news-lightbox__frame--dragging .news-lightbox__track {
	transition: none;
}

.news-lightbox__track--settling,
.news-lightbox__frame--dragging .news-lightbox__track {
	will-change: transform;
}

.news-lightbox__slide {
	min-width: 0;
	min-height: 0;
	display: grid;
	place-items: center;
}

.news-lightbox__image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	border-radius: var(--news-lightbox-radius);
	object-fit: contain;
	box-shadow: 0 22px 64px rgba(0, 0, 0, 0.42);
}

.news-lightbox__close,
.news-lightbox__nav {
	position: absolute;
	z-index: 3;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: rgba(2, 6, 23, 0.44);
	color: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	line-height: 1;
	touch-action: manipulation;
	transition: background-color 160ms ease;
}

.news-lightbox__close:focus-visible,
.news-lightbox__nav:focus-visible {
	background: rgba(2, 6, 23, 0.74);
	outline: 3px solid #ffffff;
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.news-lightbox__close:hover,
	.news-lightbox__nav:hover {
		background: rgba(2, 6, 23, 0.64);
	}
}

.news-lightbox__close {
	top: 12px;
	right: 12px;
	width: 46px;
	height: 46px;
	font-size: 28px;
}

.news-lightbox__nav {
	top: calc(50% - 18px);
	width: 48px;
	height: 48px;
	font-size: 32px;
	transform: translateY(-50%);
}

.news-lightbox__nav--previous {
	left: 12px;
}

.news-lightbox__nav--next {
	right: 12px;
}

.news-lightbox__caption,
.news-lightbox__counter {
	position: absolute;
	z-index: 2;
	margin: 0;
	color: #ffffff;
}

.news-lightbox__caption {
	right: 0;
	bottom: 0;
	left: 0;
	max-height: 38%;
	padding: 70px 16px 58px;
	overflow-y: auto;
	border-radius: 0 0 var(--news-lightbox-radius) var(--news-lightbox-radius);
	background: linear-gradient(
		to bottom,
		rgba(2, 6, 23, 0),
		rgba(2, 6, 23, 0.82)
	);
	font-size: 13px;
	line-height: 1.45;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
	touch-action: pan-y;
	user-select: text;
	-webkit-user-select: text;
}

.news-lightbox__caption[hidden] {
	display: none;
}

.news-lightbox__counter {
	bottom: 12px;
	left: 50%;
	z-index: 4;
	min-height: 32px;
	padding: 6px 11px;
	border: 0;
	border-radius: 999px;
	background: rgba(2, 6, 23, 0.44);
	font-size: 12px;
	font-weight: 800;
	line-height: 18px;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
	transform: translateX(-50%);
}

@media (max-width: 640px) {
	.news-gallery__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px), (max-height: 500px) {
	.news-lightbox {
		--news-lightbox-inset-top: max(6px, env(safe-area-inset-top, 0px));
		--news-lightbox-inset-right: max(6px, env(safe-area-inset-right, 0px));
		--news-lightbox-inset-bottom: max(6px, env(safe-area-inset-bottom, 0px));
		--news-lightbox-inset-left: max(6px, env(safe-area-inset-left, 0px));
		--news-lightbox-radius: 14px;
	}

	.news-lightbox__close {
		top: 8px;
		right: 8px;
		width: 44px;
		height: 44px;
		font-size: 27px;
	}

	.news-lightbox__nav {
		top: calc(50% - 14px);
		width: 44px;
		height: 44px;
		font-size: 30px;
	}

	.news-lightbox__nav--previous {
		left: 8px;
	}

	.news-lightbox__nav--next {
		right: 8px;
	}

	.news-lightbox__caption {
		padding: 62px 12px 54px;
		font-size: 12px;
	}

	.news-lightbox__counter {
		bottom: 8px;
		min-height: 30px;
		padding: 5px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.news-gallery__image,
	.news-lightbox__frame,
	.news-lightbox__track,
	.news-lightbox__close,
	.news-lightbox__nav {
		transition: none;
	}
}
