/* Animation Styles */

/* Hero Image Slider Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.machine-slide {
    animation: fadeIn 1s ease-in-out;
}

/* Trusted Brands Scroll Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.brands-track {
    animation: scroll 25s linear infinite;
}

.brands-track:hover {
    animation-play-state: paused;
}

/* Button Hover Animations */
.btn-primary-custom, .btn-outline-custom, .header-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary-custom:after, .btn-outline-custom:after, .header-btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
    z-index: -1;
}

.btn-primary-custom:hover:after, .btn-outline-custom:hover:after, .header-btn:hover:after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Card Hover Animations */
.machine-card, .brand-card, .feature-box, .value-card, .team-card, .gallery-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Floating Animation for Featured Items */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.feature-box:hover .feature-icon {
    animation: float 2s ease-in-out infinite;
}

.value-card:hover .value-icon {
    animation: float 2s ease-in-out infinite;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
    }
}

.btn-primary-custom, .header-btn {
    animation: pulse 2s infinite;
}

/* Loading Animation for Images */
.img-loading {
    position: relative;
    overflow: hidden;
    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;
    }
}

/* Page Load Animation */
.page-load {
    animation: pageLoad 0.8s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 0.8s forwards;
}

@keyframes textReveal {
    to {
        transform: translateY(0);
    }
}

/* Shake Animation for Attention */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.bounce {
    animation: bounce 2s infinite;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Scale Animation */
@keyframes scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.scale {
    animation: scale 2s ease-in-out infinite;
}

/* Border Glow Animation */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(211, 47, 47, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(211, 47, 47, 0.8);
    }
}

.border-glow {
    animation: borderGlow 2s infinite;
}

/* Progress Bar Animation */
@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.progress-bar {
    animation: progress 2s ease-in-out;
}

/* Staggered Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }



/* Animation */
@keyframes scrollBrands {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-280px * 4 - 30px * 3));
    }
}


@keyframes scrollBrandsMobile {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-250px * 4 - 30px * 3));
    }
}



/* animations.css - Mobile-specific animations */

/* Mobile Menu Animation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Mobile Touch Feedback */
@media (max-width: 767.98px) {
    .btn:active,
    .nav-link:active,
    .feature-box:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    /* Better touch targets */
    .btn,
    .nav-link,
    .form-control-custom {
        min-height: 44px; /* Apple's recommended touch target size */
    }
    
    .social-icons a {
        width: 44px;
        height: 44px;
        line-height: 44px;
    }
}

/* Mobile Loading Animation */
@media (max-width: 767.98px) {
    .loading-skeleton {
        animation: shimmer 1.5s infinite linear;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
    }
    
    @keyframes shimmer {
        0% {
            background-position: -200% 0;
        }
        100% {
            background-position: 200% 0;
        }
    }
}

/* Mobile Scroll Animations */
@media (max-width: 767.98px) {
    .fade-in-mobile {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .fade-in-mobile.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 767.98px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Disable pull-to-refresh on mobile */
    body {
        overscroll-behavior-y: contain;
    }
    
    /* Optimize animations for mobile */
    .hero-right,
    .map-background {
        will-change: transform;
    }
}

/* Mobile Image Optimization */
@media (max-width: 767.98px) {
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Optimize background images */
    .hero-right {
        background-size: cover;
        background-position: center;
    }
}

/* Mobile Form Optimization */
@media (max-width: 767.98px) {
    /* Prevent zoom on input focus in iOS */
    @media screen and (-webkit-min-device-pixel-ratio:0) {
        select,
        textarea,
        input {
            font-size: 16px;
        }
    }
    
    /* Better date picker on mobile */
    input[type="date"] {
        min-height: 44px;
    }
}

/* Mobile Safe Areas (for notched phones) */
@supports (padding: max(0px)) {
    @media (max-width: 767.98px) {
        body {
            padding-left: min(0px, env(safe-area-inset-left));
            padding-right: min(0px, env(safe-area-inset-right));
        }
        
        .navbar {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
        
        .footer {
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
        }
    }
}

/* About Page Mobile Animations */

@media (max-width: 767.98px) {
    /* Fade in animations for mobile */
    .about-section {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.8s ease forwards;
    }
    
    .about-section:nth-child(1) {
        animation-delay: 0.1s;
    }
    
    .about-section:nth-child(2) {
        animation-delay: 0.3s;
    }
    
    .about-section:nth-child(3) {
        animation-delay: 0.5s;
    }
    
    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Value cards hover effect for mobile */
    .value-card {
        transition: all 0.3s ease;
    }
    
    .value-card:active {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    /* Stats animation */
    .stat-box h3 {
        transition: all 0.3s ease;
    }
    
    /* Loading animation for about images */
    .img-placeholder {
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0% {
            opacity: 0.8;
        }
        50% {
            opacity: 1;
        }
        100% {
            opacity: 0.8;
        }
    }
}

/* Performance optimizations for About page */
@media (max-width: 767.98px) {
    .about-section {
        will-change: transform, opacity;
    }
    
    .img-placeholder i {
        image-rendering: -webkit-optimize-contrast;
    }
}