/* DNA Helix Animation */
.dna-helix {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.dna-helix::before,
.dna-helix::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 100%;
    background: var(--primary-blue);
    animation: rotate 3s linear infinite;
}

.dna-helix::before {
    left: 50%;
    transform-origin: 50% 50%;
}

.dna-helix::after {
    right: 50%;
    transform-origin: 50% 50%;
    animation-delay: -1.5s;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Pulse Animation for WhatsApp Button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button {
    animation: pulse 2s infinite;
}

/* Fade Up Animation */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scale Animation for Feature Cards */
.scale-up {
    transition: transform 0.3s ease;
}

.scale-up:hover {
    transform: scale(1.05);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Slide In Animation */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Molecular Structure Animation */
.molecular-structure {
    position: relative;
    width: 100px;
    height: 100px;
}

.molecular-structure::before,
.molecular-structure::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-blue);
    animation: float 3s ease-in-out infinite;
}

.molecular-structure::before {
    left: 20px;
    animation-delay: -1.5s;
}

.molecular-structure::after {
    right: 20px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--light-gray);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--primary-blue);
    animation: progress 2s ease-in-out;
}

@keyframes progress {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* RTL Animation Adjustments */
[dir="rtl"] .slide-in-left {
    transform: translateX(50px);
}

[dir="rtl"] .slide-in-right {
    transform: translateX(-50px);
}

/* Mobile Animation Optimizations */
@media (max-width: 768px) {
    .dna-helix {
        width: 60px;
        height: 60px;
    }
    
    .molecular-structure {
        width: 60px;
        height: 60px;
    }
    
    .molecular-structure::before,
    .molecular-structure::after {
        width: 12px;
        height: 12px;
    }
} 