/* ===== Flipbook Portfolio — frontend ===== */

.fbp-carousel {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 48px;
}

.fbp-track {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 8px 4px 16px;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}
.fbp-track::-webkit-scrollbar { height: 6px; }
.fbp-track::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .22); border-radius: 3px; }

.fbp-card {
	flex: 0 0 calc((100% - 36px) / var(--fbp-cols, 3));
	scroll-snap-align: start;
	cursor: pointer;
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .10);
	transition: transform .18s ease, box-shadow .18s ease;
	outline: none;
}
.fbp-card:hover, .fbp-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
@media (max-width: 768px) {
	.fbp-card { flex-basis: calc((100% - 18px) / 2); }
}
@media (max-width: 480px) {
	.fbp-card { flex-basis: 100%; }
}

.fbp-cover {
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #eef0f4;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.fbp-cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}
.fbp-cover-auto {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #2b3a67, #1b2340);
	color: #fff;
	font-size: 13px;
}
.fbp-cover-auto img { width: 100%; height: 100%; object-fit: cover; }
.fbp-cover-fallback {
	padding: 12px;
	text-align: center;
	font-weight: 600;
	opacity: .8;
}

.fbp-meta {
	padding: 10px 12px 12px;
}
.fbp-title {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}
.fbp-client {
	font-size: 12px;
	opacity: .62;
	margin-top: 2px;
}

.fbp-open {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	opacity: 0;
	transition: opacity .18s ease;
}
.fbp-card:hover .fbp-open, .fbp-card:focus-visible .fbp-open { opacity: 1; }

.fbp-prev, .fbp-next {
	position: absolute;
	top: 42%;
	z-index: 5;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: #222;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, opacity .15s ease;
}
.fbp-prev { left: 2px; }
.fbp-next { right: 2px; }
.fbp-prev:hover, .fbp-next:hover { background: #f2f4f8; }
.fbp-prev:disabled, .fbp-next:disabled { opacity: .3; cursor: default; }

.fbp-empty { padding: 24px; text-align: center; color: #777; }

/* ===== Modal ===== */
.fbp-modal {
	position: fixed;
	inset: 0;
	background: rgba(8, 10, 18, .94);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.fbp-modal-box {
	position: relative;
	width: min(1040px, 100%);
	max-height: 94vh;
	display: flex;
	flex-direction: column;
}
.fbp-modal-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	color: #fff;
	padding: 4px 4px 14px;
}
.fbp-modal-title { font-size: 17px; font-weight: 600; }
.fbp-modal-client { opacity: .6; font-weight: 400; }
.fbp-modal-close {
	background: rgba(255, 255, 255, .12);
	border: none;
	color: #fff;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	font-size: 15px;
	cursor: pointer;
	flex: none;
	transition: background .15s ease;
}
.fbp-modal-close:hover { background: rgba(255, 255, 255, .24); }

.fbp-modal-stage {
	position: relative;
	width: 100%;
	background: #20242e;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}

/* Halaman diukur inline oleh PageFlip (.stf__item) — jangan override.
   Canvas mengisi item; object-fit contain menjaga rasio PDF. */
.fbp-page canvas {
	width: 100%;
	height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.fbp-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border: 4px solid rgba(255, 255, 255, .15);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fbp-spin .8s linear infinite;
	z-index: 5;
}
@keyframes fbp-spin { to { transform: rotate(360deg); } }

.fbp-progress {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	color: #cfd4de;
	font-size: 13px;
	z-index: 70;
	background: rgba(0, 0, 0, .35);
	padding: 3px 10px;
	border-radius: 12px;
	white-space: nowrap;
}

.fbp-watermark {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 60;
}
.fbp-watermark span {
	transform: rotate(-24deg);
	font-size: clamp(16px, 3.5vw, 40px);
	color: rgba(255, 255, 255, .15);
	letter-spacing: .35em;
	text-transform: uppercase;
	white-space: nowrap;
	user-select: none;
	text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

.fbp-modal-foot {
	color: #9aa1b0;
	font-size: 12px;
	text-align: center;
	padding-top: 12px;
}
