@charset "utf-8";

/* =========================================================
   p-post
   ========================================================= */
.p-post {
  padding-bottom: 100px;
}
.p-post p,
.p-post h1,
.p-post h2,
.p-post h3 {
  margin: 0;
}
.p-post img {
  display: block;
  max-width: none;
  object-fit: cover;
  background-color: #c7c7c7;
}

@media (min-width: 1024px) {
  .p-post {
    padding-bottom: min(188px, 9.792vw);
  }
}

/* =========================================================
   p-post-cat
   ========================================================= */
.p-post-cat {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 60px;
  padding: 0 10px 0 20px;
}
/* tab jump (#postCat): the browser stops the box below the header by itself */
.p-post-cat {
  scroll-margin-top: 86px;
}
@media (min-width: 1024px) {
  .p-post-cat {
    scroll-margin-top: min(124px, calc(5.02vw + 28px));
  }
}
/* post cards wait hidden for the fade (no flash before main.js runs).
   if the script does not run, they appear after 4s */
.p-post .p-post-item:not(.js-reveal):not(.is-show) {
  opacity: 0;
  animation: postFallback .6s ease-out 4s forwards;
}
@keyframes postFallback {
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .p-post .p-post-item:not(.js-reveal):not(.is-show) {
    opacity: 1;
    animation: none;
  }
}
/* category data block (11/27): its wrappers do not make a box, so each link sits in the row */
.p-post-cat div,
.p-post-cat section,
.p-post-cat article {
  display: contents;
}
.p-post-cat__link,
.p-post-cat__link:hover {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 30px;
  border-radius: 5px;
  background-color: var(--c-sub);
  color: var(--c-black);
  text-decoration: none;
}
/* color fade only while hovering: no flash when the page (re)loads */
.p-post-cat__link:hover {
  transition: background-color .3s, color .3s;
}
.p-post-cat__link p {
  margin: 0;
  font-size: clamp(16px, calc(13.704px + 0.612vw), 18.4px);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.p-post-cat__link:hover,
.p-post-cat__link.is-active {
  background-color: var(--c-green);
  color: #fff;
}
.p-post--news .p-post-cat__link {
  border-radius: 22px;
  background-color: var(--c-light);
}
.p-post--news .p-post-cat__link:hover,
.p-post--news .p-post-cat__link.is-active {
  background-color: var(--c-blue);
  color: #fff;
}

@media (min-width: 1024px) {
  .p-post-cat {
    gap: min(20px, 1.042vw);
    width: min(1348px, calc(45.1vw + 482px));
    margin: min(134px, 6.979vw) auto 0;
    padding: 0;
  }
  .p-post-cat__link,
  .p-post-cat__link:hover {
    height: max(36px, min(44px, 2.292vw));
    padding: 0 min(30px, 1.562vw);
  }
  .p-post-cat__link p {
    font-size: clamp(13px, .833vw, 16px);
  }
}

/* =========================================================
   p-post-list
   ========================================================= */
.p-post-list {
  margin-top: 60px;
  padding: 0 40px;
}
.p-post-list__items,
.p-post-list .webgene-blog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.p-post-item,
.p-post-list .webgene-item {
  min-width: 0;
}
.p-post-item__link,
.p-post-item__link:hover {
  display: block;
  color: var(--c-black);
  text-decoration: none;
}
.p-post-item__img {
  overflow: hidden;
  border-radius: 5px;
}
.p-post .p-post-item__img img {
  width: 100%;
  height: auto;
  aspect-ratio: 295 / 244;
}
/* no image: empty box shows no_image.jpg */
.p-post-item__img:empty {
  aspect-ratio: 295 / 244;
  background: url("/system_panel/uploads/images/no_image.jpg") center / cover no-repeat;
}
.p-post-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 10px;
}
.p-post .p-post-item__date {
  font-family: var(--f-en);
  font-size: clamp(14px, calc(11.991px + 0.536vw), 16.1px);
  font-weight: 500;
  line-height: 1.4;
}
.p-post .p-post-item__cat {
  padding: 0 12px;
  border-radius: 3px;
  background-color: #dfe6cf;
  color: var(--c-txt-sub);
  font-family: var(--f-noto);
  font-size: clamp(14px, calc(11.991px + 0.536vw), 16.1px);
  line-height: 26px;
}
.p-post--news .p-post-item__cat {
  border-radius: 13px;
  background-color: var(--c-light);
}
.p-post .p-post-item__ttl {
  margin-top: 15px;
  font-family: var(--f-noto);
  font-size: clamp(16px, calc(13.704px + 0.612vw), 18.4px);
  font-weight: 400;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

@media (min-width: 768px) {
  .p-post-list__items,
  .p-post-list .webgene-blog {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 24px;
  }
}

@media (min-width: 1024px) {
  .p-post-list {
    width: min(1348px, calc(45.1vw + 482px));
    margin: min(100px, 5.208vw) auto 0;
    padding: 0;
  }
  .p-post-item__img {
    border-radius: 10px;
  }
  .p-post .p-post-item__img img {
    aspect-ratio: 417 / 345;
  }
  .p-post-item__img:empty {
    aspect-ratio: 417 / 345;
  }
  .p-post-list__items,
  .p-post-list .webgene-blog {
    grid-template-columns: repeat(3, 1fr);
    gap: min(100px, 5.208vw) min(48px, 2.5vw);
  }
  .p-post-item__meta {
    gap: 6px min(17px, .885vw);
    margin-top: min(22px, 1.146vw);
  }
  .p-post .p-post-item__date {
    font-size: clamp(15px, 1.042vw, 20px);
  }
  .p-post .p-post-item__cat {
    padding: 0 min(12px, .625vw);
    font-size: clamp(12px, .677vw, 13px);
    line-height: max(22px, min(25px, 1.302vw));
  }
  .p-post .p-post-item__ttl {
    margin-top: min(12px, .625vw);
    font-size: clamp(14px, .833vw, 16px);
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* =========================================================
   p-post pager (Sibloo: .webgene-pagination > ul > li.number / .selected / .prev / .next)
   ========================================================= */
.p-post-list__items > .webgene-pagination,
.p-post-list .webgene-blog > .webgene-pagination {
  grid-column: 1 / -1;
}
.p-post-list .webgene-pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 21px 0 0;
  padding: 0;
  list-style: none;
}
.p-post-list .webgene-pagination li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-post-list .webgene-pagination li::marker {
  content: none;
}
.p-post-list .webgene-pagination li.number,
.p-post-list .webgene-pagination li.number > *,
.p-post-list .webgene-pagination li.number a:hover {
  display: block;
  color: var(--c-black);
  font-family: var(--f-en);
  font-size: clamp(28px, calc(23.982px + 1.072vw), 32.2px);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.p-post-list .webgene-pagination li.prev,
.p-post-list .webgene-pagination li.next {
  font-size: 0;
}
.p-post-list .webgene-pagination li.prev > *,
.p-post-list .webgene-pagination li.next > * {
  position: relative;
  display: block;
  width: 31px;
  height: 33px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0057a8 0%, #509b61 100%);
  font-size: 0;
  color: transparent;
  text-decoration: none;
  overflow: hidden;
}
.p-post-list .webgene-pagination li.prev {
  margin-right: 20px;
}
.p-post-list .webgene-pagination li.next {
  margin-left: 20px;
}
.p-post-list .webgene-pagination li.prev > *::after,
.p-post-list .webgene-pagination li.next > *::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 10px;
  margin: -5px 0 0 -5.5px;
  background-color: #fff;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
}
.p-post-list .webgene-pagination li.prev > *::after {
  transform: scaleX(-1);
}

@media (min-width: 768px) {
  .p-post-list .webgene-pagination ul {
    margin-top: 8px;
  }
}

@media (min-width: 1024px) {
  .p-post-list .webgene-pagination ul {
    gap: min(20px, 1.042vw);
    margin-top: min(70px, 3.646vw);
  }
  .p-post-list .webgene-pagination li.number,
  .p-post-list .webgene-pagination li.number > *,
  .p-post-list .webgene-pagination li.number a:hover {
    font-size: clamp(28px, 2.135vw, 41px);
  }
  .p-post-list .webgene-pagination li.prev > *,
  .p-post-list .webgene-pagination li.next > * {
    width: max(34px, min(41px, 2.135vw));
    height: max(34px, min(43px, 2.24vw));
  }
  .p-post-list .webgene-pagination li.prev {
    margin-right: min(50px, 2.604vw);
  }
  .p-post-list .webgene-pagination li.next {
    margin-left: min(47px, 2.448vw);
  }
}

/* =========================================================
   p-post-detail
   ========================================================= */
.p-post-detail {
  margin-top: 68px;
  padding: 0 20px;
}
.p-post .p-post-detail__ttl {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--f-noto);
  font-size: clamp(18px, calc(15.417px + 0.689vw), 20.7px);
  font-weight: 400;
  line-height: 1.556;
}
.p-post-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
  margin-top: 16px;
}
.p-post .p-post-detail__date {
  font-family: var(--f-en);
  font-size: clamp(14px, calc(11.991px + 0.536vw), 16.1px);
  font-weight: 500;
  line-height: 1.4;
}
.p-post .p-post-detail__cat {
  padding: 0 12px;
  border-radius: 3px;
  background-color: var(--c-sub);
  color: var(--c-txt-sub);
  font-family: var(--f-noto);
  font-size: clamp(14px, calc(11.991px + 0.536vw), 16.1px);
  line-height: 26px;
}
.p-post--news .p-post-detail__cat {
  border-radius: 15px;
  background-color: var(--c-light);
}
.p-post-detail__img {
  margin: 60px 10px 0;
  overflow: hidden;
  border-radius: 5px;
}
.p-post .p-post-detail__img img {
  width: 100%;
  height: auto;
  aspect-ratio: 315 / 193;
}
.p-post-detail__img:empty {
  display: none;
}
.p-post-detail__body {
  margin-top: 32px;
  padding: 0 10px;
  font-family: var(--f-noto);
  font-size: clamp(14px, calc(11.991px + 0.536vw), 16.1px);
  line-height: 1.715;
  overflow-wrap: anywhere;
}
.p-post .p-post-detail__body p + p {
  margin-top: 1.75em;
}
.p-post-detail__body img {
  max-width: 100%;
  height: auto;
}
.p-post-detail__back {
  display: flex;
  width: 167px;
  height: 50px;
  margin: 80px auto 0;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .p-post-detail {
    width: calc(50% + 300px);
    margin-left: auto;
    margin-right: auto;
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .p-post-detail {
    width: min(calc(37.5vw + 436px), 1156px);
    margin: min(154px, 8.021vw) auto 0;
    padding: 0;
  }
  .p-post .p-post-detail__ttl {
    padding-bottom: min(36px, 1.875vw);
    font-size: clamp(20px, 1.458vw, 28px);
    line-height: 1.429;
  }
  .p-post-detail__meta {
    gap: 6px min(18px, .938vw);
    margin-top: min(16px, .833vw);
  }
  .p-post .p-post-detail__date {
    font-size: clamp(16px, 1.25vw, 24px);
  }
  .p-post .p-post-detail__cat {
    padding: 0 min(12px, .625vw);
    font-size: clamp(13px, .833vw, 16px);
    line-height: max(26px, min(30px, 1.562vw));
  }
  .p-post-detail__img {
    margin: min(91px, 4.74vw) 0 0;
    border-radius: 10px;
  }
  .p-post .p-post-detail__img img {
    aspect-ratio: 1156 / 523;
  }
  .p-post-detail__body {
    margin-top: min(50px, 2.604vw);
    padding: 0;
    font-size: clamp(14px, .833vw, 16px);
    line-height: 1.75;
  }
  .p-post-detail__back {
    width: fit-content;
    height: max(44px, min(52px, 2.708vw));
    margin-top: min(110px, 5.729vw);
  }
}
