/* Custom styles for Polk County Rescue Squad */

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

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

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

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

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(250, 250, 245, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 82, 38, 0.08);
}

nav.scrolled .menu-line {
    background: #2d5226;
}

/* Mobile menu transitions */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

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

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #528542;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Fade-in animation on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s 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.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Selection color */
::selection {
    background: #c6dfbb;
    color: #1e361a;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9cc58e;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #528542;
    outline-offset: 2px;
}

/* Subtle image hover zoom */
.group img {
    transition: transform 0.6s ease;
}

.group:hover img {
    transform: scale(1.03);
}
