/* Custom Styles for Czerniak Racing Engines */

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

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

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

::-webkit-scrollbar-thumb {
    background: #2C2C2C;
    border-radius: 5px;
}

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

/* Selection Color */
::selection {
    background: #E07A5F;
    color: #FFFFFF;
}

/* Focus Styles */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #E07A5F;
    outline-offset: 2px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation Classes (Progressive Enhancement - only applied via JS) */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 300px;
    opacity: 1;
}

/* Image Loading */
img {
    transition: opacity 0.3s ease-in-out;
}

img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

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

/* Form Input Focus States */
input:focus,
textarea:focus,
select:focus {
    border-color: #E07A5F !important;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

/* Gallery Hover Overlay */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Custom Card Hover */
.group:hover .group-hover\:bg-brand-charcoal {
    background-color: #2C2C2C;
}

/* Navbar Active State */
.nav-link-active {
    color: #E07A5F;
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Print Styles */
@media print {
    nav,
    #mobile-menu-btn,
    button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-brand-charcoal,
    .bg-brand-cream {
        background: #fff !important;
    }
}
