/* Shimmer Animation */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}

/* Fade In Animation for Page Sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animal Header Animation */
main > div:first-of-type {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stats Section Animation */
.bg-white.rounded-xl.shadow-lg:first-of-type {
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

/* How to Catch Section Animation */
.bg-white.rounded-xl.shadow-lg:nth-of-type(2) {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

/* Related Animals Animation */
.grid.md\\:grid-cols-2 > a,
.grid.lg\\:grid-cols-3 > a {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.grid.md\\:grid-cols-2 > a:nth-child(1),
.grid.lg\\:grid-cols-3 > a:nth-child(1) {
    animation-delay: 0.1s;
}

.grid.md\\:grid-cols-2 > a:nth-child(2),
.grid.lg\\:grid-cols-3 > a:nth-child(2) {
    animation-delay: 0.2s;
}

.grid.md\\:grid-cols-2 > a:nth-child(3),
.grid.lg\\:grid-cols-3 > a:nth-child(3) {
    animation-delay: 0.3s;
}

.grid.md\\:grid-cols-2 > a:nth-child(4),
.grid.lg\\:grid-cols-3 > a:nth-child(4) {
    animation-delay: 0.4s;
}

.grid.md\\:grid-cols-2 > a:nth-child(5),
.grid.lg\\:grid-cols-3 > a:nth-child(5) {
    animation-delay: 0.5s;
}

.grid.md\\:grid-cols-2 > a:nth-child(6),
.grid.lg\\:grid-cols-3 > a:nth-child(6) {
    animation-delay: 0.6s;
}

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

/* Enhanced Card Hover Effects */
.bg-white.rounded-xl.shadow-lg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stat Cards Hover Enhancement */
.bg-gradient-to-br {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Animations - Disable on Mobile for Performance */
@media (max-width: 768px) {
    .animate-shimmer {
        animation: none;
    }
    
    main > div,
    .bg-white.rounded-xl.shadow-lg,
    .grid.md\\:grid-cols-2 > a,
    .grid.lg\\:grid-cols-3 > a {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* Breadcrumb Enhancement */
nav.mb-6 a {
    position: relative;
    transition: all 0.2s ease;
}

nav.mb-6 a:hover {
    transform: translateY(-1px);
}

/* Improved Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading State for Images (if added later) */
img {
    transition: opacity 0.3s ease;
}

img[data-loading="true"] {
    opacity: 0.5;
}

