/* Animations CSS file */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide up animation */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide in from right animation */
@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide in from left animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale up animation */
@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Apply animations to elements */
.animated-title {
    animation: slideInLeft 1s ease-out forwards;
}

.animated-text {
    animation: fadeIn 1.2s ease-out 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.animated-image {
    animation: scaleUp 1.5s ease-out 0.5s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-buttons {
    animation: fadeIn 1.2s ease-out 0.8s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.service-card, .portfolio-item, .feature {
    opacity: 0;
    transform: translateY(30px);
}

/* Add hover animations */
.btn-primary:hover, .btn-secondary:hover {
    animation: pulse 0.5s ease-in-out;
}

/* Scroll animations - these will be triggered by JavaScript */
.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: translateY(30px);
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: translateX(-50px);
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: translateX(50px);
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scale-up {
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: scale(0.9);
}

.scale-up.active {
    opacity: 1;
    transform: scale(1);
}

/* Animacje dla elementów portfolio */
.portfolio-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.portfolio-item.show {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item.hide {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.portfolio-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-container {
    max-width: 90%;
    max-height: 80%;
    position: relative;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    border: 3px solid white;
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 18px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #3498db;
}

body.no-scroll {
    overflow: hidden;
}

/* Animacje dla statystyk */
.statistics {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.statistics.active {
    opacity: 1;
    transform: translateY(0);
}

.stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--item-index) * 0.1s);
}

.statistics.active .stat-item {
    opacity: 1;
    transform: translateY(0);
}

.statistic-value {
    transition: color 0.3s ease;
}

.statistics.active .statistic-value {
    color: #3498db;
} 