/* ============================================
   PlayWidTech - Advanced Animations
   Smooth micro-interactions and transitions
   ============================================ */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Bounce Animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

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

    60% {
        transform: translateY(-5px);
    }
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

    to {
        transform: rotate(360deg);
    }
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

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

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   UTILITY ANIMATION CLASSES
   ============================================ */

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 2s ease infinite;
}

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

/* Delayed Animations */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

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

.delay-500 {
    animation-delay: 0.5s;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

/* Gradient Border Hover */
.hover-gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.hover-gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #00A651, #008B8B, #0066B3);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hover-gradient-border:hover::before {
    opacity: 1;
}

/* Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Glow Effect */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 166, 81, 0.3);
}

/* Scale Effect */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Image Zoom */
.image-zoom-container {
    overflow: hidden;
    border-radius: 16px;
}

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

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

/* Overlay Effect */
.overlay-effect {
    position: relative;
    overflow: hidden;
}

.overlay-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.9), rgba(0, 102, 179, 0.9));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay-effect:hover::after {
    opacity: 1;
}

.overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay-effect:hover .overlay-content {
    opacity: 1;
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 166, 81, 0.2);
    border-top-color: #00A651;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.dots-loading {
    display: flex;
    gap: 8px;
}

.dots-loading span {
    width: 12px;
    height: 12px;
    background: #00A651;
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.dots-loading span:nth-child(2) {
    animation-delay: 0.2s;
}

.dots-loading span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   PROGRESS ANIMATIONS
   ============================================ */

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 166, 81, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00A651, #0066B3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.progress-fill.animate {
    transform: scaleX(1);
}

/* ============================================
   TESTIMONIAL SLIDER ANIMATIONS
   ============================================ */

.slide-in {
    animation: fadeInRight 0.6s ease forwards;
}

.slide-out {
    animation: fadeInLeft 0.6s ease forwards reverse;
}

/* ============================================
   PARTICLE EFFECTS
   ============================================ */

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00A651;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

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

.gradient-text {
    background: linear-gradient(135deg, #00A651, #008B8B, #0066B3);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid #00A651;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: #00A651;
    }
}

/* ============================================
   BUTTON RIPPLE EFFECT
   ============================================ */

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   STAGGER ANIMATIONS
   ============================================ */

.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animate {
    animation: fadeInUp 0.6s ease 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;
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

.smooth-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-transform {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-opacity {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PERFORMANCE OPTIMIZATION
   ============================================ */

.will-animate {
    will-change: transform, opacity;
}

.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
}