/* Professional Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Professional Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-zoom-in {
    animation: zoomIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Professional Stagger Animations */
.stagger-animate > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-animate > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animate > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animate > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animate > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animate > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animate > *:nth-child(6) { animation-delay: 0.6s; }

/* Professional Hover Effects */
.hover-glow:hover {
    box-shadow: 
        0 0 20px rgba(16, 185, 129, 0.3),
        var(--shadow-lg);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.5s;
}

.hover-shine:hover::before {
    left: 100%;
}

/* Professional Loading Shimmer */
.shimmer {
    background: var(--gray-200);
    background-image: linear-gradient(
        to right,
        var(--gray-200) 0%,
        var(--gray-100) 20%,
        var(--gray-200) 40%,
        var(--gray-200) 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 104px;
    animation: shimmer 1.2s infinite linear;
}

/* Professional Transition Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

/* Professional Animation Durations */
.duration-300 {
    animation-duration: 0.3s;
}

.duration-500 {
    animation-duration: 0.5s;
}

.duration-700 {
    animation-duration: 0.7s;
}

.duration-1000 {
    animation-duration: 1s;
}

/* Professional Page Transitions */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s, transform 0.4s;
}

.page-exit {
    opacity: 1;
}

.page-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s, transform 0.4s;
}

/* Professional Focus Animations */
.focus-scale:focus {
    transform: scale(1.02);
}

.focus-lift:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Professional Success Animations */
@keyframes successCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-check {
    animation: successCheck 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--apple-green);
    animation: confetti 3s ease-in-out forwards;
}

/* Professional Medical Specific Animations */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes stethoscope {
    0% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(15deg);
    }
    75% {
        transform: rotate(-15deg);
    }
    100% {
        transform: rotate(0);
    }
}

.stethoscope {
    animation: stethoscope 2s ease-in-out infinite;
}

/* Professional Emergency Animations */
@keyframes emergencyFlash {
    0%, 100% {
        background-color: var(--emergency-red);
    }
    50% {
        background-color: var(--emergency-red-dark);
    }
}

.emergency-flash {
    animation: emergencyFlash 1s infinite;
}

/* 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;
    }
    
    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }
}