/* Custom Styles for Over The Moon Deals */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation classes */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Reveal animations - Progressive enhancement, content visible by default */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        animation: fadeInUp 0.8s ease-out forwards;
    }
    
    .reveal-left {
        opacity: 1;
        animation: fadeInLeft 0.8s ease-out forwards;
    }
    
    .reveal-right {
        opacity: 1;
        animation: fadeInRight 0.8s ease-out forwards;
    }
}

/* Staggered animation delays */
.reveal-up:nth-child(1) { animation-delay: 0.1s; }
.reveal-up:nth-child(2) { animation-delay: 0.2s; }
.reveal-up:nth-child(3) { animation-delay: 0.3s; }
.reveal-up:nth-child(4) { animation-delay: 0.4s; }
.reveal-up:nth-child(5) { animation-delay: 0.5s; }
.reveal-up:nth-child(6) { animation-delay: 0.6s; }

.reveal-left:nth-child(1) { animation-delay: 0.1s; }
.reveal-left:nth-child(2) { animation-delay: 0.2s; }
.reveal-left:nth-child(3) { animation-delay: 0.3s; }

.reveal-right:nth-child(1) { animation-delay: 0.1s; }
.reveal-right:nth-child(2) { animation-delay: 0.2s; }

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f4f7fa;
}

::-webkit-scrollbar-thumb {
    background: #2a3d61;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #fbbf24;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Image lazy loading placeholder */
img {
    background: linear-gradient(90deg, #e3eaf0 0%, #f4f7fa 50%, #e3eaf0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[loading="lazy"].loaded {
    animation: none;
    background: none;
}

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

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

/* Card hover effects */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Button ripple effect */
button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    border-radius: inherit;
}

button:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease-in-out;
}

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}
