/* Custom styles for A&M Auto Repair */

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

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 1s;
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(74, 25, 66, 0.08);
}

.navbar-scrolled .text-plum-700 {
    color: #4a1942 !important;
}

.navbar-scrolled .font-serif.text-xl.font-semibold {
    color: #4a1942 !important;
}

.navbar-scrolled .font-serif.text-xl.font-light {
    color: #864f80 !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #bd96bc;
}

/* Selection color */
::selection {
    background: #d4a017;
    color: #1a0a19;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Service card hover underline effect */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #d4a017;
    transition: all 0.4s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

.service-card:hover::after {
    width: 60%;
}

.service-card {
    position: relative;
}

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

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
    transform: scale(0.98);
}
