/* Сетка */
.cert-grid { display: flex; flex-wrap: wrap; gap: 24px 20px; margin: 20px 0 30px; }
.cert-item { width: 150px; text-align: center; }
.cert-thumb { display: block; border: 1px solid #e5e5e5; border-radius: 4px; padding: 4px; background: #fff; cursor: zoom-in; transition: box-shadow .2s, border-color .2s; }
.cert-thumb:hover { border-color: #ccc; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.cert-thumb img { display: block; width: 100%; height: auto; }
.cert-name { margin-top: 8px; font-weight: 600; line-height: 1.2; }
.cert-count { color: #888; font-size: 12px; }
@media (max-width: 480px) { .cert-grid { justify-content: center; } }

/* Галерея */
html.cg-lock { overflow: hidden; }
.cg-overlay { position: fixed; inset: 0; z-index: 99999; display: none; flex-direction: column; background: rgba(10, 10, 12, .93); color: #fff; user-select: none; -webkit-user-select: none; }
.cg-overlay.cg-open { display: flex; }
.cg-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 15px; }
.cg-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-counter { opacity: .7; font-variant-numeric: tabular-nums; }
.cg-btn { border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; transition: background .15s; }
.cg-btn:hover, .cg-btn:focus-visible { background: rgba(255, 255, 255, .25); outline: none; }
.cg-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 64px 16px; }
.cg-img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 2px; transition: opacity .15s; }
.cg-img.cg-loading { opacity: .25; }
.cg-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.cg-prev { left: 10px; }
.cg-next { right: 10px; }
.cg-single .cg-nav { display: none; }
@media (max-width: 600px) {
  .cg-stage { padding: 0 8px 12px; }
  .cg-nav { width: 38px; height: 38px; font-size: 18px; background: rgba(0, 0, 0, .45); }
  .cg-prev { left: 4px; }
  .cg-next { right: 4px; }
}
