*{margin:0;padding:0}

/*body {
box-sizing: border-box;
  font-family: Arial;
  margin: 0;
  background-color: #fde0e0;    
  height: 100vh;
} */
html{background: url(../image/images1/bcgr.jpg) no-repeat center center fixed;    /*růžový*/
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
header { width:100%;
  /*background-color: white;*/  background:rgba(250, 7, 90, 0.1);   /*(0, 0, 0, 0.1);*/
  margin:0;padding:0px -30px 0 30px;
  text-align: center;
}

header h2 {
  color: #ffffff;
  font-weight: 900;
  margin-bottom: 5px; padding:0px;
}

.btn {
  display: inline-block;
  background-color:#b22222; /*firebrick; = #b22222*/
  padding: 6px 12px;
  color: #fff;
  border-radius: 18px;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  filter: brightness(1.1);
}

.hes-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 20px;                                                                /*--------------------------------vzdálenost mezi obr-------------------------------------*/
  margin-top:20px;padding: 10px 10px 10px 0px;
  columns: 4; /*columns: 1;*/
}

.hes-gallery img {
  width: 100%; padding:5px 5px 20px 5px;background:white;
  object-fit: cover;
  transition: 0.3s;
  cursor: pointer;
  box-shadow: 2px 2px 5px #555;
  opacity: 0.6;  
  -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius:5px; border-radius: 5px;
}

.hes-gallery img:hover {
  transform: scale(1.04);
  box-shadow: 5px 5px 12px #555; /*box-shadow: 2px 2px 6px #555;*/
  opacity: 1.0;
}

h2 {
  margin-top: 30px;
  margin-bottom: 5px;
  font-variant: small-caps;
  text-align: center;
  color: #481212;
}

p {
  margin: 0;
}

@media (max-width: 800px) {
  main {
    width: 100%;
  }
  header img {
    width: 80%;
    object-fit: contain;
  }
  .hes-gallery {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .hes-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

/*-------------------------------------------------------------------gallery-------------------------------------------------------------------------*/
#hgallery {
  display: block;
  content: '';
  position: fixed;
  top: 0;
  left: 0px;
  width: 100%;
  height: 100vh;     
  background-color: rgba(0, 0, 0, 0.9);
  visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s;
  z-index: 99;
}

.hg-disable-scrolling {
  overflow: hidden !important;
}

#hg-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10vh;
  z-index: 1;
}

#hg-bg::after {
  content: '';
  position: absolute;
  display: block;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOSA2LjQxTDE3LjU5IDUgMTIgMTAuNTkgNi40MSA1IDUgNi40MSAxMC41OSAxMiA1IDE3LjU5IDYuNDEgMTkgMTIgMTMuNDEgMTcuNTkgMTkgMTkgMTcuNTkgMTMuNDEgMTJ6Ii8+CiAgICA8cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+Cjwvc3ZnPg==);
  background-position: center;
  background-size: contain;
  cursor: pointer;
  opacity: 0.8;
}

#hg-bg::after:hover {
  background-color: white;
  -moz-border-radius: 10px; -khtml-border-radius: 10px; -webkit-border-radius:10px; border-radius: 10px;
}

#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: rgba(255, 255, 255, 0.3);                                                                                        /*barva*/
 /* background-color: transparent;*/ padding:10px 10px 40px 10px;margin-top:0px;margin-bottom:10px; border:2px solid white;
  transition: transform 0.3s;
  transform: scale(1);
  -moz-border-radius: 10px; -khtml-border-radius: 10px; -webkit-border-radius:10px; border-radius: 10px;  
}

#hg-pic-cont.hg-transition {
  transform: scale(0.1);
}

#hg-subtext {
  color: #ddd;
  font-size: 14px;
  position: absolute;
  display: block;
  left: 22px;
  bottom: 11px; z-index:999; /*padding:3px 5px; background:#545354; 
  -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius:5px; border-radius: 5px;
  /*top: calc(100% + 6px);*/
}

#hg-howmany {
  color: #aaa;
  font-size: 14px;
  position: absolute;
  display: block;
  right: 22px;
  bottom: 11px; z-index:999; /* padding:3px 5px;background:#545354;
  -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius:5px; border-radius: 5px;
  right: 5px;
  bottom: -20px;*/
}

#hg-pic {        /*-------------picture-------------*/
  width: auto;
  height: auto;
  min-height: 100px;
  min-width: 100px;
  max-width: 100%;
  max-height: 80vh;        /*90vh;*/                                            /*---------------------------------------výška obr---------------------------------------*/
  box-sizing: border-box;
  display: block;
  cursor: default;
  object-fit: contain;
  margin: 0;
  border-top-left-radius: 10px;
border-top-right-radius: 10px;
  /*-moz-border-radius: 20px; -khtml-border-radius: 20px; -webkit-border-radius:20px; border-radius: 20px;
    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: 11;
  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;
}

#hgallery #hg-prev-onpic,
#hgallery #hg-next-onpic {
  position: absolute;
  top: 0;
  left: 0;
  width: 34%;
  height: 100%;
  cursor: pointer;
}

#hgallery #hg-next-onpic {
  right: 0;
  left: auto;
  width: 66%;
}

.hg-unvisible {
  opacity: 0 !important;
  visibility: hidden;
}

@media (max-width: 1100px) {
  #hg-pic-cont {
    max-width: calc(100% - 40px);
  }
}


.zpet{position: fixed; /*transition grey color*/
height: 60px;
right:150px;  /*yes*/
bottom:10px;
z-index:2;
}  
img.grey{position: absolute;
left: 0px;
top: 0;
z-index: 10;
} 
img.color{position: absolute;
left: 0px; 
top: 0;
z-index:20px;
}
