.overlay {
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  display: flex;
  justify-content: center;  
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s;
  background-image: url('../images/bg_close.png');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: left top; 
  background-size: cover;
    
}

.overlay img{
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  transform: scale(0.95);
  transition: transform .3s;
}

.overlay:target {
  visibility: visible;
  opacity: 100;
  outline: none;
  cursor: default;
}

.overlay:target img {
    transform: scale(1);
}
