/* UHO Photo Slider v1.3 - front-end */
.uhops-replaced { display: none !important; }

.uhops {
	--uhops-primary: #0a2f63;
	--uhops-accent: #f39c12;
	--uhops-radius: 16px;
	--uhops-w: 60%;
	--uhops-wm: 94%;
	--uhops-maxh: 75vh;
	--uhops-py: 48px;
	--uhops-dur: 900ms;
	--uhops-kb: 10s;
	box-sizing: border-box;
	display: block;
	clear: both;
	width: 100%;
	padding: var(--uhops-py) 0;
	position: relative;
	outline: none;
}
.uhops *, .uhops *::before, .uhops *::after { box-sizing: border-box; }

.uhops__inner { width: var(--uhops-w); margin: 0 auto; }
@media (max-width: 900px) { .uhops__inner { width: var(--uhops-wm); } }

/* ---------- Judul ---------- */
.uhops__head { text-align: center; margin-bottom: 22px; }
.uhops .uhops__title {
	margin: 0;
	padding: 0;
	color: var(--uhops-primary);
	font-size: clamp(1.3rem, 2.2vw, 1.8rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .2px;
}
.uhops .uhops__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 10px auto 0;
	border-radius: 3px;
	background: var(--uhops-accent);
}

/* ---------- Bingkai ---------- */
.uhops__frame {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	container-type: inline-size;
	border-radius: var(--uhops-radius);
	background: var(--uhops-cap-bg, var(--uhops-primary));
	box-shadow: 0 18px 40px -18px rgba(10, 47, 99, .5), 0 4px 12px rgba(10, 47, 99, .12);
}
.uhops:focus-visible .uhops__frame { outline: 3px solid var(--uhops-accent); outline-offset: 3px; }

/* Panggung: tingginya diatur JS mengikuti slide aktif (foto + deskripsi) */
.uhops__stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
}
.uhops__stage:not(.is-ready) { aspect-ratio: var(--ratio, 1.7778); max-height: var(--uhops-maxh); }
.uhops__stage.is-ready { transition: height .7s cubic-bezier(.4, 0, .2, 1); }

/* ---------- Slide ---------- */
.uhops .uhops__slide {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--uhops-dur) ease, transform var(--uhops-dur) cubic-bezier(.22, .61, .36, 1), filter var(--uhops-dur) ease, visibility 0s linear var(--uhops-dur);
}
.uhops .uhops__slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	filter: none;
	transition: opacity var(--uhops-dur) ease, transform var(--uhops-dur) cubic-bezier(.22, .61, .36, 1), filter var(--uhops-dur) ease, visibility 0s;
}
.uhops .uhops__slide.is-far { display: none; }

/* ---------- Foto ---------- */
.uhops__photo {
	position: relative;
	flex: none;
	width: 100%;
	aspect-ratio: var(--r, 1.5);
	max-height: var(--uhops-maxh);
	overflow: hidden;
	background: #0b1220;
}
.uhops__bg {
	position: absolute;
	inset: -30px;
	background-size: cover;
	background-position: center;
	filter: blur(28px) saturate(1.1) brightness(.72);
	transform: scale(1.05);
}
.uhops .uhops__img {
	position: relative;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: contain;
	-webkit-user-drag: none;
}
.uhops[data-fixed="1"] .uhops__img { object-fit: cover; }

/* ---------- Deskripsi (menempel pada foto, rata tengah) ---------- */
.uhops {
	--uhops-cap-bg: #0a2f63;
	--uhops-tf: 'Playfair Display', Georgia, serif;
	--uhops-tc: #ffd479;
	--uhops-ts: 22px;
	--uhops-tw: 700;
	--uhops-df: Inter, 'Segoe UI', system-ui, sans-serif;
	--uhops-dc: #e9eefb;
	--uhops-ds: 16px;
}
.uhops .uhops__cap {
	margin: 0;
	width: 100%;
	padding: 22px clamp(18px, 4cqw, 44px) 26px;
	background: var(--uhops-cap-bg);
	color: var(--uhops-dc);
	text-align: center;
	border-top: 3px solid var(--uhops-accent);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
.uhops .uhops__cap-title {
	margin: 0;
	width: 100%;
	max-width: none;
	font-family: var(--uhops-tf);
	font-weight: var(--uhops-tw);
	font-size: calc(var(--uhops-ts) * var(--k, 1));
	line-height: 1.3;
	letter-spacing: .01em;
	color: var(--uhops-tc);
	text-align: center;
	text-wrap: balance;
}
.uhops .uhops__cap-rule {
	display: block;
	width: 44px;
	height: 2px;
	margin: 12px auto;
	border-radius: 2px;
	background: var(--uhops-accent);
	opacity: .9;
}
.uhops .uhops__cap-desc {
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: none;
	font-family: var(--uhops-df);
	font-weight: 400;
	font-size: calc(var(--uhops-ds) * var(--k, 1));
	line-height: 1.7;
	letter-spacing: .005em;
	color: var(--uhops-dc);
	text-align: center;
	text-wrap: pretty;
}
.uhops .uhops__cap-title,
.uhops .uhops__cap-desc {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .6s ease .35s, transform .6s ease .35s;
}
.uhops .uhops__cap-desc { transition-delay: .5s; }
.uhops .uhops__slide.is-active .uhops__cap-title,
.uhops .uhops__slide.is-active .uhops__cap-desc { opacity: 1; transform: none; }

/* Foto vertikal: deskripsi di sisi kanan, kolomnya setinggi foto
   (ukuran teks otomatis disesuaikan oleh JS agar muat sesuai tinggi foto) */
.uhops .uhops__slide[data-orient="portrait"] {
	--h: min(calc(55cqw / var(--r)), var(--uhops-maxh));
	flex-direction: row;
	align-items: flex-start;
}
.uhops .uhops__slide[data-orient="portrait"].is-nocap { --h: min(calc(100cqw / var(--r)), var(--uhops-maxh)); }
.uhops .uhops__slide[data-orient="portrait"] .uhops__photo {
	height: var(--h);
	width: calc(var(--h) * var(--r));
	aspect-ratio: auto;
	max-height: none;
}
.uhops .uhops__slide[data-orient="portrait"].is-nocap .uhops__photo { width: 100%; }
.uhops .uhops__slide[data-orient="portrait"] .uhops__cap {
	flex: 1;
	min-width: 0;
	height: var(--h);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	padding: clamp(14px, 3cqw, 32px) clamp(16px, 3cqw, 34px);
	border-top: 0;
	border-left: 3px solid var(--uhops-accent);
}
.uhops .uhops__slide[data-orient="portrait"] .uhops__cap.is-scroll { overflow-y: auto; justify-content: flex-start; }

/* Layar sempit: foto vertikal -> deskripsi pindah ke bawah foto */
@container (max-width: 520px) {
	.uhops .uhops__slide[data-orient="portrait"] { flex-direction: column; align-items: stretch; }
	.uhops .uhops__slide[data-orient="portrait"] .uhops__photo,
	.uhops .uhops__slide[data-orient="portrait"].is-nocap .uhops__photo {
		width: 100%;
		height: auto;
		aspect-ratio: var(--r);
		max-height: var(--uhops-maxh);
	}
	.uhops .uhops__slide[data-orient="portrait"] .uhops__cap {
		display: block;
		height: auto;
		overflow: visible;
		padding: 14px 18px 18px;
		border-left: 0;
		border-top: 3px solid var(--uhops-accent);
	}
	.uhops .uhops__cap { padding: 16px 18px 20px; }
	.uhops .uhops__cap-title { font-size: max(17px, calc(var(--uhops-ts) * .86 * var(--k, 1))); }
	.uhops .uhops__cap-desc { font-size: max(14px, calc(var(--uhops-ds) * .94 * var(--k, 1))); line-height: 1.65; }
}

/* ---------- Efek pergantian ---------- */
/* fade: memakai gaya dasar di atas */
.uhops--fx-zoom .uhops__slide { transform: scale(1.12); }

.uhops--fx-blur .uhops__slide { filter: blur(22px); }

.uhops--fx-flip .uhops__stage { perspective: 1600px; }
.uhops--fx-flip .uhops__slide { transform: rotateY(78deg) scale(.9); }

.uhops--fx-blink .uhops__slide { transition: none; }
.uhops--fx-blink .uhops__slide.is-active { transition: none; animation: uhopsBlink var(--uhops-dur) linear both; }
@keyframes uhopsBlink {
	0%   { opacity: 0; }
	12%  { opacity: 1; }
	26%  { opacity: .12; }
	40%  { opacity: 1; }
	54%  { opacity: .35; }
	70%  { opacity: 1; }
	100% { opacity: 1; }
}

.uhops--fx-kenburns .uhops__slide.is-active .uhops__img,
.uhops--fx-kenburns .uhops__slide.is-prev .uhops__img { animation: uhopsKB var(--uhops-kb) ease-out both; }
@keyframes uhopsKB { from { transform: scale(1); } to { transform: scale(1.09); } }

.uhops--fx-slide .uhops__slide,
.uhops--fx-slide .uhops__slide.is-active {
	opacity: 1;
	visibility: visible;
	filter: none;
	transform: translate3d(calc(var(--o, 0) * 100%), 0, 0);
	transition: transform var(--uhops-dur) cubic-bezier(.65, 0, .35, 1);
	will-change: transform;
}
.uhops--fx-slide .uhops__slide.is-far { display: none; }

/* ---------- Tombol navigasi ---------- */
.uhops .uhops__nav {
	position: absolute;
	top: var(--nav-y, 50%);
	z-index: 3;
	width: 44px;
	height: 44px;
	min-width: 0;
	margin: -22px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, .92);
	color: var(--uhops-primary);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
	cursor: pointer;
	opacity: 0;
	transform: scale(.88);
	transition: opacity .25s ease, transform .25s ease, background .2s ease, color .2s ease, top .7s cubic-bezier(.4, 0, .2, 1);
	-webkit-appearance: none;
	appearance: none;
}
.uhops .uhops__nav--prev { left: 16px; }
.uhops .uhops__nav--next { right: 16px; }
.uhops__frame:hover .uhops__nav,
.uhops .uhops__nav:focus-visible { opacity: 1; transform: none; }
.uhops .uhops__nav:hover { background: var(--uhops-accent); color: #fff; }
@media (hover: none) { .uhops .uhops__nav { opacity: 1; transform: none; width: 38px; height: 38px; margin-top: -19px; } }

/* ---------- Progress bar ---------- */
.uhops__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	z-index: 3;
	background: rgba(255, 255, 255, .18);
}
.uhops__bar span { display: block; width: 0; height: 100%; background: var(--uhops-accent); }

/* ---------- Titik & penghitung ---------- */
.uhops__foot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 18px;
}
.uhops__dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.uhops .uhops__dot {
	position: relative;
	width: 9px;
	height: 9px;
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: #c4ccd8;
	cursor: pointer;
	transition: width .35s ease, background .35s ease;
	-webkit-appearance: none;
	appearance: none;
}
.uhops .uhops__dot::after { content: ""; position: absolute; inset: -8px; }
.uhops .uhops__dot:hover { background: #9aa6b8; }
.uhops .uhops__dot.is-active { width: 28px; background: var(--uhops-accent); }
.uhops__counter { font-size: .85rem; color: #6b7686; font-variant-numeric: tabular-nums; letter-spacing: .5px; }

@media (max-width: 600px) {
	.uhops .uhops__nav--prev { left: 10px; }
	.uhops .uhops__nav--next { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.uhops { --uhops-dur: 10ms; }
	.uhops *, .uhops *::before, .uhops *::after { animation: none !important; }
	.uhops__stage.is-ready, .uhops .uhops__cap p, .uhops .uhops__dot, .uhops .uhops__nav { transition: none !important; }
}


/* =====================================================================
   v1.3 - Pinggir bingkai menyatu dengan latar + animasi sisi kiri/kanan
   ===================================================================== */
.uhops {
	--uhops-edge: 48px;
	--uhops-pagebg: #ffffff;
	--uhops-fxt: 1;
	overflow-x: clip; /* cahaya di luar bingkai tidak memunculkan scroll samping */
}

.uhops__shell { position: relative; isolation: isolate; }

/* Pinggir bingkai memudar ke warna latar halaman */
.uhops--edge .uhops__frame { box-shadow: none; }
.uhops--edge .uhops__frame::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	border-radius: inherit;
	box-shadow: inset 0 0 var(--uhops-edge) calc(var(--uhops-edge) * .3) var(--uhops-pagebg);
}
@media (max-width: 600px) {
	.uhops--edge .uhops__frame::after {
		box-shadow: inset 0 0 calc(var(--uhops-edge) * .6) calc(var(--uhops-edge) * .18) var(--uhops-pagebg);
	}
}

/* ---------- Animasi kiri & kanan bingkai (di luar foto) ---------- */
.uhops .uhops__side {
	display: none;
	position: absolute;
	top: -14px;
	bottom: -14px;
	z-index: -1;
	width: 150px;
	pointer-events: none;
	overflow: hidden;
}
.uhops--glow .uhops__side,
.uhops--sparkle .uhops__side,
.uhops--blink .uhops__side,
.uhops--line .uhops__side { display: block; }
/* 24px bagian dalam tersembunyi di balik bingkai; yang tampak hanya sisi luar */
.uhops__side--l {
	right: calc(100% - 24px);
	-webkit-mask-image: linear-gradient(to left, #000 0%, transparent 100%);
	mask-image: linear-gradient(to left, #000 0%, transparent 100%);
}
.uhops__side--r {
	left: calc(100% - 24px);
	-webkit-mask-image: linear-gradient(to right, #000 0%, transparent 100%);
	mask-image: linear-gradient(to right, #000 0%, transparent 100%);
}
.uhops__side::before,
.uhops__side::after,
.uhops__side i,
.uhops__side b { content: ""; position: absolute; inset: 0; display: none; }

/* Berpendar: denyut halus + berkas cahaya menyapu sepanjang tepi bingkai */
.uhops--glow .uhops__side::before { display: block; }
.uhops--glow .uhops__side--l::before {
	background:
		linear-gradient(to bottom, transparent, var(--uhops-accent) 50%, transparent) 0 -100% / 100% 45% no-repeat,
		radial-gradient(ellipse 100% 60% at 100% 50%, var(--uhops-accent), transparent 72%);
	animation: uhopsSweepL calc(7s * var(--uhops-fxt)) ease-in-out infinite, uhopsPulse calc(5s * var(--uhops-fxt)) ease-in-out infinite alternate;
}
.uhops--glow .uhops__side--r::before {
	background:
		linear-gradient(to bottom, transparent, var(--uhops-accent) 50%, transparent) 0 200% / 100% 45% no-repeat,
		radial-gradient(ellipse 100% 60% at 0% 50%, var(--uhops-accent), transparent 72%);
	animation: uhopsSweepR calc(7s * var(--uhops-fxt)) ease-in-out infinite, uhopsPulse calc(5s * var(--uhops-fxt)) calc(-2.5s * var(--uhops-fxt)) ease-in-out infinite alternate;
}
@keyframes uhopsSweepL {
	0%   { background-position: 0 -100%, 0 0; }
	100% { background-position: 0 200%, 0 0; }
}
@keyframes uhopsSweepR {
	0%   { background-position: 0 200%, 0 0; }
	100% { background-position: 0 -100%, 0 0; }
}
@keyframes uhopsPulse { from { opacity: .18; } to { opacity: .5; } }

/* Percikan berkilau yang melayang naik */
.uhops--sparkle .uhops__side::after {
	display: block;
	background-image:
		radial-gradient(circle, var(--uhops-accent) 0 1.4px, transparent 2.4px),
		radial-gradient(circle, var(--uhops-accent) 0 1.8px, transparent 3px),
		radial-gradient(circle, #fff 0 1px, transparent 2px);
	background-size: 74px 96px, 118px 140px, 53px 71px;
	background-position: 14px 20px, 60px 70px, 30px 10px;
	animation: uhopsRise calc(11s * var(--uhops-fxt)) linear infinite, uhopsTwinkle calc(3.2s * var(--uhops-fxt)) ease-in-out infinite alternate;
}
.uhops--sparkle .uhops__side--r::after { animation-duration: calc(14s * var(--uhops-fxt)), calc(3.8s * var(--uhops-fxt)); animation-delay: calc(-4s * var(--uhops-fxt)), calc(-1.2s * var(--uhops-fxt)); }
@keyframes uhopsRise {
	from { background-position: 14px 20px, 60px 70px, 30px 10px; }
	to   { background-position: 14px -76px, 60px -70px, 30px -61px; }
}
@keyframes uhopsTwinkle { from { opacity: .35; } to { opacity: 1; } }

/* Berkedip: titik lampu menyala-mati bergantian (dua lapis berbeda irama) */
.uhops--blink .uhops__side i,
.uhops--blink .uhops__side b { display: block; opacity: 0; }
.uhops--blink .uhops__side i {
	background-image: radial-gradient(circle, #fff 0 2px, var(--uhops-accent) 3px, transparent 8px);
	background-size: 96px 120px;
	background-position: 18px 26px;
	animation: uhopsBlinkA calc(2.6s * var(--uhops-fxt)) ease-in-out infinite;
}
.uhops--blink .uhops__side b {
	background-image: radial-gradient(circle, #fff 0 1.6px, var(--uhops-accent) 2.6px, transparent 7px);
	background-size: 83px 107px;
	background-position: 52px 78px;
	animation: uhopsBlinkB calc(3.4s * var(--uhops-fxt)) ease-in-out infinite;
}
.uhops--blink .uhops__side--r i { animation-delay: calc(-1.1s * var(--uhops-fxt)); }
.uhops--blink .uhops__side--r b { animation-delay: calc(-2s * var(--uhops-fxt)); }
@keyframes uhopsBlinkA {
	0%, 100% { opacity: 0; }
	12% { opacity: 1; }
	26% { opacity: .1; }
	40% { opacity: 1; }
	62% { opacity: 0; }
}
@keyframes uhopsBlinkB {
	0%, 100% { opacity: .9; }
	20% { opacity: 0; }
	45% { opacity: 1; }
	58% { opacity: .15; }
	78% { opacity: 1; }
}

/* Garis cahaya berdenyut tepat di tepi bingkai */
.uhops--line .uhops__side--l {
	background: linear-gradient(to right, transparent calc(100% - 36px), var(--uhops-accent) calc(100% - 26px), transparent calc(100% - 16px));
	animation: uhopsLine calc(3.6s * var(--uhops-fxt)) ease-in-out infinite alternate;
}
.uhops--line .uhops__side--r {
	background: linear-gradient(to left, transparent calc(100% - 36px), var(--uhops-accent) calc(100% - 26px), transparent calc(100% - 16px));
	animation: uhopsLine calc(3.6s * var(--uhops-fxt)) calc(-1.8s * var(--uhops-fxt)) ease-in-out infinite alternate;
}
@keyframes uhopsLine { from { opacity: .35; } to { opacity: 1; } }

@media (max-width: 600px) {
	.uhops .uhops__side { width: 60px; }
}
@media (prefers-reduced-motion: reduce) {
	.uhops .uhops__side i, .uhops .uhops__side b { display: none !important; }
}
