Nothing wrong with a little JS here and there, but itβs always nice when we can make something work without it, and thanks to :has(), there are a lot of new things that are possible with CSS only, like this effect!
@muhammadali770 share your code in something like codepen or deployed on github pages, it will make it a lot easier for people to give targeted help rather than just broad suggestions
if people can see your issue in their own browsers, it's also more likely they will help. If possible, please make a minimum viable example, so preferably just the button and CSS associated with that button, so people don't have to dig through hundreds of lines of irrelevant CSS and HTML to help you solve the issue you're having
But there is another problem. When scrolling down the page and hovering over the button, you may notice that the circle animation is not showing with scroll down. To fix this , you can commit the overflow: hidden property in the button. you will see that the header remains fixed and the pseudo-element of the button (the circle) scrolls down with the scrollbar instead of staying fixed with the button for the animation.