/* Custom styles for Bennett's Auto Repair Plus */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f6f7f9;
}
::-webkit-scrollbar-thumb {
    background: #e2e4e8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c0c4cc;
}

/* Selection color */
::selection {
    background: #ff4d6d;
    color: white;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar glass effect when scrolled */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Mobile nav links */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f6f7f9;
}
.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Input autofill style */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

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

/* Subtle hover underline for links */
a:not(.bg-coral-500):not(.bg-white\\/10):not(.bg-white\\/20) {
    text-decoration: none;
}

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

/* Animation for hero elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in,
    .fade-in-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .group:hover {
        transform: none;
    }
    a:hover {
        transform: none;
    }
}
