/* Custom styles for K and S Auto and Repair */

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

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure default visibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .text-forest-900,
#navbar.scrolled .text-lg.font-serif {
    color: #1f3318;
}

#navbar.scrolled .text-forest-600,
#navbar.scrolled a:not(.bg-forest-700) {
    color: #4d7d3a;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #98be86;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a9c54;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4d7d3a;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #c5dbb8;
    color: #1f3318;
}
