/* ==========================================================================
   Certifications - small credential badges near the founder profile that
   open the full certificate at full size in a lightbox on click.
   ========================================================================== */

.certs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.cert-badge {
  display: inline-flex;
  padding: 6px;
  border: 0;
  border-radius: var(--r-sm);
  cursor: zoom-in;
  background-color: rgba(244, 246, 243, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(8, 52, 30, 0.14),
    0 8px 20px -12px rgba(0, 0, 0, 0.7);
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.cert-badge:hover,
.cert-badge:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(185, 253, 168, 0.6),
    0 14px 28px -14px rgba(0, 0, 0, 0.8);
}

.cert-badge img {
  display: block;
  height: 44px;
  width: auto;
}

/* ---- lightbox --------------------------------------------------------- */

/* Same fixed-overlay pattern as the booking modal (see booking.css): the UA
   stylesheet's `[hidden] { display: none }` and this container's own
   `display: grid` sit at equal specificity, so the closed state is carried by
   `pointer-events: none` on `.cert-lb` and a separate `[hidden]` rule on the
   figure, rather than trusting `[hidden]` alone to hide a grid/flex element. */
.cert-lb {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 0.6rem + 2vw, 3rem);
  pointer-events: none;
}

.cert-lb.is-open {
  pointer-events: auto;
}

.cert-lb__scrim {
  position: absolute;
  inset: 0;
  background-color: rgba(2, 6, 4, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}

.cert-lb.is-open .cert-lb__scrim {
  opacity: 1;
}

.cert-lb__figure {
  position: relative;
  margin: 0;
  max-width: min(100%, 640px);
  max-height: 90svh;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.cert-lb.is-open .cert-lb__figure {
  opacity: 1;
  transform: none;
}

.cert-lb__figure[hidden] {
  visibility: hidden;
}

.cert-lb__img {
  display: block;
  max-width: 100%;
  max-height: 90svh;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--glass-cast);
  background-color: var(--bone);
}

.cert-lb__close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 0;
  cursor: pointer;
  background-color: var(--ink-900);
  color: var(--bone);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.8);
}

.cert-lb__close:hover {
  background-color: var(--green-900);
}

@media (prefers-reduced-motion: reduce) {
  .cert-lb__figure {
    transition: none;
  }
}
