/* Custom styles for Books By The Bay */

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
    50% { transform: translateY(-12px) rotate(var(--rotate, 0deg)); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1s;
    animation-duration: 4.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 5s;
}

.floating-card:nth-child(4) {
    animation-delay: -0.5s;
    animation-duration: 3.5s;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(30, 58, 138, 0.08);
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom selection color */
::selection {
    background: #fbbf24;
    color: #1e3a8a;
}

/* Subtle gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #1e3a8a 0%, #5c7cfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image hover zoom container */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.7s ease;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Contact form focus styles */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(92, 124, 250, 0.15);
}

/* Subtle pattern overlay */
.pattern-overlay {
    background-image: radial-gradient(circle at 1px 1px, rgba(30, 58, 138, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}
