/* Custom styles for M & M Autoservices */

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

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

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

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

/* Selection color */
::selection {
    background: #fbbf24;
    color: #022c22;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible even without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(2, 44, 34, 0.95) !important;
    backdrop-filter: blur(20px);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Gold gradient text effect */
.text-gold-gradient {
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover card glow effect */
.group:hover .group-hover\\:shadow-gold {
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.15);
}

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

/* Form focus animations */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
}

/* Image hover overlay */
.aspect-\[4\/5\] img,
.aspect-\[16\/11\] img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button ripple effect */
button::after,
a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(251, 191, 36, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Mobile menu animations */
#mobile-menu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Print styles */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-charcoal, .bg-forest-900 {
        background: white !important;
    }
    
    .text-offwhite, .text-offwhite\/70, .text-offwhite\/60, .text-offwhite\/50, .text-offwhite\/30 {
        color: black !important;
    }
    
    .text-gold-400 {
        color: #333 !important;
    }
}
