#fotogalerie{
    padding: 10px;
}
.foto {
    border: 1px solid gray;
    padding: 6px;
    box-shadow: 3px 3px 6px #999999;
    width: 100%;
    margin-bottom: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-origin: content-box;
    background-color: white;
}
#fotogalerie img {
    width: 100%;
}
#modal {
    padding: 0;
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: black;
}
.modalBtn {
    cursor: pointer;
    color: white;
    position: absolute;
    font-size: 35px;
    font-weight: bold;
}
.modalBtn:hover {
    color: #999;
}
#closeBtn {
    top: 20px;
    right: 35px;
}
#prevBtn,
#nextBtn {
    top: 50%;
    padding: 40px;
    margin-top: -50px;
    user-select: none;
    -webkit-user-select: none;
}
#prevBtn {
  left: 0;
  border-radius: 0 3px 3px 0;
}
#nextBtn {
  right: 0;
  border-radius: 3px 0 0 3px;
}
#fotoModal {
    height: 100%;
    width: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-origin: content-box;
}

@media only screen and (min-width: 580px) {
.foto {
    width: 30%;
    padding: 2px;
    height: 150px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-origin: content-box;
    margin-right: 3.33%;
    text-align: center;
    float: left;
}
.foto img {
    display: none;
}
#fotogalerie .foto:hover {
    opacity: 0.7;
}
#fotogalerie::after {
    content: "";
    clear: both;
    display: table;
}
#modal {
    padding: 20px 80px;
}
}