/* most recent working code included none of this */
/* --- Image modal (click-to-expand) --- */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.image-modal.is-open {
  display: flex;
}

.image-modal .modal-content {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.image-modal .close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 2.25rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 0.25rem 0.5rem;
}

body.modal-open {
  overflow: hidden;
}
