/* =====================================================================
   ADL Tour Gallery – Studio387
   v1.1 – otporno na stilove teme (armor), tiši UI, kadriranje po slici
   ===================================================================== */

.adl-g {
	--adl-ratio: 16/9;
	--adl-stage-h: auto;
	--adl-fit: cover;
	--adl-px: 50%;
	--adl-py: 50%;
	--adl-radius: 20px;
	--adl-stage-bg: #141414;
	--adl-stage-gap: 14px;
	--adl-accent: #ffffff;

	--adl-thumbs: 6;
	--adl-thumb-gap: 10px;
	--adl-thumb-ratio: 4/3;
	--adl-thumb-radius: 20px;
	--adl-thumb-veil: rgba(0, 0, 0, 0.5);
	--adl-thumb-indicator: 2px;

	--adl-ui-color: #fff;
	--adl-ui-bg: rgba(0, 0, 0, 0.35);
	--adl-ui-border: rgba(255, 255, 255, 0.28);
	--adl-ui-bg-hover: rgba(255, 255, 255, 0.95);
	--adl-ui-color-hover: #111111;
	--adl-arrow-size: 46px;

	--adl-counter-color: rgba(255, 255, 255, 0.92);
	--adl-caption-color: #fff;
	--adl-progress-bg: rgba(255, 255, 255, 0.22);

	--adl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--adl-speed: 600ms;

	position: relative;
	width: 100%;
}

.adl-g *,
.adl-g *::before,
.adl-g *::after {
	box-sizing: border-box;
}

/* ----------------------------------------------------------------------
   ARMOR – neutralizacija stilova teme (teme često boje svaki <button>)
   -------------------------------------------------------------------- */

.adl-g button,
.adl-lb button {
	-webkit-appearance: none !important;
	appearance: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font: inherit;
	line-height: 0;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	color: inherit;
	cursor: pointer;
	overflow: visible;
	transform: none;
	filter: none !important;
}

.adl-g img,
.adl-lb img {
	filter: none !important;
	max-width: 100%;
	border-radius: 0;
	box-shadow: none;
	transform: none;
}

.adl-g svg,
.adl-lb svg {
	display: block;
	fill: none;
	overflow: visible;
}

.adl-g__empty {
	padding: 40px 20px;
	text-align: center;
	border: 1px dashed currentColor;
	opacity: 0.6;
	font-size: 14px;
}

/* ------------------------------------------------------------- Okvir */

.adl-g .adl-g__stage {
	position: relative;
	background: var(--adl-stage-bg);
	border-radius: var(--adl-radius);
	overflow: hidden;
	isolation: isolate;
}

.adl-g__viewport {
	position: relative;
	width: 100%;
	aspect-ratio: var(--adl-ratio);
	height: var(--adl-stage-h);
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
}

.adl-g--zoomable .adl-g__viewport {
	cursor: zoom-in;
}

.adl-g__viewport.is-dragging {
	cursor: grabbing;
}

.adl-g__track {
	display: flex;
	width: 100%;
	height: 100%;
	will-change: transform;
	transform: translate3d(calc(var(--adl-i, 0) * -100%), 0, 0);
	transition: transform var(--adl-speed) var(--adl-ease);
}

.adl-g__track.is-dragging {
	transition: none;
}

.adl-g__slide {
	position: relative;
	flex: 0 0 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

.adl-g .adl-g__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--adl-fit);
	object-position: var(--adl-px, 50%) var(--adl-py, 50%);
	user-select: none;
	-webkit-user-drag: none;
}

.adl-g .adl-g__slide[data-fit="cover"] .adl-g__img {
	object-fit: cover;
}

.adl-g .adl-g__slide[data-fit="contain"] .adl-g__img {
	object-fit: contain;
}

/* Zatamnjenje pri dnu – čitljivost brojača i opisa. */
.adl-g--scrim .adl-g__stage::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	height: 38%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.adl-g__caption {
	position: absolute;
	left: 0;
	right: 90px;
	bottom: 0;
	z-index: 3;
	margin: 0;
	padding: 0 20px 18px;
	color: var(--adl-caption-color);
	font-size: 14px;
	line-height: 1.5;
	pointer-events: none;
}

/* ---------------------------------------------------------- Strelice */

.adl-g .adl-g__nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--adl-arrow-size) !important;
	height: var(--adl-arrow-size) !important;
	margin-top: calc(var(--adl-arrow-size) / -2) !important;
	color: var(--adl-ui-color);
	background-color: var(--adl-ui-bg) !important;
	border: 1px solid var(--adl-ui-border) !important;
	border-radius: 50% !important;
	opacity: 0;
	transition: opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.adl-g .adl-g__nav svg {
	width: 18px;
	height: 18px;
}

.adl-g .adl-g__nav--prev {
	left: 18px;
}

.adl-g .adl-g__nav--next {
	right: 18px;
}

.adl-g:hover .adl-g__nav,
.adl-g .adl-g__nav:focus-visible {
	opacity: 1;
}

.adl-g .adl-g__nav:hover {
	color: var(--adl-ui-color-hover);
	background-color: var(--adl-ui-bg-hover) !important;
	border-color: transparent !important;
}

.adl-g .adl-g__nav[disabled] {
	opacity: 0 !important;
	pointer-events: none;
}

.adl-g:hover .adl-g__nav[disabled] {
	opacity: 0.2 !important;
}

/* ------------------------------------------------- Brojač, zoom, traka */

.adl-g__counter {
	position: absolute;
	right: 20px;
	bottom: 16px;
	z-index: 4;
	color: var(--adl-counter-color);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.14em;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.adl-g__counter-sep,
.adl-g__counter-total {
	opacity: 0.5;
}

.adl-g__counter-sep {
	margin: 0 2px;
}

.adl-g .adl-g__zoom {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px !important;
	height: 38px !important;
	color: var(--adl-ui-color);
	background-color: var(--adl-ui-bg) !important;
	border: 1px solid var(--adl-ui-border) !important;
	border-radius: 50% !important;
	opacity: 0;
	transition: opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.adl-g .adl-g__zoom svg {
	width: 15px;
	height: 15px;
}

.adl-g:hover .adl-g__zoom,
.adl-g .adl-g__zoom:focus-visible {
	opacity: 1;
}

.adl-g .adl-g__zoom:hover {
	color: var(--adl-ui-color-hover);
	background-color: var(--adl-ui-bg-hover) !important;
	border-color: transparent !important;
}

.adl-g__progress {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 5;
	height: 2px;
	background: var(--adl-progress-bg);
	pointer-events: none;
}

.adl-g__progress span {
	display: block;
	width: var(--adl-p, 0%);
	height: 100%;
	background: var(--adl-accent);
	transition: width var(--adl-speed) var(--adl-ease);
}

.adl-g__live {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ------------------------------------------------------------ Sličice */

.adl-g__thumbs {
	display: flex;
	gap: var(--adl-thumb-gap);
	margin-top: var(--adl-stage-gap);
	padding: 0 0 2px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-snap-type: x proximity;
	overscroll-behavior-x: contain;
}

.adl-g__thumbs::-webkit-scrollbar {
	display: none;
}

.adl-g .adl-g__thumb {
	position: relative;
	flex: 0 0 calc((100% - (var(--adl-thumbs) - 1) * var(--adl-thumb-gap)) / var(--adl-thumbs));
	aspect-ratio: var(--adl-thumb-ratio);
	border-radius: var(--adl-thumb-radius) !important;
	overflow: hidden !important;
	scroll-snap-align: center;
	-webkit-tap-highlight-color: transparent;
}

.adl-g .adl-g__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--adl-tpos, 50% 50%);
	user-select: none;
	-webkit-user-drag: none;
}

/* Veo preko neaktivnih – slika ostaje puna, samo se stiša. */
.adl-g .adl-g__thumb::after {
	content: "" !important;
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--adl-thumb-veil);
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.adl-g .adl-g__thumb:hover::after,
.adl-g .adl-g__thumb:focus-visible::after {
	opacity: 0.4;
}

.adl-g .adl-g__thumb.is-active::after {
	opacity: 0;
}

/* Oznaka aktivne sličice */
.adl-g .adl-g__thumb::before {
	content: "" !important;
	display: block;
	position: absolute;
	z-index: 2;
	pointer-events: none;
}

.adl-g--tmark-line .adl-g__thumb::before {
	inset: auto 0 0 0;
	height: var(--adl-thumb-indicator);
	background: var(--adl-accent);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.35s var(--adl-ease);
}

.adl-g--tmark-line .adl-g__thumb.is-active::before {
	transform: scaleX(1);
}

.adl-g--tmark-frame .adl-g__thumb::before {
	inset: 0;
	border: var(--adl-thumb-indicator) solid var(--adl-accent);
	border-radius: inherit;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.adl-g--tmark-frame .adl-g__thumb.is-active::before {
	opacity: 1;
}

.adl-g--tmark-none .adl-g__thumb::before {
	display: none;
}

/* Redni broj slike – vidljiv samo u Elementor editoru. */
.adl-g__thumb-num {
	position: absolute;
	top: 4px;
	left: 5px;
	z-index: 3;
	padding: 1px 5px;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.06em;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 2px;
	pointer-events: none;
}


/* --------------------------------------- Centriranje trake sličica */

.adl-g__thumbs.is-centered {
	justify-content: center;
}

/* ------------------------------------------- Prelaz: pretapanje */

.adl-g--fx-fade .adl-g__track {
	display: block;
	position: relative;
	transform: none !important;
	transition: none;
}

.adl-g--fx-fade .adl-g__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--adl-speed) var(--adl-ease), visibility 0s linear var(--adl-speed);
}

.adl-g--fx-fade .adl-g__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--adl-speed) var(--adl-ease), visibility 0s;
}

/* -------------------------------------------------------------- Fokus */

.adl-g button:focus-visible,
.adl-lb button:focus-visible {
	outline: 2px solid var(--adl-accent, #ffffff);
	outline-offset: 2px;
	opacity: 1;
}

/* ===================================================================
   LIGHTBOX
   =================================================================== */

.adl-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 60px 16px 118px;
	opacity: 0;
	transition: opacity 0.3s ease;
	--adl-accent: #ffffff;
	--adl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.adl-lb.is-open {
	display: flex;
}

.adl-lb.is-visible {
	opacity: 1;
}

.adl-lb__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.adl-lb__figure {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	touch-action: pan-y;
}

.adl-lb .adl-lb__img {
	display: block;
	max-width: min(1500px, 100%);
	max-height: calc(100vh - 195px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 2px;
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition: opacity 0.26s ease, transform 0.34s var(--adl-ease);
	user-select: none;
	-webkit-user-drag: none;
}

/* Odlazak stare slike. */
.adl-lb .adl-lb__img.is-out {
	opacity: 0;
	transform: translate3d(var(--adl-dx, 0px), 0, 0) scale(0.985);
}

/* Postavljanje nove slike prije nego krene animacija ulaska. */
.adl-lb .adl-lb__img.is-in {
	opacity: 0;
	transform: translate3d(var(--adl-dx, 0px), 0, 0) scale(0.985);
	transition: none;
}

/* Otvaranje lightboxa. */
.adl-lb__figure {
	transform: scale(0.975);
	transition: transform 0.34s var(--adl-ease);
}

.adl-lb.is-visible .adl-lb__figure {
	transform: none;
}

.adl-lb__caption {
	max-width: 680px;
	margin-top: 16px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 13.5px;
	line-height: 1.55;
	text-align: center;
}

.adl-lb__caption:empty {
	display: none;
}

.adl-lb .adl-lb__nav,
.adl-lb .adl-lb__close {
	position: absolute;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.85);
	background-color: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.22) !important;
	border-radius: 50% !important;
	transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
	-webkit-tap-highlight-color: transparent;
}

.adl-lb .adl-lb__nav:hover,
.adl-lb .adl-lb__close:hover {
	color: #111111;
	background-color: rgba(255, 255, 255, 0.95) !important;
	border-color: transparent !important;
}

.adl-lb .adl-lb__nav {
	top: 50%;
	width: 52px !important;
	height: 52px !important;
	margin-top: -26px !important;
}

.adl-lb .adl-lb__nav svg {
	width: 20px;
	height: 20px;
}

.adl-lb .adl-lb__nav--prev {
	left: 22px;
}

.adl-lb .adl-lb__nav--next {
	right: 22px;
}

.adl-lb .adl-lb__close {
	top: 18px;
	right: 22px;
	width: 44px !important;
	height: 44px !important;
}

.adl-lb .adl-lb__close svg {
	width: 17px;
	height: 17px;
}

.adl-lb__counter {
	position: absolute;
	top: 32px;
	left: 26px;
	z-index: 4;
	color: rgba(255, 255, 255, 0.6);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	font-variant-numeric: tabular-nums;
}

.adl-lb__thumbs {
	position: absolute;
	inset: auto 0 20px 0;
	z-index: 4;
	display: flex;
	gap: 8px;
	justify-content: center;
	max-width: 100%;
	padding: 0 22px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.adl-lb__thumbs::-webkit-scrollbar {
	display: none;
}

.adl-lb .adl-lb__thumb {
	position: relative;
	flex: 0 0 82px;
	height: 58px;
	border-radius: 2px !important;
	overflow: hidden !important;
}

.adl-lb .adl-lb__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.adl-lb .adl-lb__thumb::after {
	content: "" !important;
	display: block;
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	transition: opacity 0.25s ease;
}

.adl-lb .adl-lb__thumb:hover::after {
	opacity: 0.45;
}

.adl-lb .adl-lb__thumb.is-active::after {
	opacity: 0;
}

.adl-lb .adl-lb__thumb::before {
	content: "" !important;
	display: block;
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	height: 2px;
	background: var(--adl-accent);
	transform: scaleX(0);
	transition: transform 0.3s ease;
}

.adl-lb .adl-lb__thumb.is-active::before {
	transform: scaleX(1);
}

.adl-lb__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 1.5px solid rgba(255, 255, 255, 0.2);
	border-top-color: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	opacity: 0;
	animation: adl-spin 0.8s linear infinite;
	pointer-events: none;
}

.adl-lb.is-loading .adl-lb__spinner {
	opacity: 1;
}

@keyframes adl-spin {
	to {
		transform: rotate(360deg);
	}
}

html.adl-lb-open,
body.adl-lb-open {
	overflow: hidden;
}

/* =================================================================== */
/* Mobitel                                                             */
/* =================================================================== */

@media (max-width: 767px) {

	.adl-g .adl-g__nav {
		opacity: 1;
		width: calc(var(--adl-arrow-size) * 0.78) !important;
		height: calc(var(--adl-arrow-size) * 0.78) !important;
		margin-top: calc(var(--adl-arrow-size) * -0.39) !important;
	}

	.adl-g .adl-g__nav--prev {
		left: 10px;
	}

	.adl-g .adl-g__nav--next {
		right: 10px;
	}

	.adl-g .adl-g__nav svg {
		width: 16px;
		height: 16px;
	}

	.adl-g .adl-g__zoom {
		opacity: 1;
		top: 12px;
		right: 12px;
		width: 34px !important;
		height: 34px !important;
	}

	.adl-g__counter {
		right: 14px;
		bottom: 12px;
		font-size: 11px;
	}

	.adl-g__caption {
		right: 76px;
		padding: 0 14px 14px;
		font-size: 13px;
	}

	.adl-lb {
		padding: 54px 8px 98px;
	}

	.adl-lb .adl-lb__img {
		max-height: calc(100vh - 172px);
	}

	.adl-lb .adl-lb__nav {
		width: 40px !important;
		height: 40px !important;
		margin-top: -20px !important;
	}

	.adl-lb .adl-lb__nav--prev {
		left: 8px;
	}

	.adl-lb .adl-lb__nav--next {
		right: 8px;
	}

	.adl-lb .adl-lb__nav svg {
		width: 17px;
		height: 17px;
	}

	.adl-lb .adl-lb__close {
		top: 10px;
		right: 10px;
		width: 40px !important;
		height: 40px !important;
	}

	.adl-lb__counter {
		top: 23px;
		left: 16px;
		font-size: 11px;
	}

	.adl-lb__thumbs {
		gap: 6px;
		bottom: 14px;
		padding: 0 12px;
		justify-content: flex-start;
	}

	.adl-lb .adl-lb__thumb {
		flex: 0 0 58px;
		height: 42px;
	}

	.adl-lb__caption {
		margin-top: 12px;
		font-size: 12.5px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.adl-g__track,
	.adl-g__progress span,
	.adl-lb,
	.adl-lb__figure,
	.adl-lb .adl-lb__img,
	.adl-g__thumbs,
	.adl-lb__thumbs {
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.adl-lb__spinner {
		animation-duration: 2s;
	}
}
