.ew-gallery-component {
	width: 100%;
}

.ew-gallery-grid {
	--ew-gallery-columns: 4;
	--ew-gallery-gap: 20px;
	width: 100%;
}

.ew-gallery--grid {
	display: grid;
	grid-template-columns: repeat(var(--ew-gallery-columns), minmax(0, 1fr));
	gap: var(--ew-gallery-gap);
	align-items: start;
}

.ew-gallery--masonry {
	column-count: var(--ew-gallery-columns);
	column-gap: var(--ew-gallery-gap);
}

.ew-gallery-item {
	position: relative;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ew-gallery--masonry .ew-gallery-item {
	display: inline-block;
	width: 100%;
	margin: 0 0 var(--ew-gallery-gap);
	break-inside: avoid;
	vertical-align: top;
}

.ew-gallery-carousel {
	position: relative;
	width: 100%;
}

.ew-gallery-carousel__viewport {
	position: relative;
	width: 100%;
}

.ew-gallery--carousel {
	display: flex;
	gap: var(--ew-gallery-gap);
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-behavior: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.ew-gallery--carousel::-webkit-scrollbar {
	display: none;
}

.ew-gallery--carousel .ew-gallery-item {
	flex: 0 0 calc((100% - (var(--ew-gallery-columns) - 1) * var(--ew-gallery-gap)) / var(--ew-gallery-columns));
	scroll-snap-align: start;
}

.ew-gallery--carousel.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
	user-select: none;
}

.ew-gallery--carousel.is-dragging a {
	pointer-events: none;
}

.ew-gallery-item[hidden] {
	display: none !important;
}

.ew-gallery-item.is-ew-revealing {
	animation: ew-gallery-reveal 0.4s ease both;
}

@keyframes ew-gallery-reveal {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ew-gallery-media {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	background: #f2f2f2;
	isolation: isolate;
}

a.ew-gallery-media {
	color: inherit;
	text-decoration: none;
}

.ew-gallery--uniform .ew-gallery-media {
	aspect-ratio: 4 / 3;
}

.ew-gallery-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border: 0;
	transition-property: transform;
	transition-duration: 0.4s;
	transition-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ew-gallery--uniform .ew-gallery-image {
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.ew-gallery-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	pointer-events: none;
	transition-property: opacity;
	transition-duration: 0.4s;
	transition-timing-function: ease;
}

.ew-gallery-item:hover .ew-gallery-overlay,
.ew-gallery-trigger:focus-visible .ew-gallery-overlay {
	opacity: 1;
}

.ew-gallery-trigger:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.ew-gallery-zoom-icon {
	width: 34px;
	height: 34px;
	color: #fff;
}

.ew-gallery-caption {
	z-index: 3;
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	color: #fff;
	background: rgba(0, 0, 0, 0.58);
	line-height: 1.45;
}

.ew-gallery-caption--overlay {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
}

.ew-gallery-caption--below {
	position: relative;
}

.ew-gallery-empty {
	padding: 28px;
	border: 1px dashed #b6b6b6;
	border-radius: 8px;
	color: #666;
	background: #fafafa;
	text-align: center;
}

.ew-gallery-carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, 0.62);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ew-gallery-carousel__arrow:hover,
.ew-gallery-carousel__arrow:focus-visible {
	color: #fff;
	background: #111;
	transform: translateY(-50%) scale(1.05);
}

.ew-gallery-carousel__arrow:focus-visible,
.ew-gallery-carousel__dot:focus-visible,
.ew-gallery-load-more:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.ew-gallery-carousel__arrow[disabled] {
	opacity: 0.32;
	cursor: default;
	pointer-events: none;
}

.ew-gallery-carousel__arrow[hidden] {
	display: none;
}

.ew-gallery-carousel__arrow svg {
	width: 22px;
	height: 22px;
}

.ew-gallery-carousel__arrow--previous {
	left: 14px;
}

.ew-gallery-carousel__arrow--next {
	right: 14px;
}

.ew-gallery-carousel__dots {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.ew-gallery-carousel__dot {
	display: block;
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c7c7c7;
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.ew-gallery-carousel__dot:hover,
.ew-gallery-carousel__dot.is-active {
	background: #111;
	transform: scale(1.22);
}

.ew-gallery-load-more-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-top: 28px;
}

.ew-gallery-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 13px 24px;
	border: 0;
	border-radius: 6px;
	color: #fff;
	background: #111;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ew-gallery-load-more:hover,
.ew-gallery-load-more:focus-visible {
	color: #fff;
	background: #333;
	transform: translateY(-1px);
}

.ew-gallery-load-more-wrap[hidden],
.ew-gallery-load-more[hidden] {
	display: none !important;
}

.ew-gallery-load-more__count {
	opacity: 0.75;
}

.ew-gallery-component .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

body.ew-gallery-lightbox-open {
	overflow: hidden;
}

.ew-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 72px;
	background: rgba(8, 8, 10, 0.94);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ew-gallery-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.ew-gallery-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: min(100%, 1600px);
	height: min(100%, 1100px);
	margin: 0;
}

.ew-gallery-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
	transition: opacity 0.15s ease;
}

.ew-gallery-lightbox.is-loading .ew-gallery-lightbox__image {
	opacity: 0.35;
}

.ew-gallery-lightbox__caption {
	max-width: 900px;
	margin-top: 14px;
	color: #fff;
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.ew-gallery-lightbox__counter {
	position: absolute;
	top: 22px;
	left: 24px;
	color: rgba(255, 255, 255, 0.86);
	font: 500 14px/1.2 Arial, sans-serif;
}

.ew-gallery-lightbox__button {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.ew-gallery-lightbox__button:hover,
.ew-gallery-lightbox__button:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.18);
	transform: scale(1.05);
}

.ew-gallery-lightbox__button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.ew-gallery-lightbox__button svg {
	width: 24px;
	height: 24px;
}

.ew-gallery-lightbox__close {
	top: 18px;
	right: 20px;
}

.ew-gallery-lightbox__previous,
.ew-gallery-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.ew-gallery-lightbox__previous:hover,
.ew-gallery-lightbox__previous:focus-visible,
.ew-gallery-lightbox__next:hover,
.ew-gallery-lightbox__next:focus-visible {
	transform: translateY(-50%) scale(1.05);
}

.ew-gallery-lightbox__previous {
	left: 16px;
}

.ew-gallery-lightbox__next {
	right: 16px;
}

@media (max-width: 767px) {
	.ew-gallery-carousel__arrow {
		width: 40px;
		height: 40px;
	}

	.ew-gallery-carousel__arrow--previous {
		left: 8px;
	}

	.ew-gallery-carousel__arrow--next {
		right: 8px;
	}

	.ew-gallery-lightbox {
		padding: 64px 14px 44px;
	}

	.ew-gallery-lightbox__image {
		max-height: calc(100vh - 160px);
	}

	.ew-gallery-lightbox__button {
		width: 42px;
		height: 42px;
	}

	.ew-gallery-lightbox__previous,
	.ew-gallery-lightbox__next {
		top: auto;
		bottom: 10px;
		transform: none;
	}

	.ew-gallery-lightbox__previous:hover,
	.ew-gallery-lightbox__previous:focus-visible,
	.ew-gallery-lightbox__next:hover,
	.ew-gallery-lightbox__next:focus-visible {
		transform: scale(1.05);
	}

	.ew-gallery-lightbox__previous {
		left: calc(50% - 52px);
	}

	.ew-gallery-lightbox__next {
		right: calc(50% - 52px);
	}

	.ew-gallery-lightbox__counter {
		top: 28px;
		left: 16px;
	}

	.ew-gallery-lightbox__close {
		top: 14px;
		right: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ew-gallery-image,
	.ew-gallery-overlay,
	.ew-gallery-lightbox,
	.ew-gallery-lightbox__button,
	.ew-gallery-lightbox__image {
		transition-duration: 0.01ms !important;
	}

	.ew-gallery-item.is-ew-revealing {
		animation: none !important;
	}
}
