/* Custom Styles for Smiths Auto Sales */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0f0d;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

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

/* Float animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Service card hover glow */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(52, 211, 153, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card {
    position: relative;
    overflow: hidden;
}

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

/* Testimonial card hover */
.testimonial-card {
    transition: all 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(6, 95, 70, 0.3);
}

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(10, 15, 13, 0.92);
    backdrop-blur-xl;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Staggered animation delays */
.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }
.fade-in-up.delay-4 { animation-delay: 0.4s; }
.fade-in-up.delay-5 { animation-delay: 0.5s; }

/* Gold shimmer on hover for CTA */
.btn-gold-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-gold-shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 40%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 60%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-gold-shimmer:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

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

/* Ensure images don't shift layout */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift for hero image */
#hero img {
    will-change: transform;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
}
