/* Custom CSS for Macias Auto Sales */

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

/* Custom animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(45deg);
    }
    50% {
        transform: translateY(-20px) rotate(45deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(12deg);
    }
    50% {
        transform: translateY(-15px) rotate(12deg);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(45deg);
    }
    to {
        transform: rotate(405deg);
    }
}

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

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

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

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

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 5px;
}

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

/* Focus styles */
*:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, .animate-float, .animate-float-delayed, .animate-spin-slow {
        display: none;
    }
    
    body {
        color: #064e3b;
        background: white;
    }
}

/* 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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-cream-50 {
        background-color: #ffffff;
    }
    
    .text-emerald-700\/70 {
        color: #065f46;
    }
}

/* Tablet and up */
@media (min-width: 768px) {
    .lg\:hover\:bg-emerald-50:hover {
        background-color: #ecfdf5;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Navigation background */
.nav-scrolled #nav-bg {
    transform: translate-y(0);
    opacity: 1;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background-color: #059669;
    color: #fdfcf8;
}
