/* Custom styles for Langlois Auto Body & Auto Sales */

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

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: #0f172a;
}

#navbar.scrolled .nav-link:hover {
    color: #16914e;
    background: #e1fbec;
}

#navbar.scrolled .logo-text {
    color: #0f172a;
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Vehicle card hover effects */
.vehicle-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.vehicle-card:hover {
    transform: translateY(-6px);
}

/* Testimonial card hover */
.testimonial-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

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

#mobileMenu.hidden {
    animation: slideUp 0.3s ease forwards;
}

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

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

/* Mobile links */
.mobile-link {
    transform: translateX(-10px);
    opacity: 0;
    animation: fadeInLeft 0.3s ease forwards;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-link:nth-child(5) { animation-delay: 0.25s; }
.mobile-link:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Selection color */
::selection {
    background: #52d48f;
    color: #061d33;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7ca0c1;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f0f4f8 inset !important;
    -webkit-text-fill-color: #0f172a !important;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #52d48f;
    outline-offset: 2px;
}

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

/* Subtle entrance animations */
.service-card,
.vehicle-card,
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
}

.service-card.visible,
.vehicle-card.visible,
.testimonial-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1).visible { animation-delay: 0.05s; }
.service-card:nth-child(2).visible { animation-delay: 0.1s; }
.service-card:nth-child(3).visible { animation-delay: 0.15s; }
.service-card:nth-child(4).visible { animation-delay: 0.2s; }
.service-card:nth-child(5).visible { animation-delay: 0.25s; }
.service-card:nth-child(6).visible { animation-delay: 0.3s; }

.vehicle-card:nth-child(1).visible { animation-delay: 0.05s; }
.vehicle-card:nth-child(2).visible { animation-delay: 0.15s; }
.vehicle-card:nth-child(3).visible { animation-delay: 0.25s; }

.testimonial-card:nth-child(1).visible { animation-delay: 0.05s; }
.testimonial-card:nth-child(2).visible { animation-delay: 0.15s; }
.testimonial-card:nth-child(3).visible { animation-delay: 0.25s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero section animation */
#hero > .relative > .max-w-7xl > .grid > div:first-child > * {
    opacity: 0;
    animation: heroFadeIn 0.8s ease forwards;
}

#hero > .relative > .max-w-7xl > .grid > div:first-child > *:nth-child(1) { animation-delay: 0.1s; }
#hero > .relative > .max-w-7xl > .grid > div:first-child > *:nth-child(2) { animation-delay: 0.2s; }
#hero > .relative > .max-w-7xl > .grid > div:first-child > *:nth-child(3) { animation-delay: 0.3s; }
#hero > .relative > .max-w-7xl > .grid > div:first-child > *:nth-child(4) { animation-delay: 0.4s; }
#hero > .relative > .max-w-7xl > .grid > div:first-child > *:nth-child(5) { animation-delay: 0.5s; }

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

/* Hero image animation */
#hero > .relative > .max-w-7xl > .grid > div:last-child {
    opacity: 0;
    animation: heroImageIn 1s ease 0.3s forwards;
}

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
