/* ========================================
   Enhanced Animations & Transitions
   ======================================== */

/* Smooth transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Slide In Up */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideInUp 0.4s ease-out;
}

/* Scale In */
@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* Pulse */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* ========================================
   Card Hover Effects
   ======================================== */

.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-shadow:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* ========================================
   Button Effects
   ======================================== */

.btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.98);
}

/* ========================================
   Link Hover Effects
   ======================================== */

.hover-text-primary:hover {
    color: var(--bs-primary) !important;
    transition: color 0.2s ease;
}

.hover-text-underline:hover {
    text-decoration: underline;
}

.hover-bg-light:hover {
    background-color: var(--bs-light) !important;
    transition: background-color 0.2s ease;
}

/* ========================================
   Badge Animations
   ======================================== */

.badge {
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* ========================================
   Loading States
   ======================================== */

.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   Form Animations
   ======================================== */

.form-control,
.form-select {
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15) !important;
}

/* Floating Labels Animation */
.form-floating>label {
    transition: all 0.2s ease;
}

/* ========================================
   Modal Animations
   ======================================== */

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: scale(0.9);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* ========================================
   Toast Animations
   ======================================== */

.toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Progress Bar Animation
   ======================================== */

.progress-bar {
    transition: width 0.6s ease;
}

@keyframes progress {
    0% {
        width: 0%;
    }
}

.progress-bar-animated {
    animation: progress 1s ease-out;
}

/* ========================================
   Dropdown Animations
   ======================================== */

.dropdown-menu {
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Navbar Scroll Effect
   ======================================== */

.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Image Hover Effects
   ======================================== */

.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* ========================================
   Utility Classes
   ======================================== */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* ========================================
   Glassmorphism Effect
   ======================================== */

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Gradient Text
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Responsive Utilities
   ======================================== */

@media (max-width: 768px) {
    .hover-shadow:hover {
        transform: none;
    }

    .card {
        transition: none;
    }
}

/* ========================================
   Dark Mode Support
   ======================================== */

[data-bs-theme="dark"] .card {
    background-color: #1a1a1a;
    border-color: #2d2d2d;
}

[data-bs-theme="dark"] .glass {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Accessibility
   ======================================== */

.focus-visible:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}