/* Custom styles for Precision Motor Works */

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

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

::-webkit-scrollbar-track {
    background: #0D0D0D;
}

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

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

/* Selection color */
::selection {
    background: rgba(192, 123, 81, 0.3);
    color: #E8D5C4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Gold gradient text animation */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background-size: 200% auto;
    animation: shimmer 4s linear infinite;
}

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

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-bg {
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Card hover glow */
.card-glow:hover {
    box-shadow: 0 0 40px rgba(192, 123, 81, 0.15) !important;
}

/* Pulse ring animation */
@keyframes pulseRing {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

.pulse-ring {
    animation: pulseRing 2s ease-in-out infinite;
}

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

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

/* Ensure select dropdown is styled properly */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B8A494' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Map filter for dark theme */
iframe[src*="google.com/maps"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

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

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