/* TRUST HERO */

.trust-hero__head {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(320px, 0.38fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: start;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.trust-hero__title-wrap,
.trust-hero__text-wrap {
  min-width: 0;
}

.trust-hero__title {
  max-width: 820px;
  margin: 0;
  font-family: var(--family-cormorant);
  font-size: var(--h1);
  line-height: 1.12;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--black-color);
}

.trust-hero__text {
  max-width: 520px;
  margin: 0;
  color: var(--black-color);
  font-size: var(--fs-18);
  line-height: 1.65;
}

.trust-hero__image-wrap {
    width: 100%;
    height: clamp(150px, 20vw, 320px);
    overflow: hidden;
    background: #E8E8E8;
}

.trust-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* STATS SECTION */

.stats-section {
  background: #F8F8F8;
}

.stats-section__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(20px, 2vw, 30px);
    align-items: start;
}

.stats-section__item {
  min-width: 0;
  text-align: center;
}

.stats-section__number {
    color: var(--turquoise-color);
    font-size: clamp(40px, 4vw, 64px);
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.stats-section__label {
    margin-top: 18px;
    font-family: var(--family-cormorant);
    color: var(--black-color);
    font-size: var(--h4);
    line-height: 1.1;
    font-weight: 500;
}

.stats-section__text {
    max-width: 340px;
    margin: 22px auto 0;
    color: var(--gray-color);
    font-size: var(--fs-16);
    line-height: 1.55;
}

/* CERTIFICATES SECTION */


.certificates-section__header {
  margin-bottom: clamp(34px, 5vw, 58px);
}

.certificates-slider {
  position: relative;
  padding-bottom: 64px;
}

.certificates-slider__viewport {
  width: 100%;
  overflow: hidden;
}

.certificates-slider__track {
  display: flex;
  gap: 26px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.certificates-slider__slide {
  position: relative;
  flex: 0 0 calc((100% - 78px) / 4);
  height: clamp(230px, 18vw, 310px);
  padding: 0;
  border: 0;
  border-radius: var(--border-radius);
  background: #D9D9D9;
  overflow: hidden;
  cursor: pointer;
}

.certificates-slider__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0);
  transition: background var(--transition);
}

.certificates-slider__slide:hover::after {
  background: rgba(20, 20, 20, 0.12);
}

.certificates-slider__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.certificates-slider__slide:hover .certificates-slider__image {
  transform: scale(1.035);
}

.certificates-slider__arrows {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 16px;
}

.certificates-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: var(--border-radius);
  background: var(--black-color);
  color: var(--white-color);
  transition:
    background var(--transition),
    opacity var(--transition),
    transform var(--transition);
}

.certificates-slider__arrow:hover {
  background: var(--turquoise-color);
}

.certificates-slider__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.certificates-slider__arrow span {
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.certificates-slider__arrow--prev {
  background: rgba(50, 50, 50, 0.35);
}

.certificates-slider__arrow--prev span {
  transform: rotate(-135deg);
}

.certificates-slider__arrow--next span {
  transform: rotate(45deg);
}

/* CERTIFICATES LIGHTBOX */

.certificate-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition),
    visibility var(--transition);
}

.certificate-lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.certificate-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.84);
  backdrop-filter: blur(6px);
}

.certificate-lightbox__window {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  height: min(86vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.certificate-lightbox__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.certificate-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.certificate-lightbox__close {
  position: absolute;
  z-index: 4;
  top: -8px;
  right: -8px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--white-color);
  color: var(--black-color);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.certificate-lightbox__close::before,
.certificate-lightbox__close::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 11px;
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
}

.certificate-lightbox__close::before {
  transform: rotate(45deg);
}

.certificate-lightbox__close::after {
  transform: rotate(-45deg);
}

.certificate-lightbox__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--black-color);
  transform: translateY(-50%);
  transition:
    background var(--transition),
    color var(--transition);
}

.certificate-lightbox__arrow:hover {
  background: var(--turquoise-color);
  color: var(--white-color);
}

.certificate-lightbox__arrow--prev {
  left: -64px;
}

.certificate-lightbox__arrow--next {
  right: -64px;
}

.certificate-lightbox__arrow span {
  display: block;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.certificate-lightbox__arrow--prev span {
  transform: rotate(-135deg);
}

.certificate-lightbox__arrow--next span {
  transform: rotate(45deg);
}

.certificate-lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: -42px;
  transform: translateX(-50%);
  color: var(--white-color);
  font-size: var(--fs-14);
  line-height: 1;
  opacity: 0.85;
}

/* WORK STEPS */
.work-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(36px, 5vw, 62px);
}

.work-steps__card {
  position: relative;
  min-height: 330px;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(50, 50, 50, 0.18);
  background: transparent;
  overflow: hidden;
  transform: translateY(18px);
  opacity: 0;
  animation: workStepFadeUp 0.7s ease forwards;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.work-steps__card:nth-child(1) {
  animation-delay: 0.05s;
}

.work-steps__card:nth-child(2) {
  animation-delay: 0.12s;
}

.work-steps__card:nth-child(3) {
  animation-delay: 0.19s;
}

.work-steps__card:nth-child(4) {
  animation-delay: 0.26s;
}

.work-steps__card:nth-child(5) {
  animation-delay: 0.33s;
}

.work-steps__card:nth-child(6) {
  animation-delay: 0.4s;
}

.work-steps__card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--turquoise-gardient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.work-steps__card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(34, 138, 138, 0.07);
  transform: scale(0.6);
  opacity: 0;
  transition:
    opacity var(--transition),
    transform var(--transition);
}

.work-steps__card:hover {
  background: var(--white-color);
  border-color: rgba(34, 138, 138, 0.3);
  box-shadow: 0 18px 44px rgba(50, 50, 50, 0.08);
  transform: translateY(-4px);
}

.work-steps__card:hover::before {
  transform: scaleX(1);
}

.work-steps__card:hover::after {
  opacity: 1;
  transform: scale(1);
}

.work-steps__number {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--turquoise-color);
  font-size: var(--fs-14);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.work-steps__title {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0;
    font-family: var(--family-cormorant);
    font-size: var(--h5);
    line-height: 1.14;
    font-weight: 500;
    color: var(--black-color);
}

.work-steps__text {
    position: relative;
    z-index: 1;
    margin: 24px 0 0;
    color: var(--black-color);
    font-size: var(--fs-16);
    line-height: 1.55;
}

@keyframes workStepFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* DAPTIVE */

@media (max-width: 1320px) {
  .certificate-lightbox__arrow--prev {
    left: 12px;
  }

  .certificate-lightbox__arrow--next {
    right: 12px;
  }
}


@media (max-width: 1180px) {
  .stats-section__grid {
    gap: 34px;
  }

  .stats-section__text {
    font-size: var(--fs-16);
  }

    .certificates-slider__track {
    gap: 22px;
  }

  .certificates-slider__slide {
    flex-basis: calc((100% - 44px) / 3);
    height: clamp(220px, 24vw, 290px);
  }

  .work-steps__grid {
    gap: 20px;
  }

  .work-steps__card {
    min-height: 310px;
    padding: 28px;
  }

  .work-steps__text {
    font-size: var(--fs-16);
  }
}

@media (max-width: 1024px) {
  .trust-hero__head {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .trust-hero__title {
    max-width: 760px;
  }

  .trust-hero__text {
    max-width: 640px;
    font-size: var(--fs-16);
  }

  .trust-hero__image-wrap {
    height: clamp(300px, 48vw, 460px);
  }
}

@media (max-width: 900px) {
  .stats-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 28px;
  }

    .work-steps__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-steps__card {
    min-height: 290px;
  }
}

@media (max-width: 768px) {
  .certificates-slider {
    padding-bottom: 58px;
  }

  .certificates-slider__track {
    gap: 18px;
  }

  .certificates-slider__slide {
    flex-basis: calc((100% - 18px) / 2);
    height: 240px;
  }

  .certificates-slider__arrows {
    right: auto;
    left: 0;
  }

  .certificates-slider__arrow {
    width: 42px;
    height: 42px;
  }

  .certificate-lightbox {
    padding: 16px;
  }

  .certificate-lightbox__window {
    width: 100%;
    height: 78vh;
  }

  .certificate-lightbox__close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
  }

  .certificate-lightbox__close::before,
  .certificate-lightbox__close::after {
    top: 18px;
    left: 10px;
    width: 18px;
  }

  .certificate-lightbox__arrow {
    width: 40px;
    height: 40px;
  }

  .certificate-lightbox__counter {
    bottom: -32px;
  }
}

@media (max-width: 640px) {
  .trust-hero__head {
    margin-bottom: 24px;
  }

  .trust-hero__text {
    font-size: var(--fs-16);
    line-height: 1.55;
  }

  .trust-hero__image-wrap {
    height: 300px;
  }
    .stats-section__grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .stats-section__label {
    margin-top: 12px;
  }

  .stats-section__text {
    max-width: 420px;
    margin-top: 16px;
    font-size: var(--fs-16);
  }

   .work-steps__grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
  }

  .work-steps__card {
    min-height: auto;
    padding: 24px 18px;
  }

  .work-steps__number {
    margin-bottom: 24px;
  }

  .work-steps__title {
    font-size: clamp(26px, 8vw, 32px);
  }

  .work-steps__text {
    margin-top: 26px;
    font-size: var(--fs-16);
  }
}

@media (max-width: 480px) {
  .certificates-slider__slide {
    flex-basis: 100%;
    height: 250px;
  }

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

@media (max-width: 420px) {
  .trust-hero__image-wrap {
    height: 260px;
  }

    .work-steps__card {
    padding: 22px 16px;
  }
}