/* NW Gallery Carousel — the navigation bar is part of the layout flow (CSS grid), never positioned with pixel offsets. */
.nwgc-carousel {
	--nwgc-spv: 3;
	--nwgc-gap: 15px;
	--nwgc-fit: cover;
	--nwgc-pos: center center;
	--nwgc-zoom: 1;
	--nwgc-areas: 'track' 'nav';
	--nwgc-nav-display: flex;
	--nwgc-group-display: flex;
	--nwgc-arrow-area: auto;
	--nwgc-side-on: 0;
	--nwgc-gap-on: 1;
	--nwgc-nav-spacing: 24px;
	--nwgc-nav-gap: 20px;
	--nwgc-nav-justify: flex-end;
	--nwgc-arrows-gap: 12px;
	--nwgc-side-offset: 16px;
	--nwgc-arrow-size: 40px;
	--nwgc-arrow-icon: 16px;
	--nwgc-progress-h: 2px;
	--nwgc-progress-track: rgba(0, 0, 0, .12);
	--nwgc-progress-fill: currentColor;
	--nwgc-bullet-size: 8px;
	--nwgc-bullet-gap: 8px;
	--nwgc-bullet: rgba(0, 0, 0, .2);
	--nwgc-bullet-active: currentColor;
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: var(--nwgc-areas);
	row-gap: calc(var(--nwgc-nav-spacing) * var(--nwgc-gap-on));
	width: 100%;
	min-width: 0;
}
.nwgc-carousel.nwgc--no-pagination { --nwgc-has-pagination: 0; }
.nwgc-carousel.nwgc--no-nav { row-gap: 0; }

/* ---- Track (Swiper core, scoped: works with Swiper 5 and 8 whatever Elementor ships) ---- */
.nwgc-carousel .nwgc-track {
	grid-area: track;
	position: relative;
	overflow: hidden;
	/* Swiper/Elementor CSS sets margin-inline:auto on .swiper: in a grid that disables stretching and the track grows with its content. */
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	min-width: 0;
	z-index: 1;
	touch-action: pan-y;
}
.nwgc-carousel .nwgc-track .swiper-wrapper {
	position: relative;
	display: flex;
	width: 100%;
	height: auto;
	z-index: 1;
	box-sizing: content-box;
	transition-property: transform;
}
.nwgc-carousel .nwgc-slide {
	position: relative;
	flex-shrink: 0;
	height: auto;
	margin: 0;
	padding: 0;
	transition-property: transform;
}
/* Before Swiper starts (and without JS) slides already have their final width: no layout shift. */
.nwgc-carousel:not(.is-ready) .nwgc-slide {
	width: calc((100% - (var(--nwgc-spv) - 1) * var(--nwgc-gap)) / var(--nwgc-spv));
	margin-inline-end: var(--nwgc-gap);
}
.nwgc-carousel.is-fallback .nwgc-track {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.nwgc-carousel.is-fallback .nwgc-track::-webkit-scrollbar { display: none; }
.nwgc-carousel.is-fallback .nwgc-slide { scroll-snap-align: start; }

/* ---- Media ---- */
.nwgc-carousel .nwgc-media {
	position: relative;
	display: block;
	height: 340px;
	overflow: hidden;
	border-radius: 16px;
	isolation: isolate;
}
.nwgc-carousel .nwgc-media img,
.elementor .nwgc-carousel .nwgc-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: var(--nwgc-fit);
	object-position: var(--nwgc-pos);
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.nwgc-carousel .nwgc-slide:hover .nwgc-media img { transform: scale(var(--nwgc-zoom)); }
.nwgc-carousel .nwgc-media--link:focus-visible { outline: 2px solid var(--nwgc-focus, var(--e-global-color-primary, #1d2327)); outline-offset: 3px; }
.nwgc-carousel .nwgc-caption { margin-top: 10px; }

/* ---- Navigation bar ---- */
.nwgc-carousel .nwgc-nav {
	grid-area: nav;
	display: var(--nwgc-nav-display);
	align-items: center;
	justify-content: var(--nwgc-nav-justify);
	gap: var(--nwgc-nav-gap);
	min-width: 0;
}
.nwgc-carousel .nwgc-arrows {
	display: var(--nwgc-group-display);
	align-items: center;
	gap: var(--nwgc-arrows-gap);
	order: 1;
	flex: 0 0 auto;
}
.nwgc-carousel .nwgc-arrow {
	/* In "sides" mode the arrows become grid items laid over the track. */
	grid-area: var(--nwgc-arrow-area);
	align-self: center;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--nwgc-arrow-size);
	height: var(--nwgc-arrow-size);
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: var(--nwgc-arrow-icon);
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease, transform .2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.nwgc-carousel .nwgc-arrow--prev { justify-self: start; margin-inline-start: calc(var(--nwgc-side-offset) * var(--nwgc-side-on)); }
.nwgc-carousel .nwgc-arrow--next { justify-self: end; margin-inline-end: calc(var(--nwgc-side-offset) * var(--nwgc-side-on)); }
.nwgc-carousel .nwgc-arrow svg,
.nwgc-carousel .nwgc-arrow img {
	display: block;
	width: var(--nwgc-arrow-icon);
	height: var(--nwgc-arrow-icon);
}
.nwgc-carousel .nwgc-arrow i { font-size: var(--nwgc-arrow-icon); color: inherit; }
.nwgc-carousel .nwgc-arrow svg.e-font-icon-svg { fill: currentColor; }
.nwgc-carousel .nwgc-arrow:focus-visible { outline: 2px solid var(--nwgc-focus, var(--e-global-color-primary, #1d2327)); outline-offset: 3px; }
.nwgc-carousel .nwgc-arrow.is-disabled { cursor: default; pointer-events: none; }
.nwgc-carousel .nwgc-arrow.is-locked { display: none; }
[dir="rtl"] .nwgc-carousel .nwgc-arrow__default,
.rtl .nwgc-carousel .nwgc-arrow__default { transform: scaleX(-1); }

/* ---- Pagination ---- */
.nwgc-carousel .nwgc-pagination {
	grid-area: nav;
	order: 0;
	min-width: 0;
}
.nwgc-carousel .nwgc-pagination.is-locked { visibility: hidden; }
.nwgc-carousel .nwgc-pagination--progressbar {
	position: relative;
	flex: 1 1 auto;
	align-self: center;
	width: 100%;
	height: var(--nwgc-progress-h);
	overflow: hidden;
	border-radius: var(--nwgc-progress-h);
	background: var(--nwgc-progress-track);
}
.nwgc-carousel .nwgc-progress-fill {
	position: absolute;
	inset: 0;
	background: var(--nwgc-progress-fill);
	transform: scaleX(0);
	transform-origin: left top;
}
[dir="rtl"] .nwgc-carousel .nwgc-progress-fill,
.rtl .nwgc-carousel .nwgc-progress-fill { transform-origin: right top; }
.nwgc-carousel .nwgc-pagination--fraction { white-space: nowrap; font-variant-numeric: tabular-nums; }
.nwgc-carousel .nwgc-pagination--bullets {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--nwgc-bullet-gap);
}
.nwgc-carousel .nwgc-bullet {
	display: block;
	width: var(--nwgc-bullet-size);
	height: var(--nwgc-bullet-size);
	border-radius: 50%;
	background: var(--nwgc-bullet);
	opacity: 1;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease;
}
.nwgc-carousel .nwgc-bullet.is-active { background: var(--nwgc-bullet-active); transform: scale(1.15); }

.nwgc-empty {
	padding: 24px;
	border: 1px dashed rgba(0, 0, 0, .25);
	border-radius: 8px;
	text-align: center;
	font-size: 14px;
	opacity: .8;
}

@media (prefers-reduced-motion: reduce) {
	.nwgc-carousel .nwgc-media img,
	.nwgc-carousel .nwgc-arrow { transition: none; }
}
