/* ============================================
   GLOBAL SCROLL SNAP
   ============================================ */

html {
    scroll-snap-type: y proximity;
    scroll-snap-stop: always;
}

.lottie-placeholder {
    display: block;
    background: transparent;
}
	.animated-counter {
           
            transition: color 0.3s ease; /* Optional: smooth color changes */
        }
        
        .animated-counter.counting {
            /* Optional: Add styles while counting */
             /* Blue while animating */
        }

[class*="fade-in-"],
[class*="slide-in-"],
[class*="scale-in"],
[class*="rotate-in"],
[class*="offset-"],
[class*="from-"] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0s;
    
    /* iOS Safari Performance Fixes */
    will-change: transform, opacity;
    transform: translateZ(0); 
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Ensure floating animations are not affected by scroll-triggered styles */
[class*="float"] {
    opacity: 1 !important;
    transition: none !important;
    /* Keep hardware acceleration for floating too */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Animate class triggers the animation - iOS Safari Optimized */
[class*="fade-in-"].animate,
[class*="slide-in-"].animate,
[class*="scale-in"].animate,
[class*="rotate-in"].animate,
[class*="offset-"].animate,
[class*="from-"].animate {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg); /* Use 3D transforms */
    -webkit-transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
}

/* =================================
   FADE ANIMATIONS - iOS Safari Optimized
   ================================= */

.fade-in-up {
    transform: translate3d(0, 30px, 0); /* Use 3D transform for iOS */
    -webkit-transform: translate3d(0, 30px, 0);
}

.fade-in-down {
    transform: translate3d(0, -30px, 0);
    -webkit-transform: translate3d(0, -30px, 0);
}

.fade-in-left {
    transform: translate3d(-30px, 0, 0);
    -webkit-transform: translate3d(-30px, 0, 0);
}

.fade-in-right {
    transform: translate3d(30px, 0, 0);
    -webkit-transform: translate3d(30px, 0, 0);
}

.fade-in {
    /* Simple fade with no movement */
    transform: none;
    -webkit-transform: none;
}

/* =================================
   SLIDE ANIMATIONS (More dramatic)
   ================================= */

.slide-in-up {
    transform: translateY(60px);
}

.slide-in-left {
    transform: translateX(-60px);
}

.slide-in-right {
    transform: translateX(60px);
}

/* =================================
   OFFSET ANIMATIONS (Custom distances)
   ================================= */

.offset-up-100 {
    transform: translateY(100px);
}

.offset-up-150 {
    transform: translateY(150px);
}

.offset-up-200 {
    transform: translateY(200px);
}

.offset-down-100 {
    transform: translateY(-100px);
}

.offset-left-100 {
    transform: translateX(-100px);
}

.offset-right-100 {
    transform: translateX(100px);
}

/* Off-screen animations (start from completely outside viewport) */
.from-bottom {
    transform: translateY(100vh);
}

.from-top {
    transform: translateY(-100vh);
}

.from-left {
    transform: translateX(-100vw);
}

.from-right {
    transform: translateX(100vw);
}

/* =================================
   SCALE AND ROTATE ANIMATIONS
   ================================= */

.scale-in {
    transform: scale(0.8);
}

.rotate-in {
    transform: rotate(-10deg) scale(0.9);
}

/* =================================
   FLOATING ANIMATIONS
   ================================= */

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

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

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

.float-x {
    animation: float-horizontal 5s ease-in-out infinite;
}

.float-y {
    animation: float-vertical 4s ease-in-out infinite;
}

[class*="float"] {
    opacity: 1;
    will-change: transform;
}

/* =================================
   FLOATING KEYFRAMES
   ================================= */

@keyframes float {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    25% {
        transform: translate(-5px, -10px) rotate(1deg);
    }

    50% {
        transform: translate(3px, -15px) rotate(-1deg);
    }

    75% {
        transform: translate(-3px, -8px) rotate(0.5deg);
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    33% {
        transform: translate(-3px, -8px) rotate(0.5deg);
    }

    66% {
        transform: translate(2px, -12px) rotate(-0.5deg);
    }
}

@keyframes float-fast {
    0%, 100% {
        transform: translate(0px, 0px) rotate(0deg);
    }

    20% {
        transform: translate(-4px, -8px) rotate(1deg);
    }

    40% {
        transform: translate(4px, -12px) rotate(-1deg);
    }

    60% {
        transform: translate(-2px, -6px) rotate(0.5deg);
    }

    80% {
        transform: translate(2px, -10px) rotate(-0.5deg);
    }
}

@keyframes float-horizontal {
    0%, 100% {
        transform: translateX(0px) rotate(0deg);
    }

    25% {
        transform: translateX(-8px) rotate(0.5deg);
    }

    50% {
        transform: translateX(6px) rotate(-0.5deg);
    }

    75% {
        transform: translateX(-4px) rotate(0.3deg);
    }
}

@keyframes float-vertical {
    0%, 100% {
        transform: translateY(0px);
    }

    25% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(-15px);
    }

    75% {
        transform: translateY(-8px);
    }
}


/* =================================
   SCROLL SCALE
   ================================= */

.scroll-scale-up,
.scroll-scale-down {
    transform-origin: center center;
    will-change: transform;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    -webkit-transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.016s linear, -webkit-transform 0.016s linear;
    isolation: isolate;
    contain: layout style paint;
}

/* =================================
   TEXT REVEAL ANIMATIONS
   ================================= */

.text-reveal-chars,
.text-reveal-words {
    overflow: hidden;
}

.reveal-char,
.reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font: inherit;
    color: inherit;
    text-decoration: inherit;
    letter-spacing: inherit;
}

.reveal-char.animate,
.reveal-word.animate {
    opacity: 1;
    transform: translateY(0);
}

.reveal-char.fade-only,
.reveal-word.fade-only,
.reveal-char.fade-only.animate,
.reveal-word.fade-only.animate {
    transform: none;
}

.reveal-char.slide-up,
.reveal-word.slide-up {
    transform: translateY(30px);
}

.reveal-char.slide-down,
.reveal-word.slide-down {
    transform: translateY(-30px);
}

.reveal-char.scale-in,
.reveal-word.scale-in {
    transform: scale(0.8);
}

.reveal-char.rotate-in,
.reveal-word.rotate-in {
    transform: rotate(-10deg) scale(0.9);
}

/* =================================
   TIMING MODIFIERS
   ================================= */

/* Delay classes */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }
.delay-5 { transition-delay: 1.0s; }
.delay-6 { transition-delay: 1.2s; }
.delay-7 { transition-delay: 1.4s; }
.delay-8 { transition-delay: 1.6s; }
.delay-9 { transition-delay: 1.8s; }
.delay-10 { transition-delay: 2.0s; }

/* Duration classes */
.fast {
    transition-duration: 0.4s;
}

.slow {
    transition-duration: 1.2s;
}

.extra-slow {
    transition-duration: 1.8s;
}

/* =================================
   EASING MODIFIERS
   ================================= */

.ease-bounce {
    transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ease-smooth {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-sharp {
    transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}



/* ============================================
   TESTIMONIALS
   ============================================ */

.kk-testimonials-wrap {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 5px 0;
}

.kk-track-right,
.kk-track-left {
    display: flex;
    gap: 20px;
    padding-right: 20px;
    width: max-content;
    will-change: transform;
}

.kk-track-right {
    animation: scrollMarquee 30s linear infinite;
}

.kk-track-left {
    margin-top: 20px;
    animation: scrollMarqueeRev 30s linear infinite;
}

.kk-track-right:hover,
.kk-track-left:hover {
    animation-play-state: paused;
}

.kk-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.15);
}

.kk-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kk-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #5F1C8C;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
    font-family: inherit;
}

.kk-name {
    font-weight: 400;
    font-size: 18px;
    color: rgb(118, 41, 162);
    line-height: 1.2;
    font-family: inherit;
}

.kk-stars {
    display: flex;
    gap: 3px;
}

.kk-stars svg {
    width: 30px;
    height: 30px;
    fill: #5F1C8C;
}

.kk-quote {
    font-family: Helvetica, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: rgb(72, 70, 73);
    line-height: 1.6;
}

@media (max-width: 767px) {
    .kk-card {
        width: 90vw;
    }
}

@keyframes scrollMarquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 10px));
    }
}

@keyframes scrollMarqueeRev {
    from {
        transform: translateX(calc(-50% - 10px));
    }
    to {
        transform: translateX(0);
    }
}
