/* ===== СЕРТИФИКАТЫ ===== */

.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: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

@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: 48px;
}

.seoms-certs__title {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: 40px;
  line-height: 1.2;
}

.seoms-certs__subtitle {
  margin: 0;
  font-size: 14px;
  color: #888;
  font-weight: 500;
}

@media (max-width: 768px) {
  .seoms-certs__title { font-size: 32px; }
}

/* ===== СЕТКА ===== */

.seoms-certs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .seoms-certs__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 780px) {
  .seoms-certs__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 380px) {
  .seoms-certs__grid { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
}

/* ===== КАРТОЧКА ===== */

.seoms-certs__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.seoms-certs__item:focus-visible .seoms-certs__img-wrap {
  outline: 2px solid #ff6d3d;
  outline-offset: 3px;
}

/* Обёртка изображения */

.seoms-certs__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.10),
    0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seoms-certs__item:hover .seoms-certs__img-wrap {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.16),
    0 2px 6px rgba(0,0,0,0.08);
}

.seoms-certs__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.2s ease;
}

.seoms-certs__item:hover .seoms-certs__img {
  filter: brightness(0.75);
}

/* Иконка лупы — появляется при ховере */

.seoms-certs__zoom-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.seoms-certs__zoom-icon svg {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.seoms-certs__item:hover .seoms-certs__zoom-icon {
  opacity: 1;
}

/* Подпись под карточкой */

.seoms-certs__caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
  padding: 0 2px;
}

.seoms-certs__caption-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
}

.seoms-certs__caption-desc {
  font-size: 12px;
  line-height: 1.4;
  color: #666;
}

/* ===== ЛАЙТБОКС ===== */

.seoms-certs__lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;

  /* Скрыт по умолчанию */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.seoms-certs__lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Фон */

.seoms-certs__lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}

/* Кнопка закрытия */

.seoms-certs__lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  padding: 0;
}

.seoms-certs__lb-close:hover {
  background: #ff6d3d;
  border-color: #ff6d3d;
  transform: rotate(90deg);
}

/* Навигационные стрелки */

.seoms-certs__lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 72px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  padding: 0;
}

.seoms-certs__lb-nav:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
}

.seoms-certs__lb-nav--prev {
  left: 16px;
}

.seoms-certs__lb-nav--next {
  right: 16px;
}

.seoms-certs__lb-nav:active {
  transform: translateY(-50%) scale(0.94);
}

/* Основная область с картинкой */

.seoms-certs__lb-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(640px, calc(100vw - 160px));
  max-height: calc(100vh - 40px);
  gap: 16px;
  /* плавное появление картинки при переключении */
  transition: opacity 0.15s ease;
}

.seoms-certs__lb-stage.is-switching {
  opacity: 0;
}

.seoms-certs__lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  background: #fff;
}

/* Подпись в лайтбоксе */

.seoms-certs__lb-info {
  text-align: center;
}

.seoms-certs__lb-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.seoms-certs__lb-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}

/* Счётчик */

.seoms-certs__lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  pointer-events: none;
  font-family: "MontserratCustom", system-ui, sans-serif;
}

/* Адаптив */

@media (max-width: 640px) {
  .seoms-certs__lb-nav {
    width: 36px;
    height: 56px;
  }
  .seoms-certs__lb-nav--prev { left: 6px; }
  .seoms-certs__lb-nav--next { right: 6px; }

  .seoms-certs__lb-stage {
    max-width: calc(100vw - 100px);
  }

  .seoms-certs__lb-img {
    max-height: calc(100vh - 140px);
  }
}
