#hgallery {
  display: block;
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s;
  z-index: 99999;
}

.hg-disable-scrolling {
  overflow: hidden !important;
}

#hg-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
}

#hg-bg::after {
  content: "\00d7";  
  position: absolute;  
  top: 20px;
  right: 30px;
  width: 30px;
  height: 30px;    
  background-size: contain;
  cursor: pointer;
  color: #fff;  
  font-size: 50px;
  font-weight: bold;
  opacity: 0.7;
}

#hg-bg::after:hover {
  opacity: 1;
  color: #fff;
}

#hgallery.open {
  visibility: visible !important;
  opacity: 1;
}

#hg-pic-cont {
  max-width: calc(70% - 40px);
  max-height: 90vh;
  cursor: default;
  z-index: 12;
  position: relative;
  background-color: white;
  transition: transform 0.3s;
  transform: scale(1);
}

#hg-pic-cont.hg-transition {
  transform: scale(0.1);
}

#hg-subtext {
  color: #ddd;
  font-size: 14px;
  position: absolute;
  display: block;
  left: 5px;
  top: calc(100% + 6px);
}

#hg-howmany {
  color: #aaa;
  font-size: 14px;
  position: absolute;
  display: block;
  right: 5px;
  bottom: -20px;
}

#hg-pic {
  width: auto;
  height: auto;
  min-height: 100px;
  min-width: 100px;
  max-width: 100%;
  max-height: 90vh;
  box-sizing: border-box;
  display: block;
  cursor: default;
  object-fit: contain;
  margin: 0;

  /*    border-radius: 5px;*/
}

#hg-pic:hover {
  transform: none;
  box-shadow: none;
}

#hgallery button {
  position: absolute;
  display: block;
  margin: auto 0;
  width: 60px;
  height: 60px;
  z-index: 13;
  cursor: pointer;
  background-color: transparent;
  background-image: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZmZmZmZmIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgICA8cGF0aCBkPSJNOC41OSAxNi4zNGw0LjU4LTQuNTktNC41OC00LjU5TDEwIDUuNzVsNiA2LTYgNnoiLz4NCiAgICA8cGF0aCBkPSJNMC0uMjVoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4NCjwvc3ZnPg==');
  background-size: contain;
  border: 0;
  outline: 0;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  visibility: hidden;
}

#hgallery.open button {
  visibility: visible;
  opacity: 0.7;
}

#hgallery button:hover {
  opacity: 1;
}

#hgallery button#hg-prev {
  left: 10px;
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

#hgallery button#hg-prev:active {
  left: 7px;
}

#hgallery button#hg-next {
  right: 10px;
}

#hgallery button#hg-next:active {
  right: 7px;
}

.hg-unvisible {
  opacity: 0 !important;
  visibility: hidden;
}

@media (max-width: 1100px) {
  #hg-pic-cont {
    max-width: calc(100% - 40px);
  }
}
#FotoSlider {
  position: relative;  
}
#FotoSlider .MS-content {  
  overflow: hidden;
  white-space: nowrap;  
}
@media (max-width: 767px) {
  #FotoSlider .MS-content {
    margin: 0;
  }
}
#FotoSlider .MS-content .item {
  display: inline-block;
  height: 100%;
  overflow: hidden;
  position: relative;
  vertical-align: top;    
  width: 25%;
  padding: 10px;  
}
#FotoSlider .MS-content .item img:hover{		
  cursor: pointer;  
  transform: scale(1.2);
  opacity: 0.7;
}
@media (max-width: 1200px) {
  #FotoSlider .MS-content .item {
    width: 25%;
  }
}
@media (max-width: 992px) {
  #FotoSlider .MS-content .item {
    width: 33.3333%;
  }
}
@media (max-width: 767px) {
  #FotoSlider .MS-content .item {
    width: 50%;
  }
}
#FotoSlider .MS-content .item p {
  font-size: 30px;
  text-align: center;
  line-height: 1;
  vertical-align: middle;
  margin: 0;
  padding: 10px 0;
}
#FotoSlider .MS-controls button {
  position: absolute;
  border: none;
  background: transparent;
  font-size: 30px;
  outline: 0;
  top: 35px;
}
@media (max-width: 767px) {
  #FotoSlider .MS-controls button {
    display: none;
  }
  #hgallery button {
  width: 40px;
  height: 40px;
  }
}
#FotoSlider .MS-controls button:hover {
  cursor: pointer;
}
#FotoSlider .MS-controls .MS-left {
  left: 10px;
}
@media (max-width: 992px) {
  #FotoSlider .MS-controls .MS-left {
    left: -2px;
  }
}
#FotoSlider .MS-controls .MS-right {
  right: 10px;
}
@media (max-width: 992px) {
  #FotoSlider .MS-controls .MS-right {
    right: -2px;
  }
}