@charset "utf-8";

.p-works {
  margin: 150px 0 113px;
}

.p-works__inner {
}

.p-works__cat-text {
}

.p-works__categories {
  margin-top: 25px;

  .webgene-blog {
    display: flex;

    @media (width < 768px) {
      flex-direction: column;
      width: fit-content;
    }
  }

  .webgene-item {
    padding-right: 20px;

    @media (width < 768px) {
      padding-left: 0;
      padding-right: 0;
      padding-bottom: 6px;
    }
  }

  .webgene-item:not(:first-of-type) {
    padding-left: 20px;
    border-left: 1px solid #d5d5d5;

    @media (width < 768px) {
      padding-left: 0;
      padding-top: 6px;
      border-left: none;
      border-top: 1px solid #d5d5d5;
    }
  }
}

.p-works__cat {
  width: clamp(140px, 18vw, 180px);
  height: 55px;
  background: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;

  @media (width < 768px) {
    width: 180px;
    height: 40px;
  }
}

.p-works__cat.is-selected,
.p-works__cat:hover {
  background: var(--color-blue);
  color: var(--color-white);
}

.p-works__cat.is-selected {
  pointer-events: none;
}

.p-works__lists {
  margin-top: 70px;

  .webgene-blog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px calc(41vw / 13.66);

    @media (width < 768px) {
      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: 351/260;
    border-radius: 5px;
    overflow: hidden;

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

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

  .p-works__item-tags {
  }

  .p-works__item-title {
    min-height: 50px;
    margin-top: 8px;
    font-family: var(--font-sans-serif);
    line-height: 1.786;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
  }

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

    @media (width < 600px) {
      margin-top: 0;
    }
  }

  .webgene-pagination ul .number a {
    background: #efefef;
  }

  .webgene-pagination ul .number a:hover,
  .webgene-pagination ul .number.selected a {
    background: var(--color-blue);
    color: var(--color-white);
  }

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

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

  .webgene-pagination 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 a:hover,
  li.prev a:hover {
  }

  li.next:hover::after,
  li.prev:hover::after {
    background: url("https://aoi-sora.net/system_panel/uploads/images/pagination-arrow-white.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://aoi-sora.net/system_panel/uploads/images/pagination-arrow-black.svg") no-repeat center center / contain;
    transition: all 0.3s ease-out;
  }

  li.prev:after {
    left: 0;
  }

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