.wrapper {
  padding-block: 40px 80px;
}

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

  & .head-content {
    max-width: 824px;
    margin-bottom: 3rem;

    & h1 {
      margin-bottom: 3.75rem;
    }

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

  @media (max-width: 740px) {
    & h2 {
      font-size: 1.5rem;
    }
  }
}

.polaroids-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  &.animation-hidden {
    & .photo-card {
      opacity: 0;
      filter: blur(40px);
      transform: translateX(-100%) !important;
    }
  }

  & .photo-card {
    will-change: transform, opacity, filter;
    /* width: 100%; */
    width: 200px;
    background: #fff;
    color: #000;
    padding: 0.5rem;
    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) {
      width: 130px;
      padding: 0.5rem;
    }

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

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

  & .photo-card:nth-of-type(1) {
    transform: rotate(-3deg);
  }
  & .photo-card:nth-of-type(2) {
    transform: rotate(2deg);
    transition-delay: 0.1s;
  }
  & .photo-card:nth-of-type(3) {
    transform: rotate(-3deg);
    transition-delay: 0.2s;
  }
  & .photo-card:nth-of-type(4) {
    transform: rotate(-1deg);
    transition-delay: 0.3s;
  }
  & .photo-card:nth-of-type(5) {
    transform: rotate(5deg);
    transition-delay: 0.4s;
  }
  & .photo-card:nth-of-type(6) {
    transform: rotate(2deg);
    transition-delay: 0.5s;
  }
  & .photo-card:nth-of-type(7) {
    transform: rotate(-6deg);
    transition-delay: 0.6s;
  }
  & .photo-card:nth-of-type(8) {
    transform: rotate(1deg);
    transition-delay: 0.7s;
  }
  & .photo-card:nth-of-type(9) {
    transform: rotate(4deg);
    transition-delay: 0.8s;
  }

  /* & .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;
    background-color: #e1e1e1;
    width: 100%;

    & span {
      display: block;
      aspect-ratio: 1/1;
      font-family: Geologica;
      font-weight: 900;
      font-size: 144px;
      line-height: 100%;
      letter-spacing: 0%;
      text-align: center;
      margin: auto;
      color: rgb(164, 164, 164);

      @media (max-width: 500px) {
        font-size: 80px;
      }
    }
  }

  & div.photo-card__img {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  & .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;
  }
}

.big-numbers-section {
  display: flex;
  padding-block: 120px 80px;
  margin-block: 0;
  flex-wrap: wrap;
  gap: 2rem;

  & .big-number {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border-radius: 10px;
    transition: 1s;

    &.animation-hidden {
      scale: 0;
      filter: blur(5px);
    }

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

    & h3 {
      font-weight: 900;
      font-size: 96px;
      line-height: 96px;
      margin: 0;
      text-align: center;

      transition: 1s;

      &.animation-hidden {
        scale: 0;
        filter: blur(5px);
      }

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

    & p {
      font-weight: 300;
      font-size: 16px;
      line-height: 24px;
      text-align: center;
    }
  }
}

.countries-section {
  overflow: hidden;

  & .countries-wrapper {
    overflow: auto;
    display: flex;
    scrollbar-width: thin;
    scrollbar-color: #4a4a4a transparent;
    
    &::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    
    &::-webkit-scrollbar-thumb {
      background-color: #4a4a4a;
      border-radius: 4px;
    }
    
    &::-webkit-scrollbar-track {
      background-color: transparent;
    }
    gap: 3rem;
    
    & .country {
      & .country__flag {
        font-family: Geologica;
        font-weight: 900;
        font-size: 144px;
        width: 144px;
        height: 144px;
        line-height: 100%;
        letter-spacing: 0%;
        text-align: center;
      }
      
      & .country__name {
        font-weight: 300;
        font-size: 20px;
        line-height: 32px;
        letter-spacing: 0%;
        text-align: center;
      }
      
      @media (max-width: 500px) {
        & .country__flag {
          font-size: 96px;
        }
      }
    }
  }
}

.team-section {
  
  & .team-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }
  
  & .ui-card-wrapper {
    min-width: 280px;
    max-width: 400px;
    height: 480px;
    flex: 1 0 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    transition: 0.7s ease;

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

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

    &:hover {
      transform: scale(1.02);
    }

    & h3 {
      font-size: 40px;
      line-height: 56px;
    }

    & ul {
      display: flex;
      flex-direction: column;
      list-style: none;
      padding: 0;
      margin: 0;
      gap: 0.5rem;

      & li {
        font-weight: 300;
        line-height: 24px;

        & span {
          font-weight: 500;
          font-size: 24px;
          line-height: 36px;
          margin-right: 1.5rem;
        }
      }
    }

    p {
      font-weight: 300;
      line-height: 24px;
      margin-block: 0;

      & b {
        font-weight: 500;
        text-decoration: underline;
      }
    }

    @media(max-width: 700px) {
      height: auto;
      flex-basis: 100%;
      max-width: initial;

      & h3 {
        font-size: 28px;
        line-height: 40px;
      }
    }
  }
}

.our-values {
  .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; */
      padding: 1.5rem;
      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
          ); /* now 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; */
        height: calc(100% - 3rem);
        max-height: initial;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        h4 {
          font-family: Geologica;
          font-weight: 600;
          font-size: 16px;
          line-height: 24px;
          margin-bottom: 3rem;
          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; */
        }
      }
    }
  }
}
