/* Certificate lightbox */

.cert-item {
  cursor: zoom-in;
}

.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.85);
}

.cert-modal.is-open {
  display: flex;
}

.cert-modal-image {
  display: block;
  max-width: min(92vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.cert-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff !important;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.8rem;
  font-weight: normal;
  line-height: 2.2rem;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
}

.cert-modal-close:after {
  display: none;
}

.cert-modal-close:hover {
  border-color: #ffffff !important;
  background: rgba(255, 255, 255, 0.18);
}

@media screen and (max-width: 736px) {
  .cert-modal {
    padding: 1rem;
  }

  .cert-modal-image {
    max-width: 96vw;
    max-height: 88vh;
  }

  .cert-modal-close {
    top: 0.75rem;
    right: 0.75rem;
  }
}
