/* Certificates-only styling */

.cert-container {
  max-width: 1200px;
}

/* Bigger cards, less wasted side space */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* Use your home-page card look, but make it clickable */
.cert-card {
  cursor: zoom-in;
}

/* Title at the top like home cards, larger and centered */
.cert-h3 {
  margin: 2px 0 12px;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
  color: rgba(238,243,255,.94);
}

/* Image fits fully, no cropping */
.cert-media {
  width: 100%;
  aspect-ratio: 1650 / 1275;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(7,10,18,.35);
}

.cert-media img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* IMPORTANT: no crop */
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.lightbox.open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
}

.lightbox-panel {
  position: relative;
  max-width: 94vw;
  max-height: 92vh;
  margin: 4vh auto;
  padding: 14px;
  background: rgba(11,18,32,.94);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow), var(--glow);
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(7,10,18,.55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: rgba(94,252,232,.25);
}

/* Mobile */
@media (max-width: 900px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}
/* Force consistent title height so images align */
.cert-h3{
  min-height: 2.6em;     /* ≈ two lines */
  display: flex;
  align-items: center;
  justify-content: center;
}
