.single-project {
  main {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .top-section {
    padding: 48px 128px 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 64px;
    position: relative;
    overflow: hidden;
    width: 100%;
  }

  .top-section__info-container {
    display: flex;
    flex-direction: row;
    gap: 64px;
    width: 1184px;
  }

  .top-section__left {
    width: 50%;
    z-index: 1;
  }

  .top-section__btn {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: "Inter", sans-serif;
    text-decoration: none;
    color: var(--dark-100);
    overflow: hidden;

    .btn-round {
      transform: scaleX(-1);
    }

    .btn-text {
      text-align: left;
    }

    &:hover {
      .btn-round {
        &::before {
          content: url(../../../images/icons/big-arrow-icon-green.svg);
          left: 50%;
        }

        &::after {
          left: 125%;
        }
      }

      .btn-text {
        transform: translateY(-175%);

        &::after {
          transform: translateY(0);
        }
      }
    }
  }

  .top-section__info-container {
    display: flex;
    gap: 64px;
    z-index: 1;
  }

  .top-section__info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 560px;
  }

  .top-section__info-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blue-gray);

    h1 {
      margin-top: 32px;
      font-family: "Poppins", serif;
      font-weight: 600;
      font-size: 38px;
      color: var(--dark-80);
    }

    span {
      font-family: "Inter", sans-serif;
      font-weight: 400;
      font-size: 14px;
      color: var(--dark-80);
    }
  }

  .top-section__info-descrition {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 19.6px;
    color: var(--dark-100);

    ul {
      padding-left: 20px;
    }
  }

  .wp-post-image {
    object-fit: contain;
    object-position: right;
    height: 300px;
    width: 50%;
    z-index: 1;
  }

  .project-section {
    line-height: 25px;
    margin-top: 48px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 1180px;

    div {
      grid-column: span 2;

      article {
        width: 100%;
      }
    }

    article {
      display: flex;
      flex-direction: column;
      font-family: "Inter", sans-serif;
      color: var(--dark-100);
    }

    h2:first-of-type {
      font-family: "Poppins", serif;
      font-weight: 600;
      font-size: 22px;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      margin-top: 8px;
      font-weight: 700;
    }

    p {
      font-weight: 400;
      font-size: 16px;
    }

    p,
    ul,
    ol {
      margin-top: 16px;
      line-height: 25.6px;
    }

    ul,
    ol {
      padding-left: 24px;
    }
  }

  .projects__nav {
    height: 48px;
    display: flex;
    justify-content: space-between;
    margin-block: 32px 64px;
    width: 100%;
    max-width: 1184px;
  }

  .projects__nav-btn {
    display: flex;
    height: 48px;
    align-items: center;
    gap: 16px;
    font-family: "Inter", sans-serif;
    text-decoration: none;
    color: var(--dark-100);
    overflow: hidden;

    &:hover {
      .btn-round {
        &::before {
          content: url(../../../images/icons/big-arrow-icon-green.svg);
          left: 50%;
        }

        &::after {
          left: 125%;
        }
      }

      .btn-text {
        transform: translateY(-175%);

        &::after {
          transform: translateY(0);
        }
      }
    }
  }

  .projects__nav-btn.prev {
    .btn-round {
      transform: scaleX(-1);
    }

    .btn-text {
      text-align: left;
    }
  }

  .projects__nav-btn.next {
    .btn-text {
      text-align: right;
    }
  }

  .info-badges {
    margin-top: 0;
  }
}

.card__technologies {
  margin-top: 24px;
  display: flex;
  gap: 16px;

  .tech-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;

    img {
      width: 100%;
      opacity: 0.7;
    }

    &:after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 27px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 12px;
      line-height: 16px;
      white-space: nowrap;
      color: var(--white-primary);
      background-color: var(--dark-50);
      border-radius: 8px;
      padding: 2px 5px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 300ms;
      z-index: 1;
    }

    &::before {
      content: "";
      position: absolute;
      bottom: 19px;
      left: 50%;
      transform: translateX(-50%);
      border: 4px solid transparent;
      border-top-color: var(--dark-50);
      opacity: 0;
      z-index: 1;
      transition: opacity 300ms;
      pointer-events: none;
    }

    &:hover {
      img,
      &::after,
      &::before {
        opacity: 1;
      }
    }
  }
}

@media (max-width: 1280px) {
  .single-project {
    .top-section {
      padding: 56px 48px;
    }

    .top-section__info-container {
      justify-content: center;
      align-items: center;
      width: auto;
    }

    .top-section__info {
      width: auto;
    }

    .project-section {
      padding-inline: 48px;

      article {
        width: auto;
      }
    }

    .projects__nav {
      padding-inline: 48px;
    }
  }
}

@media (max-width: 768px) {
  .single-project {
    .top-section {
      padding: 48px 48px 0;
    }

    .top-section__info-container {
      flex-direction: column-reverse;
      gap: 32px;
    }

    .top-section__left {
      width: 100%;
    }

    .top-section__info-container {
      flex-direction: column-reverse;
      margin-top: 0;
    }

    .top-section__info {
      gap: 16px;
    }

    .top-section__info-title {
      h1 {
        font-size: 32px;
      }
    }

    .top-section__btn {
      position: absolute;
      top: 32px;

      &:hover {
        .btn-round {
          &::before {
            display: none;
          }

          &::after {
            left: 50%;
          }
        }

        .btn-text {
          transform: none;

          &::after {
            transform: none;
          }
        }
      }
    }

    .wp-post-image {
      margin-top: 64px;
      width: 100%;
      height: auto;
      object-position: center;
    }

    .project-section {
      padding-inline: 48px;
      gap: 32px;

      p {
        margin-top: 8px;
      }
    }

    .projects__nav {
      margin-block: 32px;
    }

    .projects__nav-btn {
      &:hover {
        .btn-round {
          &::before {
            display: none;
          }

          &::after {
            left: 50%;
          }
        }

        .btn-text {
          transform: none;

          &::after {
            transform: none;
          }
        }
      }
    }
  }
}

@media (max-width: 560px) {
  .single-project {
    .top-section {
      padding: 16px 16px 0;
    }

    .top-section__btn {
      top: 16px;
    }

    .project-section {
      padding-inline: 16px;
    }

    .projects__nav {
      padding-inline: 16px;
    }
  }
}
