/* ============================================
   MODAL POPUP FÜR BILDVERGRÖSSERUNG
   ============================================ */

/* Modal Container */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}

.image-modal.active {
  display: flex;
}

/* Modal Image */
.image-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.8);
  animation: zoomIn 0.3s ease;
}

/* Clickable Images */
.clickable-image {
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clickable-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Close Button (optional) */
.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: scale(1.2);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .image-modal img {
    max-width: 95%;
    max-height: 95%;
  }
  
  .modal-close {
    font-size: 30px;
    top: 10px;
    right: 15px;
  }
}

/* Accessibility */
.image-modal:focus {
  outline: none;
}

/* Loading State */
.image-modal.loading img {
  opacity: 0.5;
}
