@charset "utf-8";

.p-blog {
  margin-top: 60px;
  margin-bottom: 150px;

  @media (width < 768px) {
    margin-bottom: 100px;
  }
}

.p-blog__categories {
  margin-top: 60px;

  section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    a {
      display: block;
      border-radius: 100px;
      background: #fff;
      min-width: 160px;
      padding: 9px 20px;
      text-align: center;
      color: var(--color-blue);
      letter-spacing: 0em;
      font-weight: 500;
      border: 1px solid var(--color-blue);
    }

    a:hover,
    a.is-selected {
      background: var(--color-blue);
      color: #eff3fb;
    }
  }
}

.p-blog__lists {
  margin-top: 60px;

  section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 58px 44px;

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

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

  .webgene-pagination {
    margin-top: 25px;
    justify-self: center;
    grid-column: 1 / -1;
    color: #4b4b4b;
    font-family: var(--font-noto-sans-jp);

    ul .number a {
      background: #f4f5f5;
    }

    ul .number a:hover,
    ul .number.selected a {
      background: var(--color-blue);
      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://saikorokohak.com/system_panel/uploads/images/page-arrow-blue.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://saikorokohak.com/system_panel/uploads/images/page-arrow-white.svg") no-repeat center center / contain;
      transition: all 0.3s ease;
    }

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

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