/* Custom styles for Jerry's Lawn Service */

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

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .group img {
        transition: none;
    }
}

/* Mobile menu animation */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.inactive {
    opacity: 0;
    pointer-events: none;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 252, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(92, 33, 44, 0.08);
}

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

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

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

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

/* Selection color */
::selection {
    background: #f9d4d8;
    color: #5c212c;
}

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

/* Service card hover */
.group:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    transition: transform 0.3s ease;
}

.service-icon {
    transition: transform 0.3s ease;
}

/* Hero text animation - only for non-reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .hero-badge {
        animation: fadeInDown 0.8s ease forwards;
    }
    .hero-title {
        animation: fadeInUp 0.8s ease 0.2s forwards;
        opacity: 0;
    }
    .hero-subtitle {
        animation: fadeInUp 0.8s ease 0.4s forwards;
        opacity: 0;
    }
    .hero-cta {
        animation: fadeInUp 0.8s ease 0.6s forwards;
        opacity: 0;
    }
    .hero-trust {
        animation: fadeInUp 0.8s ease 0.8s forwards;
        opacity: 0;
    }
}

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

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

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c4273f;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Gallery image hover */
.group img {
    transition: transform 0.7s ease;
}

/* Floating card animation */
@media (prefers-reduced-motion: no-preference) {
    .floating-card {
        animation: float 3s ease-in-out infinite;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c4273f' 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 12px center;
    padding-right: 40px;
}
