/* Custom styles for elements Tailwind CDN can't handle */

/* Smooth scrolling and prevent horizontal overflow */
html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Hero car positioning */
#heroCar {
    transform: translateX(-50%);
}

/* About car parallax */
#aboutCar {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

/* Sustainability car parallax - drives into distance */
#sustainCar {
    will-change: transform, opacity;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

/* Parallax optimization */
#heroCar,
#hero .font-display {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* 911 text - taller on mobile */
.hero-911 {
    transform: scaleY(2);
}

@media (min-width: 768px) {
    .hero-911 {
        transform: scaleY(1);
    }
}


/* Gallery image hover effect */
#gallery img {
    transition: transform 0.3s ease;
}

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

#mobileMenu.active {
    display: flex;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1A1A1A;
    border-radius: 4px;
}

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

/* Hide scrollbar on configurator */
#desktopConfigOptions,
#mobileConfigOptions {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#desktopConfigOptions::-webkit-scrollbar,
#mobileConfigOptions::-webkit-scrollbar {
    display: none;
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #1A1A1A;
    outline-offset: 2px;
}

/* Glassmorphism nav */
.glass-nav {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

/* Dark mode glass */
.glass-nav.nav-light {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Side navigation styles */
#sideNav .nav-link {
    position: relative;
    transition: color 0.3s ease;
    color: #555555;
}

#sideNav .nav-link:hover,
#sideNav .nav-link.active {
    color: #1A1A1A;
}

#sideNav .nav-indicator {
    color: #1A1A1A;
}

/* Light nav for dark backgrounds */
#sideNav.nav-light .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

#sideNav.nav-light .nav-link:hover,
#sideNav.nav-light .nav-link.active {
    color: #FFFFFF;
}

#sideNav.nav-light .nav-indicator {
    color: #FFFFFF;
}
