/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f8f8f8;
  color: #1a1a1a;
  line-height: 1.5;
  overflow-x: hidden;
  min-width: 320px;
}

.wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* Container */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  /* background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
}

.logo img {
  max-width: 180px;
  height: auto;
  display: block;
}

.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Buttons (General) */
.btn {
  background: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.btn:hover {
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12),
    inset 0 -1px 2px rgba(0, 0, 0, 0.07),
    inset 0 1px 2px rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Book Container */
.book-container {
  margin: 20px auto;
  width: 100%;
  max-width: 800px;
  height: 500px;
  position: relative;
  padding: 0 10px;
}

/* Turn.js Pages */
#book {
  width: 100%;
  height: 100%;
}

#book .turn-page {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#book .turn-page img.zoomable {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: auto;
}

/* Remove Gradients */
#book .even .gradient,
#book .odd .gradient {
  display: none;
}

/* Navigation Buttons */
.next-button,
.previous-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease, transform 0.3s ease;
}

.next-button:hover,
.previous-button:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.next-button:active,
.previous-button:active {
  transform: translateY(-50%) scale(0.95);
}

.next-button {
  right: 10px;
}

.previous-button {
  left: 10px;
}

.next-button::after,
.previous-button::after {
  content: "";
  width: 24px;
  height: 24px;
  background-size: contain;
}

.next-button::after {
  background-image: url("https://www.virgolam.com/catalogue/img/next.png");
}

.previous-button::after {
  background-image: url("https://www.virgolam.com/catalogue/img/previous.png");
}

.next-button:focus,
.previous-button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Page Controls */
.page-controls {
  text-align: center;
margin: 112px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.page-controls button {
  background: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-controls button:hover {
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12),
    inset 0 -1px 2px rgba(0, 0, 0, 0.07),
    inset 0 1px 2px rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.page-controls button:active {
  transform: scale(0.98);
}

.page-controls button:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.page-controls #pageIndicator {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media (max-width: 900px) {
  .book-container {
    max-width: 100%;
    margin: 10px auto;
    height: 400px;
  }

  .next-button {
    right: 5px;
  }

  .previous-button {
    left: 5px;
  }

  .next-button,
  .previous-button {
    width: 40px;
    height: 40px;
  }

  .next-button::after,
  .previous-button::after {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px;
    min-height: 80px;
  }

  .logo img {
    max-width: 140px;
  }

  .header-buttons {
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .book-container {
    margin: 8px auto;
    padding: 0 5px;
    height: 350px;
  }

  .next-button,
  .previous-button {
    width: 36px;
    height: 36px;
  }

  .next-button::after,
  .previous-button::after {
    width: 18px;
    height: 18px;
  }

  .page-controls {
    gap: 8px;
  }

  .page-controls button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .page-controls #pageIndicator {
    font-size: 13px;
    padding: 6px 10px;
  }
}

@media (max-width: 400px) {
  .logo img {
    max-width: 120px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .book-container {
    height: 300px;
  }

  .next-button,
  .previous-button {
    width: 32px;
    height: 32px;
  }

  .next-button::after,
  .previous-button::after {
    width: 16px;
    height: 16px;
  }

  .page-controls button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .page-controls #pageIndicator {
    font-size: 12px;
    padding: 5px 8px;
  }
}