/* Custom styles for Rocky Auto Sales */

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

/* Selection color */
::selection {
    background-color: rgba(212, 168, 67, 0.3);
    color: #fefce8;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050d0a;
}
::-webkit-scrollbar-thumb {
    background: #1a3528;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4a843;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(5, 13, 10, 0.95);
    backdrop-filter: blur(20px);
}

/* Reveal animations */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scroll reveal states (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 0;
    }
    
    .reveal-up {
        transform: translateY(30px);
    }
    
    .reveal-left {
        transform: translateX(-30px);
    }
    
    .reveal-right {
        transform: translateX(30px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0);
    }
}

/* Nav link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #d4a843, #e2be6a);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

/* Gold gradient text helper */
.gold-gradient {
    background: linear-gradient(135deg, #e2be6a, #d4a843, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover glow */
.group:hover .group-hover\:from-emerald-500\/30 {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.group:hover .group-hover\:from-gold-500\/30 {
    box-shadow: 0 0 30px rgba(212, 168, 67, 0.1);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

/* Select dropdown styling */
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='%23d4a843' 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;
}

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

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

/* Map contrast fix */
iframe[title*="map"] {
    background: #0a1410;
}
