/* Custom styles for Mow-Town Lawn Care */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfbf7;
}
::-webkit-scrollbar-thumb {
    background: #0f5132;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #198754;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Service card hover animation */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0f5132, #198754);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.service-card:hover::after {
    transform: scaleX(1);
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Hero parallax-like effect */
#hero {
    background-attachment: fixed;
}
@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #0f5132;
    outline-offset: 2px;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.25s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
}

/* Testimonial card hover */
#testimonials .bg-brand-cream:hover {
    transform: translateY(-4px);
}
