/* Custom animations and utility styles */
@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;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #1a4d2e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #153d24;
}

/* Selection color */
::selection {
    background: #1a4d2e;
    color: #faf8f5;
}

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

/* Button hover effects */
button, a {
    transition: all 0.3s ease;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #e8f0e9 25%, #f5f0e8 50%, #e8f0e9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
