.videos {
  margin-top: 112px;

  @media (max-width: $tablet) {
    margin-top: 96px;
  }

  @media (max-width: $mobile) {
    margin-top: 80px;
  }

  &__title {
    display: flex;
    justify-content: space-between;
    color: #253737;

    .videos__small & {
      align-items: baseline;
      color: #212529;
    }

    .title {
      color: inherit;
    }

    @media (max-width: $desktop) {
      font-size: 36px;
    }

    @media (max-width: $tablet) {
      font-size: 28px;
    }

    @media (max-width: $mobile) {
      justify-content: center;
    }

    > .button {
      font-size: 16px;
      font-weight: 700;

      @media (max-width: $tablet) {
        font-size: 15px;
      }

      @media (max-width: $mobile) {
        display: none;
      }
    }
  }

  &__button {
    display: none;

    @media (max-width: $mobile) {
      display: block;
      text-align: center;
    }
  }

  &__controls {
    display: flex;
    gap: 18px;

    @media (max-width: $mobile) {
      display: none;
    }

    button {
      padding: 0;
      color: #253737;
      background-color: transparent;
      border: none;

      &:hover,
      &:focus {
        color: #5c6d70;
      }

      &:disabled {
        color: #c7c8cb;
      }
    }
  }

  &__container {
    margin-top: 2.5rem;
    overflow: hidden;

    @media (max-width: $tablet) {
      margin-top: 2rem;
    }

    @media (max-width: $mobile) {
      width: calc(100% + 32px);
      margin-inline: -16px;
      overflow-x: auto;
      scroll-behavior: smooth;
      scroll-snap-type: x mandatory;

      .videos__small & {
        width: 100%;
        margin-inline: 0;
      }

      &::-webkit-scrollbar {
        height: 4px;
      }

      &::-webkit-scrollbar-track {
        border-radius: 4px;
        background: #2537371a;
        margin: 0 12px;
      }

      &::-webkit-scrollbar-thumb {
        background-color: #253737;
        border-radius: 4px;
      }
    }
  }

  &__list {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    transition: transform 0.3s ease-out;

    @media (max-width: $tablet) {
      gap: 1.5rem;
    }

    @media (max-width: $mobile) {
      .videos__small & {
        flex-direction: column;
      }
    }

    li {
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      width: calc((100% - 4rem) / 3);

      @media (max-width: $tablet) {
        width: calc((100% - 1.5rem) / 2);
      }

      @media (max-width: $mobile) {
        width: 100%;
        padding-inline: 12px;
        scroll-snap-align: start;

        .videos__small & {
          padding-inline: 0;
        }
      }

      a {
        color: #253737;

        &:hover {
          h3 {
            opacity: 60%;
          }
        }
      }

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      h3 {
        margin-top: 1.5rem;
        line-height: 1.25;
        font-size: 20px;
        font-weight: 600;
        transition: opacity 0.2s;

        @media (max-width: $desktop) {
          margin-top: 1.25rem;
          font-size: 18px;
        }

        @media (max-width: $tablet) {
          margin-top: 1rem;
          line-height: 1.25;
          font-size: 16px;
        }

        @media (max-width: $mobile) {
          margin-top: 0.88rem;
        }
      }

      p {
        line-height: 1.5;
        font-size: 14px;
        margin-top: 0.5rem;
        margin-bottom: 0;
        color: #5e636e;
      }

      img {
        width: 100%;
        height: auto;
      }
    }

    .videos__small & {
      margin-bottom: 1.5rem;

      li {
        @media (max-width: $tablet) {
          width: calc((100% - 3rem) / 3);
        }

        @media (max-width: $mobile) {
          width: 100%;
        }
      }
    }
  }

  .button-container {
    width: 100%;
    text-align: center;
    margin-bottom: 3.5rem;
    margin-top: 3.5rem;
  }

  .video-button {
    border: 1px solid black;
  }
}
