/* Custom styles for Jdp Auto Sales Inc. */

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

/* Ensure all text is readable */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

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

.reveal.animated {
    opacity: 0;
    transform: translateY(20px);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #9dba7e;
    border-radius: 4px;
}

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

/* Hero parallax-like effect */
#hero {
    will-change: transform;
}

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

/* Ensure proper contrast on all backgrounds */
.bg-forest-800,
.bg-forest-900,
.bg-forest-950 {
    color: white;
}

.bg-forest-50,
.bg-offwhite-50,
.bg-white {
    color: #1f3416;
}

/* Mobile menu link styles */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(157, 186, 126, 0.2);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}
