/* Galerija — coverflow-style photo carousel. Large centered slide, flanking
   slides angled off into the distance via 3D transforms. */

body.galerija-page {
	margin: 0;
	background-color: var(--kh-cream);
	color: var(--kh-navy-900);
	font-weight: 300;
	-webkit-font-smoothing: antialiased;
}

.kh-coverflow {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 1200px;
	margin: 40px auto 0;
	padding: 40px 60px 60px;
	/* Bočne slike su namerno izvučene van sredine; na uskom ekranu su virile
	   preko desne ivice i vukle celu stranicu u stranu (scrollWidth 470 na
	   telefonu od 390). Sada se seku ovde umesto da pomeraju stranicu. */
	overflow-x: clip;
}

.kh-coverflow__track {
	position: relative;
	width: 100%;
	max-width: 900px;
	height: min(58vh, 520px);
	perspective: 1400px;
}

.kh-coverflow__slide {
	position: absolute;
	top: 0;
	left: 50%;
	width: min(46vw, 380px);
	height: 100%;
	transform: translateX(-50%);
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 30px 60px -24px rgba(10, 30, 61, 0.4);
	background: var(--kh-navy-950);
	transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.55s ease, z-index 0s 0.3s;
	cursor: pointer;
}

.kh-coverflow__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kh-coverflow__slide.is-active {
	transform: translateX(-50%) translateZ(0) rotateY(0deg);
	z-index: 5;
	cursor: default;
	box-shadow: 0 40px 70px -20px rgba(10, 30, 61, 0.5);
}

.kh-coverflow__slide.is-prev1 {
	transform: translateX(calc(-50% - 46%)) translateZ(-140px) rotateY(32deg);
	z-index: 4;
	opacity: 1;
}

.kh-coverflow__slide.is-prev2 {
	transform: translateX(calc(-50% - 82%)) translateZ(-260px) rotateY(38deg);
	z-index: 3;
	opacity: 0.7;
}

.kh-coverflow__slide.is-next1 {
	transform: translateX(calc(-50% + 46%)) translateZ(-140px) rotateY(-32deg);
	z-index: 4;
	opacity: 1;
}

.kh-coverflow__slide.is-next2 {
	transform: translateX(calc(-50% + 82%)) translateZ(-260px) rotateY(-38deg);
	z-index: 3;
	opacity: 0.7;
}

.kh-coverflow__slide.is-hidden {
	transform: translateX(-50%) translateZ(-360px) scale(0.8);
	opacity: 0;
	z-index: 1;
	pointer-events: none;
}

.kh-coverflow__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba(10, 30, 61, 0.12);
	color: var(--kh-navy-900);
	cursor: pointer;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
	z-index: 6;
}

.kh-coverflow__arrow:hover,
.kh-coverflow__arrow:focus-visible {
	border-color: var(--kh-gold-deep);
	color: var(--kh-gold-deep);
	box-shadow: 0 10px 24px -14px rgba(10, 30, 61, 0.35);
}

.kh-coverflow__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding-bottom: 80px;
}

.kh-coverflow__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border-radius: 50%;
	background: rgba(10, 30, 61, 0.18);
	border: none;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.kh-coverflow__dot.is-active {
	background-color: var(--kh-gold-deep);
	transform: scale(1.3);
}

@media (max-width: 720px) {
	.kh-coverflow {
		padding: 24px 16px 40px;
		gap: 4px;
	}

	.kh-coverflow__slide {
		width: 62vw;
	}

	.kh-coverflow__arrow {
		width: 36px;
		height: 36px;
	}
}
