/* Enhanced Animations for Sections */

/* Fade In Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Scale Animations */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Image Hover Effects */
.image-hover {
    overflow: hidden;
    border-radius: 15px;
    position: relative;
}

.image-hover img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-hover:hover img {
    transform: scale(1.1);
}

.image-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-hover:hover::after {
    opacity: 1;
}

/* Card Animations */
.card-float {
    transition: all 0.3s ease;
}

.card-float:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s ease;
}

.text-reveal.animate span {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    width: 0%;
    transition: width 2s ease;
    border-radius: 2px;
}

.progress-fill.animate {
    width: var(--progress-width, 90%);
}

/* Floating Elements */
.float-element {
    animation: floatUpDown 3s ease-in-out infinite;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

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

/* Rotate Animation */
.rotate-slow {
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.8);
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #6366f1;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #6366f1; }
}

/* Slide In Animations */
.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.slide-in-bottom.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-top {
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.8s ease;
}

.slide-in-top.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Bounce Animation */
.bounce-in {
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Flip Animation */
.flip-in {
    opacity: 0;
    transform: rotateY(-90deg);
    transition: all 0.8s ease;
}

.flip-in.animate {
    opacity: 1;
    transform: rotateY(0deg);
}

/* Responsive Animations */
@media (max-width: 768px) {
    .fade-in, .fade-in-left, .fade-in-right,
    .scale-in, .slide-in-bottom, .slide-in-top {
        transform: translateY(20px);
    }
    
    .fade-in-left, .fade-in-right {
        transform: translateY(20px);
    }
}