.gallery {
  padding: 2.5rem 0;
}

.gallery .gallery__content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.gallery__img {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery__img img {
  transition: transform 0.3s ease;
}

.gallery__img:hover img {
  transform: scale(1.1);
}

.gallery__img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #222;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery__img:hover::after {
  opacity: 0.5;
}

.gallery__img:hover .zoom-icon {
  opacity: 1;
}

.gallery__img .zoom-icon {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  z-index: 10;
  width: 48px;
  height: 48px;
}

@media screen and (max-width: 1024px) {
  .gallery .gallery__content {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .gallery .gallery__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 475px) {
  .gallery .gallery__content {
    grid-template-columns: 1fr;
    place-items: center;
  }
}

/* Modal de visualização da imagem */
#preview-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
}

.preview-box {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 2rem;
  transform: translate(-50%, -50%);
  width: 100%;
}

.preview-box img {
  margin: 0 auto;
  display: block;
}

#modal-close-btn {
  position: absolute;
  right: 2rem;
  top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#modal-prev-img, #modal-prev-img-empresa {
  position: absolute;
  top: 50%;
  left: 2rem;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#modal-next-img, #modal-next-img-empresa {
  position: absolute;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#modal-prev-img svg,
#modal-next-img svg {
  width: 64px;
  height: 64px;
}

/* #modal-prev-img-empresa svg, 
#modal-next-img-empresa svg {
  width: 64px;
  height: 64px;
} */

#modal-img-counter, #modal-img-counter-empresa {
  position: absolute;
  left: 50%;
  color: #fff;
  bottom: 2rem;
  transform: translateX(-50%);
}

/* Estilo do Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: none;
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

#caption {
  text-align: center;
  color: #ccc;
  font-size: 16px;
  padding: 10px;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  #imageModal, #imageModalEmpresa {
    padding: 20px;
  }

  .modal-content {
    width: 100%;
    height: 400px;
  }

  .preview-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


#modal-prev-img-empresa,
#modal-next-img-empresa {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
}

#modal-prev-img-empresa svg,
#modal-next-img-empresa svg {
    width: 64px;
    height: 64px;
}
