/* Animations CSS for Park Lama Website */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.8s ease forwards;
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease forwards;
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-up {
    animation: scaleUp 0.8s ease forwards;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Rotating Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 8s linear infinite;
}

/* Shake Animation */
@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 ease-in-out;
}

/* Gradient Background Animation */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg {
    background: linear-gradient(270deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    background-size: 600% 600%;
    animation: gradientBG 15s ease infinite;
}

/* Button Hover Effects */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-hover-effect:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
    z-index: -1;
}

.btn-hover-effect:hover:after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Image Hover Effects */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Icon Hover Effects */
.icon-hover {
    transition: transform 0.3s ease, color 0.3s ease;
}

.icon-hover:hover {
    transform: translateY(-5px);
    color: var(--secondary-color);
}

/* Delay Classes */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* AOS Animation Overrides */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Custom Animation for Hero Section */
.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.hero-bg-animation:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color) 0%, transparent 70%);
    opacity: 0.7;
    z-index: 1;
}

.moving-car {
    position: absolute;
    bottom: 50px;
    left: -100px;
    width: 60px;
    height: 30px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    animation: moveCar 15s linear infinite;
}

@keyframes moveCar {
    from {
        left: -100px;
    }
    to {
        left: calc(100% + 100px);
    }
}

/* Animated City Background */
.city-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background-image: url('../images/city-silhouette.svg');
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: auto 100%;
    opacity: 0.2;
    animation: cityMove 60s linear infinite;
}

@keyframes cityMove {
    from {
        background-position: 0 bottom;
    }
    to {
        background-position: -1000px bottom;
    }
}

/* Animated Parking Icons */
.parking-icon {
    position: absolute;
    opacity: 0.1;
    animation: float 3s ease-in-out infinite;
}

.parking-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    font-size: 2rem;
    animation-delay: 0s;
}

.parking-icon:nth-child(2) {
    top: 20%;
    right: 20%;
    font-size: 3rem;
    animation-delay: 0.5s;
}

.parking-icon:nth-child(3) {
    bottom: 30%;
    left: 30%;
    font-size: 2.5rem;
    animation-delay: 1s;
}

.parking-icon:nth-child(4) {
    bottom: 15%;
    right: 15%;
    font-size: 1.8rem;
    animation-delay: 1.5s;
}

/* Animated Counter */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-animation {
    display: inline-block;
    animation: countUp 1s ease forwards;
}

/* Animated Market Size Chart */
.market-chart-animation {
    position: relative;
    height: 200px;
    margin: 50px 0;
}

.market-bar {
    position: absolute;
    bottom: 0;
    width: 25%;
    background: var(--gradient-primary);
    border-radius: 5px 5px 0 0;
    transition: height 1.5s ease;
    opacity: 0;
}

.market-bar.tam {
    left: 10%;
    height: 0;
}

.market-bar.sam {
    left: 40%;
    height: 0;
}

.market-bar.som {
    left: 70%;
    height: 0;
}

.market-bar.animate {
    opacity: 1;
}

.market-bar.tam.animate {
    height: 100%;
}

.market-bar.sam.animate {
    height: 60%;
}

.market-bar.som.animate {
    height: 30%;
}

.market-label {
    position: absolute;
    bottom: -30px;
    width: 25%;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.market-value {
    position: absolute;
    top: -30px;
    width: 25%;
    text-align: center;
    font-weight: 700;
    color: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.market-label.tam {
    left: 10%;
}

.market-label.sam {
    left: 40%;
}

.market-label.som {
    left: 70%;
}

.market-value.tam {
    left: 10%;
}

.market-value.sam {
    left: 40%;
}

.market-value.som {
    left: 70%;
}

.market-label.animate,
.market-value.animate {
    opacity: 1;
}