/* Sec / Сертификаты — Figma */

body:has(.sp-certs) .page,
body:has(.sp-certs) .content {
  overflow: visible;
}

.sp-certs {
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 80px 240px;
  background: #fff;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.sp-certs *,
.sp-certs *::before,
.sp-certs *::after {
  box-sizing: border-box;
}

.sp-certs__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.sp-certs__title {
  margin: 0;
  padding: 0;
  height: 52px;
  font-weight: 500;
  font-size: 48px;
  line-height: 52px;
  color: #1a1d21;
  white-space: nowrap;
}

.sp-certs__swiper {
  width: 100%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.sp-certs__swiper:active {
  cursor: grabbing;
}

.sp-certs__swiper .swiper-slide {
  width: auto;
  height: 264px;
}

.sp-certs__item {
  display: block;
  width: 100%;
  height: 264px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 0.83px solid #d2d5db;
  cursor: grab;
  font: inherit;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.sp-certs__item:active {
  cursor: grabbing;
}

.sp-certs__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.sp-certs__footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.sp-certs__all {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  min-width: 205px;
  height: 52px;
  padding: 14px 24px;
  border-radius: 10px;
  background: #e6f4ff;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: #006ab5 !important;
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.sp-certs__all:hover {
  background: #d6ebff;
}

.sp-certs__nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.sp-certs__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 14px;
  border: 2px solid #d2d5db;
  border-radius: 150px;
  background: #fff;
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.sp-certs__arrow:hover:not(:disabled) {
  opacity: 1;
}

.sp-certs__arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.sp-certs__arrow svg {
  display: block;
  width: 24px;
  height: 24px;
}

.sp-certs__scrollbar {
  display: none;
}

.sp-certs__scrollbar.swiper-scrollbar {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  top: auto;
  width: 79px;
  height: 6px;
  margin: 0;
  background: #ebedf0;
  border-radius: 12px;
  overflow: hidden;
}

.sp-certs__scrollbar .swiper-scrollbar-drag {
  background: #6d717f;
  border-radius: 12px;
  height: 100%;
  left: 0;
  top: 0;
}

@media (max-width: 1599px) {
  .sp-certs {
    padding: 64px 64px;
  }
}

@media (max-width: 1199px) {
  .sp-certs {
    padding: 48px 32px;
  }

  .sp-certs__title {
    height: auto;
    font-size: 36px;
    line-height: 40px;
    white-space: normal;
  }

  .sp-certs__swiper .swiper-slide {
    width: 188px;
    height: 264px;
  }

  .sp-certs__item {
    height: 264px;
  }
}

@media (max-width: 991px) {
  .sp-certs {
    padding: 48px 24px;
  }

  .sp-certs__swiper .swiper-slide {
    width: 172px;
    height: 240px;
  }

  .sp-certs__item {
    height: 240px;
  }
}

/* Mobile — Figma Frame 2043683999 */
@media (max-width: 776px) {
  .sp-certs {
    padding: 40px 16px;
    overflow: visible;
  }

  .sp-certs__inner {
    gap: 24px;
    max-width: none;
    overflow: visible;
  }

  .sp-certs__title {
    height: auto;
    font-size: 32px;
    line-height: 40px;
    white-space: normal;
  }

  .sp-certs__swiper {
    width: calc(100% + 16px);
    margin-right: -16px;
    overflow: hidden;
  }

  .sp-certs__swiper .swiper-slide {
    width: 160px;
    height: 225px;
  }

  .sp-certs__item {
    height: 225px;
    border-radius: 0;
  }

  .sp-certs__footer {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
  }

  .sp-certs__all {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: 48px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
  }

  .sp-certs__nav {
    display: none;
  }

  .sp-certs__scrollbar,
  .sp-certs__scrollbar.swiper-scrollbar {
    display: block !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    width: 79px !important;
    height: 6px !important;
    flex: none;
  }
}

/* Lightbox — Figma certificate viewer */
.sp-certs-lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.sp-certs-lb[hidden] {
  display: none !important;
}

.sp-certs-lb__backdrop {
  position: absolute;
  inset: 0;
  background: #111827;
  opacity: 0.8;
  cursor: pointer;
}

.sp-certs-lb__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.sp-certs-lb__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sp-certs-lb__swiper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.sp-certs-lb__swiper .swiper-slide {
  width: 450px;
  height: 640px;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.sp-certs-lb__swiper .swiper-slide-prev,
.sp-certs-lb__swiper .swiper-slide-next {
  opacity: 0.7;
}

.sp-certs-lb__swiper .swiper-slide-active {
  opacity: 1;
}

.sp-certs-lb__slide {
  width: 450px;
  height: 640px;
  overflow: hidden;
  background: #fff;
}

.sp-certs-lb__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}

.sp-certs-lb__controls {
  position: absolute;
  left: 50%;
  bottom: 40px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  transform: translateX(-50%);
}

.sp-certs-lb__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 150px;
  background: #fff;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.sp-certs-lb__arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

.sp-certs-lb__arrow svg {
  display: block;
  width: 24px;
  height: 24px;
}

.sp-certs-lb__counter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  min-width: 34px;
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  color: #fff;
  white-space: nowrap;
}

.sp-certs-lb__counter-sep,
.sp-certs-lb__counter [data-sp-certs-total] {
  color: rgba(255, 255, 255, 0.5);
}

body.sp-certs-lb-open {
  overflow: hidden;
}

@media (max-width: 1199px) {
  .sp-certs-lb__swiper .swiper-slide,
  .sp-certs-lb__slide {
    width: min(450px, calc(100vw - 48px));
    height: min(640px, calc(100vh - 180px));
  }

  .sp-certs-lb__controls {
    bottom: 24px;
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .sp-certs-lb__close {
    top: 12px;
    right: 12px;
  }

  .sp-certs-lb__controls {
    gap: 16px;
  }

  .sp-certs-lb__arrow {
    width: 44px;
    height: 44px;
  }
}
