/* ===========================================
   PROFESSIONAL ANIMATIONS & TRANSITIONS
   =========================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide Left Animation */
@keyframes slideLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide Right Animation */
@keyframes slideRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Icon Rotate Animation */
@keyframes iconRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Icon Bounce Animation */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glow Animation */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
}

/* ================================================
   COMPONENT ANIMATIONS
   ================================================ */

/* Button Hover Effect */
.btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* Card Hover Effect */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Nav Link Hover Effect */
.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #b22222, #8b0000);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

/* Badge Animations */
.badge {
    animation: scaleIn 0.4s ease;
    display: inline-block;
}

/* Icon Animations */
.bi {
    transition: all 0.3s ease;
}

.nav-link:hover .bi {
    animation: iconBounce 0.6s ease;
}

button:hover .bi {
    animation: iconBounce 0.6s ease;
}

/* Form Input Focus Animation */
.form-control,
.form-select {
    transition: all 0.3s ease;
    border-color: #ccc;
}

.form-control:focus,
.form-select:focus {
    border-color: #b22222;
    box-shadow: 0 0 0 0.2rem rgba(178, 34, 34, 0.25);
    transform: scale(1.01);
}

/* Table Row Hover Animation */
.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(178, 34, 34, 0.05);
    transform: scale(1.01);
}

/* Modal Animations */
.modal.fade .modal-dialog {
    animation: slideUp 0.3s ease;
}

.modal.fade.show .modal-dialog {
    animation: slideUp 0.3s ease;
}

/* Dropdown Menu Animation */
.dropdown-menu {
    animation: slideDown 0.3s ease;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(178, 34, 34, 0.1);
    transform: translateX(5px);
    color: #b22222;
}

/* Alert Animations */
.alert {
    animation: slideDown 0.4s ease;
    border: none;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: #10b981;
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: #ef4444;
    color: #7f1d1d;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
    color: #78350f;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left-color: #3b82f6;
    color: #1e3a8a;
}

/* Loading Spinner Animation */
.spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Floating Label Animation */
.floating-label {
    position: relative;
}

.floating-label label {
    position: absolute;
    bottom: 0;
    left: 0;
    transition: all 0.3s ease;
    color: #999;
    pointer-events: none;
    padding-left: 12px;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    transform: translateY(-25px) scale(0.85);
    color: #b22222;
}

/* Page Transition Animation */
body {
    animation: fadeIn 0.5s ease;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    animation: slideUp 0.6s ease forwards;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* ================================================
   RESPONSIVE ANIMATIONS
   ================================================ */

@media (max-width: 768px) {
    .btn,
    .card,
    .nav-link {
        transform: none !important;
    }

    .btn:hover,
    .card:hover,
    .nav-link:hover {
        transform: none !important;
    }
}

/* ================================================
   UTILITY ANIMATION CLASSES
   ================================================ */

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-slide-up {
    animation: slideUp 0.5s ease;
}

.animate-slide-down {
    animation: slideDown 0.5s ease;
}

.animate-slide-left {
    animation: slideLeft 0.5s ease;
}

.animate-slide-right {
    animation: slideRight 0.5s ease;
}

.animate-bounce {
    animation: bounce 0.6s ease;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-rotate {
    animation: iconRotate 2s linear infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Delay Animations */
.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

.animate-delay-500 {
    animation-delay: 0.5s;
}
