/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes doctorTalk {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(2deg);
    }
    75% {
        transform: scale(1.05) rotate(-2deg);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.doctor-talk {
    animation: doctorTalk 3s infinite;
}

/* Staggered Animation Delays */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Page Load Animations */
.page-load {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-load.show {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Special Animation for Doctor */
.doctor-avatar {
    animation: doctorTalk 5s infinite;
}

.speech-bubble {
    animation: float 4s ease-in-out infinite;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(26, 188, 156, 0.3);
    border-radius: 50%;
    border-top-color: var(--highlight-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Heartbeat Animation for Emergency */
.heartbeat {
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Button Hover Effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hover-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
    z-index: -1;
}

.btn-hover-effect:hover::after {
    left: 100%;
}

/* Additional CSS for Medical Icons */
.floating-medical-icons {
    pointer-events: none;
}

.floating-medical-icon {
    will-change: transform, opacity;
}

.floating-medical-icon i {
    transition: all 0.3s ease;
}

/* Color variations for different medical icons */
.floating-medical-icon .fa-user-md { 
    color: #2c3e50; 
    text-shadow: 0 2px 4px rgba(44, 62, 80, 0.2);
}

.floating-medical-icon .fa-stethoscope { 
    color: #3498db; 
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.floating-medical-icon .fa-heartbeat { 
    color: #e74c3c; 
    text-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.floating-medical-icon .fa-brain { 
    color: #9b59b6; 
    text-shadow: 0 2px 4px rgba(155, 89, 182, 0.2);
}

.floating-medical-icon .fa-hospital { 
    color: #1abc9c; 
    text-shadow: 0 2px 4px rgba(26, 188, 156, 0.2);
}

.floating-medical-icon .fa-clinic-medical { 
    color: #16a085; 
    text-shadow: 0 2px 4px rgba(22, 160, 133, 0.2);
}

.floating-medical-icon .fa-ambulance { 
    color: #e67e22; 
    text-shadow: 0 2px 4px rgba(230, 126, 34, 0.2);
}

.floating-medical-icon .fa-prescription { 
    color: #8e44ad; 
    text-shadow: 0 2px 4px rgba(142, 68, 173, 0.2);
}

.floating-medical-icon .fa-pills { 
    color: #27ae60; 
    text-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.floating-medical-icon .fa-syringe { 
    color: #2980b9; 
    text-shadow: 0 2px 4px rgba(41, 128, 185, 0.2);
}

.floating-medical-icon .fa-medkit { 
    color: #d35400; 
    text-shadow: 0 2px 4px rgba(211, 84, 0, 0.2);
}

.floating-medical-icon .fa-procedures { 
    color: #c0392b; 
    text-shadow: 0 2px 4px rgba(192, 57, 43, 0.2);
}

.floating-medical-icon .fa-microscope { 
    color: #7f8c8d; 
    text-shadow: 0 2px 4px rgba(127, 140, 141, 0.2);
}

.floating-medical-icon .fa-dna { 
    color: #2c3e50; 
    text-shadow: 0 2px 4px rgba(44, 62, 80, 0.2);
}

.floating-medical-icon .fa-wheelchair { 
    color: #34495e; 
    text-shadow: 0 2px 4px rgba(52, 73, 94, 0.2);
}

/* Hover effects for floating medical icons */
.floating-medical-icon:hover {
    z-index: 10 !important;
}

.floating-medical-icon:hover i {
    transform: scale(1.5);
    opacity: 1 !important;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Diagnostic Services Icons */
.diagnostic-icon {
    transition: all 0.3s ease;
}

.diagnostic-card:hover .diagnostic-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--highlight-color);
}

.diagnostic-icon .fa-brain {
    color: #9b59b6;
}

.diagnostic-icon .fa-stethoscope {
    color: #3498db;
}

.diagnostic-icon .fa-syringe {
    color: #e74c3c;
}