I am giving you an idea for thatthis, you have to use jqueryjQuery for the popup. and the below syntax will give you the current post data in a HTML popup html.
while ($the_query->have_posts()): $the_query->the_post();
echo '<div class="non-popup">';
echo '<div class="card-title" id="card-'.get_the_title.'">'.get_the_title().'</div>';
write you front end code + html (http://screenshotlink.ru/eff3d7431f4fbcd6a03ca5fcbbc41cdd.png)
echo '</div>';
echo '<div class="popup" style="display:none;">';
echo '<div class="popup-title">'.get_the_title().'</div>';
write your popup html + code
echo '</div>';
endwhile;
hereHere is your jquerythe jQuery:
$(document).ready(function(){
$(".card-title").on('click',function(){
$(this).siblings().css('display','block');
});
});