#gallery {
  padding: 5.5rem 0rem 2rem;
  }
  @media screen and (min-width: 991px) {
    #gallery {
      padding: 7rem 0 2rem;
    }
  }
  
  .img-wrapper {
    position: relative;
  
  }
  .img-wrapper img {
    width: 100%;
    border-radius: 10px;
  }
  
  .img-overlay {
    cursor: pointer;
    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;
  
  }
  .gallery__container{
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 1rem;
  }
  #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;
    cursor: pointer;
  }
  #overlay img {
    margin: 0;
    width: 80%;
    height: auto;
    -o-object-fit: contain;
       object-fit: contain;
    padding: 5%;
    border-radius: 40px;
  
  }
  @media screen and (min-width: 768px) {
    #overlay img {
      width: 60%;
      border-radius: 70px;
    }
  }
  @media screen and (min-width: 1200px) {
    #overlay img {
      width: 50%;
      border-radius: 100px;
    }
  }
  
  #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;
    }
  }
  
  #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;
    }
  }




@media (max-width: 767.98px) { 
  .gallery__container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
   }
 }


 @media (max-width: 575.98px) { 
  .gallery__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
   }
 }
