@charset "utf-8";

.p-fv__categories {
  section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }
}

.p-works__cat {
  background: #fff;
  color: #372710;
  min-width: 160px;
  display: block;
  border-radius: 26px;
  padding: 12px 43px;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
}

.p-works__cat.is-selected,
.p-works__cat:hover {
  background: #6ab58d;
  color: #eff3fb;
}

.p-works {
  padding: 103px 0 160px;

  @media (width < 1120px) {
    padding: 50px 0 80px;
  }
}

.p-works__inner {
  section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 35px;

    @media (width < 1120px) {
      gap: 60px 20px;
      grid-template-columns: repeat(2, 1fr);
    }

    @media (width < 600px) {
      display: flex;
      flex-direction: column;
    }
  }
}

.p-works__item {
}

.p-works__link {
}

.p-works__link:hover {
  opacity: 0.7;
}

.p-works__item-head {
  width: 100%;
  aspect-ratio: 285/200;
  border-radius: 6px;
  overflow: hidden;

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

.p-works__item-body {
  margin-top: 15px;
}

.p-works__item-title {
  margin-top: 15px;
  letter-spacing: 0.05em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 3;
  min-height: 70px;
}

.webgene-pagination {
  margin-top: 80px;
  justify-self: center;
  grid-column: 1 / -1;
  color: #4b4b4b;

  ul .number a {
    background: #eff0ef;
  }

  ul .number a:hover,
  ul .number.selected a {
    background: #6ab58d;
    color: #ffffff;
  }

  ul .number.selected a {
    pointer-events: none;
  }

  ul {
    display: flex;
    list-style: none;
    gap: 10px;
    padding-inline-start: 0;
    justify-content: center;
    align-items: center;
  }

  ul .number a {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
  }

  li.next,
  li.prev {
    position: relative;
  }

  li.next {
    margin-left: 20px;
  }

  li.prev {
    margin-right: 20px;
  }

  li.next a,
  li.prev a {
    height: 40px;
    width: 76px;
    line-height: 1;
    display: flex;
    align-items: center;
  }

  li.prev a {
    justify-content: end;
  }

  li.next:hover::after,
  li.prev:hover::after {
    background: url("https://do-and-be.jp/system_panel/uploads/images/pagination-arrow-green.svg") no-repeat center center / contain;
  }

  li.prev:after,
  li.next:after {
    pointer-events: none;
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    width: 40px;
    height: 40px;
    background: url("https://do-and-be.jp/system_panel/uploads/images/pagination-arrow-white.svg") no-repeat center center / contain;
    transition: all 0.3s ease-out;
  }

  li.prev:after {
    left: 0;
    transform: translateY(-50%) rotate(180deg);
  }

  li.next:after {
    right: 0;
  }
}
