.official-trust,
.official-trust * {
  box-sizing: border-box;
}

.official-trust {
  display: block;
  width: 100%;
  padding: var(--official-trust-padding-top) 20px var(--official-trust-padding-bottom);
  color: var(--official-trust-text-color);
  background: var(--official-trust-background);
}

.official-trust__inner {
  width: 100%;
  max-width: var(--official-trust-max-width);
  margin: 0 auto;
}

.official-trust__header {
  margin: 0 0 30px;
}

.official-trust--align-center .official-trust__header {
  text-align: center;
}

.official-trust--align-left .official-trust__header {
  text-align: left;
}

.official-trust__title {
  margin: 0;
  color: var(--official-trust-heading-color);
  font-size: clamp(25px, 2.4vw, 36px);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.4px;
  text-transform: uppercase;
}

.official-trust__description {
  max-width: 1050px;
  margin: 10px 0 0;
  color: var(--official-trust-text-color);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 450;
  opacity: 0.92;
}

.official-trust--align-center .official-trust__description {
  margin-right: auto;
  margin-left: auto;
}

.official-trust__certificate-shell {
  position: relative;
}

.official-trust__certificate-track {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.official-trust__certificate-track::-webkit-scrollbar {
  display: none;
}

.official-trust__certificate-track.is-scrollable {
  justify-content: flex-start;
}

.official-trust__certificate-card {
  width: calc((100% - 48px) / 4);
  max-width: calc((100% - 48px) / 4);
  flex: 0 0 calc((100% - 48px) / 4);
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.official-trust__certificate-action {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: inherit;
  background: var(--official-trust-card-background);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--official-trust-card-radius);
  box-shadow: none;
  cursor: zoom-in;
  text-decoration: none;
  appearance: none;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

a.official-trust__certificate-action {
  cursor: pointer;
}

.official-trust__certificate-action--static {
  cursor: default;
}

.official-trust__certificate-action:not(.official-trust__certificate-action--static):hover {
  transform: translateY(-3px);
  border-color: var(--official-trust-heading-color);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.official-trust__certificate-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: var(--official-trust-card-background);
}

.official-trust__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #111111;
  background: rgba(255, 255, 255, 0.96);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.official-trust__arrow:hover {
  transform: translateY(-50%) scale(1.06);
}

.official-trust__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.official-trust__arrow--previous {
  left: -18px;
}

.official-trust__arrow--next {
  right: -18px;
}

.official-trust__arrow span {
  font-size: 30px;
  line-height: 1;
  transform: translateY(-1px);
}

.official-trust__mobile-hint {
  display: none;
}

.official-trust__trust-area {
  margin-top: 36px;
}

.official-trust__trust-heading {
  margin: 0 0 18px;
  color: var(--official-trust-heading-color);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.official-trust__trust-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.official-trust__trust-card {
  width: calc((100% - 32px) / 3);
  max-width: calc((100% - 32px) / 3);
  flex: 0 1 calc((100% - 32px) / 3);
  min-width: 0;
}

.official-trust__trust-action {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #222222;
  border-radius: var(--official-trust-card-radius);
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.official-trust__trust-action:not(.official-trust__trust-action--static):hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.official-trust__trust-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.official-trust__lightbox[hidden] {
  display: none !important;
}

.official-trust__lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.official-trust__lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(0, 0, 0, 0.84);
  border: 0;
  cursor: zoom-out;
}

.official-trust__lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.official-trust__lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
}

.official-trust__lightbox-close {
  position: absolute;
  top: -17px;
  right: -17px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #111111;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.32);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

body.official-trust-lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 900px) and (min-width: 769px) {
  .official-trust__certificate-card {
    width: calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
    flex-basis: calc((100% - 32px) / 3);
  }

  .official-trust__trust-card {
    width: calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 768px) {
  .official-trust {
    padding-right: 0;
    padding-left: 0;
  }

  .official-trust__header {
    margin-bottom: 21px;
    padding: 0 16px;
  }

  .official-trust__title {
    font-size: 25px;
  }

  .official-trust__description {
    font-size: 13px;
  }

  .official-trust__certificate-track {
    justify-content: flex-start;
    gap: 12px;
    padding: 0 16px 10px;
    scroll-padding-inline: 16px;
  }

  .official-trust__certificate-card {
    width: var(--official-trust-mobile-card-width);
    max-width: var(--official-trust-mobile-card-width);
    flex: 0 0 var(--official-trust-mobile-card-width);
  }

  .official-trust__certificate-action:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .official-trust__arrow {
    display: none !important;
  }

  .official-trust__mobile-hint {
    display: block;
    margin: 5px 16px 0;
    color: var(--official-trust-text-color);
    font-size: 11.5px;
    line-height: 1.4;
    font-weight: 600;
    text-align: center;
    opacity: 0.72;
  }

  .official-trust__trust-area {
    margin-top: 27px;
    padding: 0 16px;
  }

  .official-trust__trust-heading {
    font-size: 19px;
  }

  .official-trust__trust-grid {
    gap: 12px;
  }

  .official-trust__trust-grid--stack {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .official-trust__trust-grid--stack .official-trust__trust-card {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }

  .official-trust__trust-grid--scroll {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .official-trust__trust-grid--scroll::-webkit-scrollbar {
    display: none;
  }

  .official-trust__trust-grid--scroll .official-trust__trust-card {
    width: 86%;
    max-width: 86%;
    flex: 0 0 86%;
    scroll-snap-align: start;
  }

  .official-trust__trust-action:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .official-trust__lightbox {
    padding: 14px;
  }

  .official-trust__lightbox-close {
    top: -13px;
    right: -8px;
    width: 38px;
    height: 38px;
  }
}
