/* =========================
  WORKS ARCHIVE
========================= */

.works-archive {
  padding: 70px 0 110px;
}

.works-archive__inner {
  width: var(--aibi-width, 100%);
  max-width: var(--aibi-inner, 1100px);
  margin: 0 auto;
}

.works-archive__title {
  display: grid;
  grid-template-columns: auto 220px auto;
  align-items: center;
  column-gap: 18px;
  width: fit-content;
  margin: 0 0 58px;
}

.works-archive__title h1 {
  margin: 0;
  font-size: var(--aibi-title-size, 42px);
  font-weight: var(--aibi-title-weight, 600);
  line-height: 1;
  letter-spacing: .04em;
}

.works-archive__title h1 span {
  color: var(--aibi-color-main, #ee9988);
}

.works-archive__title i {
  height: 1px;
  background: var(--aibi-line-color, #808080);
}

.works-archive__title em {
  color: var(--aibi-color-gray-text, #808080);
  font-size: var(--aibi-title-en-size, 22px);
  font-style: normal;
  font-weight: 700;
}

.works-archive__filter {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 78px;
  flex-wrap: wrap;
}

.works-archive__filter a {
  width: 170px;
  height: 42px;
  border: 1px solid var(--aibi-line-color, #808080);
  border-radius: 999px;
  color: var(--aibi-color-gray, #808080);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .12em;
  transition: .25s;
}

.works-archive__filter a.is-active,
.works-archive__filter a:hover {
  background: var(--aibi-color-main, #ee9988);
  border-color: var(--aibi-color-main, #ee9988);
  color: #fff;
}

.works-archive__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 50px;
  row-gap: 80px;
}

.works-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.works-card__image {
  margin: 0 0 16px;
  overflow: hidden;
}

.works-card__image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.works-card a:hover .works-card__image img {
  transform: scale(1.06);
}

.works-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.works-card__cat {
  min-width: 86px;
  height: 22px;
  padding: 0 18px;
  border: 1px solid var(--aibi-line-color, #808080);
  border-radius: 999px;
  color: var(--aibi-color-gray, #808080);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}

.works-archive__pager {
  margin-top: 90px;
  display: flex;
  gap: 7px;
}

.works-archive__pager .page-numbers {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 4px;
  background: #666;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.works-archive__pager .page-numbers.current {
  background: var(--aibi-color-orange, #f26b2f);
}

.works-archive__empty {
  grid-column: 1 / -1;
}

/* SP */

@media (max-width: 768px) {
  .works-archive {
    padding: 54px 0 80px;
  }

  .works-archive__inner {
    width: var(--aibi-sp-width, calc(100% - 32px));
  }

  .works-archive__title {
    width: 100%;
    grid-template-columns: auto 1fr auto;
    margin-bottom: 40px;
  }

  .works-archive__title h1 {
    font-size: var(--aibi-title-size-sp, 32px);
  }
  .works-archive__title em{
    font-size: var(--aibi-title-en-size-sp);
  }

  .works-archive__filter {
    gap: 12px;
    margin-bottom: 48px;
  }

  .works-archive__filter a {
    width: calc(30% - 6px);
    height: 40px;
    font-size: 11px;
  }

  .works-archive__list {
    grid-template-columns: 1fr;
    row-gap: 46px;
  }

  .works-card__image img {
    height: auto;
    aspect-ratio: 1.5 / 1;
  }

  .works-archive__pager {
    margin-top: 56px;
  }
}

/* =========================
  WORKS DETAIL
========================= */

.works-detail {
  padding: 60px 0 90px;
}

.works-detail__inner {
  width: var(--aibi-width, 100%);
  max-width: var(--aibi-inner, 1100px);
  margin: 0 auto;
}

.works-detail__title {
  display: grid;
  grid-template-columns: auto 220px auto;
  align-items: center;
  column-gap: 18px;
  width: fit-content;
  margin: 0 0 72px;
}

.works-detail__title h1 {
  margin: 0;
  font-size: var(--aibi-title-size, 42px);
  font-weight: var(--aibi-title-weight, 600);
  line-height: 1;
}

.works-detail__title h1 span {
  color: var(--aibi-color-main, #ee9988);
}

.works-detail__title i {
  height: 1px;
  background: var(--aibi-line-color, #808080);
}

.works-detail__title em {
  color: var(--aibi-color-gray-text, #808080);
  font-size: var(--aibi-title-en-size, 22px);
  font-style: normal;
  font-weight: 700;
}

.works-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.works-detail__head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.5;
}

.works-detail__head span {
  min-width: 132px;
  height: 32px;
  border: 1px solid var(--aibi-line-color, #808080);
  border-radius: 999px;
  color: var(--aibi-color-gray, #808080);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.works-gallery__main {
  margin: 0 0 20px;
  background: #f5f5f5;
  overflow: hidden;
}

.works-gallery__main img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.42 / 1;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity .35s ease;
}

.works-gallery__main img.is-fading {
  opacity: 0;
}

.works-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.works-gallery__thumb {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: .75;
  transition: opacity .25s ease;
}

.works-gallery__thumb.is-active,
.works-gallery__thumb:hover {
  opacity: 1;
}

.works-gallery__thumb img {
  width: 100%;
  aspect-ratio: 1.55 / 1;
  object-fit: cover;
  display: block;
}

.works-detail__concept,
.works-detail__outline {
  margin-top: 58px;
  padding: 48px 0 64px;
  border-top: 1px solid #111;
}

.works-detail__outline {
  border-bottom: 1px solid #111;
}

.works-detail__concept h3,
.works-detail__outline h3 {
  margin: 0 0 42px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .16em;
}

.works-detail__concept-text {
  max-width: 760px;
  margin: 0 auto;
}

.works-detail__concept-text p {
  margin: 0 0 2em;
  font-size: 15px;
  font-weight: 500;
  line-height: 2.2;
  letter-spacing: .12em;
}

.works-detail__concept-text p:last-child {
  margin-bottom: 0;
}

.works-detail__outline-list {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 90px;
  row-gap: 18px;
}

.works-detail__outline-list dl {
  margin: 0;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  column-gap: 26px;
}

.works-detail__outline-list dt {
  min-height: 58px;
  background: #808080;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.works-detail__outline-list dd {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .works-detail__concept,
  .works-detail__outline {
    margin-top: 42px;
    padding: 34px 0 42px;
  }

  .works-detail__concept h3,
  .works-detail__outline h3 {
    margin-bottom: 28px;
    font-size: 22px;
  }

  .works-detail__concept-text {
    max-width: none;
  }

  .works-detail__concept-text p {
    font-size: 14px;
    line-height: 2;
    letter-spacing: .06em;
  }

  .works-detail__outline-list {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .works-detail__outline-list dl {
    grid-template-columns: 110px 1fr;
    column-gap: 16px;
  }

  .works-detail__outline-list dt {
    min-height: 48px;
    font-size: 14px;
  }

  .works-detail__outline-list dd {
    font-size: 14px;
  }
}

.works-detail__voice {
  margin-top: 50px;
}

.works-detail__voice-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.works-detail__voice h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}

.works-detail__voice div {
  color: var(--aibi-color-gray, #808080);
  font-size: 15px;
  font-weight: 700;
  line-height: 2;
}

.works-detail__voice div p {
  margin: 0 0 1em;
}

.works-detail__back {
  margin-top: 22px;
  text-align: center;
}

.works-detail__back a {
  width: var(--aibi-btn-width);
  height: var(--aibi-btn-height);
  border: 1px solid var(--aibi-line-color, #808080);
  border-radius: 999px;
  color: var(--aibi-color-gray, #808080);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
}

.works-detail__back span {
  width: 16px;
}

.works-detail__back img {
  width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .works-detail {
    padding: 50px 0 70px;
  }

  .works-detail__inner {
    width: var(--aibi-sp-width, calc(100% - 32px));
  }

  .works-detail__title {
    width: 100%;
    grid-template-columns: auto 1fr auto;
    margin-bottom: 44px;
  }

  .works-detail__title h1 {
    font-size: var(--aibi-title-size-sp, 32px);
  }

  .works-detail__head {
    display: block;
  }

  .works-detail__head h2 {
    margin-bottom: 12px;
    font-size: 23px;
  }

  .works-gallery__thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
  .works-gallery__thumb img {
    height: 100px;
  }
}



#photo {
    padding-top: 50px;
    padding-bottom: 0px;
    margin-bottom: 50px;
}

#photo figcaption{
    text-align: center;
    margin: 10px auto;
}

#photo .photo-wrap {
    max-width: 800px;
    width: 100%;
    margin: 0 auto 30px;
    position: relative; /* 矢印を外側に飛ばすための基準点 */
}

/* --- 上部メイン画像（gallery）の設定 --- */
#photo .gallery {
    margin: 0 0 30px 0;
}

#photo .gallery img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    vertical-align: bottom;
}

/* --- 下部サムネイル（choice-btn）の設定 --- */
#photo .choice-btn {
    width: 80%;
    margin: 0 auto;
    /* 矢印は .photo-wrap を基準に飛ばすため、ここには position: relative をかけず、
       overflow: hidden もかけないことで、矢印が絶対に裏に回らないようにします */
}

/* Slickが生成するトラックとスライド枠の調整 */
#photo .choice-btn .slick-track {
    display: flex !important;
    align-items: center;
}

/* WordPressのブロックエディタの figure が悪さをして幅が狂うのを防ぐ */
#photo .choice-btn .slick-slide {
    padding: 0 10px;
    box-sizing: border-box;
    margin: 0 !important; /* WPの余計なマージンをリセット */
}

#photo .choice-btn img {
    width: 100% !important;
    height: 150px !important;
    object-fit: cover;
    vertical-align: bottom;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* 現在選択されているアクティブなサムネイルの透過解除 */
#photo .choice-btn .slick-slide.slick-current img {
    opacity: 1;
}

/* --- 矢印の設定（.photo-wrapを基準に外側に絶対配置） --- */
#photo .slick-prev,
#photo .slick-next {
    position: absolute;
    z-index: 99;
    top: auto;
    bottom: 60px; /* サムネイル（高さ150px）の中央付近にくるように調整 */
    height: 30px;
    width: 30px;
    cursor: pointer;
}

/* NEXT矢印 */
#photo .slick-next:before {
    content: '' !important;
    width: 10px;
    height: 10px;
    border-top: solid 2px #fff;
    border-right: solid 2px #fff;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    position: absolute;
    background-repeat: no-repeat;
    z-index: 2;
    top: 32%;
    left: 6px;
}
#photo .slick-next::after {
    content: '';
    width: 30px;
    height: 30px;
    background: #d7d0c6;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
}

/* PREV矢印 */
#photo .slick-prev:before {
    content: '' !important;
    width: 10px;
    height: 10px;
    border-top: solid 2px #fff;
    border-right: solid 2px #fff;
    -webkit-transform: rotate(-135deg);
    transform: rotate(-135deg);
    position: absolute;
    background-repeat: no-repeat;
    z-index: 2;
    top: 32%;
    right: 6px;
}
#photo .slick-prev::after {
    content: '';
    width: 30px;
    height: 30px;
    background: #d7d0c6;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
}

/* 矢印の飛び出し位置（.photo-wrapの幅に対して外側へ） */
#photo .slick-prev { left: -5%; }
#photo .slick-next { right: -5%; }

/* --- スマホサイズ（768px以下） --- */
@media screen and (max-width: 768px) {
    #photo .gallery img {
        height: 250px;
    }
    
    #photo .choice-btn img {
        height: 100px !important;
    }
    
    #photo .slick-prev,
    #photo .slick-next {
        bottom: 35px; /* スマホ時のサムネイルの高さに合わせて矢印の上下位置を調整 */
    }
    
    #photo .slick-prev { left: -12%; }
    #photo .slick-next { right: -11%; }
    #photo .choice-btn .slick-track
    {
        margin-left: 115px;
    }
}

/* --- 以下、ページ移動リンク（変更なし） --- */
.link-flex {
    max-width: 1040px;
    margin: 80px auto 80px;
    display: flex;
    justify-content: space-between;
}
.link-flex .prev,
.link-flex .next {
    font-weight: bold;
    font-size: 13px;
    font-family: sans-serif;
    border: solid 1px #898989;
    border-radius: 30px;
    position: relative;
}
.link-flex .prev{ left: 20px; }
.link-flex .next{ right: 20px; }
.link-flex .prev:before {
    content: "";
    position: absolute;
    width: 30px;
    border-bottom: solid 1px #898989;
    right: -20px;
    top: 50%;
    height: .1px;
    transition: all 0.2s ease-in-out;
}
.link-flex .prev:after {
    content: "";
    width: 8px;
    height: 1px;
    background-color: #898989;
    position: absolute;
    right: -28px;
    top: 50%;
    margin-top: 3px;
    transform: rotate(35deg) translateX(-100%);
    z-index: 22;
    transition: all 0.2s ease-in-out;
}
.link-flex .prev:hover:before { margin-right: -5px; }
.link-flex .prev:hover:after { margin-right: -5px; }

.link-flex .next:before {
    content: "";
    position: absolute;
    width: 30px;
    border-bottom: solid 1px #898989;
    left: -20px;
    top: 50%;
    height: .1px;
    transition: all 0.2s ease-in-out;
}
.link-flex .next:after {
    content: "";
    width: 8px;
    height: 1px;
    background-color: #898989;
    position: absolute;
    left: -27px;
    top: 50%;
    margin-top: 3px;
    transform: rotate(135deg) translateX(-100%);
    z-index: 22;
    transition: all 0.2s ease-in-out;
}
.link-flex .next:hover:before { margin-left: -5px; }
.link-flex .next:hover:after { margin-left: -5px; }

.link-flex .prev a,
.link-flex .next a {
    color: #231815;
    font-weight: 100;
    padding: 5px 20px;
    display: block;
}
.link-flex .list_btn { box-sizing: border-box; }
.link-flex .list_btn a{
    border:solid 1px #898989;
    border-radius: 30px;
    padding: 5px 20px;
    display: block;
    font-size: 13px;
}
.link-flex .empty { width: 85px; }