.jsg-gallery {
	--jsg-card-bg: #f1f5f9;
	--jsg-overlay-color: rgba(15, 23, 42, 0.72);
	--jsg-text-color: #ffffff;
	--jsg-title-color: #ffffff;
	--jsg-description-color: #f8fafc;
	--jsg-button-color: #ffffff;
	--jsg-badge-color: #ffffff;
	--jsg-badge-bg-color: rgba(255, 255, 255, 0.18);
	--jsg-gradient-start: #c026d3;
	--jsg-gradient-mid: #3b82f6;
	--jsg-gradient-end: #06b6d4;
	--jsg-frame-size: 4px;
	--jsg-radius: 1.25rem;
	--jsg-gradient-duration: 6s;
	--jsg-hover-scale: 1.08;
	--jsg-hover-lift: 5px;
	--jsg-tablet-columns: 2;
	--jsg-desktop-columns: 24;
	--jsg-desktop-row-size: 3vw;
	--jsg-tablet-aspect-ratio: 4 / 3;
	--jsg-mobile-aspect-ratio: 4 / 3;
	--jsg-mobile-carousel-peek: 0px;
	--jsg-image-fit: cover;
	--jsg-image-position: center center;
	display: block;
	overflow-x: clip;
}

.jsg-gallery__viewport {
	display: block;
}

.jsg-gallery__track {
	display: block;
}

.jsg-gallery__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1.5rem;
	position: relative;
}

.jsg-gallery__item {
	position: relative;
	display: block;
	box-sizing: border-box;
	padding: var(--jsg-frame-size);
	border-radius: var(--jsg-radius);
	background: linear-gradient(
		135deg,
		var(--jsg-item-gradient-start, var(--jsg-gradient-start)),
		var(--jsg-item-gradient-mid, var(--jsg-gradient-mid)),
		var(--jsg-item-gradient-end, var(--jsg-gradient-end))
	);
	background-size: 200% 200%;
	animation: jsg-gradient-move var(--jsg-gradient-duration) ease infinite;
	box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
	text-decoration: none;
	color: var(--jsg-item-text-color, var(--jsg-text-color));
	transition:
		transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
		box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
	cursor: pointer;
}

.jsg-gallery__item:hover,
.jsg-gallery__item:focus-visible {
	transform: translateY(calc(var(--jsg-hover-lift) * -1)) scale(var(--jsg-hover-scale));
	z-index: 100 !important;
}

.jsg-gallery__item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.jsg-gallery__frame {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 100%;
	overflow: hidden;
	border-radius: max(calc(var(--jsg-radius) - var(--jsg-frame-size)), 0px);
	background-color: var(--jsg-item-bg, var(--jsg-card-bg));
}

.jsg-gallery__frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(15, 23, 42, 0.08) 12%,
		var(--jsg-item-overlay-color, var(--jsg-overlay-color)) 100%
	);
	opacity: 0;
	transition: opacity 0.35s ease;
	z-index: 1;
}

.jsg-gallery__media {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	z-index: 0;
}

.elementor .jsg-gallery .jsg-gallery__media .jsg-gallery__image,
.jsg-gallery .jsg-gallery__media .jsg-gallery__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: var(--jsg-item-image-fit, var(--jsg-image-fit)) !important;
	object-position: var(--jsg-item-image-position, var(--jsg-image-position)) !important;
	transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.jsg-gallery__item:hover .jsg-gallery__image,
.jsg-gallery__item:focus-visible .jsg-gallery__image {
	transform: scale(1.08);
}

.jsg-gallery__caption {
	position: absolute;
	inset: auto 0 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1.5rem;
	color: var(--jsg-item-text-color, var(--jsg-text-color));
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity 0.35s ease,
		transform 0.35s ease;
	pointer-events: none;
}

.jsg-gallery__item--has-caption:hover .jsg-gallery__frame::after,
.jsg-gallery__item--has-caption:focus-visible .jsg-gallery__frame::after,
.jsg-gallery__item--static-caption .jsg-gallery__frame::after {
	opacity: 1;
}

.jsg-gallery__item--has-caption:hover .jsg-gallery__caption,
.jsg-gallery__item--has-caption:focus-visible .jsg-gallery__caption,
.jsg-gallery__item--static-caption .jsg-gallery__caption {
	opacity: 1;
	transform: translateY(0);
}

.jsg-gallery__badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	backdrop-filter: blur(8px);
	background-color: var(--jsg-badge-bg-color);
	color: var(--jsg-badge-color);
}

.jsg-gallery__title {
	margin: 0;
	color: var(--jsg-title-color);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.05;
}

.jsg-gallery__description {
	max-width: 26rem;
	color: var(--jsg-description-color);
	line-height: 1.6;
}

.jsg-gallery__button {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: var(--jsg-button-color);
	font-weight: 700;
}

.jsg-gallery__button::after {
	content: "\2192";
	line-height: 1;
}

.jsg-gallery__mobile-controls {
	display: none;
}

.jsg-gallery__mobile-pagination {
	display: flex;
	align-items: center;
}

.jsg-gallery__mobile-controls {
	gap: 0.875rem;
	justify-content: center;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0.85rem 1.5rem 0;
}

.jsg-gallery__mobile-buttons {
	display: none;
	position: absolute;
	inset: 50% 0 auto;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
	padding: 0 0.35rem;
	transform: translateY(-50%);
	z-index: 4;
}

.jsg-gallery__mobile-button,
.jsg-gallery__mobile-dot {
	border: 0;
	background: transparent;
	color: var(--jsg-gradient-start);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.jsg-gallery__mobile-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	font-size: 2.9rem;
	line-height: 1;
	pointer-events: auto;
}

.jsg-gallery__mobile-button:hover,
.jsg-gallery__mobile-button:focus-visible,
.jsg-gallery__mobile-dot:hover,
.jsg-gallery__mobile-dot:focus-visible {
	opacity: 0.78;
}

.jsg-gallery__mobile-button:focus-visible,
.jsg-gallery__mobile-dot:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.jsg-gallery__mobile-button[disabled] {
	opacity: 0.45;
	cursor: default;
	transform: none;
}

.jsg-gallery__mobile-pagination {
	gap: 0.45rem;
	flex-wrap: wrap;
	justify-content: center;
}

.jsg-gallery__mobile-dot {
	width: 0.45rem;
	height: 0.45rem;
	padding: 0;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.55);
}

.jsg-gallery__mobile-dot[aria-current="true"] {
	background: var(--jsg-gradient-start);
}

.jsg-caption-align-left .jsg-gallery__caption {
	align-items: flex-start;
	text-align: left;
}

.jsg-caption-align-center .jsg-gallery__caption {
	align-items: center;
	text-align: center;
}

.jsg-caption-align-right .jsg-gallery__caption {
	align-items: flex-end;
	text-align: right;
}

@keyframes jsg-gradient-move {
	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.jsg-gallery__grid {
		grid-template-columns: repeat(var(--jsg-tablet-columns), minmax(0, 1fr));
	}

	.jsg-gallery__frame {
		aspect-ratio: var(--jsg-tablet-aspect-ratio);
	}
}

@media (min-width: 1024px) {
	.jsg-gallery__grid {
		grid-template-columns: repeat(var(--jsg-desktop-columns), minmax(0, 1fr));
		grid-auto-rows: var(--jsg-desktop-row-size);
		gap: 0;
		padding: 4rem 2rem;
	}

	.jsg-gallery__item {
		grid-column: var(--jsg-col-start, auto) / var(--jsg-col-end, auto);
		grid-row: var(--jsg-row-start, auto) / var(--jsg-row-end, auto);
		z-index: var(--jsg-z-index, 1);
	}

	.jsg-gallery__frame {
		aspect-ratio: auto;
	}
}

@media (max-width: 767px) {
	.jsg-gallery__frame {
		aspect-ratio: var(--jsg-mobile-aspect-ratio);
	}
}

body.elementor-device-mobile .jsg-gallery__frame,
body.elementor-device-mobile_extra .jsg-gallery__frame,
body[data-elementor-device-mode="mobile"] .jsg-gallery__frame,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery__frame {
	aspect-ratio: var(--jsg-mobile-aspect-ratio);
}

@media (max-width: 767px) {
	.jsg-gallery--is-mobile-carousel .jsg-gallery__viewport {
		position: relative;
		padding: 0;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__track {
		overflow: hidden;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__grid {
		display: flex;
		flex-wrap: nowrap;
		width: 100%;
		max-width: none;
		margin: 0;
		gap: 0;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 0;
		scroll-behavior: smooth;
		scroll-padding-inline: 0;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__grid::-webkit-scrollbar {
		display: none;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__item {
		flex: 0 0 100%;
		width: 100%;
		min-width: 100%;
		max-width: 100%;
		grid-column: auto !important;
		grid-row: auto !important;
		z-index: auto !important;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__frame {
		aspect-ratio: 1 / 1;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-controls {
		display: flex;
	}

	.jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-buttons {
		display: flex;
	}
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__viewport,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__viewport,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__viewport,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__viewport {
	position: relative;
	padding: 0;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__track,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__track,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__track,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__track {
	overflow: hidden;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__grid,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__grid,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__grid,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__grid {
	display: flex;
	flex-wrap: nowrap;
	width: 100%;
	max-width: none;
	margin: 0;
	gap: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0;
	scroll-behavior: smooth;
	scroll-padding-inline: 0;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__grid::-webkit-scrollbar,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__grid::-webkit-scrollbar,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__grid::-webkit-scrollbar,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__grid::-webkit-scrollbar {
	display: none;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__item,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__item,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__item,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__item {
	flex: 0 0 100%;
	width: 100%;
	min-width: 100%;
	max-width: 100%;
	grid-column: auto !important;
	grid-row: auto !important;
	z-index: auto !important;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__frame,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__frame,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__frame,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__frame {
	aspect-ratio: 1 / 1;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-controls,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-controls,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-controls,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-controls {
	display: flex;
}

body.elementor-device-mobile .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-buttons,
body.elementor-device-mobile_extra .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-buttons,
body[data-elementor-device-mode="mobile"] .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-buttons,
body[data-elementor-device-mode="mobile_extra"] .jsg-gallery--is-mobile-carousel .jsg-gallery__mobile-buttons {
	display: flex;
}

@media (hover: none) {
	.jsg-gallery__item--has-caption .jsg-gallery__frame::after {
		opacity: 1;
	}

	.jsg-gallery__item--has-caption .jsg-gallery__caption {
		opacity: 1;
		transform: translateY(0);
	}
}
