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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--color-neutral-11);
}

body {
  min-height: 100vh;
  direction: rtl;
  text-align: right;
  color: var(--color-white);
}

img,
svg {
  display: block;
}

.certificates-segment {
  width: 100%;
  --certificates-scene-shift: 0px;
}

.certificates-segment__scene {
  position: relative;
  width: 100%;
  background: #1d261f;
  isolation: isolate;
}

.certificates-segment__scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #202423;
  opacity: 63%;
  pointer-events: none;
}

.certificates-segment__scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.certificates-segment__scene-art rect,
.certificates-segment__scene-art path,
.certificates-segment__scene-art ellipse,
.certificates-segment__scene-art circle {
  shape-rendering: geometricPrecision;
}

.certificates-segment__content {
  position: relative;
  z-index: 1;
  min-height: clamp(480px, 34vw, 516px);
  padding: 58px 104px 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 38px;
}

.certificates-segment__hero {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
}

.certificates-segment__title {
  min-height: 60px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--color-white);
  color: var(--color-neutral-11);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
  text-align: right;
  box-shadow: 0 10px 26px rgb(0 0 0 / 18%);
}

.certificates-segment__mark {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--color-violet-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 26px rgb(0 0 0 / 18%);
}

.certificates-segment__mark img {
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
}

.certificates-segment__gallery {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-inline: 12px;
}

.certificate-card {
  width: clamp(136px, 14vw, 188px);
  aspect-ratio: 186 / 236;
  padding: 8px;
  border-radius: 14px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 16px 32px rgb(0 0 0 / 22%);
}

.certificate-card__image {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
}

.certificate-card__sheet {
  height: 100%;
  border-radius: 11px;
  background: var(--color-white);
  border: 1px solid rgb(var(--color-warning-500-rgb) / 56%);
  box-shadow: inset 0 0 0 1px rgb(var(--color-warning-700-rgb) / 12%);
  padding: 10px 9px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.certificate-card__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.certificate-card__logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 22px;
}

.certificate-card__logo {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.certificate-card__logo--cyan {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgb(var(--color-info-300-rgb) / 70%);
}

.certificate-card__logo--cyan::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  border: 1px solid rgb(var(--color-info-700-rgb) / 64%);
}

.certificate-card__logo--brand {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--color-violet-500);
}

.certificate-card__logo--brand img {
  width: 13px;
  height: 13px;
  filter: brightness(0) invert(1);
}

.certificate-card__logo--amber {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgb(var(--color-warning-700-rgb) / 72%);
}

.certificate-card__logo--amber::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--color-warning-500-rgb) / 82%);
}

.certificate-card__heading {
  margin: 0;
  color: var(--color-neutral-9);
  text-align: center;
}

.certificate-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-inline: 6px;
  flex: 1 1 auto;
  justify-content: center;
}

.certificate-card__line {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgb(var(--color-neutral-7-rgb) / 52%);
}

.certificate-card__line--xl {
  width: 92%;
}

.certificate-card__line--lg {
  width: 84%;
}

.certificate-card__line--md {
  width: 74%;
}

.certificate-card__line--sm {
  width: 54%;
}

.certificate-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.certificate-card__signature {
  flex: 1 1 auto;
  min-width: 0;
}

.certificate-card__signature svg {
  width: 100%;
  height: auto;
}

.certificate-card__seal {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgb(var(--color-green-500-rgb) / 32%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.certificate-card__seal span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-green-500);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .certificates-segment__content {
    padding: 48px 40px 28px;
    gap: 30px;
  }

  .certificates-segment__gallery {
    gap: 14px;
  }

  .certificate-card {
    width: clamp(128px, 16vw, 170px);
  }
}

@media (max-width: 820px) {
  .certificates-segment__content {
    padding: 40px 24px 24px;
    gap: 26px;
    min-height: 640px;
  }

  .certificates-segment__hero {
    gap: 8px;
    padding: 0px 16px;
  }

  .certificates-segment__title {
    min-height: 54px;
    padding: 11px 18px;
  }

  .certificates-segment__mark {
    width: 54px;
    height: 54px;
    border-radius: 9px;
  }

  .certificates-segment__mark img {
    width: 30px;
    height: 30px;
  }

  .certificates-segment__gallery {
    gap: 12px;
    padding-inline: 0;
  }

  .certificate-card {
    width: clamp(140px, 40vw, 178px);
  }
}

@media (max-width: 540px) {
  .certificates-segment__content {
    padding: 28px 0px 18px;
    gap: 22px;
    min-height: 344px;
  }

  .certificates-segment__hero {
    width: 100%;
    justify-content: flex-end;
  }

  .certificates-segment__title {
    min-height: 52px;
    padding: 10px 16px;
    font-size: var(--fs-h6);
    line-height: var(--lh-h6);
    width: 100%;
  }

  .certificates-segment__mark {
    width: 52px;
    height: 52px;
  }

  .certificates-segment__scene {
    overflow: hidden;
  }

  .certificates-segment__scene-art {
    inset: -28px auto 0 50%;
    width: 100%;
    min-width: 1200px;
    height: calc(100% + 28px);
    object-fit: cover;
    transform: translateX(calc(-50% + var(--certificates-scene-shift)));
    will-change: transform;
  }

  .certificates-segment__gallery {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
    gap: 23px;
  }

  .certificates-segment__gallery::-webkit-scrollbar {
    display: none;
  }

  .certificate-card {
    width: clamp(136px, 42vw, 164px);
    padding: 7px;
    border-radius: 13px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .certificate-card:first-child{
    margin-right: 16px;
  }

  .certificate-card:last-child{
    margin-left: 16px;
  }

  .certificate-card img{
    width: 100%;
  }

  .certificate-card__sheet {
    padding: 9px 8px 11px;
  }

  .certificate-card__logos {
    min-height: 20px;
  }

  .certificate-card__logo--brand {
    width: 17px;
    height: 17px;
  }
}
