@keyframes levitate {
  0% {
    transform: translateY(40%);
  }
  50% {
    transform: translateY(37.5%);
  }
  100% {
    transform: translateY(40%);
  }
}

@media (max-width: 900px) {
  @keyframes levitate {
    0% {
      transform: translateY(50%);
    }
    50% {
      transform: translateY(47.5%);
    }
    100% {
      transform: translateY(50%);
    }
  }
}

.head {
  position: relative;
  padding-top: 2rem;
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 6rem;

  & .head-content {
    max-width: calc(312px + 25%);
    margin-bottom: 3rem;

    & h2 {
      color: #cccccc;
      font-size: 1rem;
      line-height: 24px;
      font-weight: 300;
    }
  }

  & img {
    position: absolute;
    right: 0;
    bottom: 90px;
    transform: translateY(40%);
    width: 480px;
    height: 480px;
    animation: levitate 3s ease-in-out infinite;
  }

  @media (max-width: 900px) {
    & img {
      bottom: 56px;
      transform: translateY(50%);
      height: 340px;
      width: 340px;
    }
  }

  @media (max-width: 740px) {
    padding-bottom: 7.5rem;

    & h2 {
      font-size: 1.5rem;
    }

    & img {
      bottom: 36px;
      transform: translateY(50%);
      width: 240px;
      height: 240px;
    }
  }
}

.btn-flex-container {
  & .clutch-widget {
    width: 180px;
    & iframe {
        width: 220px;
        transform-origin: left;
        scale: 0.75;
        padding: 1rem;
        background: white;
        border-radius: 3px;
    }
  }
}

.service-plan {
  margin-top: 140px;

  @media (max-width: 800px) {
    margin-top: 110px;
  }

  .section__title {
    margin-top: 0;
  }

  h3 {
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 36px;
    margin-block: 3rem 2rem;
  }

  .ui-card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    counter-reset: card-counter; /* initialize counter */

    .ui-card-wrapper {
      /* min-width: 230px; */
      flex: 1 1 230px;
      max-width: 295px;

      transition: 1s ease, opacity 2s ease;

      @media (prefers-reduced-motion) {
        transition: none;
      }

      &.animation-hidden {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(-50%);

        @media (max-width: 1293px) {
          transform: translateX(-100%);
        }
      }

      &.animation-show {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);

        @media (max-width: 1293px) {
          transform: translateX(0);
        }
      }

      @media (min-width: 1294px) {
        &:nth-of-type(2) {
          transition-delay: 0.25s;
        }
        &:nth-of-type(3) {
          transition-delay: 0.5s;
        }
        &:nth-of-type(4) {
          transition-delay: 0.75s;
        }
        &:nth-of-type(5) {
          transition-delay: 1s;
        }
      }

      & .counter {
        display: flex;
        justify-content: center;
        align-items: center;
        background: linear-gradient(
          180deg,
          #8039e5 0%,
          #b939e5 50%,
          #e539bd 100%
        );
        border-radius: 50%;
        width: 3rem;
        height: 3rem;
        counter-increment: card-counter;

        &::before {
          content: counter(
            card-counter,
            decimal-leading-zero
          ); /* displays as 01, 02, etc. */
          font-weight: 600;
          font-size: 1.5rem;
          line-height: 36px;
          text-align: center;
          color: white;
        }
      }

      & .ui-card-content {
        /* min-height: 240px; */
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        h4 {
          font-family: Geologica;
          font-weight: 600;
          font-size: 16px;
          line-height: 24px;
          letter-spacing: 0%;
        }

        p {
          font-family: Geologica;
          font-weight: 300;
          font-size: 16px;
          line-height: 24px;
          letter-spacing: 0%;
          margin-block: 0;
        }
      }

      @media (max-width: 530px) {
        max-width: none;

        & .ui-card-content {
          height: auto;
          max-height: initial;
          /* gap: 1.5rem; */
        }
      }
    }
  }

  & > p, & > .text-container {
    max-width: 824px;
    font-weight: 300;
    margin-top: 3rem;
  }

  & > .text-container {

    & p {
      font-weight: 300;
      font-size: 16px;
      line-height: 24px;
      letter-spacing: 0%;
      margin-block: 0 0.5rem;

      & strong {
        font-weight: 600;
      }
    }
  }
}

/* Контейнер секції */
.call-to-action {
  margin-block: 0;
  max-width: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-inline: 0;

  & .cta__gradient {
    position: absolute;
    inset: 0;
    /* background: rgb(0, 0, 0); */
    /* background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0) 5%,
      rgba(0, 0, 0, 0.6502976190476191) 20%,
      rgba(3, 3, 3, 1) 30%,
      rgba(3, 3, 3, 1) 70%,
      rgba(5, 5, 5, 0.6502976190476191) 80%,
      rgba(0, 0, 0, 0) 95%
    ); */
    background: linear-gradient(
      to bottom,
      transparent 0%,
      #1f1f1f 15%,
      #000 50%,
      #1f1f1f 85%,
      transparent 100%
    );
    /* filter: blur(10px); */

    z-index: 0;
  }

  & .contact-btn {
    border: 2px solid white;
    color: white;
    background-color: black;
  }

  /* Вміст */
  & .cta__content {
    background-color: transparent;
    position: relative;
    z-index: 1; /* щоб було над градієнтом */
    text-align: center;
    color: #fff;
    padding-block: 20rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Заголовок */
  & .cta__title {
    font-weight: 600;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0%;
    text-align: center;
    margin-bottom: 2rem;
    padding-inline: 1.5rem;
  }

  /* Контейнер із двома фото */
  & .cta__photos {
    margin-top: 4rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: nowrap;
  }

  /* Стиль “полароїд”-карток */
  & .photo-card {
    will-change: transform, opacity, filter;
    width: 50%;
    max-width: 280px;
    background: #fff;
    color: #000;
    padding: 1rem;
    border-radius: 0.25rem;
    transition: 0.3s ease;
    text-align: left;
    box-shadow: 0px 8px 16px 0px #0000003d;
    backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;

    @media (max-width: 500px) {
      padding: 0.75rem;
    }

    @media (max-width: 370px) {
      & .photo-card__name {
        font-size: 0.875rem;
      }

      & .photo-card__role {
        font-size: 0.75rem;
      }
    }

    &.animation-show {
    }
  }

  & .photo-card:nth-of-type(1) {
    transform: rotate(2deg) translate(8px, -10px);
    z-index: 3;

    &.animation-hidden {
      opacity: 0;
      filter: blur(20px);
      transform: translateX(-100%);
    }
  }
  & .photo-card:nth-of-type(2) {
    transform: rotate(-4deg) translate(-8px, 10px);

    &.animation-hidden {
      opacity: 0;
      filter: blur(20px);
      transform: translateX(100%);
    }
  }

  & .photo-card:hover {
    transform: rotate(0deg) scale(1.02);
  }

  & .photo-card__img {
    display: block;
    margin-bottom: 0.5rem;
    object-fit: cover;
    aspect-ratio: 1/1;
    width: 100%;
  }

  & .photo-card__info {
    min-height: 72px;
  }

  & .photo-card__name {
    margin-block: 0 0.25rem;
    font-weight: 600;
    font-size: 1rem;
    line-height: 24px;
  }

  & .photo-card__role {
    margin: 0;
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
  }
}

.form-section {
  margin-bottom: 96px;
  padding-top: 96px;
}

.brands-section {
  margin-block: 40px 96px;
}

.services {
  margin-block: 84px 56px;

  & .services__row {
    margin-bottom: 0;
  }

  & .service-card {
    height: 200px;
  }
}

.slider-section {
  margin-block: 84px 104px;
}

.technologies-section,
.reviews-section {
  margin-block: 84px 56px;
}

@media (max-width: 1200px) {
  .services,
  .slider-section,
  .technologies-section,
  .reviews-section {
    margin-block: 64px 40px;
  }

  .brands-section {
    margin-block: 24px 64px;
  }
}
