@charset "UTF-8";
/* CSS Document */
body#work .work_list {
  min-height: 320px;
}
#work .lower_wrapper {
  width: 950px;
  margin: 0 auto;
}

#work .lower_title {
  margin-bottom: 94px;
}

.work_list {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.work_list li {
  width: 48%;
  margin-bottom: 80px;
  will-change: transform;
}

/* JSが更新するのは --moveY だけ。段差は --baseY で固定 */
.work_list li {
  --baseY: 0px;
  --moveY: 0px;
  transform: translateY(calc(var(--baseY) + var(--moveY)));
  will-change: transform;
}

.work_list li.is-even {
  --baseY: 120px;
}
.work_list li.is-odd {
  --baseY: 60px;
} /* 偶数の1/2 */

.work_list li img {
  width: 100%;
}

.work_list li span {
  border: 1px solid #555;
  padding: 0px 10px;
  font-size: 12px;
  min-width: 95px;
  display: inline-block;
  text-align: center;
  line-height: 1.6;
}

.work_list_title {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  font-weight: 400;
}

.work_list li a:hover {
  text-decoration: none;
}

/* 画像リンク（1つ目のa）だけを黒べたの土台にする */
.work_list li > a:first-child {
  position: relative;
  display: block;
  overflow: hidden; /* 黒べたがはみ出ない */
}

/* 画像をブロックにして余白崩れ防止 */
.work_list li > a:first-child img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s ease, filter 0.45s ease; /* ← ここにまとめる */
}

/* 黒べた（左→右） */
.work_list li > a:first-child::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  transform: translateX(-100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

/* li hoverで発火（画像の上にスライドで乗る） */
.work_list li:hover > a:first-child::after {
  transform: translateX(0);
}

.work_list li:hover > a:first-child img {
  transform: scale(1.02);
  filter: brightness(0.9);
}

/* SPではhover演出を無効化 */
@media (hover: none) {
  .work_list li > a:first-child::after {
    display: none;
  }
}

#work .sidebar {
  position: absolute;
  top: 0;
  left: 50%;
  width: 200px;
  transform: translateX(calc(-475px - 200px));
  z-index: 2;
}

/* SP時は全部オフ（段差も慣性も見た目も） */
@media (max-width: 768px) {
  .work_list li {
    --moveY: 0px !important;
    will-change: auto;
  }
}

/* 絞り込み */
.work_list li.is-hidden {
  display: none;
}

@media (min-width: 769px) and (max-width: 1400px) {
  .double_layout {
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: 0 auto;
  }
  #work .sidebar {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    width: 30%;
  }
  #work .lower_wrapper {
    transform: none;
    width: 100%;
    transition: auto;
  }
}

@media (max-width: 768px) {
  #work .sidebar {
    position: relative;
    width: 100%;
    position: relative;
    width: 100%;
    left: auto;
    top: auto;
    transform: none;

    padding: 0 calc(20 * var(--vw375));
  }

  .sidebar_title {
    display: flex;
    align-items: center;
    gap: 16px; /* 文字と線の間 */
    font-weight: 200;
  }

  /* 横棒 */
  .sidebar_title::after {
    content: "";
    flex: 1; /* 残り幅いっぱい */
    height: 1px;
    background: #555;
  }

  .sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 28px;
    border: 0;
    padding: calc(10 * var(--vw375)) 0 calc(20 * var(--vw375));
  }

  .sidebar li {
    padding: 0;
  }
  .sidebar a {
    font-size: calc(13 * var(--vw375));
  }
  #work .lower_wrapper {
    width: 100%;
    padding: 0 calc(20 * var(--vw375));
  }
  .work_list {
    display: block;
  }
  .work_list li img {
    line-height: 0;
  }
  .work_list li {
    width: 100%;
    transform: none !important;
  }
  .lower_title {
    height: auto;
  }
  .lower_title img {
    height: calc(47 * var(--vw375));
  }
  #work .lower_title {
    margin-bottom: calc(60 * var(--vw375));
  }
}
