/* Custom styles and animations */

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

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

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

@keyframes float-reverse {
    0%, 100% {
        transform: translateY(0px) rotate(-3deg);
    }
    50% {
        transform: translateY(10px) rotate(-3deg);
    }
}

/* Apply floating animations */
.transform-rotate-3 {
    animation: float 4s ease-in-out infinite;
}

.transform-rotate-negative {
    animation: float-reverse 4s ease-in-out infinite;
}

/* Subtle hover effects */
.group:hover .group-hover\!scale-110 {
    transform: scale(1.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: #97c3a3;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6aa378;
}

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

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

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

#mobile-menu.open {
    max-height: 400px;
    transition: max-height 0.3s ease-in;
}

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

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

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

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

button::after, a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after, a:active::after {
    width: 200px;
    height: 200px;
}
