/* Custom styles for Nelson Trailer Repair */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f0d;
}
::-webkit-scrollbar-thumb {
    background: #1e3a2f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4a853;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(400%); opacity: 0; }
}
.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(10, 15, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Nav link hover effect */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #d4a853, #e8c77b);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.mobile-menu-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open span:nth-child(2) {
    opacity: 0;
}
.menu-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for service cards */
.reveal-stagger {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-stagger.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Gold shimmer effect on hover for CTA buttons */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Selection color */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #f5f0e8;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 2px;
}

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

/* Image lazy load fade-in */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

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