@charset "utf-8";

/*
  structure
*/
main .archive .inner,
main .single .inner {
  display: flex;
  justify-content: space-between;
  column-gap: 20px;
  margin: 0 auto;
  width: min(1280px, calc(100% - 20px));
}

main .archive .inner .main,
main .single .inner .main {
  width: 75%;
}
main .archive .inner #sidebar,
main .single .inner #sidebar {
  width: 25%;
}

/**
  Archive
**/
.archive main h2 {
  margin: unset;
  padding: unset;
  border: unset;
  font-size: 1.8rem;
  color: var(--main-text);
}
.archive main ul.archives {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.archive main ul.archives li {
  width: calc((100% - 20px) / 2);
}
/*.archive main ul.archives li:not(:last-of-type) {
  margin-bottom: 20px;
}*/
.archive main ul.archives li a {
  display: flex;
  align-items: center;
  column-gap: 20px;
}
.archive main ul.archives li a figure img {
  width: 100px;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
/*.archive main ul.archives li a img {
  width: 200px;
  width: 120px;
}*/
/*.archive main ul.archives li img {
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  width: 80%;
}*/


.archive .main .pager {
  margin: 100px 0 2em;
  text-align:center;
}
.archive .main .pager span,
.archive .main .pager a.page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 .25em;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 2em;
  height: 2em;
}
.archive .main .pager a.page-numbers.prev,
.archive .main .pager a.page-numbers.next {
  border: 0;
}
.archive .main .pager span.current {
  background: rgba(0,0,0,.1);
}

#sidebar .widget:not(:last-child) {
  margin-bottom: 2em;
}
#sidebar h2 {
  margin-bottom: .2em;
  padding-left: .5em;
  border-bottom: 1px solid var(--color-gray);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-red);
}
#sidebar ul {
  padding-left: .5em;
}
#sidebar ul li:not(:last-of-type) {
  margin-bottom: .5em;
  line-height: 1.3;
}
#sidebar ul li a {
  text-transform: uppercase;
}

/**
  Single
**/
.single main .page_mv .mv_area .inner p {
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.single main .date {
  padding-right: .5em;
  text-align: right;
}
.single main .post-area {
  padding: 0 1em;
}
.single main .post-area p {
  margin-bottom: 1em;
}
.single main .post-area img {
  width: unset;
}
.single main .post-area figure.wp-block-gallery {
  margin-bottom: 32px;
}

.single main .pager {
  display: flex;
  justify-content: space-between;
  margin: 150px auto 2em;
  /*padding: 0 .5em;*/
  width: calc(100% - 20px);
}
/*.single main .pager .next-right {
  text-align: right;
}*/
.single main .pager li {
  line-height: 1.3;
}
.single main .pager a {
  position: relative;
  display: flex;
  align-items: center;
  padding: .5em;
  border: 1px solid #707070;
  width: 300px;
  /*height: 40px;*/
  height: 60px;
}
.single main .pager .next-left a {
  /*padding-left: 2em;*/
  padding-left: 1.5em;
}
.single main .pager .next-left a::before {
  content: "« ";
  position: absolute;
  /*top: 6.5px;*/
  top: 50%;
  /*left: 1em;*/
  left: .7em;
  transform: translateY(-50%);
}
.single main .pager .next-right a {
  justify-content: end;
  /*padding-right: 2em;*/
  padding-right: 1.5em;
}
.single main .pager .next-right a::after {
  content: " »";
  position: absolute;
  /*top: 6.5px;*/
  top: 50%;
  /*right: 1em;*/
  right: .7em;
  transform: translateY(-50%);
}


/* ギャラリーの画像サイズがまちまちなので正方形にする */
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a, .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
  aspect-ratio: 1 / 1;
}

/* ギャラリーの最後の画像が伸びないようにする */
.wp-block-gallery.has-nested-images figure.wp-block-image {
  flex-grow: 0;
}

@media screen and (max-width: 870px) {
  .single main .pager {
    flex-direction: column-reverse;
    row-gap: 20px;
    margin-top: 100px;
  }
  .single main .pager .next-right {
    display: flex;
    justify-content: end;
  }
}

@media screen and (max-width: 767px) {
  main .archive .inner,
  main .single .inner {
    flex-direction: column;
    align-items: center;
    row-gap: 40px;
  }
  main .archive .inner .main,
  main .single .inner .main {
    width: 100%;
  }
  main .archive .inner #sidebar,
  main .single .inner #sidebar {
    width: min(315px, 100%);
  }

  .archive main ul.archives {
    flex-direction: column;
  }
  .archive main ul.archives li {
    width: 100%;
  }

  .single main .post-area {
    padding: 0;
  }
}
@media screen and (max-width: 539px) {
  .archive main ul.archives li a .txt_area {
    width: calc(100% - 120px);
  }
  .archive main h2 {
    font-size: 1.4rem;
  }


  .wp-block-gallery.has-nested-images figcaption,
  .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    text-align: left;
  }

  /*.single main .pager {
    display: block;
  }*/
}


/*
  メインビジュアル
*/
body.term-logistics .sec_mv {
  background: url('../images/works/logistics_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
body.term-house .sec_mv {
  background: url('../images/works/house_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
body.term-production .sec_mv {
  background: url('../images/works/production_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
body.term-public .sec_mv {
  background: url('../images/works/public_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
body.term-commerce .sec_mv {
  background: url('../images/works/commerce_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
body.term-welfare .sec_mv {
  background: url('../images/works/welfare_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
body.term-office .sec_mv {
  background: url('../images/works/office_mv.jpg') no-repeat #333 right center / 1680px 200px;
}
