.a-flash-post-gallery {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--a-flash-post-gallery-columns, 4), minmax(0, 1fr));
	gap: 8px;
}

.a-flash-post-gallery__item {
	position: relative;
	min-width: 0;
	margin: 0;
}

.a-flash-post-gallery__toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.a-flash-post-gallery__download-all {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 16px;
	border-radius: 6px;
	background: #111;
	color: #fff;
	text-decoration: none;
}

.a-flash-post-gallery__download-all:hover,
.a-flash-post-gallery__download-all:focus-visible {
	background: #333;
	color: #fff;
}

.a-flash-post-gallery-shell .a-flash-post-gallery__link,
.a-flash-post-gallery-shell .a-flash-post-gallery__link:hover,
.a-flash-post-gallery-shell .a-flash-post-gallery__link:focus,
.a-flash-post-gallery-shell .a-flash-post-gallery__link:focus-visible,
.a-flash-post-gallery-shell .a-flash-post-gallery__link:active {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

.a-flash-post-gallery__image {
	position: relative;
	display: block;
	overflow: hidden;
	background: #202020;
}

.a-flash-post-gallery__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	clip-path: inset(50% 50% 50% 50%);
	transition: transform 0.25s ease;
}

.a-flash-post-gallery__image.is-loaded img {
	opacity: 1;
	animation: a-flash-post-gallery-reveal var(--a-flash-post-gallery-transition-ms, 220ms) ease-out both;
}
.a-flash-post-gallery__image.is-error { background: #ececec; }

.a-flash-post-gallery__link:hover img {
	transform: scale(1.02);
}

.a-flash-post-gallery__link:focus-visible,
.a-flash-post-gallery-viewer__nav:focus-visible,
.a-flash-post-gallery-lightbox__nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Decorative, non-interactive Hero slideshow. Its Elementor container owns height. */
.elementor-widget-a_flash_post_gallery:has(> .elementor-widget-container > .a-flash-post-gallery-shell--slideshow) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.elementor-widget-a_flash_post_gallery:has(> .elementor-widget-container > .a-flash-post-gallery-shell--slideshow) > .elementor-widget-container {
	height: 100%;
}

.a-flash-post-gallery-shell--slideshow,
.a-flash-post-gallery--slideshow {
	width: 100%;
	height: 100%;
	min-height: inherit;
	overflow: hidden;
	pointer-events: none;
}

.a-flash-post-gallery--slideshow {
	position: relative;
	display: block;
	gap: 0;
	isolation: isolate;
}

.a-flash-post-gallery--slideshow .a-flash-post-gallery__item {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
}

.a-flash-post-gallery--slideshow .a-flash-post-gallery__item.is-active {
	opacity: 1;
	visibility: visible;
}

.a-flash-post-gallery-shell .a-flash-post-gallery--slideshow .a-flash-post-gallery__link,
.a-flash-post-gallery--slideshow .a-flash-post-gallery__image,
.a-flash-post-gallery--slideshow .a-flash-post-gallery__image img {
	display: block;
	width: 100%;
	height: 100%;
}

.a-flash-post-gallery-shell .a-flash-post-gallery--slideshow .a-flash-post-gallery__link {
	cursor: default;
	pointer-events: none;
}

.a-flash-post-gallery--slideshow .a-flash-post-gallery__image img,
.a-flash-post-gallery--slideshow .a-flash-post-gallery__image.is-loaded img {
	object-fit: cover;
	object-position: center center;
	opacity: 1;
	clip-path: none;
	transform: none;
	transition: none;
	animation: none;
	user-select: none;
	-webkit-user-drag: none;
}

.a-flash-post-gallery--ratio-1-1 .a-flash-post-gallery__image {
	aspect-ratio: 1 / 1;
}

.a-flash-post-gallery--ratio-4-3 .a-flash-post-gallery__image {
	aspect-ratio: 4 / 3;
}

.a-flash-post-gallery--ratio-3-2 .a-flash-post-gallery__image {
	aspect-ratio: 3 / 2;
}

.a-flash-post-gallery--ratio-16-9 .a-flash-post-gallery__image {
	aspect-ratio: 16 / 9;
}

.a-flash-post-gallery--ratio-original .a-flash-post-gallery__image img {
	height: auto;
	object-fit: contain;
}

.a-flash-post-gallery__empty {
	padding: 1rem;
	border: 1px solid #ddd;
	background: #fff;
	white-space: normal;
}

.a-flash-post-gallery-lightbox-open {
	overflow: hidden;
	overscroll-behavior: none;
}

.a-flash-post-gallery-lightbox {
	position: fixed;
	z-index: 2147483000;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.88);
	opacity: 0;
	transition: opacity var(--a-flash-post-gallery-transition-ms, 220ms) ease;
	touch-action: none;
}

.a-flash-post-gallery-lightbox.is-open {
	display: flex;
	opacity: 1;
}

.a-flash-post-gallery-lightbox__stage {
	position: absolute;
	inset: 0;
	overflow: hidden;
	touch-action: none;
}

.a-flash-post-gallery-lightbox__image {
	position: absolute;
	inset: 0;
	display: block;
	width: auto;
	height: auto;
	max-width: 100vw;
	max-height: 100dvh;
	margin: auto;
	object-fit: contain;
	opacity: 0;
	visibility: hidden;
	transform-origin: center center;
	user-select: none;
	-webkit-user-drag: none;
	touch-action: none;
	border-radius: var(--a-flash-post-gallery-lightbox-radius, 8px);
}

.a-flash-post-gallery-lightbox__loader,
.a-flash-post-gallery-lightbox__unavailable {
	position: absolute;
	z-index: 2;
	left: 50%;
	top: 50%;
	margin: 0;
	transform: translate(-50%, -50%);
	color: #fff;
}

.a-flash-post-gallery-lightbox__loader[hidden],
.a-flash-post-gallery-lightbox__unavailable[hidden] {
	display: none;
}

.a-flash-post-gallery-lightbox.is-error .a-flash-post-gallery-lightbox__image {
	opacity: 0 !important;
	visibility: hidden !important;
}

.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__close,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__nav {
	position: fixed;
	z-index: 3;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	font-family: Arial, sans-serif;
	line-height: 1;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.a-flash-post-gallery-lightbox__image.is-revealing {
	animation: a-flash-post-gallery-reveal var(--a-flash-post-gallery-transition-ms, 220ms) ease-out both;
}

.a-flash-post-gallery-lightbox__close {
	top: max(12px, env(safe-area-inset-top));
	right: max(14px, env(safe-area-inset-right));
	width: 56px;
	height: 56px;
	font-size: 40px;
	font-weight: 200;
}

.a-flash-post-gallery-lightbox__nav {
	top: 50%;
	width: 58px;
	height: 88px;
	margin-top: -44px;
	font-size: 64px;
	font-weight: 200;
}

.a-flash-post-gallery-lightbox__nav[hidden] {
	display: none;
}

.a-flash-post-gallery-lightbox__nav--prev {
	left: max(4px, env(safe-area-inset-left));
}

.a-flash-post-gallery-lightbox__nav--next {
	right: max(4px, env(safe-area-inset-right));
}

.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__close:hover,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__close:focus,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__close:focus-visible,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__close:active,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__nav:hover,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__nav:focus,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__nav:focus-visible,
.a-flash-post-gallery-lightbox .a-flash-post-gallery-lightbox__nav:active {
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
	outline: 0;
	box-shadow: none;
}

@keyframes a-flash-post-gallery-reveal {
	0% { opacity: 0; clip-path: inset(50% 50% 50% 50%); }
	100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Any responsive one-column Gallery becomes a Final-image viewer. */
.a-flash-post-gallery-viewer__nav {
	display: none;
}

.a-flash-post-gallery-viewer__nav[hidden] {
	display: none !important;
}

.a-flash-post-gallery.is-single-viewer {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	line-height: 0;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__item {
	display: none;
	width: 100%;
	margin: 0;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__item.is-active {
	display: block;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__link,
.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__image {
	display: block;
	width: 100%;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__image {
	height: auto;
	overflow: hidden;
	background: transparent;
	aspect-ratio: auto;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	object-fit: contain;
	transform: none;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery__link:hover img {
	transform: none;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery-viewer__nav {
	position: absolute;
	z-index: 3;
	top: 50%;
	display: block;
	width: 54px;
	height: 86px;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 0;
	background: rgba(0, 0, 0, 0.18);
	color: #fff;
	font: 200 60px/1 Arial, sans-serif;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.a-flash-post-gallery-viewer__nav--prev {
	left: 0;
}

.a-flash-post-gallery-viewer__nav--next {
	right: 0;
}

.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery-viewer__nav:hover,
.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery-viewer__nav:focus,
.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery-viewer__nav:focus-visible,
.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery-viewer__nav:active {
	border: 0;
	background: rgba(0, 0, 0, 0.32);
	color: #fff;
	box-shadow: none;
}

@media (min-width: 1025px) {
	.a-flash-post-gallery .a-flash-post-gallery__item.is-hidden-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.a-flash-post-gallery .a-flash-post-gallery__item.is-hidden-tablet {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.a-flash-post-gallery .a-flash-post-gallery__item.is-hidden-mobile {
		display: none !important;
	}

	.a-flash-post-gallery-lightbox__nav {
		width: 44px;
		height: 72px;
		margin-top: -36px;
		background: transparent;
		font-size: 52px;
	}

	.a-flash-post-gallery-lightbox__close {
		width: 52px;
		height: 52px;
		background: transparent;
		font-size: 36px;
	}

	.a-flash-post-gallery.is-single-viewer .a-flash-post-gallery-viewer__nav {
		width: 42px;
		height: 68px;
		background: rgba(0, 0, 0, 0.12);
		font-size: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.a-flash-post-gallery__image img,
	.a-flash-post-gallery-lightbox,
	.a-flash-post-gallery--slideshow .a-flash-post-gallery__item {
		transition-duration: 0.01ms;
	}

	.a-flash-post-gallery__link:hover img {
		transform: none;
	}

	.a-flash-post-gallery-lightbox__spinner {
		animation: none;
	}
}
