/* ===== СЕРТИФИКАТЫ ===== */

.seoms-certs {
  padding: 80px 0 90px;
  background: #f4f4f4;
  color: #111;
  font-family: "MontserratCustom", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.seoms-certs__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 980px) {
  .seoms-certs__container {
    padding: 0 24px;
  }
}

@media (max-width: 640px) {
  .seoms-certs__container {
    padding: 0 16px;
  }
}

/* Заголовок */

.seoms-certs__header {
  text-align: center;
  margin-bottom: 40px;
}

.seoms-certs__title {
  margin: 0;
  font-weight: 800;
  font-size: 40px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .seoms-certs__title {
    font-size: 32px;
  }
}

/* Сетка сертификатов */

.seoms-certs__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
}

@media (max-width: 1100px) {
  .seoms-certs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .seoms-certs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .seoms-certs__grid {
    grid-template-columns: 1fr;
  }
}

/* Карточка */

.seoms-certs__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Обёртка изображения */

.seoms-certs__img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
  background: #e9e9e9;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.06),
    0 1px 2px rgba(0,0,0,0.05);
  cursor: zoom-in;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out;
}

.seoms-certs__img-wrapper:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.10),
    0 2px 6px rgba(0,0,0,0.06);
}

.seoms-certs__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Текст под сертификатом */

.seoms-certs__text {
  margin-top: 14px;
}

.seoms-certs__name {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.seoms-certs__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}

/* ===== ЛАЙТБОКС ДЛЯ СЕРТИФИКАТОВ ===== */

.seoms-certs__lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;          /* включаем display:flex через .is-open */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;          /* чтобы внутри было место под тень/крестик */
  box-sizing: border-box;
}

.seoms-certs__lightbox.is-open {
  display: flex;
}

.seoms-certs__lightbox-inner {
  position: relative;
  max-width: min(90vw, 960px); /* можно сузить, чтобы не было прям "во всю" */
  max-height: 90vh;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;          /* если вдруг что-то больше — появится скролл, а не выход за экран */
}

.seoms-certs__lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  cursor: zoom-in;
  transition: transform 0.22s ease-out;
}

/* увеличенное состояние внутри лайтбокса */

.seoms-certs__lightbox-img.is-zoomed {
  transform: scale(1.2);   /* не 1.4, чтобы не вылезать жестко за 90vh/90vw */
  cursor: zoom-out;
}

/* крестик */

.seoms-certs__lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #ff6d3d;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.seoms-certs__lightbox-close::before,
.seoms-certs__lightbox-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background: #fff;
}

.seoms-certs__lightbox-close::before {
  transform: rotate(45deg);
}

.seoms-certs__lightbox-close::after {
  transform: rotate(-45deg);
}

@media (max-width: 640px) {
  .seoms-certs__lightbox-close {
    top: -12px;
    right: -12px;
  }
}
