 /* Контейнер галереи в виде гибкой сетки */
 #lightgallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background-color: #222;
    border-radius: 5px;
  }
  /* Элемент галереи занимает 25% ширины, можно настроить под дизайн */
  #lightgallery a {
    width: calc(20% - 10px);
    overflow: hidden;
  }
  #lightgallery a img {
    width: 100%;
    display: block;
    border-radius: 5px;
    transition: transform 0.3s;
    cursor: pointer;
  }
  #lightgallery a img:hover {
    transform: scale(1.05);
  }
  /* На мобильных устройствах показываем по 2 элемента в строке */
  @media (max-width: 768px) {
    #lightgallery a {
      width: calc(33% - 10px);
    }
    #lightgallery a:last {
      display: none;
    }
  }