
.thumbs {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  /* width:500px; */
  max-width:90%;
  > a {
    max-width:400px;
    height:auto;
    margin:10px;
    overflow:hidden;
    border-radius:15px;
    box-shadow:0 0 0 3px white, 0 5px 8px 3px rgba(black, 0.6);
    img {
      transform:scale(1);
      transition:transform 0.1s ease-in-out;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    &:hover {
      img {
        transform:scale(1.1);
      }
    }
  }
}

.lightbox {
  position:fixed;
  z-index: 1001;  /* nav z-index: 1000; */
  background:rgba(black,0.5);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height:100%;
  width: 100%;
  left:0;
  top:0;
  transform:translateY(-100%);
  opacity:0;
  transition:opacity 0.5s ease-in-out;
  &:has(div:target) {
    transform:translateY(0%);
    opacity:1;
  }
  a.navg {
    text-decoration:none;
    color:white;
    font-size:40px;
    text-shadow:0 2px 2px rgba(black,0.8);
    font-weight:200;
  }
  .target {
    position:absolute;
    height:100%;
    width:100%;
    display:flex;
    transform:scale(0);
    align-items:center;
    justify-content:space-between;
    *:first-child,*:last-child {
      flex:0 0 100px;
      text-align:center;
      @media all and (max-width:600px){
        flex:0 0 50px;
      }
    }
    .content {
      transform:scale(0.9);
      opacity:0;
      flex:1 1 auto;
      align-self: center;
      max-height:100%;
      min-height:0;
      max-width:calc(100% - 200px);
      min-width:0;
      border-radius:5px;
      overflow:hidden;
      box-shadow:0 0 0 3px white, 0 5px 8px 3px rgba(black, 0.6);
      transition:transform 0.25s ease-in-out,opacity 0.25s ease-in-out;
      img {
        width: auto;
        height: auto;
        max-width: calc(100% - 40px);
        max-height: calc(100vh - 40px);
        object-fit: contain;
        display: block;
        margin: 0 auto;
      }
    }
    &:target {
      transform:scale(1);
      .content {
        transform:scale(1);
        opacity:1;
      }
    }
  }
  .close {
    position:absolute;
    right:30px;
    top:30px;
  }
}

.lightbox a.navg img {
  display: block;
  /* ewentualnie centrowanie: */
  margin: 0 auto;
}


@media (max-width: 600px) {
  /* Miniaturki nie reagują na kliknięcie */
  .thumbs a {
    pointer-events: none;
  }
  /* Lightbox w ogóle nie pojawi się */
  .lightbox {
    display: none !important;
  }
}