.p-works-group-tag .webgene-blog {
  margin-block: 80px 64px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
}
.p-works-group-tag .p-works-group__tag-item {
    width: 160px;
    height: fit-content;
}
.p-works-group-tag .p-works__cat {
  position: relative;
  overflow: hidden;
  display: block;
  width: 160px;
  text-align: center;
  border-radius: 26px;
  padding-block: 12px 14px;
  background: #eff0ef;
  color: #372710;
  transition: color 0.25s ease;
}
.p-works-group-tag .p-works__cat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #5fb38d;
  border-radius: 26px;

  transform: scaleX(0);
  transform-origin: left bottom;
  transition: transform 0.3s ease;
  z-index: 0;
}
.p-works-group-tag .p-works__cat span {
  position: relative;
  z-index: 1;
}
@media (any-hover: hover) {
  .p-works-group-tag .p-works__cat:hover::before {
    transform: scaleX(1);
  }
  .p-works-group-tag .p-works__cat:hover {
    color: #fff;
  }
}
.p-works-group-tag .is-selected {
  position: relative;
  overflow: hidden;
  display: block;
  width: 160px;
  text-align: center;
  border-radius: 26px;
  padding-block: 12px 14px;
  background: #5fb38d;
  color: #fff;
  transition: color 0.25s ease;
}
.p-works-group-tag .is-selected::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #5fb38d;
  border-radius: 26px;
  transform: scaleX(0);
  transform-origin: left bottom;
  transition: transform 0.3s ease;
  z-index: 0;
}

@media screen and (max-width: 768px) {
  .p-works-group-cards {
    padding-bottom: calc(170 / 1366 * 100vw);
  }
}

.p-works-group-cards {
  padding-bottom: 170px;
}
@media screen and (max-width: 768px) {
  .p-works-group-cards {
    padding-bottom: calc(170 / 1366 * 100vw);
  }
}
.p-works-group-cards .webgene-blog {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 50px 45px;
}
@media screen and (max-width: 1366px) {
  .p-works-group-cards .webgene-blog {
    gap: calc(50 / 1366 * 100vw) calc(45 / 1366 * 100vw);
  }
}
@media screen and (max-width: 1080px) {
  .p-works-group-cards .webgene-blog {
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 45px;
  }
}
@media screen and (max-width: 650px) {
  .p-works-group-cards .webgene-blog {
    grid-template-columns: 1fr;
  }
}

.p-works__item {
  width: 385px;
}
@media screen and (max-width: 1366px) {
  .p-works__item {
    width: calc(385 / 1366 * 100vw);
  }
}
@media screen and (max-width: 1080px) {
  .p-works__item {
    width: 385px;
    margin-inline: auto;
  }
}
@media screen and (max-width: 900px) {
  .p-works__item {
    width: calc(385 / 900 * 100vw);
  }
}
@media screen and (max-width: 650px) {
  .p-works__item {
    width: min(calc(300 / 375 * 100vw), 385px);
  }
}
@media (any-hover: hover) {
  .p-works__item:hover .p-works__item-head img {
	transform: scale(1.03);
  }
}
.p-works__item-head {
  border-radius: 10px;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.p-works__item-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
    transform-origin: center;
}

.p-works__item-body {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.p-works__item-tag {
  width: 130px;
  background-color: #e2f0ea;
  border-radius: 20px;
  text-align: center;
  color: #5fb38d;
  font-size: 12px;
  font-weight: 600;
  font-family: "Prompt", sans-serif;
}
.p-works__item-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
  font-family: "Noto Sans JP", sans-serif;
}

.webgene-pagination {
  margin-top: 110px;
  font-size: 14px;
  justify-self: center;
  grid-column: 1 / -1;
}
.webgene-pagination a:hover {
  transform: scale(1.15);
  opacity: 0.7;
}

.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;
  line-height: 2.2;
  border-radius: 50%;
  background-color: #eff0ef;
  color: #4b4b4b;
}

.webgene-pagination ul .number.selected a {
  background: #5fb38d;
  color: #fff;
  border-radius: 50%;
}

/* ★ 追加：省略記号（…） */
.webgene-pagination ul li.dots {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #4b4b4b;
  user-select: none;
}

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

li.next a,
li.prev a {
  height: 40px;
  width: 40px;
  padding: 2px;
  position: relative;
}

li.prev:after,
li.next:after {
  pointer-events: none;
  content: "";
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
}

li.prev:after {
  background-image: url("https://zil-inc.co.jp/system_panel/uploads/images/prev.png");
  left: 0;
}
li.next:after {
  background-image: url("https://zil-inc.co.jp/system_panel/uploads/images/next.png");
  right: 0;
}

@media screen and (min-width: 768px) {
  li.next {
    margin-left: 30px;
  }
  li.prev {
    margin-right: 30px;
  }

  li.next a,
  li.prev a {
    margin-top: 3px;
    width: auto;
    padding-block: 10px;
    z-index: 10;
    line-height: 1;
  }
  li.prev a {
    padding-left: 48px;
    color: #919191;
  }
  li.next a {
    padding-right: 48px;
    color: #4b4b4b;
  }

  li.prev:after,
  li.next:after {
    pointer-events: auto;
  }
}

/* =========================
   記事詳細
========================= */
.p-works-detail {
  padding-block: 110px 150px;
}

@media screen and (max-width: 1366px) {
  .p-works-detail {
    padding-block: calc(110 / 1366 * 100vw) calc(150 / 1366 * 100vw);
  }
}
.p-works-detail .detail {
  padding-block: 94px 100px;
  padding-inline: 70px;
  width: 1060px;
  margin-inline: auto;
  border-radius: 10px;
  background-color: #ffffff;
}
@media screen and (max-width: 1080px) {
  .p-works-detail .detail {
      width: min(calc(340 / 375 * 100vw), 921px);
      padding-block: min(calc(94 / 1080 * 100vw), 94px)
        min(calc(100 / 1080 * 100vw), 100px);
      padding-inline: min(calc(70 / 1080 * 100vw), 70px);
  }
}

@media screen and (min-width: 1200px) {
  .p-works-detail .detail-box {
    padding-inline: 130px;
  }
}
@media screen and (min-width: 768px) {
  .p-works-detail .detail-box {
    padding-inline: 40px;
  }
}
.p-works-detail .detail-box {
  padding-inline: 20px;
}

.p-works-detail .detail-catBtn {
  display: inline-block;
  width: 130px;
  padding-block: 4px;
  padding-inline: 10px;
  background: #e2f0ea;
  color: #5fb38d;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  border-radius: 12px;
  text-align: center;
}
.p-works-detail .detail-day {
  margin-left: 20px;
  font-size: 14px;
  color: #5c5c5c;
  font-weight: 400;
  line-height: 1;
}
.p-works-detail .post-ttl {
    margin-top: 47px;
    font-size: 22px;
    font-weight: normal;
    line-height: calc(44 / 22);
    letter-spacing: 0.0em;
    font-weight: 700;
    color: #5c5c5c;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #d0d0d0;
    padding-left: 29px;
    position: relative;
}
.p-works-detail .post-ttl::before {
    content: "";
    position: absolute;
    background: #5fb38d;
    width: 8px;
    height: 78%;
    top: 6px;
    left: -3px;
}
.p-works-detail .post-detail__content img,
.p-works-detail .detail img {
    margin: 40px auto 10px;
    max-width: 550px !important;
    margin-inline: auto;
    display: block;
    aspect-ratio: 603 / 380;
    border-radius: 5px;
    width: 100%;
}
@media screen and (min-width: 768px) {
  .p-works-detail .post-detail__content img,
  .p-works-detail .detail img {
      margin: 71px auto 93px;
      width: calc(600 / 1366 * 100vw);
      max-width: 600px !important;
  }
}
.p-works-detail .post-detail__content img,
.p-works-detail .detail img {
  -o-object-fit: cover;
     object-fit: cover;
}
.p-works-detail .detail-text {
  padding-block: 49px 79px;
    color: #505050;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 1.2px;
    line-height: calc(33 / 15);
}
.p-works-detail .detail-text p + p {
  padding-top: 30px;
}
.p-works-detail .post-detail__content > h3:first-child {
  margin-top: 0;
}
.p-works-detail .post-detail__content h3 {
  font-size: 20px;
  font-weight: 500 !important;
  margin-top: 53px;
  font-weight: 400;
  letter-spacing: 1.2px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 45px;
}
@media screen and (max-width: 768px) {
  .p-works-detail .post-detail__content h3 {
    gap: 17px;
    font-size: 20px;
  }
}
.p-works-detail .post-detail__content h3::before {
  content: "";
  width: 16px;
  height: 17px;
  border-radius: 5px;
  background: #5fb38d;
  display: inline-flex;
  flex-shrink: 0;
}
.p-works-detail .post-detail__content h4 {
  font-size: 20px;
  font-weight: 500 !important;
  margin-top: 53px;
  font-weight: 400;
  letter-spacing: 1.2px;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 35px;
}
.p-works-detail .post-detail__content h4::before {
  position: relative;
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fb38d;
  display: inline-flex;
  flex-shrink: 0;
}
@media screen and (max-width: 768px) {
  .p-works-detail .post-detail__content h4 {
    gap: 17px;
    font-size: 20px;
  }
}
.p-works-detail .post-detail__content h5 {
  font-size: 18px;
  font-weight: 500 !important;
  margin-top: 83px;
  letter-spacing: 0.06em;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid #d0d0d0;
}
.p-works-detail .post-detail__content h5::before {
  position: relative;
  top: -2px;
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-flex;
  flex-shrink: 0;
}
.p-works-detail .post-detail__content h6 {
  font-size: 16px;
  font-weight: 500 !important;
  margin-top: 83px;
  letter-spacing: 0.06em;
  padding-bottom: 12px;
  margin-bottom: 10px;
}
.p-works-detail .post-detail__content h6::before {
  position: relative;
  top: -2px;
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-flex;
  flex-shrink: 0;
}
.p-works-detail .detail__btn {
  margin-inline: auto;
  width: -moz-fit-content;
  width: fit-content;
}
.p-works-detail .detail__btn .button {
  padding-block: 12px 14px;
  padding-inline: 52px;
  border-radius: 28px;
  background: #5fb38d;
  font-size: 14px;
  color: #ffffff;
  line-height: 1;
  font-weight: 500;
}
@media (any-hover: hover) {
  .p-works-detail .detail__btn .button:hover {
    color: #5fb38d;
    background: #ffffff;
    border: 1px solid #5fb38d;
  }
}
