/* ==========================================================================
   HEYZINE-STYLE VIEWPORT-FIT FLIPBOOK CSS (On-Demand Shimmer & Zero Clipping)
   ========================================================================== */

.about-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.heyzine-stage {
  position: relative;
  width: 100vw;
  height: calc(100vh - 56px);
  min-height: 520px;
  margin-left: 50%;
  transform: translateX(-50%);
  margin-bottom: 3rem;

  background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 55%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 14px;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}

.heyzine-stage:fullscreen,
.heyzine-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  transform: none;
  padding: 20px 32px 16px;
}

/* Card Info Latar Kiri */
.heyzine-backdrop-info {
  position: absolute;
  top: 28px;
  left: 32px;
  width: 300px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  padding: 22px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.heyzine-backdrop-info h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 500;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.heyzine-backdrop-info .backdrop-url {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #475569;
}

.heyzine-backdrop-info .backdrop-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #64748b;
  text-align: justify;
}

/* Floating Top-Right Toolbar Pill */
.heyzine-top-controls {
  position: absolute;
  top: 18px;
  right: 28px;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  z-index: 30;
}

.hz-icon-btn {
  background: transparent;
  border: none;
  color: #1e293b;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.hz-icon-btn:hover {
  background: #f1f5f9;
  color: #0284c7;
}

.hz-icon-btn.is-muted {
  color: #94a3b8;
}

/* Initial Loader */
.flipbook-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 500;
  z-index: 25;
}

.flipbook-loader i {
  font-size: 2rem;
  color: #0f172a;
}

.flipbook-loader.is-hidden {
  display: none;
}

/* Area Utama Buku */
.heyzine-book-wrapper {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.heyzine-book-wrapper.is-ready {
  opacity: 1;
}

.heyzine-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

/* ==========================================================================
   GPU DROP-SHADOW & BUKA-TUTUP COVER TENGAH
   ========================================================================== */
.flipbook-canvas {
  position: relative;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 18px 32px rgba(15, 23, 42, 0.22))
          drop-shadow(0 4px 10px rgba(15, 23, 42, 0.1));
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.flipbook-canvas.is-closed-front {
  transform: translateX(-25%);
}

.flipbook-canvas.is-closed-back {
  transform: translateX(25%);
}

.flipbook-canvas.is-open-spread {
  transform: translateX(0);
}

/* ==========================================================================
   ELEMEN HALAMAN & SKELETON SHIMMER (Anti Blank / Anti Separuh Putih)
   ========================================================================== */
.flipbook-page {
  background-color: #ffffff;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  backface-visibility: hidden;
}

/* Skeleton Shimmer saat halaman sedang diambil on-demand di background */
.flipbook-page.is-loading::before {
  content: attr(data-page-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.05em;
  background: linear-gradient(
    90deg,
    #f8fafc 25%,
    #f1f5f9 50%,
    #f8fafc 75%
  );
  background-size: 200% 100%;
  animation: hzPageShimmer 1.4s infinite linear;
  z-index: 2;
}

@keyframes hzPageShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Efek Tumpukan Kertas (Paper Stack Edge) */
.flipbook-page.is-inner-page.is-left-page {
  box-shadow: inset 3px 0 0 #e2e8f0, inset 5px 0 0 #cbd5e1;
}

.flipbook-page.is-inner-page.is-right-page {
  box-shadow: inset -3px 0 0 #e2e8f0, inset -5px 0 0 #cbd5e1;
}

/* Gambar dikunci absolute inset:0 agar 100% memenuhi halaman tanpa pernah terpotong */
.flipbook-page img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.flipbook-page.is-loaded img {
  opacity: 1;
}

/* Efek Lipatan Jilid Tengah (Spine Crease) */
.page-spine-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.flipbook-page.is-inner-page.is-left-page .page-spine-overlay {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 82%,
    rgba(255, 255, 255, 0.25) 91%,
    rgba(0, 0, 0, 0.07) 96%,
    rgba(0, 0, 0, 0.28) 100%
  );
}

.flipbook-page.is-inner-page.is-right-page .page-spine-overlay {
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0) 82%,
    rgba(255, 255, 255, 0.22) 91%,
    rgba(0, 0, 0, 0.07) 96%,
    rgba(0, 0, 0, 0.26) 100%
  );
}

.flipbook-page.is-cover-page.is-right-page .page-spine-overlay {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(255, 255, 255, 0.35) 1.5%,
    rgba(0, 0, 0, 0.18) 3%,
    rgba(0, 0, 0, 0) 8%
  );
}

.flipbook-page.is-cover-page.is-left-page .page-spine-overlay {
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(255, 255, 255, 0.35) 1.5%,
    rgba(0, 0, 0, 0.18) 3%,
    rgba(0, 0, 0, 0) 8%
  );
}

/* Navigasi Bawah: Tombol Lipatan & Slider Bar */
.heyzine-bottom-bar {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 30;
  margin-top: 8px;
}

.hz-curl-btn {
  background: transparent;
  border: none;
  color: #334155;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.hz-curl-btn:hover:not(:disabled) {
  color: #0f172a;
  transform: scale(1.15);
}

.hz-curl-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.hz-progress-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hz-progress-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: #cbd5e1;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.hz-progress-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 42px;
  height: 7px;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hz-progress-slider::-webkit-slider-thumb:hover {
  background: #0f172a;
  transform: scaleY(1.2);
}

.hz-page-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  min-width: 64px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Responsive Tablet & Mobile */
@media (max-width: 1180px) {
  .heyzine-backdrop-info {
    display: none;
  }
}

@media (max-width: 768px) {
  .heyzine-stage {
    height: calc(100vh - 50px);
    padding: 10px 10px 12px;
  }

  .flipbook-canvas.is-closed-front,
  .flipbook-canvas.is-closed-back {
    transform: translateX(0);
  }

  .heyzine-top-controls {
    top: 10px;
    right: 10px;
    padding: 4px 6px;
  }
}