/* Custom styles for RubKar Dealership website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #bfe0c3;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8ec79a;
}

/* Selection color */
::selection {
    background: #bfe0c3;
    color: #1d4529;
}

/* Nav active state */
.nav-link.active {
    background: #dcefdf;
    color: #1d4529;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%232c6e40' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

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

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

/* Scroll reveal base - content always visible by default */
.reveal {
    /* Default: visible, no animation */
}

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal.animate {
        animation: fadeUp 0.7s ease-out forwards;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.reveal.animate:nth-child(1) { animation-delay: 0.05s; }
.reveal.animate:nth-child(2) { animation-delay: 0.15s; }
.reveal.animate:nth-child(3) { animation-delay: 0.25s; }
.reveal.animate:nth-child(4) { animation-delay: 0.35s; }
.reveal.animate:nth-child(5) { animation-delay: 0.45s; }
.reveal.animate:nth-child(6) { animation-delay: 0.55s; }

/* Header scrolled state */
#site-header.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(28, 69, 41, 0.08);
}

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

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5fa872;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
