/* Custom styles for Gilbertsville Volunteer Fire Department */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* Stat card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-0.5deg); }
}

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

.stat-card {
    animation: float1 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation: float2 7s ease-in-out infinite;
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation: float3 5s ease-in-out infinite;
    animation-delay: -1s;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Service card hover effect */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

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

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 400px;
    opacity: 1;
}

/* Form input focus ring animation */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3178ff;
}

/* Selection color */
::selection {
    background: rgba(45, 212, 191, 0.3);
    color: #001866;
}
