/* Animations for MedTecInno */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes breathe {
    0%, 100% {
        transform: perspective(500px) rotateY(15deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: perspective(500px) rotateY(15deg) scale(1.1);
        opacity: 1;
    }
}

@keyframes breatheRight {
    0%, 100% {
        transform: perspective(500px) rotateY(-15deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: perspective(500px) rotateY(-15deg) scale(1.1);
        opacity: 1;
    }
}

/* Lung Animation */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lungs-animation {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lung {
    position: absolute;
    width: 180px;
    height: 280px;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 40% 40% 10% 10%;
    opacity: 0.8;
}

.left-lung {
    left: 0;
    transform: perspective(500px) rotateY(15deg);
    animation: breathe 4s infinite ease-in-out;
}

.right-lung {
    right: 0;
    transform: perspective(500px) rotateY(-15deg);
    animation: breatheRight 4s infinite ease-in-out;
    animation-delay: 0.2s;
}

.trachea {
    position: absolute;
    width: 60px;
    height: 120px;
    background: linear-gradient(to bottom, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: 30px 30px 0 0;
    top: -60px;
}

.bronchi {
    position: absolute;
    width: 40px;
    height: 60px;
    background: var(--primary);
    border-radius: 20px;
    top: 60px;
}

.left-bronchus {
    left: 60px;
    transform: rotate(-30deg);
}

.right-bronchus {
    right: 60px;
    transform: rotate(30deg);
}

.alveoli {
    position: absolute;
    background-color: var(--secondary);
    border-radius: 50%;
    opacity: 0.7;
    box-shadow: 0 0 20px var(--secondary);
    animation: pulse 3s infinite ease-in-out;
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Staggered Animations */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Hero Content Animation */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

/* Responsive Adjustments for Animations */
@media (max-width: 992px) {
    .lungs-animation {
        width: 350px;
        height: 350px;
    }
    
    .lung {
        width: 150px;
        height: 230px;
    }
}

@media (max-width: 768px) {
    .lungs-animation {
        width: 300px;
        height: 300px;
    }
    
    .lung {
        width: 130px;
        height: 200px;
    }
}

@media (max-width: 576px) {
    .lungs-animation {
        width: 250px;
        height: 250px;
    }
    
    .lung {
        width: 110px;
        height: 170px;
    }
}