/* Modern Animations CSS */

/* Fade In Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide In Left Animation */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right Animation */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Up Animation */
.slide-in-up {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zoom In Animation */
.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    animation: zoomIn 1s ease forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(51, 153, 204, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(51, 153, 204, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(51, 153, 204, 0);
    }
}

/* Floating Animation */
.floating {
    animation: floating 3s ease infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Shake Animation */
.shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Hover Effects for Service Boxes */
.service-box {
    transition: all 0.3s ease;
}

.service-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-box .icon {
    transition: all 0.5s ease;
}

.service-box:hover .icon {
    transform: rotateY(180deg);
}

/* Portfolio Item Hover Effects */
.work-box {
    overflow: hidden;
    transition: all 0.3s ease;
}

.work-box .image {
    transition: all 0.5s ease;
}

.work-box:hover .image {
    transform: scale(1.1);
}

.work-box .inner {
    transition: all 0.3s ease;
    opacity: 0;
    background: rgba(51, 153, 204, 0.8);
}

.work-box:hover .inner {
    opacity: 1;
}

/* Button Hover Effects */
.uk-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.uk-button:after {
    content: '';
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.uk-button:hover:after {
    width: 100%;
}

/* Blog Post Hover Effects */
.post {
    transition: all 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.post .featured-image {
    overflow: hidden;
}

.post .featured-image .image {
    transition: all 0.5s ease;
}

.post:hover .featured-image .image {
    transform: scale(1.1);
}

/* Animated Underline for Links */
.animated-underline {
    position: relative;
    text-decoration: none;
}

.animated-underline:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #3399cc;
    transition: width 0.3s ease;
}

.animated-underline:hover:after {
    width: 100%;
}

/* Scroll Reveal Animation */
@media (min-width: 768px) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.8s ease;
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Preloader Animation */
.preloader .bar-loading {
    animation: loading 2s ease infinite;
}

@keyframes loading {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}
