/* TG Certificates + lightbox */
.tg-certgrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.tg-certgrid button {
  padding: 0;
  border: 1px solid var(--tg-line);
  background: var(--tg-bg-alt);
  cursor: zoom-in;
  aspect-ratio: 3/4;
  overflow: hidden;
  transition: transform 0.4s var(--tg-ease), box-shadow 0.4s;
}
.tg-certgrid button:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -22px rgba(4, 46, 56, 0.4);
}
.tg-body .tg-certgrid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
@media (max-width: 1000px) {
  .tg-certgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .tg-certgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 460px) {
  .tg-certgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.tg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(1, 20, 26, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vw;
}
.tg-lightbox.open {
  display: flex;
}
.tg-body .tg-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.tg-lightbox button {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--tg-line-dark);
  background: rgba(246, 240, 228, 0.08);
  color: var(--tg-on-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tg-lightbox button svg {
  width: 20px;
  height: 20px;
}
.tg-lightbox .close {
  top: 22px;
  right: 22px;
}
.tg-lightbox .prev {
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
}
.tg-lightbox .next {
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
}
.tg-lightbox .counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--tg-on-dark-muted);
}
