/* Estilo para o modal de imagens */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 30px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
}

/* Adicionando um indicador de zoom na modal */
.modal::after {
  content: "Use a roda do mouse para zoom";
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.modal:hover::after {
  opacity: 0.3;
}

/* Estilo para o conteúdo do modal (imagem) */
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  animation-name: zoom;
  animation-duration: 0.3s;
  transform-origin: center center;
  transition: transform 0.2s ease;
}

/* Personalizando o cursor baseado no comportamento do zoom */
.modal-content:hover {
  cursor: zoom-in;
}

.modal-content.zoomed-in {
  cursor: zoom-out;
}

.modal-content.zoomed-max {
  cursor: not-allowed;
}

/* Animação de zoom */
@keyframes zoom {
  from {transform:scale(0.5); opacity: 0;}
  to {transform:scale(1); opacity: 1;}
}

/* Botão para fechar o modal */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 1001;
}

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

/* Cursor de lupa ao passar sobre imagens clicáveis */
img[onclick*="openModal"] {
  cursor: zoom-in !important;
}