/* TDM Website Image Animations */

/* Fade in animation for images */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image animation classes */
.animated-image {
    animation: fadeInUp 1s ease-out;
    transition: all 0.3s ease;
}

.animated-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.animated-image-left {
    animation: fadeInLeft 1s ease-out;
    transition: all 0.3s ease;
}

.animated-image-right {
    animation: fadeInRight 1s ease-out;
    transition: all 0.3s ease;
}

.animated-image-pulse {
    animation: pulse 2s infinite;
}

.animated-image-float {
    animation: float 3s ease-in-out infinite;
}

.animated-image-zoom {
    animation: zoomIn 1s ease-out;
}

.animated-image-rotate {
    animation: rotateIn 1s ease-out;
}

/* Temperature icon animations */
.temperature-icon {
    animation: pulse 2s infinite;
    color: #ff6b6b;
}

.temperature-icon:hover {
    animation: float 1s ease-in-out infinite;
    transform: scale(1.2);
}

/* Vehicle animation */
.vehicle-animation {
    animation: slideInFromBottom 1.5s ease-out;
    transition: all 0.3s ease;
}

.vehicle-animation:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* Warehouse animation */
.warehouse-animation {
    animation: fadeInLeft 1.2s ease-out;
    transition: all 0.3s ease;
}

.warehouse-animation:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Validation animation */
.validation-animation {
    animation: fadeInRight 1.2s ease-out;
    transition: all 0.3s ease;
}

.validation-animation:hover {
    transform: scale(1.02);
    filter: contrast(1.1);
}

/* Staggered animations for multiple elements */
.animate-delay-1 {
    animation-delay: 0.2s;
}

.animate-delay-2 {
    animation-delay: 0.4s;
}

.animate-delay-3 {
    animation-delay: 0.6s;
}

.animate-delay-4 {
    animation-delay: 0.8s;
}

/* Parallax effect for background images */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Loading animation for images */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover effects for project images */
.project-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,107,107,0.8), rgba(74,144,226,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-image:hover::before {
    opacity: 1;
}

.project-image img {
    transition: transform 0.3s ease;
}

.project-image:hover img {
    transform: scale(1.1);
}

/* Temperature gauge animation */
.temperature-gauge {
    animation: rotateIn 2s ease-out;
    transition: all 0.3s ease;
}

.temperature-gauge:hover {
    animation: pulse 1s infinite;
}

/* Equipment animation */
.equipment-animation {
    animation: zoomIn 1.5s ease-out;
    transition: all 0.3s ease;
}

.equipment-animation:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Responsive animations */
@media (max-width: 768px) {
    .animated-image,
    .animated-image-left,
    .animated-image-right {
        animation-duration: 0.8s;
    }
    
    .animated-image:hover,
    .vehicle-animation:hover,
    .warehouse-animation:hover,
    .validation-animation:hover {
        transform: none;
    }
}

/* Intersection Observer animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Special effects for temperature mapping */
.temperature-mapping-effect {
    position: relative;
    overflow: hidden;
}

.temperature-mapping-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: sweep 3s infinite;
}

@keyframes sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
