/* Custom styles for Newton Automotive */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8b1a2b;
}

/* Hero animations */
.hero-badge {
    animation: fadeInDown 0.8s ease-out forwards;
    opacity: 0;
}

h1 {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

h1 p {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

h1 .flex {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

h1 .grid {
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

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

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

/* Service card hover effect */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease, background-color 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Service line animation */
.service-line {
    transition: width 0.3s ease;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(253, 251, 249, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(139, 26, 43, 0.08);
}

.nav-scrolled .font-serif {
    color: #8b1a2b !important;
}

.nav-scrolled .nav-link {
    color: #2d2d2d !important;
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s 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.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(139, 26, 43, 0.1);
}

/* Intersection observer animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax-like subtle effect on hero image */
#hero img {
    transition: transform 0.3s ease;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: #f9e4e4;
    color: #8b1a2b;
}
