/* -------------トップ一覧-------------- */

.webgene-blog {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 2rem;
}

.webgene-blog .news__li {
  width: 23%;
}

.top-news .webgene-blog::before,
.sub-news .webgene-blog::before {
  width: 23%;
  content: "";
  display: block;
  height: 0;
  order: 1;
}

.top-news .webgene-blog::after,
.sub-news .webgene-blog::after {
  width: 23%;
  content: "";
  display: block;
  height: 0;
}

.webgene-blog .news__img {
  margin-bottom: 10px;
  text-align: center;
}

.webgene-blog .news__img img {
  aspect-ratio: 1 / .85;
  object-fit: cover;
}

.webgene-blog .news__txt {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.webgene-blog .news__date {
  font-size: 15px;
  display: inline-block;
  width: 110px;
  vertical-align: middle;
}

.webgene-blog .news__title {
  display: inline-block;
  width: calc(100% - 120px);
  vertical-align: middle;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-bottom: none;
  line-height: 1;
}

@media screen and (max-width: 768px) {

  .webgene-blog .news__txt {
    display: block;
  }

  .webgene-blog .news__date {
    width: fit-content;
  }

  .webgene-blog .news__title {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }

  .webgene-blog .news__li {
    width: 100%;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    margin: 0 auto 15px;
  }

  .webgene-blog .news__li:last-child {
    margin-bottom: 0;
  }

  .webgene-blog .news__img {
    text-align: center;
  }
}


/* -------------サブ一覧-------------- */

.sub-news .sub__inner {
  padding-bottom: 0;
}

.sub-news .webgene-blog .news__li {
  margin-bottom: 30px;
}


/* -------------　詳細　-------------- */

.sub-newsdetail .webgene-blog {
  display: block;
  width: 100%;
}

.sub-newsdetail .sub__inner {
  padding-bottom: 0;
}

.sub-newsdetail .btn_cmn {
  margin: 80px auto 0;
}

.news__detail {
  background: #fff;
  padding: 60px;
  position: relative;
}

.news__detail::before {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  border: 1px solid #726e69;
  right: 10px;
  top: -10px;
}

.news__detail .news__date {
  color: #ad8e2b;
  font-weight: 500;
  font-size: 18px;
  display: inline-block;
  margin-right: 1rem;
  width: fit-content;
}

.news__detail .news__cate {
  background-color: #ad8e2b;
  color: #fff;
  font-size: 14px;
  display: inline-block;
  padding: 5px 10px;
  text-align: center;
}

.news__detail .news__title {
  padding-bottom: 20px;
  margin-bottom: 20px;
  font-size: 20px;
  border-bottom: 1px solid #ddd;
  width: 100%;
  margin-left: 0;
  white-space: wrap;
  overflow: auto;
  line-height: 1.6;
}

.news__detail .news__imgs {
  margin-bottom: 30px;
}

.news__detail .news__img {
  width: 32%;
  max-width: 420px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: 0 .5% .8% .5%;
}

.news__detail .news__img img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media screen and (max-width: 768px) {

  .sub-newsdetail .btn_cmn {
    margin: 30px auto 0;
  }

  .news__detail {
    padding: 20px;
  }

  .news__detail .news__date {
    font-size: 14px;
  }

  .news__detail .news__cate {
    font-size: 12px;
  }

  .news__detail .news__title {
    font-size: 16px;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .news__detail .news__imgs {
    margin-bottom: 10px;
  }

  .news__detail .news__img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: inherit;
    object-fit: contain;
    margin: 0 auto 10px;
  }

  .news__detail .news__img img {
    width: auto;
    max-width: 100%;
  }

  .news__detail::before {
    right: 5px;
    top: -5px;
  }
}

@media screen and (max-width: 599px) {
  .news__detail {
    padding: 20px 10px 50px;
  }
}


/* pager */
.webgene-pagination {
  display: block;
  margin-top: 50px;
  text-align: center;
  width: 100%;
}

.webgene-pagination ul li a {
  display: inline-block;
  padding: 5px 15px;
  background: #ad8e2b;
  border: 1px solid #ad8e2b;
  color: #fff;
  transition: .3s ease-out;
}

.webgene-pagination ul li a:hover {
  background: #fff;
  color: #ad8e2b;
}


/* btn */
.sub_news .btn_clear {
  margin: 50px auto;
  text-align: center;
}

.sub_news .btn_clear a {
  color: #ad8e2b;
  display: inline-block;
  padding: 5px 15px;
  border: 1px solid #ad8e2b;
  background: #fff;
}

@media screen and (max-width: 768px) {
  .sub_news .btn_clear {
    margin: 30px auto;
  }
}


/* -------------　カテゴリー/タブ　-------------- */

.webgene-blog:has(.categorylist) {
  margin-bottom: 50px;
}

.sub-news .webgene-item.categorylist {
  display: inline-block;
  width: 32%;
}

.sub-news .webgene-item.categorylist a {
  display: block;
  width: 100%;
  color: #fff;
  background: #ad8e2b;
  text-align: center;
  padding: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

@media screen and (max-width: 768px) {
  .webgene-blog:has(.categorylist) {
    margin-bottom: 30px;
  }

  .sub-news .webgene-item.categorylist {
    margin-right: 0;
    width: 100%;
    margin-bottom: 10px;
  }

  .sub-news .webgene-item.categorylist a {
    font-size: 14px;
  }
}