/**
 * NLAKAM Animation Styles - Africa Theme Edition
 * Clean, simple animations for all pages with Africa-inspired colors
 */

/* Page Load Animation */
body.page-loaded {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Button Animations */
.btn, button[type="submit"], .download-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover, button[type="submit"]:hover, .download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active, button[type="submit"]:active, .download-link:active {
    transform: translateY(0);
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Input Focus Animation */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea,
select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 5px rgba(44, 95, 45, 0.3);
}

.input-focused {
    animation: inputFocus 0.3s ease;
}

@keyframes inputFocus {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.95;
    }
}

/* Table Row Animation */
table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

table tbody tr:hover {
    background-color: #f8fdf8 !important;
}

/* Card Hover Effect */
.stats-card, .info-container, .section, .login-container, .register-container, .card, .stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover, .info-container:hover, .section:hover, .card:hover, .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

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

/* Navbar Link Animation */
.navbar a {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.navbar a:hover {
    transform: translateY(-1px);
}

/* Footer Animation */
.footer {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Error Animation */
.error {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Success Message Animation */
.success {
    animation: fadeInUp 0.5s ease;
}

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