.sge-gallery-grid {
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sge-gallery-grid.sge-cols-1 { grid-template-columns: 1fr; }
.sge-gallery-grid.sge-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sge-gallery-grid.sge-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sge-gallery-grid.sge-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sge-gallery-grid.sge-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sge-gallery-grid.sge-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 782px) {
	.sge-gallery-grid.sge-cols-3,
	.sge-gallery-grid.sge-cols-4,
	.sge-gallery-grid.sge-cols-5,
	.sge-gallery-grid.sge-cols-6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.sge-gallery-grid.sge-gallery-grid--archive {
		grid-template-columns: 1fr;
	}
}

.sge-gallery-card {
	margin: 0;
	overflow: visible;
	background: transparent !important;
	border: 0;
	box-shadow: none;
}

/* Kill theme/Elementor button pink/hover backgrounds on album cards */
.sge-gallery-card__link,
.sge-gallery-card__link:hover,
.sge-gallery-card__link:focus,
.sge-gallery-card__link:active,
.sge-gallery-card__link:focus-visible,
button.sge-gallery-card__link,
button.sge-gallery-card__link:hover,
button.sge-gallery-card__link:focus,
button.sge-gallery-card__link:active {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	outline: none !important;
	color: inherit !important;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	font: inherit;
	line-height: inherit;
	transition: none;
}

.sge-gallery-card__link:disabled {
	cursor: default;
	opacity: 0.7;
}

.sge-gallery-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #dcdcde;
	border-radius: 14px;
}

/* YouTube / video albums use YouTube 16:9 frame */
.sge-gallery-card--video .sge-gallery-card__media,
.sge-carousel[data-sge-type="youtube"] .sge-gallery-card__media,
.sge-gallery-grid[data-sge-type="youtube"] .sge-gallery-card__media {
	aspect-ratio: 16 / 9;
}

.sge-gallery-card--carousel .sge-gallery-card__media {
	border-radius: 16px;
}

.sge-gallery-card__media img,
.sge-gallery-image img {
	width: 100%;
	height: 100%;
	object-fit: cover !important;
	object-position: center center;
	display: block;
	transition: transform 0.35s ease;
}

.sge-gallery-card__link:hover .sge-gallery-card__media img,
.sge-gallery-card__link:focus .sge-gallery-card__media img {
	transform: scale(1.03);
}

.sge-gallery-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8e8e8, #cfcfcf);
}

.sge-gallery-card__body {
	padding: 0.75rem 0.35rem 0.15rem;
	background: transparent !important;
}

.sge-gallery-card__title {
	margin: 0;
	font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	color: #222;
	background: transparent !important;
}

.sge-gallery-card__excerpt {
	margin: 0.35rem 0 0;
	font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	opacity: 0.85;
	text-align: center;
}

.sge-gallery-image {
	margin: 0;
	overflow: hidden;
	background: #f0f0f1;
	border-radius: 10px;
}

.sge-gallery-image a {
	display: block;
	aspect-ratio: 1 / 1;
}

.sge-gallery-image--video a,
.sge-gallery-grid[data-sge-type="youtube"] .sge-gallery-image a {
	aspect-ratio: 16 / 9;
}

.sge-gallery-image a:hover img,
.sge-gallery-image a:focus img {
	transform: scale(1.03);
	opacity: 0.95;
}

.sge-gallery-image,
.sge-gallery-card__media,
.sge-image-slider__figure {
	position: relative;
}

.sge-gallery-image--video a::after,
.sge-gallery-card--video .sge-gallery-card__media::after,
.sge-image-slider__figure--video .sge-image-slider__link::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.22);
	pointer-events: none;
	border-radius: inherit;
}

.sge-media-play {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 2;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	pointer-events: none;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.sge-media-play::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -8px 0 0 -5px;
	border-style: solid;
	border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
}

.sge-gallery-empty {
	margin: 0;
	padding: 1rem 0;
}

/* Homepage carousel — Elementor Image Carousel-like nav (white chevrons on media) */
.sge-carousel {
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: visible;
	padding-inline: calc(var(--sge-nav-icon) / 2);
	box-sizing: border-box;
	--sge-nav-color: #0c0d0e;
	--sge-nav-size: 40px;
	--sge-nav-icon: 36px;
}

.sge-carousel__viewport {
	position: relative;
	display: block;
	padding: 0;
	overflow: visible;
}

.sge-carousel__track-wrap {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.sge-carousel__track {
	display: flex;
	transition: transform 0.4s ease;
	will-change: transform;
}

.sge-carousel__slide {
	flex: 0 0 33.333%;
	max-width: 33.333%;
	padding: 0 0.65rem;
	box-sizing: border-box;
}

/* Transparent white chevrons overlaid on the gallery media (desktop + mobile) */
.sge-carousel__arrow {
	position: absolute;
	top: 0;
	z-index: 4;
	height: 100%;
	width: var(--sge-nav-size);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-image: none !important;
	background-color: transparent !important;
	color: var(--sge-nav-color) !important;
	box-shadow: none !important;
	cursor: pointer;
	line-height: 1;
	opacity: 0.95;
	transition: opacity 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

/* Keep arrows centered on the media band when titles sit under cards */
.sge-carousel[data-sge-titles="1"] .sge-carousel__arrow {
	height: calc(100% - 3.35rem);
}

.sge-carousel[data-sge-type="youtube"][data-sge-titles="1"] .sge-carousel__arrow {
	height: calc(100% - 3.35rem);
}

.sge-carousel__arrow:hover,
.sge-carousel__arrow:focus {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--sge-nav-color) !important;
	opacity: 1;
	outline: none;
	box-shadow: none !important;
}

.sge-carousel__arrow:disabled {
	opacity: 0.25;
	cursor: default;
	pointer-events: none;
}

.sge-carousel__arrow-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--sge-nav-icon);
	height: var(--sge-nav-icon);
	padding: 5px;
	border-radius: 100px;
	background-color: #F0F0F0;
}

.sge-carousel__arrow-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.sge-carousel__arrow--prev {
	left: 10px;
	transform: translateX(-50%);
}

.sge-carousel__arrow--next {
	right: 10px;
	transform: translateX(50%);
}

.sge-carousel:not(.sge-carousel--nav) .sge-carousel__arrow {
	display: none;
}

/* Elementor-like swiper bullets */
.sge-carousel__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 1.15rem;
	min-height: 12px;
}

.sge-carousel__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c4c4c4;
	opacity: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sge-carousel__dot:hover {
	background: #9a9a9a;
}

.sge-carousel__dot.is-active {
	width: 8px;
	background: #54595F;
	transform: scale(1.05);
}

@media (max-width: 767px) {
	.sge-carousel {
		--sge-nav-size: 40px;
		--sge-nav-icon: 36px;
		padding-inline: 0;
	}

	.sge-carousel__viewport {
		padding: 0;
	}

	.sge-carousel__slide {
		flex-basis: 100%;
		max-width: 100%;
		padding: 0;
	}

	.sge-carousel__arrow {
		height: 100%;
	}

	.sge-carousel[data-sge-titles="1"] .sge-carousel__arrow {
		height: calc(100% - 3.1rem);
	}

	.sge-carousel__arrow--prev {
		left: 10px;
		transform: none;
	}

	.sge-carousel__arrow--next {
		right: 10px;
		transform: none;
	}

	.sge-image-slider .sge-carousel__viewport,
	.sge-image-slider__viewport {
		padding: 0;
	}
}

/* Single-gallery image slider (id= / slug=): 1 image, dots only, full banner view */
.sge-image-slider {
	width: 100%;
}

.sge-image-slider .sge-carousel__viewport,
.sge-image-slider__viewport {
	padding: 0;
}

.sge-image-slider .sge-carousel__arrow {
	display: none !important;
}

.sge-image-slider__slide {
	flex: 0 0 100%;
	max-width: 100%;
	padding: 10px;
	box-sizing: border-box;
	border-radius: 10px;
}

.sge-image-slider__figure {
	position: relative;
	margin: 0;
	width: 100%;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow:
		0 2px 6px rgba(15, 23, 42, 0.06),
		0 10px 24px rgba(15, 23, 42, 0.10);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.sge-image-slider__link {
	position: relative;
	display: block;
	width: 100%;
	line-height: 0;
	text-decoration: none;
	border: 0;
	background: transparent !important;
	cursor: zoom-in;
}

/* Single-gallery video slider: lock to YouTube 16:9 */
.sge-image-slider[data-sge-type="youtube"] .sge-image-slider__link,
.sge-image-slider__figure--video .sge-image-slider__link {
	aspect-ratio: 16 / 9;
}

.sge-image-slider[data-sge-type="youtube"] .sge-image-slider__img,
.sge-image-slider__figure--video .sge-image-slider__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sge-image-slider__link:hover .sge-image-slider__figure,
.sge-image-slider__link:focus .sge-image-slider__figure {
	box-shadow:
		0 4px 10px rgba(15, 23, 42, 0.08),
		0 16px 32px rgba(15, 23, 42, 0.14);
}

.sge-image-slider__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
	object-position: center center;
}

.sge-image-slider__dots {
	margin-top: 0.75rem;
}

@media (max-width: 767px) {
	.sge-image-slider__slide {
		padding: 5px;
	}

	.sge-image-slider__figure {
		box-shadow:
			0 1px 4px rgba(15, 23, 42, 0.06),
			0 8px 18px rgba(15, 23, 42, 0.10);
	}
}

/* Fallback lightbox */
html.sge-lightbox-open,
html.sge-lightbox-open body {
	overflow: hidden;
}

.sge-lightbox[hidden] {
	display: none !important;
}

.sge-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.9);
}

.sge-lightbox__backdrop {
	position: absolute;
	inset: 0;
}

.sge-lightbox__stage {
	position: relative;
	z-index: 1;
	max-width: min(92vw, 1200px);
	max-height: 82vh;
}

.sge-lightbox__img {
	display: block;
	max-width: 92vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.sge-lightbox__img[hidden],
.sge-lightbox__video-wrap[hidden] {
	display: none !important;
}

.sge-lightbox__video-wrap {
	width: min(92vw, 1100px);
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.sge-lightbox__iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 767px) {
	.sge-lightbox__stage {
		max-width: 96vw;
		max-height: 78vh;
		width: 96vw;
	}

	.sge-lightbox__video-wrap {
		width: 100%;
		max-width: 96vw;
	}

	.sge-lightbox__img {
		max-width: 96vw;
		max-height: 70vh;
	}

	.sge-lightbox__prev,
	.sge-lightbox__next {
		font-size: 1.8rem;
	}

	.sge-lightbox__close {
		top: 0.6rem;
		right: 0.6rem;
		font-size: 2rem;
	}
}

.sge-lightbox__close,
.sge-lightbox__prev,
.sge-lightbox__next {
	position: absolute;
	z-index: 2;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	padding: 0.35rem 0.55rem;
	opacity: 0.9;
}

.sge-lightbox__close:hover,
.sge-lightbox__prev:hover,
.sge-lightbox__next:hover {
	opacity: 1;
}

.sge-lightbox__close {
	top: 1rem;
	right: 1rem;
	font-size: 2.4rem;
}

.sge-lightbox__prev,
.sge-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 2.2rem;
}

.sge-lightbox__prev { left: 0.75rem; }
.sge-lightbox__next { right: 0.75rem; }

.sge-lightbox__meta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1.1rem;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	color: #fff;
	font-size: 0.95rem;
	opacity: 0.9;
	pointer-events: none;
}

.sge-lightbox__title:empty,
.sge-lightbox__counter:empty {
	display: none;
}
