/* Custom styles for Complete Auto Service Ramsey */

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

/* Selection color */
::selection {
    background-color: rgba(45, 90, 61, 0.2);
    color: #1a3a25;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

/* Service card stagger animation */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Testimonial card animation */
.testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* Hero content animation */
#hero .relative > div {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.9s ease forwards;
}

#hero .relative > div > div:first-child {
    animation-delay: 0.1s;
}

#hero .relative > div > h1 {
    animation-delay: 0.25s;
}

#hero .relative > div > p {
    animation-delay: 0.4s;
}

#hero .relative > div > div:nth-child(4) {
    animation-delay: 0.55s;
}

#hero .relative > div > div:nth-child(5) {
    animation-delay: 0.7s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #2D5A3D;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .service-card,
    .testimonial-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
    #hero .relative > div > * {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Tablet adjustments */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}
