/* Custom styles for door.html hero section */
#zoom-out-hero {
  background-image: url('images/HUNC6296.jpg') !important;
  background-size: cover;
  background-position: top center;
  animation: zoomOutEffect 20s ease-out forwards;
  transform-origin: center center;
}

@keyframes zoomOutEffect {
  0% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* 3D Book Gallery Styles */
.book-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}

/* Book Key Decorations */
.book-key-decoration {
  position: absolute;
  font-size: 32px; /* Increased size */
  color: #d4af37; /* More vibrant gold color */
  opacity: 0.35; /* Increased opacity to make more visible */
  z-index: 0;
  animation: floatKey 8s ease-in-out infinite;
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.5); /* Added glow effect */
}

.book-key-decoration.key-1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}
.book-key-decoration.key-2 {
  top: 25%;
  left: 80%;
  animation-delay: 1s;
}
.book-key-decoration.key-3 {
  top: 65%;
  left: 15%;
  animation-delay: 2s;
}
.book-key-decoration.key-4 {
  top: 45%;
  left: 75%;
  animation-delay: 3s;
}
.book-key-decoration.key-5 {
  top: 85%;
  left: 25%;
  animation-delay: 1.5s;
}
.book-key-decoration.key-6 {
  top: 5%;
  left: 40%;
  animation-delay: 2.5s;
}

/* Additional 10 keys */
.book-key-decoration.key-7 {
  top: 15%;
  left: 60%;
  animation-delay: 1.2s;
}
.book-key-decoration.key-8 {
  top: 35%;
  left: 8%;
  animation-delay: 2.8s;
}
.book-key-decoration.key-9 {
  top: 55%;
  left: 90%;
  animation-delay: 0.7s;
}
.book-key-decoration.key-10 {
  top: 75%;
  left: 55%;
  animation-delay: 3.2s;
}
.book-key-decoration.key-11 {
  top: 92%;
  left: 70%;
  animation-delay: 1.8s;
}
.book-key-decoration.key-12 {
  top: 18%;
  left: 28%;
  animation-delay: 2.3s;
  transform: rotate(45deg);
}
.book-key-decoration.key-13 {
  top: 38%;
  left: 45%;
  animation-delay: 3.7s;
  transform: rotate(-30deg);
}
.book-key-decoration.key-14 {
  top: 68%;
  left: 35%;
  animation-delay: 1.5s;
  transform: rotate(15deg);
}
.book-key-decoration.key-15 {
  top: 82%;
  left: 85%;
  animation-delay: 2.9s;
  transform: rotate(-45deg);
}
.book-key-decoration.key-16 {
  top: 8%;
  left: 78%;
  animation-delay: 0.5s;
  transform: rotate(25deg);
}

@keyframes floatKey {
  0%,
  100% {
    transform: translateY(0) rotate(0);
    color: #d4af37; /* Standard gold */
  }
  50% {
    transform: translateY(-15px) rotate(15deg);
    color: #f0d776; /* Slightly brighter gold for shine effect */
  }
}

.book-display {
  position: relative;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
  z-index: 1;
}

.interactive-book {
  width: 300px;
  height: 400px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-12deg) rotateX(5deg);
  transition: transform 1.5s ease;
  cursor: pointer;
}

.interactive-book.flipped {
  transform: rotateY(168deg) rotateX(5deg);
}

.interactive-book div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: visible;
}

.book-front,
.book-back {
  backface-visibility: hidden;
  overflow: hidden;
}

.book-front {
  transform: rotateY(0deg) translateZ(15px);
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
}

.book-back {
  transform: rotateY(180deg) translateZ(15px);
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4);
}

.book-front img,
.book-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-shadow {
  position: absolute;
  width: 330px;
  height: 80px;
  bottom: -20px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  transform: rotateX(90deg);
  filter: blur(15px);
  opacity: 0.6;
  transition: all 1.5s ease;
}

.interactive-book.flipped + .book-shadow {
  transform: rotateX(90deg) rotateY(180deg);
}

.flip-instruction {
  position: absolute;
  bottom: -40px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.book-display:hover .flip-instruction {
  opacity: 1;
}

.book-cta {
  color: #fff;
  padding: 20px;
  position: relative;
}

.book-cta h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #d4af37;
  letter-spacing: 1px;
}

.book-cta .tagline {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 20px;
  color: #e0e0e0;
}

.book-description {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 30px;
}

.book-cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(45deg, #d4af37, #f5d76e);
  color: #000 !important;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.book-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Remove yellow 3D cross (spine + top/bottom faces) */
.book-spine,
.book-side-top,
.book-side-bottom {
  display: none !important;
}

@media (max-width: 992px) {
  .book-gallery {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .book-display {
    height: 400px;
  }

  .interactive-book {
    width: 250px;
    height: 350px;
  }
}

/* WhatsApp Floating Chat Button */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-icon {
  font-size: 32px;
  color: white;
}

.whatsapp-tooltip {
  position: absolute;
  right: 75px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.whatsapp-button:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}
