/* Custom Styles for Mago Vista Food Trucks */

/* Base Reset & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: #0a0e27;
}

::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2dd4bf;
}

/* Selection Color */
::selection {
    background: #14b8a6;
    color: #0a0e27;
}

/* Pulse Animations */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.05); }
}

@keyframes pulse-slower {
    0%, 100% { opacity: 0.08; transform: scale(1); }
    50% { opacity: 0.12; transform: scale(1.08); }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-pulse-slower {
    animation: pulse-slower 6s ease-in-out infinite;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.animate-bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .animate-fade-in,
    .animate-slide-up,
    .animate-slide-up-delay,
    .animate-slide-up-delay-2 {
        opacity: 1;
        animation: none;
    }
    
    .animate-pulse-slow,
    .animate-pulse-slower,
    .animate-bounce-slow {
        animation: none;
    }
}

/* Mobile Menu Transitions */
#mobileMenu {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

#mobileMenu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobileMenu:not(.hidden) {
    max-height: 400px;
    opacity: 1;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
}

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Image Hover Container */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Custom Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Card Hover Glow */
.hover\\:shadow-xl:hover {
    box-shadow: 0 20px 40px -15px rgba(20, 184, 166, 0.15);
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Prevent layout shift on images */
.aspect-\[4\/3\] {
    position: relative;
}

.aspect-\[4\/3\]::before {
    content: '';
    display: block;
    padding-top: 75%;
}

.aspect-\[4\/3\] > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.aspect-square::before {
    content: '';
    display: block;
    padding-top: 100%;
}

.aspect-square > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.aspect-\[4\/5\]::before {
    content: '';
    display: block;
    padding-top: 125%;
}

.aspect-\[4\/5\] > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
