


#gallery {
  padding-top: 40px;
}
@media screen and (min-width: 991px) {
  #gallery {
    padding: 60px 30px 0 30px;
  }
}

.img-wrapper {
  position: relative;
  margin-top: 15px;
}
.img-wrapper img {
  width: 100%;
  height: 228px;

}

.img-overlay {
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
}
.img-overlay i {
  color: #fff;
  font-size: 3em;
}

#overlay {
  background: rgba(0, 0, 0, 0.7);
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
#overlay img {
  margin: 0;
  width: 80%;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  padding: 5%;
}
@media screen and (min-width: 768px) {
  #overlay img {
    width: 60%;
  }
}
@media screen and (min-width: 1200px) {
  #overlay img {
    width: 50%;
  }
}

#nextButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
}
#nextButton:hover {
  opacity: 0.7;
}
@media screen and (min-width: 768px) {
  #nextButton {
    font-size: 3em;
  }
}

#prevButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
}
#prevButton:hover {
  opacity: 0.7;
}
@media screen and (min-width: 768px) {
  #prevButton {
    font-size: 3em;
  }
  #contenitore{height: 90.5vw; width: 88vw; margin: 12vw auto;}
}

@media (max-width: 768px) {
  #contenitore{height: 90.5vw!important; width: 88vw!important; margin: 12vw auto!important;}

    .wall {
      grid-template-columns: repeat(2, 1fr); /* 2 colonne per schermi piccoli */
    }

    .wall{min-height: 300px!important;}

}

#exitButton {
  color: #fff;
  font-size: 2em;
  transition: opacity 0.8s;
  position: absolute;
  top: 15px;
  right: 15px;
}
#exitButton:hover {
  opacity: 0.7;
}
@media screen and (min-width: 768px) {
  #exitButton {
    font-size: 3em;
  }

  /* Imposta le immagini in modo da non essere allungate */
  .wall .slide .image {
    width: 100%;
    height: auto;
  }

  .wall .slide .image .image-in {
    width: 100%;
    height: auto;
  }

  /* Adatta le dimensioni della parete */
  .wall {
    min-height: 300px; /* Imposta un'altezza minima più ridotta */
  }

  /* Adatta il testo per schermi piccoli */
  .wall .slide .text {
    width: 90%; /* Rendi il testo più largo per dispositivi mobili */
    padding: 10px;
  }

  /* Riduzi il padding per migliorare la visualizzazione su schermi piccoli */
  .wall .slide .text h1 {
    font-size: 1.5rem;
  }

  /* Adattamenti per pulsanti e altri elementi */
  .wall button {
    width: 15%;
    padding-bottom: 15%;
    top: 5%;
    right: 5%;
  }


}



.wall {
  width: 100%;
  height: 100%;
  /*position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);*/
  overflow: hidden;
  box-sizing: border-box;
  background-color: #000;
  min-height: 800px;

  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonne di default per desktop */
  grid-gap: 20px; /* Spazio tra gli elementi */
}
.wall div {
  box-sizing: border-box;
}
.wall .slide {
  position: absolute;
  left: 0%;
  top: 0%;
  height: 100%;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  background-color: #333;
  opacity: 0;
}
.wall .slide .image {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 100%;
  width: 100%;
  transform: translateX(-50%) translateY(-50%);
}
.wall .slide .image .image-in {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 105%;
  width: 105%;
  background-size: cover;
  background-position: center;
  transform: translateX(-50%) translateY(-50%);
}
.wall .slide .image .image-in.image2 {
  filter: gray; /* IE6-9 */
  -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */
  filter: brightness(0.7);
  transition: opacity 0.5s;
}
.wall .slide:hover .image-in.image2 {
  opacity: 0;
}
.wall .slide:nth-child(1) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_1a.webp);
}
.wall .slide:nth-child(2) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_5a.webp);
}
.wall .slide:nth-child(3) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_2a.webp);
}
.wall .slide:nth-child(4) .image div {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_3a.webp);
}
.wall .slide:nth-child(5) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_4a.webp);
}
.wall .slide:nth-child(6) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_9a.webp);
}
.wall .slide:nth-child(7) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_12a.webp);
}
.wall .slide:nth-child(8) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_9a.webp);
}
.wall .slide:nth-child(9) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_5a.webp);
}
.wall .slide:nth-child(10) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_6a.webp);
}
.wall .slide:nth-child(11) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_10a.webp);
}
.wall .slide:nth-child(12) .image .image-in {
  background-image: url(https://insufflaggiofrosinone.it/assets/img/images/newimg/gallery_7a.webp);
}


.wall button {
  position: absolute;
  right: 5%;
  top: 5%;
  width: 10%;
  height: 0%;
  padding-bottom: 10%;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.5s;
  top: -30%;
  right: -30%;
}
.wall button:before, .wall button:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30%;
  height: 100%;
  background-color: #ffffff;
  transform: translateX(-50%) translateY(-50%) rotateZ(45deg);
  border-radius: 100px;
}
.wall button:after {
  transform: translateX(-50%) translateY(-50%) rotateZ(-45deg);
}
.wall button:hover {
  opacity: 1;
}
.wall .image .preloader {
  position: absolute;
  width: 10%;
  height: 0%;
  padding-bottom: 10%;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}
.wall .image .preloader div {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  overflow: hidden;
  animation: animatePreloader 1s infinite linear;
  transform-origin: 50% 100%;
}
.wall .image .preloader div:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  border: 3px solid #ccc;
  border-radius: 50%;
  box-sizing: border-box;
}
.wall .image .preloader div:nth-child(2) {
  width: 60%;
  height: 60%;
  top: 20%;
  animation: animatePreloader 0.5s infinite linear;
}
@keyframes animatePreloader {
  0% {
    transform: translateX(-50%) translateY(-50%) rotateZ(0deg);
  }
  100% {
    transform: translateX(-50%) translateY(-50%) rotateZ(360deg);
  }
}

.wall .slide .text {
  position: absolute;
  color: #333;
  box-sizing: border-box;
  padding: 20px;
  margin: 20px;
  width: 50%;
  background-color: rgb(255 255 255 / 79%);
  opacity: 0;
  transition: background-color 0.5s;
}
.wall .slide .text:hover {
  background-color: rgba(255, 255, 255, 1);
}
.wall .slide .text h1, .wall .slide .text div {
  margin: 0px;
  padding: 0px;
}
.wall .slide .text h1 {
  text-transform: uppercase;
  font-family: 'Saira Extra Condensed', sans-serif;
}
.wall .slide .text div {
  margin-top: 20px;
  font-family: 'Inconsolata', monospace;
}

.wall .hint {
  position: absolute;
  left: 50%;
  bottom: 20px;
  color: #333;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 10px;
  box-sizing: border-box;
  transform: translateX(-50%);
  font-family: 'Inconsolata', monospace;
  opacity: 0.1;
  transition: all 0.5s;
  cursor: pointer;
}
.wall .hint:hover {
  opacity: 1;
}