/* owhs-image-modal.css
   Standalone modal stylesheet that avoids Bootstrap/class-name conflicts
   for the OWHS image collage.
*/

/* Clickable collage images */
.image {
  cursor: pointer;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.30),
    0 6px 20px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.image:hover,
.image:focus {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(69, 120, 166, 0.30),
    0 6px 20px rgba(69, 120, 166, 0.15),
    0 6px 20px rgba(69, 120, 166, 0.25);
  outline: none;
}

/* Custom modal wrapper */
.custom-image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.82);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}

/* Use this when JS opens the modal */
.custom-image-modal.is-open {
  display: flex;
}

/* Modal panel */
.custom-image-modal__dialog {
  position: relative;
  width: min(920px, 92vw);
  max-height: 92vh;
  margin: auto;
  padding: 14px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

/* The enlarged image */
.custom-image-modal__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 28px);
  object-fit: contain;
  border-radius: 10px;
}

/* Optional caption area */
.custom-image-modal__caption {
  margin-top: 10px;
  text-align: center;
  color: #242424;
  font-size: 1rem;
  line-height: 1.4;
}

/* Close button */
.custom-image-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #242424;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.custom-image-modal__close:hover,
.custom-image-modal__close:focus {
  background: #f3f3f3;
  outline: 2px solid #4578a6;
  outline-offset: 2px;
}

/* Small screens */
@media (max-width: 768px) {
  .custom-image-modal {
    padding: 14px;
  }

  .custom-image-modal__dialog {
    width: 96vw;
    padding: 10px;
    border-radius: 12px;
  }

  .custom-image-modal__img {
    max-height: calc(88vh - 20px);
  }

  .custom-image-modal__close {
    top: 6px;
    right: 6px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .custom-image-modal__dialog {
    width: 98vw;
    padding: 8px;
  }

  .custom-image-modal__caption {
    font-size: 0.95rem;
  }
}