.my-custom-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #2f8be6;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.my-custom-button:hover {
    background-color: #1a6dc1;
    color: #fff;
}
.my-animation span{
    display: inline-block;
}



.my-animation:hover span:nth-child(2n+1), .my-animation:hover span:nth-child(2n) {
  -webkit-animation-timing-function: cubic-bezier(0.75, 0, 0.125, 1);
  transition-animation-function: cubic-bezier(0.75, 0, 0.125, 1);
}
.my-animation:hover span:nth-child(2n+1) {
  -webkit-animation: nanuk_1 0.5s forwards;
  animation: nanuk_1 0.5s forwards;
}
.my-animation:hover span:nth-child(2n) {
  -webkit-animation: nanuk_2 0.5s forwards;
  animation: nanuk_2 0.5s forwards;
}

/* Staggered delays for wave effect */
.my-animation:hover span:nth-child(1) { animation-delay: 0s; }
.my-animation:hover span:nth-child(2) { animation-delay: 0.05s; }
.my-animation:hover span:nth-child(3) { animation-delay: 0.1s; }
.my-animation:hover span:nth-child(4) { animation-delay: 0.15s; }
.my-animation:hover span:nth-child(5) { animation-delay: 0.2s; }
.my-animation:hover span:nth-child(6) { animation-delay: 0.25s; }
.my-animation:hover span:nth-child(7) { animation-delay: 0.3s; }
.my-animation:hover span:nth-child(8) { animation-delay: 0.35s; }
.my-animation:hover span:nth-child(9) { animation-delay: 0.4s; }
.my-animation:hover span:nth-child(10) { animation-delay: 0.45s; }
.my-animation:hover span:nth-child(11) { animation-delay: 0.5s; }
.my-animation:hover span:nth-child(12) { animation-delay: 0.55s; }
.my-animation:hover span:nth-child(13) { animation-delay: 0.6s; }
.my-animation:hover span:nth-child(14) { animation-delay: 0.65s; }
.my-animation:hover span:nth-child(15) { animation-delay: 0.7s; }
.my-animation:hover span:nth-child(16) { animation-delay: 0.75s; }
.my-animation:hover span:nth-child(17) { animation-delay: 0.8s; }
.my-animation:hover span:nth-child(18) { animation-delay: 0.85s; }
.my-animation:hover span:nth-child(19) { animation-delay: 0.9s; }
.my-animation:hover span:nth-child(20) { animation-delay: 0.95s; }
.my-animation:hover span:nth-child(21) { animation-delay: 1s; }
.my-animation:hover span:nth-child(22) { animation-delay: 1.05s; }
.my-animation:hover span:nth-child(23) { animation-delay: 1.1s; }
.my-animation:hover span:nth-child(24) { animation-delay: 1.15s; }
.my-animation:hover span:nth-child(25) { animation-delay: 1.2s; }
.my-animation:hover span:nth-child(26) { animation-delay: 1.25s; }
.my-animation:hover span:nth-child(27) { animation-delay: 1.3s; }
.my-animation:hover span:nth-child(28) { animation-delay: 1.35s; }
.my-animation:hover span:nth-child(29) { animation-delay: 1.4s; }
.my-animation:hover span:nth-child(30) { animation-delay: 1.45s; }
.my-animation:hover span:nth-child(31) { animation-delay: 1.5s; }
.my-animation:hover span:nth-child(32) { animation-delay: 1.55s; }
.my-animation:hover span:nth-child(33) { animation-delay: 1.6s; }
.my-animation:hover span:nth-child(34) { animation-delay: 1.65s; }
.my-animation:hover span:nth-child(35) { animation-delay: 1.7s; }
.my-animation:hover span:nth-child(36) { animation-delay: 1.75s; }
.my-animation:hover span:nth-child(37) { animation-delay: 1.8s; }
.my-animation:hover span:nth-child(38) { animation-delay: 1.85s; }
.my-animation:hover span:nth-child(39) { animation-delay: 1.9s; }
.my-animation:hover span:nth-child(40) { animation-delay: 1.95s; }




@keyframes nanuk_1 {

    0%,
    100% {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    49% {
        opacity: 1;
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
    }

    50% {
        opacity: 0;
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
        color: inherit;
    }

    51% {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
        color: inherit;
    }

    100% {
        color: inherit;
    }
}

@keyframes nanuk_2 {

    0%,
    100% {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    49% {
        opacity: 1;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
    }

    50% {
        opacity: 0;
        -webkit-transform: translate3d(0, -100%, 0);
        transform: translate3d(0, -100%, 0);
        color: inherit;
    }

    51% {
        opacity: 0;
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
        color: inherit;
    }

    100% {
        color: inherit;
    }
}
