/* Custom styles for E&R Motor And Transmission Rebuild */

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

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

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(4, 120, 87, 0.1);
}

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

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

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

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

/* Selection color */
::selection {
    background: #047857;
    color: #FDF8F0;
}

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

#mobileMenu.open {
    max-height: 400px;
    padding: 1rem 0;
}

/* Geometric floating animation delays */
.animate-float-1 { animation-delay: 0s; }
.animate-float-2 { animation-delay: -2s; }
.animate-float-3 { animation-delay: -4s; }
.animate-float-4 { animation-delay: -1s; }

/* Form focus styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

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

/* Ensure images don't shift layout */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion preference */
@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;
    }
}
