/* Logo Animation Effects */

/* Base logo styling */
.logo-container {
    position: relative;
    overflow: hidden;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    animation: logoMoving 5s ease-in-out infinite;
    filter: drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.3));
}

/* Continuous taxi moving animation */
@keyframes logoMoving {
    0% {
        transform: translateX(-2px) translateY(0px);
        filter: drop-shadow(3px 5px 5px rgba(0, 0, 0, 0.3));
    }
    25% {
        transform: translateX(2px) translateY(-2px);
        filter: drop-shadow(2px 6px 5px rgba(0, 0, 0, 0.25));
    }
    50% {
        transform: translateX(0px) translateY(1px);
        filter: drop-shadow(4px 4px 5px rgba(0, 0, 0, 0.3));
    }
    75% {
        transform: translateX(-1px) translateY(-1px);
        filter: drop-shadow(3px 6px 5px rgba(0, 0, 0, 0.35));
    }
    100% {
        transform: translateX(-2px) translateY(0px);
        filter: drop-shadow(3px 5px 5px rgba(0, 0, 0, 0.3));
    }
}

/* Entry animation */
@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
        filter: blur(5px);
    }
    40% {
        opacity: 1;
        filter: blur(0);
    }
    70% {
        transform: translateY(5px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

/* Taxi driving effect */
@keyframes taxiDriving {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.3));
    }
    15% {
        transform: translateX(3px) translateY(1px) rotate(0.5deg);
        filter: drop-shadow(3px 4px 5px rgba(0, 0, 0, 0.25));
    }
    30% {
        transform: translateX(1px) translateY(-1px) rotate(-0.5deg);
        filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.3));
    }
    45% {
        transform: translateX(-2px) translateY(0px) rotate(0.25deg);
        filter: drop-shadow(1px 6px 5px rgba(0, 0, 0, 0.35));
    }
    60% {
        transform: translateX(-1px) translateY(2px) rotate(-0.25deg);
        filter: drop-shadow(3px 5px 5px rgba(0, 0, 0, 0.3));
    }
    75% {
        transform: translateX(2px) translateY(1px) rotate(0.5deg);
        filter: drop-shadow(4px 4px 5px rgba(0, 0, 0, 0.25));
    }
    90% {
        transform: translateX(0px) translateY(-1px) rotate(-0.5deg);
        filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.3));
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
        filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.3));
    }
}

/* Road bump effect for taxi */
@keyframes roadBump {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-1deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(1px) rotate(1deg);
    }
}

/* Floating animation for hover state */
@keyframes logoFloat {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(3px) rotate(-1deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Shine effect */
@keyframes logoShine {
    0% {
        background-position: -100% center;
    }
    100% {
        background-position: 300% center;
    }
}

/* Specific logo animation classes */
.logo.animated {
    animation: logoEntrance 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, 
               taxiDriving 8s ease-in-out infinite 1.2s, 
               roadBump 4s ease-in-out infinite 2s;
}

.logo-container:hover .logo {
    animation: logoFloat 3s ease infinite;
    filter: drop-shadow(0 5px 15px rgba(254, 184, 0, 0.4));
}

/* Moving shadow effect */
.logo-container::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 60%;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translateX(-50%) scaleX(0.8);
    z-index: -1;
    animation: shadowMoving 5s ease-in-out infinite;
}

@keyframes shadowMoving {
    0% {
        transform: translateX(-55%) scaleX(0.8);
        opacity: 0.6;
    }
    25% {
        transform: translateX(-45%) scaleX(0.9);
        opacity: 0.7;
    }
    50% {
        transform: translateX(-50%) scaleX(0.7);
        opacity: 0.6;
    }
    75% {
        transform: translateX(-53%) scaleX(0.85);
        opacity: 0.7;
    }
    100% {
        transform: translateX(-55%) scaleX(0.8);
        opacity: 0.6;
    }
}

/* Shine effect on hover */
.logo-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    background-size: 50% 100%;
    background-repeat: no-repeat;
}

.logo-container:hover::after {
    opacity: 1;
    animation: logoShine 1.5s ease forwards;
}

/* Color pulse effect */
.logo-container:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(254, 184, 0, 0.2) 0%, rgba(254, 184, 0, 0) 70%);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    animation: logoPulse 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes logoPulse {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Wheel rotation effect (for showing taxi motion) */
.logo-wheel {
    position: absolute;
    width: 8px;
    height: 8px;
    background: transparent;
    border-radius: 50%;
    bottom: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    animation: wheelRotation 2s linear infinite;
}

.logo-wheel.front {
    right: 25%;
}

.logo-wheel.back {
    left: 25%;
}

@keyframes wheelRotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Click animation */
.logo-container.clicked .logo {
    transform: scale(0.9);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: roadBump 0.5s ease;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .logo-container::after,
    .logo-container::before {
        display: none;
    }
    
    .logo-container:hover .logo {
        animation: none;
        transform: scale(1.05);
    }
    
    .logo {
        animation: taxiDriving 8s ease-in-out infinite;
    }
}

/* Accessibility - respect user preferences */
@media (prefers-reduced-motion: reduce) {
    .logo,
    .logo-container::after,
    .logo-container::before,
    .logo-container:hover .logo {
        animation: none;
        transition: none;
    }
} 