/* Micro-interactions for Industry Evolve 360 */

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button hover and focus states */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ripple effect for buttons */
.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;
    z-index: 1;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn * {
    position: relative;
    z-index: 2;
}

/* Card hover effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--bs-primary);
}

/* Event card animations */
.event-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.event-card:hover::before {
    left: 100%;
}

.event-card:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.event-card .card-body * {
    position: relative;
    z-index: 2;
}

/* Navigation link animations */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown animations */
.dropdown-menu {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--bs-primary);
    transition: left 0.3s ease;
    z-index: -1;
    opacity: 0.1;
}

.dropdown-item:hover::before {
    left: 0;
}

/* Form input animations */
.form-control, .form-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e9ecef;
}

.form-control:focus, .form-select:focus {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.2);
    border-color: var(--bs-primary);
}

/* Loading animations */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress indicators */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Fade in animations for content */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animations for lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item:nth-child(1) { animation: fadeInUp 0.6s ease 0.1s forwards; }
.stagger-item:nth-child(2) { animation: fadeInUp 0.6s ease 0.2s forwards; }
.stagger-item:nth-child(3) { animation: fadeInUp 0.6s ease 0.3s forwards; }
.stagger-item:nth-child(4) { animation: fadeInUp 0.6s ease 0.4s forwards; }
.stagger-item:nth-child(5) { animation: fadeInUp 0.6s ease 0.5s forwards; }

/* Badge animations */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* Table row hover effects */
.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    transform: scale(1.01);
}

/* Icon animations */
.fas, .far, .fab {
    transition: all 0.3s ease;
}

.btn:hover .fas,
.btn:hover .far,
.btn:hover .fab {
    transform: scale(1.1);
}

/* Search input focus effect */
.search-input {
    position: relative;
}

.search-input::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--bs-primary);
    border-radius: inherit;
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-input:focus-within::before {
    opacity: 1;
    transform: scale(1);
}

/* Modal animations */
.modal.fade .modal-dialog {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Alert animations */
.alert {
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Page transition effects */
.page-transition {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Skeleton loading for cards */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-dark);
}

/* Pulse animation for notifications */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Interactive stats cards */
.stats-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.stats-card .display-4 {
    transition: all 0.3s ease;
}

.stats-card:hover .display-4 {
    transform: scale(1.1);
    color: var(--bs-primary);
}

/* Breadcrumb animations */
.breadcrumb-item {
    transition: all 0.3s ease;
}

.breadcrumb-item:hover {
    transform: translateX(5px);
}

/* Tag/label hover effects */
.tag, .label {
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag:hover, .label:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}