/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5
 * component: looping photographic carousel · genre: editorial · tone: luxury
 * theme: Ivanko/Osty warm-neutral tokens · interaction: direct drag + camera reel
 * states: default · hover · focus · active · disabled · loading · error · success
 */

.elementor-widget-ivanko-aperture-gallery {
	position: relative;
	left: 50%;
	width: min(1340px, calc(100dvw - 2.25rem));
	max-width: none !important;
	min-width: 0;
	flex-shrink: 0;
	transform: translateX(-50%);
}

.ivanko-aperture-gallery {
	--ivanko-color-gallery-marker: var(--ivanko-color-feature-cta);
	--ivanko-gallery-slide-width: 78%;
	--ivanko-gallery-gap: var(--ivanko-space-xs);
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding-block: var(--ivanko-space-md) var(--ivanko-space-sm);
	background: var(--ivanko-color-gallery-surface);
	color: var(--ivanko-color-gallery-ink);
	font-family: var(--ivanko-font-body);
}

.ivanko-aperture-gallery *,
.ivanko-aperture-gallery *::before,
.ivanko-aperture-gallery *::after { box-sizing: border-box; }

.ivanko-aperture-gallery__viewfinder {
	position: relative;
	width: 100%;
	min-width: 0;
}

.ivanko-aperture-gallery__viewport {
	width: 100%;
	min-width: 0;
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}
.ivanko-aperture-gallery__viewport.is-dragging { cursor: grabbing; }
.ivanko-aperture-gallery__viewport:focus-visible,
.ivanko-aperture-gallery__number:focus-visible {
	outline: 2px solid var(--ivanko-color-gallery-marker);
	outline-offset: 3px;
}

.ivanko-aperture-gallery__strip {
	display: flex;
	gap: var(--ivanko-gallery-gap);
	width: 100%;
	transform: translate3d(var(--ivanko-strip-x, 0px), 0, 0);
}
.ivanko-aperture-gallery__viewport.is-moving .ivanko-aperture-gallery__strip,
.ivanko-aperture-gallery__rail.is-moving .ivanko-aperture-gallery__numbers { will-change: transform; }

.ivanko-aperture-gallery__slide {
	position: relative;
	flex: 0 0 var(--ivanko-gallery-slide-width);
	min-width: 0;
	margin: 0;
	aspect-ratio: 16 / 9;
	background: var(--ivanko-color-card-rail);
}
.ivanko-aperture-gallery--editorial .ivanko-aperture-gallery__slide { aspect-ratio: 3 / 2; }
.ivanko-aperture-gallery--portrait { --ivanko-gallery-slide-width: 72%; }
.ivanko-aperture-gallery--portrait .ivanko-aperture-gallery__slide { aspect-ratio: 4 / 5; }
.ivanko-aperture-gallery--square .ivanko-aperture-gallery__slide { aspect-ratio: 1; }
.ivanko-aperture-gallery__image,
.elementor .ivanko-aperture-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
}
.ivanko-aperture-gallery--contain .ivanko-aperture-gallery__image,
.elementor .ivanko-aperture-gallery--contain .ivanko-aperture-gallery__image { object-fit: contain; }
.ivanko-aperture-gallery__caption {
	position: absolute;
	inset-inline-start: var(--ivanko-space-lg);
	inset-block-end: var(--ivanko-space-lg);
	max-width: min(70%, 65ch);
	padding: var(--ivanko-space-xs) var(--ivanko-space-sm);
	background: var(--ivanko-color-gallery-caption);
	color: var(--ivanko-color-gallery-ink);
	font-size: var(--ivanko-text-sm);
	line-height: 1.5;
	pointer-events: none;
}
.ivanko-aperture-gallery__error { display: none; }
.ivanko-aperture-gallery__slide.is-broken .ivanko-aperture-gallery__image { display: none; }
.ivanko-aperture-gallery__slide.is-broken .ivanko-aperture-gallery__error {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--ivanko-color-gallery-ink);
	font-size: var(--ivanko-text-base);
}

.ivanko-aperture-gallery__corners {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 50%;
	width: calc(var(--ivanko-gallery-slide-width) + var(--ivanko-space-md));
	transform: translateX(-50%);
	pointer-events: none;
	z-index: 1;
}
.ivanko-aperture-gallery__corner {
	position: absolute;
	width: var(--ivanko-space-lg);
	height: var(--ivanko-space-lg);
	border-color: var(--ivanko-color-gallery-ink);
	border-style: solid;
	border-width: 0;
}
.ivanko-aperture-gallery__corner--tl { inset-block-start: 0; inset-inline-start: 0; border-block-start-width: 2px; border-inline-start-width: 2px; }
.ivanko-aperture-gallery__corner--tr { inset-block-start: 0; inset-inline-end: 0; border-block-start-width: 2px; border-inline-end-width: 2px; }
.ivanko-aperture-gallery__corner--bl { inset-block-end: 0; inset-inline-start: 0; border-block-end-width: 2px; border-inline-start-width: 2px; }
.ivanko-aperture-gallery__corner--br { inset-block-end: 0; inset-inline-end: 0; border-block-end-width: 2px; border-inline-end-width: 2px; }

.ivanko-aperture-gallery__controls { display: flex; justify-content: center; padding-block-start: var(--ivanko-space-md); }
.ivanko-aperture-gallery__rail {
	position: relative;
	width: min(100%, 15rem);
	height: 2.75rem;
	overflow: hidden;
}
.ivanko-aperture-gallery__numbers {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	display: flex;
	align-items: center;
	width: max-content;
	height: 100%;
	transform: translate3d(var(--ivanko-reel-x, 0px), 0, 0);
}
.ivanko-aperture-gallery__number {
	appearance: none;
	flex: 0 0 3.5rem;
	width: 3.5rem;
	height: 2.75rem;
	border: 0;
	padding: 0;
	background: transparent;
	color: var(--ivanko-color-gallery-muted);
	font: inherit;
	font-size: var(--ivanko-text-xs);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.08em;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.ivanko-aperture-gallery__number::after { content: '···'; margin-inline-start: var(--ivanko-space-2xs); }
.ivanko-aperture-gallery__number.is-current { color: var(--ivanko-color-gallery-ink); }
.ivanko-aperture-gallery__number:active { color: var(--ivanko-color-gallery-marker); }
.ivanko-aperture-gallery__number:disabled { opacity: 0.45; cursor: not-allowed; }
.ivanko-aperture-gallery__marker {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	display: grid;
	width: 1.75rem;
	height: 1.75rem;
	place-items: center;
	border-radius: 50%;
	background: var(--ivanko-color-gallery-surface);
	color: var(--ivanko-color-gallery-marker);
	transform: translate(-50%, -50%);
	pointer-events: none;
}
.ivanko-aperture-gallery__marker svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.ivanko-aperture-gallery__announcement { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
	.ivanko-aperture-gallery__number:hover { color: var(--ivanko-color-gallery-marker); }
}
@media (min-width: 40rem) {
	.ivanko-aperture-gallery { --ivanko-gallery-slide-width: 68%; --ivanko-gallery-gap: var(--ivanko-space-md); }
	.ivanko-aperture-gallery--portrait { --ivanko-gallery-slide-width: 52%; }
}
@media (min-width: 70rem) {
	.ivanko-aperture-gallery { --ivanko-gallery-slide-width: 60%; --ivanko-gallery-gap: var(--ivanko-space-lg); }
	.ivanko-aperture-gallery--portrait { --ivanko-gallery-slide-width: 38%; }
}
@media (max-width: 39.99rem) {
	.elementor-widget-ivanko-aperture-gallery { width: calc(100dvw - 1.25rem); }
	.ivanko-aperture-gallery__corner { width: var(--ivanko-space-md); height: var(--ivanko-space-md); }
	.ivanko-aperture-gallery__caption { inset-inline-start: var(--ivanko-space-xs); inset-block-end: var(--ivanko-space-xs); max-width: calc(100% - 1rem); }
}
@media (prefers-reduced-motion: reduce) {
	.ivanko-aperture-gallery__number { transition: none; }
}
