/* Custom styles for K and J Auto Body */

:root {
    --color-midnight-900: #0a0f1a;
    --color-midnight-800: #0f172a;
    --color-mint-400: #34d399;
}

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

/* Selection color */
::selection {
    background-color: rgba(52, 211, 153, 0.3);
    color: #fff;
}

/* Navbar transition */
#navbar {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

#navbar.visible {
    transform: translateY(0);
}

/* 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, var(--color-mint-400), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Mobile menu */
#mobileMenu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.4rem;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

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

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: none;
    }
    
    .service-card,
    .testimonial-card {
        transition: none;
    }
    
    .service-card::before {
        display: none;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--color-midnight-900);
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.5);
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

/* Select dropdown styling */
select option {
    background-color: #0f172a;
    color: #fff;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.8));
}

/* Subtle gradient for hero text */
h1 {
    background-clip: text;
}
