/* ============================================
   Centered Open Book — Page Turn Slider
   Right page flips right → left
   ============================================ */

.book-slider-section {
  margin-top: var(--header-h);
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-h));
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(160deg, #0a1628 0%, #1a5276 40%, #0e3450 100%);
}

/* Stage with 3D perspective — full width */
.book-stage {
  width: 100%;
  height: 100%;
  position: relative;
  perspective: 2200px;
  perspective-origin: 50% 50%;
  padding: 0 0 72px;
}

/* Open book — edge to edge full width */
.book {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Shared page sheet styles */
.book-sheet {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  background: #1a1a2e;
}

.book-sheet .page-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.book-sheet .page-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 52, 80, 0.82) 0%,
    rgba(26, 82, 118, 0.65) 100%
  );
}

.book-sheet .page-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  z-index: 2;
}

.book-sheet .page-content-inner {
  text-align: center;
  color: #fff;
  max-width: 100%;
}

.book-sheet .page-content-inner h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.book-sheet .page-content-inner p {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  opacity: 0.92;
  margin-bottom: 24px;
  line-height: 1.7;
}

.book-sheet .hero-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.book-sheet .hero-buttons .btn {
  min-width: 120px;
  padding: 10px 18px;
  font-size: 0.82rem;
}

/* ---- LEFT PAGE (static) ---- */
.book-left {
  left: 0;
  border-radius: 0;
  box-shadow: inset -8px 0 20px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.book-left .page-content-inner h1 {
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
}

/* Left page shows image only — no heavy text overlay */
.book-left .page-overlay {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15));
}

.book-left .page-content {
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 24px;
  padding-left: 20px;
}

.book-left .page-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ---- RIGHT BASE (underneath flip page) ---- */
.book-right-base {
  right: 0;
  border-radius: 0;
  z-index: 2;
  box-shadow: inset 8px 0 20px rgba(0, 0, 0, 0.15);
}

/* ---- FLIPPING RIGHT PAGE ---- */
.book-flip {
  right: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 1.1s cubic-bezier(0.645, 0.045, 0.355, 1);
  z-index: 5;
  border-radius: 0;
}

.book-flip.flipping {
  transform: rotateY(-180deg);
}

.book-flip.flipping-reverse {
  transform: rotateY(0deg);
}

/* Front & back faces of flip page */
.book-flip .page-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  overflow: hidden;
  border-radius: 0;
}

.book-flip .page-front {
  z-index: 2;
}

.book-flip .page-back {
  transform: rotateY(180deg);
  border-radius: 0;
}

/* Curl shadow while turning */
.book-flip::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.45), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 10;
}

.book-flip.flipping::after {
  opacity: 1;
}

/* Page edge highlight during flip */
.book-flip.flipping .page-front::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
  z-index: 5;
}

/* ---- CENTER SPINE ---- */
.book-spine {
  position: absolute;
  left: 50%;
  top: -2%;
  width: 14px;
  height: 104%;
  transform: translateX(-50%);
  background: linear-gradient(
    to right,
    #0a0a12 0%,
    #2c2c3a 20%,
    #1a1a28 50%,
    #2c2c3a 80%,
    #0a0a12 100%
  );
  z-index: 20;
  border-radius: 2px;
  box-shadow:
    -3px 0 8px rgba(0, 0, 0, 0.5),
    3px 0 8px rgba(0, 0, 0, 0.5);
}

/* Book bottom shadow */
.book::before {
  display: none;
}

/* Cover state — first slide left shows brand */
.book-left.is-cover .page-overlay {
  background: linear-gradient(135deg, rgba(14, 52, 80, 0.92), rgba(26, 82, 118, 0.85));
}

.book-left.is-cover .cover-brand {
  text-align: center;
  padding: 20px;
}

.book-left.is-cover .cover-brand .cover-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), #b8860b);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
}

.book-left.is-cover .cover-brand h2 {
  font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  color: #fff;
  margin-bottom: 6px;
}

.book-left.is-cover .cover-brand span {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ---- Controls ---- */
.slider-controls {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 100;
}

.slider-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.slider-dots {
  display: flex;
  gap: 10px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.slider-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}

.slider-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 100;
  width: 0%;
}

/* Hint text */
.book-hint {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 50;
  pointer-events: none;
}

@media (max-width: 768px) {
  .book-slider-section {
    min-height: 460px;
  }

  .book-stage {
    padding-bottom: 68px;
  }

  .book-sheet .page-content {
    padding: 16px 14px;
  }

  .book-sheet .hero-buttons .btn {
    min-width: 100px;
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .book-spine {
    width: 10px;
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .book-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .book-sheet .page-content-inner h1 {
    font-size: 1.1rem;
  }

  .book-sheet .page-content-inner p {
    font-size: 0.85rem;
    margin-bottom: 14px;
  }

  .book-left .page-content {
    display: none;
  }
}
