.projects {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  height: 100vh;

  .polygon-projects {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    margin-left: -5rem;
  }

  .polygon-projects {
    border-right: 100vw solid transparent;
    border-bottom: 20vh solid var(--primary_green);
    z-index: -1;
  }

  h2 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 2rem;
  }

  .projects-slider {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    overflow: visible;
    position: relative;

    .slide-track {
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding-bottom: 1rem;
      animation: scroll 25s infinite;
    }

    .project-card:hover {
      scale: 1.02;
      box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2);
    }

    .project-card {
      display: flex;
      flex-direction: column;
      height: fit-content;
      transform: ease-in-out 0.3s;
      width: 31%;

      .project-image {
        height: 30dvh;
        border-radius: 8px 8px 0 0;
        overflow: hidden;

        img {
          object-fit: cover;
        }
      }

      .project-info {
        display: flex;
        flex-direction: column;
        background-color: #f5f5f5;
        height: 25dvh;
        justify-content: space-between;
        padding: 1rem;
        border-radius: 0 0 8px 8px;

        .project-description {
          display: flex;
          flex-direction: column;
        }

        a {
          text-decoration: none;
          color: black;
          font-size: 1.1rem;
          font-weight: 700;
          margin-bottom: 0.6rem;
          transform: ease-in-out 0.3s;
        }
  
        a:hover {
          color: var(--primary_blue);
        }

        a:hover .github-icon {
          width: 2rem;
          
          background: url(../statics/icons/github_blue.svg);
        }
  
        span {
          font-size: 0.9rem;
          opacity: 0.7;
        }

        .status-tittles {
          display: grid;
          grid-template-columns: 1fr 1fr;
          font-weight: 600;
          width: 50%;
        }

        .project-status {
          display: flex;
          justify-content: space-between;
          align-items: end;
          margin-top: 1rem;

          .technologies-used {
            display: flex;
            justify-content: center;
            align-items: center;
          }

          .technologies-used img {
            width: 1.7rem;
            height: 1.7rem;
            margin-left: 0.1rem;
          }

          .percentage-bar {
            display: flex;
            gap: 0.5rem;

            progress {
              appearance: none;
              border-radius: 8px;
            }

            progress::-webkit-progress-bar {
              background-color: #ccc;
              border: 1px solid #3ca3de;
              border-radius: 8px;
              width: 80%;
              position: relative;
            }

            progress::-webkit-progress-value {
              background-color: var(--primary_blue); 
              border-radius: 8px;
            }
  
          }

        }
      }

    }
  }
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-30%);
  }
}