/* Custom styles for Magnum Automotive */

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

/* Hide scrollbar for mobile menu */
body.menu-open {
    overflow: hidden;
}

/* Navbar styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(4, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 164, 78, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8a44e, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #c8a44e, #e0cc86);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom select styling */
select option {
    background: #0f1f36;
    color: #fff;
}

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

/* Selection color */
::selection {
    background: rgba(200, 164, 78, 0.3);
    color: #fff;
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .service-card::before {
        display: none;
    }
    
    .service-card:hover::before {
        opacity: 0;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

/* Map dark mode override */
iframe[title*="Google Maps"] {
    border-radius: 0.75rem;
}

/* Ensure all text is readable */
h1, h2, h3, h4 {
    color: #fff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

/* Gold accent line animation on hover */
a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    text-decoration: none;
}

/* Ensure hero image doesn't cause layout shift */
#hero img {
    will-change: transform;
}

/* Performance optimizations */
.service-card,
.reveal {
    will-change: transform, opacity;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .reveal {
        will-change: transform, opacity;
    }
}
