/* Custom styles and overrides */

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

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

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

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

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

/* Selection color */
::selection {
    background: #c5dca0;
    color: #121b0c;
}

/* Navbar transition */
.navbar-scrolled #nav-bg {
    opacity: 1;
}

/* Reduced motion */
@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;
    }
}

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}

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

/* Card hover effects */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

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

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

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

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

/* Apply float animation with reduced motion check */
@media (prefers-reduced-motion: no-preference) {
    .absolute.z-20 {
        animation: float 6s ease-in-out infinite;
    }
    
    .absolute.z-20:nth-child(2) {
        animation-delay: -2s;
        animation-duration: 7s;
    }
    
    .absolute.z-20:nth-child(3) {
        animation-delay: -4s;
        animation-duration: 5s;
    }
}
