/* FLIPBOOK SECTION */
.flipbook-section {
  padding: 80px 0;
  /* background-color: var(--light); */
}

.flipbook-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.book-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  opacity: 0;
  visibility: visible;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.book-wrapper.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#book {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: transparent;
}

.loading-flipbook {
  text-align: center;
  padding: 100px 20px;
  color: var(--dark);
  font-size: 1.2rem;
}

.loading-flipbook::after {
  content: "...";
  animation: dotsFlipbook 1.5s steps(4, end) infinite;
}

@keyframes dotsFlipbook {
  0%,
  20% {
    content: ".";
  }

  40% {
    content: "..";
  }

  60%,
  100% {
    content: "...";
  }
}

.flipbook-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUpFlipbook 0.8s ease 0.6s forwards;
}

.flipbook-btn {
  padding: 14px 32px;
  background: var(--dark);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.flipbook-btn:hover {
  background: var(--pink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(199, 56, 123, 0.3);
}

.flipbook-btn:active {
  transform: translateY(0);
}

.flipbook-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.page-indicator {
  font-family: "Gotham", sans-serif;
  color: var(--dark);
  font-size: 1.1rem;
  min-width: 150px;
  text-align: center;
  font-weight: 700;
}

.page {
  background: #fff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.error-message {
  text-align: center;
  padding: 40px;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.error-message h2 {
  font-family: "Gotham", sans-serif;
  margin-bottom: 20px;
  color: #c0392b;
}

@keyframes fadeInUpFlipbook {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .flipbook-section {
    padding: 60px 0;
  }

  .book-wrapper {
    margin-bottom: 20px;
  }

  #book {
    max-width: 100%;
  }

  .flipbook-controls {
    gap: 12px;
  }

  .flipbook-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .page-indicator {
    min-width: 90px;
    font-size: 0.95rem;
  }
}
