/* ===========================
   PARKEE ADVANCED ANIMATIONS
   Creative parking-themed effects
=========================== */

/* ========== PARKING-THEMED ANIMATIONS ========== */

/* Car sliding into parking spot */
@keyframes car-slide-in {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Parking spot availability pulse */
@keyframes parking-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
        transform: scale(1.05);
    }
}

/* Location pin bounce */
@keyframes pin-bounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    10%,
    30% {
        transform: translateY(-10px) scale(1.1);
    }

    20% {
        transform: translateY(-5px) scale(1.05);
    }

    40% {
        transform: translateY(0) scale(1);
    }
}

/* Floating animation for icons */
@keyframes float-smooth {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(1deg);
    }

    50% {
        transform: translateY(-15px) rotate(0deg);
    }

    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

/* Gradient animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Road line animation */
@keyframes road-line {
    0% {
        stroke-dashoffset: 1000;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* Payment success animation */
@keyframes payment-success {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Counter number animation */
@keyframes counter-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card flip 3D effect */
@keyframes card-flip {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }

    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* Ripple effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========== SCROLL ANIMATIONS ========== */

.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scroll-scale-up {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-scale-up.active {
    opacity: 1;
    transform: scale(1);
}

/* ========== ENHANCED HERO SECTION ========== */

.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Animated parking spots in background */
.hero-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    animation: parking-pulse 4s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -50px;
    animation: parking-pulse 5s ease-in-out infinite 1s;
}

/* Floating parking indicators */
.parking-indicator {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--parkee-primary);
    border-radius: 50%;
    animation: pin-bounce 2s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.parking-indicator::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    animation: parking-pulse 2s ease-in-out infinite;
}

/* ========== ENHANCED FEATURE CARDS ========== */

.single-feature {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.single-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(20, 184, 166, 0.1) 100%);
    transition: all 0.4s ease;
    z-index: 0;
}

.single-feature:hover::before {
    left: 0;
}

.single-feature:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

.single-feature .icon {
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    animation: float-smooth 3s ease-in-out infinite;
}

.single-feature:hover .icon {
    transform: scale(1.1) rotate(5deg);
    animation-play-state: paused;
}

.single-feature .content {
    position: relative;
    z-index: 1;
}

/* ========== STEP CARDS WITH ANIMATION ========== */

.step-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--parkee-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.step-card:hover::before {
    transform: scaleX(1);
}

.step-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.25);
}

.step-number {
    position: relative;
    width: 70px;
    height: 70px;
    background: var(--parkee-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 25px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    animation: parking-pulse 3s ease-in-out infinite;
}

.step-card:hover .step-number {
    transform: rotate(360deg) scale(1.1);
    animation-play-state: paused;
}

/* ========== ANIMATED BUTTONS ========== */

.main-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.main-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.main-btn:hover::before {
    width: 300px;
    height: 300px;
}

.main-btn:active {
    transform: scale(0.95);
}

/* ========== STATISTICS SECTION ========== */

.stats-section {
    position: relative;
    background: var(--parkee-gradient);
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px);
    animation: road-line 20s linear infinite;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    animation: counter-up 1s ease-out;
}

/* ========== POLICY CARDS ========== */

.policy-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.policy-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--parkee-gradient);
    opacity: 0.1;
    border-radius: 0 20px 0 100%;
    transition: all 0.4s ease;
}

.policy-card:hover::after {
    width: 200px;
    height: 200px;
}

.policy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.2);
}

.policy-icon {
    width: 90px;
    height: 90px;
    background: var(--parkee-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 40px;
    transition: all 0.4s ease;
    animation: float-smooth 4s ease-in-out infinite;
}

.policy-card:hover .policy-icon {
    transform: rotate(360deg) scale(1.1);
    animation-play-state: paused;
}

/* ========== GLASSMORPHISM EFFECTS ========== */

.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

/* ========== PARALLAX ELEMENTS ========== */

.parallax-element {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* ========== LOADING ANIMATION ========== */

.preloader .ytp-spinner-circle {
    border-color: var(--parkee-primary) var(--parkee-secondary) transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========== SCROLL PROGRESS BAR ========== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--parkee-gradient);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========== CUSTOM SCROLLBAR ========== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--parkee-gradient);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--parkee-primary);
}

/* ========== RESPONSIVE ANIMATIONS ========== */

@media (max-width: 768px) {

    /* Reduce animation complexity on mobile for performance */
    .single-feature,
    .step-card,
    .policy-card {
        animation: none;
    }

    .single-feature .icon,
    .policy-icon {
        animation: none;
    }

    .hero-section {
        animation: none;
    }

    .step-number {
        animation: none;
    }
}

/* ========== ACCESSIBILITY ========== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== HOVER GLOW EFFECTS ========== */

.glow-on-hover {
    position: relative;
}

.glow-on-hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--parkee-gradient);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(10px);
    transition: opacity 0.3s ease;
}

.glow-on-hover:hover::after {
    opacity: 0.7;
}

/* ========== STAGGER ANIMATIONS ========== */

.stagger-animation>* {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-animation>*:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}