/* Fondo oscuro semitransparente */
.modal-overlay {
  display: none; /* Oculto por defecto */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75); /* Negro al 75% de opacidad */
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* Mostrar cuando esté activo */
.modal-overlay.active {
  display: flex;
}

/* Contenedor del popup */
.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Imagen dentro del modal */
.modal-content img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* Botón para cerrar (superior derecho) */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.close-btn:hover {
  background: rgba(255, 0, 0, 0.8);
}
