.glitch-container {
  overflow: hidden;
  position: relative;
  display: inline-block;
}

.glitch-image {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease-in-out;
}

.glitch-container:hover .glitch-image {
  transform: translate(-2px, -2px);
}

.glitch-container:hover .glitch-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 0, 0, 0.5); /* Цвет эффекта глича */
  mix-blend-mode: difference;
  animation: glitch-animation 2s infinite linear alternate-reverse;
}

@keyframes glitch-animation {
  0% {
    transform: translate(0);
  }
  25% {
    transform: translate(-5px, 5px);
  }
  50% {
    transform: translate(5px, -5px);
  }
  75% {
    transform: translate(-3px, 3px);
  }
  100% {
    transform: translate(0);
  }
}