/* ==========================================================================
   IMAGE MODAL COMPONENT
   Simple modal overlay for viewing images
   ========================================================================== */

.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

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

.image-modal__image {
  max-width: 90%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.image-modal__close {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-modal__close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.image-modal__close:active {
  transform: scale(0.95);
}

/* Make carousel images look clickable */
.carousel-item img {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.carousel-item img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .image-modal__image {
    max-width: 95%;
    max-height: 85vh;
  }

  .image-modal__close {
    top: 1rem;
    right: 1rem;
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-item img {
    transition: none;
  }

  .carousel-item img:hover {
    transform: none;
  }
}
