/* Custom styles for Ace Autolounge */

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

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

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

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

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

/* Selection color */
::selection {
    background: #d44a1f;
    color: white;
}

/* Navbar scroll effect */
header.scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Mobile menu animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

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

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

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

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

/* Intersection Observer animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* Service card tilt effect */
.group {
    transform: translateZ(0);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #d44a1f !important;
    box-shadow: 0 0 0 3px rgba(212, 74, 31, 0.15) !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .animate-on-scroll,
    .stagger-children > * {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .group:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    header,
    #contact,
    .map-section {
        display: none;
    }
}
