@charset "utf-8";

.p-news {
  margin-top: -266px;
  padding: 344px 0 487px;
  background: #f4f4f4;

  @media (width < 768px) {
    margin-top: -138px;
    padding: 200px 0 420px;
  }
}

.p-news__categories {
  section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  a {
    display: block;
    border-radius: 100px;
    background: #fff;
    min-width: 160px;
    padding: 16px 50px;
    color: var(--color-red);
    border: 1px solid var(--color-red);
    line-height: 1.3;
    letter-spacing: 0.05em;
    font-weight: 300;
    text-align: center;
  }

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

.p-news__lists {
  padding-top: 60px;

  @media (width < 768px) {
    padding-top: 40px;
  }

  section {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .webgene-pagination {
    margin: 68px auto 0;
    color: #4b4b4b;

    @media (width < 768px) {
      margin: 40px auto 0;
    }

    ul .number a {
      background: #ffffff;
    }

    ul .number a:hover,
    ul .number.selected a {
      background: var(--color-red);
      color: #fff;
    }

    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;

      @media (width < 768px) {
        gap: 8px;
      }
    }

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

    li {
      line-height: 1;
    }

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

    li.next {
      margin-left: 30px;

      @media (width < 768px) {
        margin-left: 10px;
      }
    }

    li.prev {
      margin-right: 30px;

      @media (width < 768px) {
        margin-right: 10px;
      }
    }

    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://ajpc-inc.com/system_panel/uploads/images/page-arrow-red.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://ajpc-inc.com/system_panel/uploads/images/page-arrow-white.svg") no-repeat center center / contain;
      transition: all 0.2s ease;
    }

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

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