/* Custom styles for American Family Care */

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

/* Floating animation for hero cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 3.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Default visible state for progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(30, 86, 64, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: #8EBFA3;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5EA078;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #5EA078;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu transition */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobileMenu.open {
    max-height: 400px;
}

/* Service card hover effect */
.group:hover .group-hover\:bg-forest-200 {
    background-color: #b9dbc9;
}

/* Ensure all images have smooth loading */
img {
    image-rendering: auto;
}

/* Print styles */
@media print {
    nav,
    .animate-float,
    .animate-float-delayed {
        display: none;
    }
    
    body {
        color: #1a4836;
        background: white;
    }
}
