/* HOBBYTEC — Galéria realizácií: parallax nekonečný carousel */

.hbtc-gallery-carousel {
	position: relative;
	width: 100%;
	padding: clamp(14px, 2vw, 32px) 0 0;
	overflow: hidden;
	isolation: isolate;
	font-family: "Gilroy-Regular", system-ui, sans-serif;
}

.hbtc-gallery-inner { width: 100%; }

/* ── Stage ───────────────────────────────────────────────────────────────── */
.hbtc-gallery-stage {
	position: relative;
	z-index: 1;
	width: 100%;
}

.hbtc-gallery-track {
	display: flex;
	gap: clamp(14px, 1.5vw, 22px);
	width: 100%;
	overflow-x: scroll;
	overflow-y: hidden;
	scroll-behavior: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: clamp(8px, 1.2vw, 18px) 0;
	cursor: grab;
	touch-action: pan-y;
}
.hbtc-gallery-track::-webkit-scrollbar { display: none; }
.hbtc-gallery-track.is-dragging { cursor: grabbing; }

/* ── Karta ───────────────────────────────────────────────────────────────── */
.hbtc-gallery-item {
	position: relative;
	flex: 0 0 auto;
	width: clamp(220px, 26vw, 360px);
	aspect-ratio: 4 / 3;
	border-radius: clamp(18px, 1.6vw, 26px);
	overflow: hidden;
	background: #f1f1ee;
	box-shadow: 0 16px 40px rgba(34, 31, 32, 0.14);
	cursor: zoom-in;
	transition: box-shadow 0.4s ease;
}
.hbtc-gallery-item::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: rgba(34, 31, 32, 0);
	transition: background 0.4s ease;
}
.hbtc-gallery-item img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 135%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: translate(-50%, -50%);
	transform-origin: center center;
	pointer-events: none;
	-webkit-user-drag: none;
	user-select: none;
	transition: scale 0.5s cubic-bezier(.22, 1, .36, 1);
	scale: 1;
}
/* jemný zoom na hover (scale je oddelené od JS transformu kvôli parallaxu) */
.hbtc-gallery-track:not(.is-dragging) .hbtc-gallery-item:hover img { scale: 1.07; }
.hbtc-gallery-track:not(.is-dragging) .hbtc-gallery-item:hover { box-shadow: 0 24px 54px rgba(34, 31, 32, 0.22); }
.hbtc-gallery-track:not(.is-dragging) .hbtc-gallery-item:hover::after { background: rgba(34, 31, 32, 0.04); }

/* ── Šípky ───────────────────────────────────────────────────────────────── */
.hbtc-gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1100;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(46px, 4vw, 58px);
	height: clamp(46px, 4vw, 58px);
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #221f20;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 12px 30px rgba(34, 31, 32, 0.28);
	transition: background 0.25s ease, transform 0.25s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-gallery-arrow:hover { background: #78b956; transform: translateY(-50%) scale(1.07); }
.hbtc-gallery-arrow svg { width: 40%; height: 40%; }
.hbtc-gallery-arrow-prev { left: clamp(8px, 2vw, 24px); }
.hbtc-gallery-arrow-next { right: clamp(8px, 2vw, 24px); }

/* ── Empty ───────────────────────────────────────────────────────────────── */
.hbtc-gallery-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 200px;
	color: rgba(34, 31, 32, 0.45);
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
}

/* ── Lightbox galéria ────────────────────────────────────────────────────── */
.hbtc-gallery-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(12px, 2vw, 22px);
	padding: clamp(16px, 4vw, 48px);
	background: rgba(18, 18, 18, 0.94);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.hbtc-gallery-lb.is-open { opacity: 1; visibility: visible; }

.hbtc-gallery-lb__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
}
.hbtc-gallery-lb__img {
	max-width: min(92vw, 1100px);
	max-height: 72vh;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	object-fit: contain;
}

.hbtc-gallery-lb__close,
.hbtc-gallery-lb__nav {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border: 0;
	border-radius: 999px;
	background: #221f20;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
	transition: background 0.2s ease, transform 0.2s ease;
}
.hbtc-gallery-lb__close svg { width: 22px; height: 22px; }
.hbtc-gallery-lb__nav svg { width: 24px; height: 24px; }
.hbtc-gallery-lb__close:hover,
.hbtc-gallery-lb__nav:hover { background: #78b956; transform: scale(1.06); }
.hbtc-gallery-lb__close { top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); }
.hbtc-gallery-lb__prev { left: clamp(10px, 3vw, 36px); top: 44%; transform: translateY(-50%); }
.hbtc-gallery-lb__next { right: clamp(10px, 3vw, 36px); top: 44%; transform: translateY(-50%); }
.hbtc-gallery-lb__prev:hover { transform: translateY(-50%) scale(1.06); }
.hbtc-gallery-lb__next:hover { transform: translateY(-50%) scale(1.06); }

.hbtc-gallery-lb__thumbs {
	display: flex;
	gap: 10px;
	flex: 0 0 auto;
	max-width: min(94vw, 1100px);
	overflow-x: auto;
	padding: 4px 2px;
	scrollbar-width: thin;
}
.hbtc-gallery-lb__thumb {
	flex: 0 0 auto;
	width: clamp(54px, 8vw, 86px);
	height: clamp(54px, 8vw, 86px);
	padding: 0;
	border: 2px solid transparent;
	border-radius: 14px;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.hbtc-gallery-lb__thumb:hover { opacity: 0.85; transform: translateY(-2px); }
.hbtc-gallery-lb__thumb.is-active { opacity: 1; border-color: #78b956; }

/* ── CTA tlačidlo pod galériou ──────────────────────────────────────────── */
.hbtc-gallery-cta-wrap {
	display: flex;
	justify-content: center;
	padding: clamp(16px, 2.5vw, 32px) 0 0;
}
.hbtc-gallery-cta-box {
	display: inline-flex;
	padding: 6px;
	border-radius: 999px;
	background: #1e1e1e;
}
.hbtc-gallery-cta-pill { display: flex; align-items: center; gap: 3px; }

.hbtc-gallery-cta-main,
.hbtc-gallery-cta-arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 60px;
	border-radius: 999px;
	overflow: hidden;
	isolation: isolate;
	background: #f1bb41 !important;
	color: #221f20 !important;
	text-decoration: none;
}
.hbtc-gallery-cta-main { padding: 0 34px; }
.hbtc-gallery-cta-arrow { width: 60px; }

.hbtc-gallery-cta-fill {
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: inherit;
	background: #111 !important;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform 0.4s cubic-bezier(.2, .75, .2, 1);
}
.hbtc-gallery-cta-arrow .hbtc-gallery-cta-fill { transition-delay: 0.08s; }
.hbtc-gallery-cta-pill:hover .hbtc-gallery-cta-fill { transform-origin: left center; transform: scaleX(1); }
.hbtc-gallery-cta-pill:hover .hbtc-gallery-cta-main,
.hbtc-gallery-cta-pill:hover .hbtc-gallery-cta-arrow { color: #fff !important; }

.hbtc-gallery-cta-text {
	position: relative;
	z-index: 1;
	display: block;
	height: 1.2em;
	overflow: hidden;
	font-family: "Gilroy-Medium", "Gilroy-Regular", system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.2;
}
.hbtc-gallery-cta-text > span { display: block; height: 1.2em; transition: transform 0.42s cubic-bezier(.22, 1, .36, 1); }
.hbtc-gallery-cta-pill:hover .hbtc-gallery-cta-text > span { transform: translateY(-1.2em); }

.hbtc-gallery-cta-arrow-icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	overflow: hidden;
}
.hbtc-gallery-cta-arrow-icon > span {
	position: absolute;
	inset: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.42s cubic-bezier(.22, 1, .36, 1);
}
.hbtc-gallery-cta-arrow-icon > span:last-child { transform: translateX(-22px); }
.hbtc-gallery-cta-pill:hover .hbtc-gallery-cta-arrow-icon > span:first-child { transform: translateX(22px); }
.hbtc-gallery-cta-pill:hover .hbtc-gallery-cta-arrow-icon > span:last-child { transform: translateX(0); }
.hbtc-gallery-cta-arrow-icon svg { width: 18px; height: 18px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.hbtc-gallery-item { width: clamp(200px, 62vw, 300px); }
	.hbtc-gallery-arrow-prev { left: 6px; }
	.hbtc-gallery-arrow-next { right: 6px; }
}
