/* glitch-effect.css */
.glitch-effect {
  position: relative;
  display: inline-block;
  cursor: pointer;
  overflow: hidden;
}

.glitch-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 1;
  transition: background 0.3s ease;
}

.glitch-effect:hover::before {
  background: rgba(0, 0, 0, 0.05);
}

.glitch-effect img {
  display: block;
  transition: transform 0.3s ease;
}

.glitch-effect:hover img {
  transform: scale(1.02);
}

/* Additional styling for featured images */
.featured-image-container.glitch-effect .featured-image-overlay {
  z-index: 10; /* Ensure overlay stays above the glitch effect */
}

/* Add a subtle indicator for glitchable images */
.glitch-effect::after {
  content: '';
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 5;
  filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.5));
}

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

/* Optional pulsing effect for randomly glitching images */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(155, 114, 170, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(155, 114, 170, 0); }
  100% { box-shadow: 0 0 0 0 rgba(155, 114, 170, 0); }
}

.random-glitch {
  animation: pulse 4s infinite;
}