@charset "UTF-8";
body {
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}
/* CSS Document */
.container-works {
  margin: 150px 0 100px;
}
.h2-tittle {
  margin: 150px 0 100px;
}
.logo-box {
  padding: 30px;
}
.logo-container-middle {
  margin: 20px 0;
}
@media only screen and (max-width: 765px) {
  .logo-box {
    padding: 0px;
  }
  .logo-container-middle {
    margin-top: 10px 0;
  }
}
.client-box {
  display: flex;
  float: right;
  margin-top: 150px
}
.client-box li {
  width: 100%;
  list-style-type: none;
  font-size: 78%;
  text-align: right;
  height: 20px
}
@keyframes infinity-scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}
.scroll-infinity__wrap {
  display: flex;
  overflow: hidden;
}
.scroll-infinity__list {
  display: flex;
  list-style: none;
  padding: 0;
  margin-bottom: 30px
}
.scroll-infinity__list--left {
  animation: infinity-scroll-left 80s infinite linear 0.5s both;
}
.scroll-infinity__item-9 {
  width: calc(100vw / 9);
  margin-left: 20px;
}
.scroll-infinity__item-7 {
  width: calc(100vw / 7);
  margin-left: 20px;
}
.scroll-infinity__item-6 {
  width: calc(100vw / 6);
  margin-left: 20px;
}
.scroll-infinity__item-5 {
  width: calc(100vw / 5);
  margin-left: 20px;
}
.scroll-infinity__item-4 {
  width: calc(100vw / 4);
  margin-left: 20px;
}
.scroll-infinity__item-3 {
  width: calc(100vw / 3);
  margin-left: 20px;
}
.scroll-infinity__item-9 img, .scroll-infinity__item-7 img, .scroll-infinity__item-6 img, .scroll-infinity__item-5 img, .scroll-infinity__item-4 img, .scroll-infinity__item-3 img {
  width: 100%;
  z-index: 100;
}
@media screen and (max-width:640px) {
  .scroll-infinity__item-9, .scroll-infinity__item-7, .scroll-infinity__item-6, .scroll-infinity__item-5, .scroll-infinity__item-4, .scroll-infinity__item-3 {
    width: calc(99vw / 2);
  }
}
.slider-container {
  margin: 30px auto 0;
  width: 100%;
}
img {
  height: auto;
  width: 100%;
}
.thumbnail-img {
  padding: 10px
}
.works-text {
	  margin-top: 10px;
  font-size: 11px;
  list-style-type: none;
  line-height: 1.4em;
  color: #8C8C8C;
}
.works-text-tittle {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4em;
  color: #8C8C8C;
}
.works-text li {
  font-size: 10px;
  list-style-type: none;
  line-height: 1.6em;
	margin-left: 5px
}
.works-text .li-2 {
  margin-left: 38px
}
.works-box-container {
  width: 90%;
  margin: 0 auto;
	overflow: visible !important;
  max-height: none !important;
}
.works-box img {
  background: #FBFBFB
}
.works-box {
  width: calc(100% / 4);
  margin-bottom: 20px;
  padding: 20px;
  float: left;
  min-height: 300px;
  height: auto
}
@media screen and (max-width:1024px) {
  .works-box {
    width: calc(100% / 3);
    padding: 10px;
  }
}
@media screen and (max-width:640px) {
  .works-box {
    width: calc(100% / 2);
  min-height: 180px;
margin-bottom: 10px;
  }
}

.works-box-web img {
  background: #ECECEC;

}
.works-box-web {
  width: calc(100% / 4);
  margin-bottom: 40px;
  padding: 20px;
  float: left;
  min-height: 300px;
  height: auto
}
@media screen and (max-width:1024px) {
.works-box-web{
    width: calc(100% / 3);
    padding: 10px;
	  min-height: 160px;
  }
}
@media screen and (max-width:640px) {
  .works-box-web {
	  min-height: 100px;
	  margin-bottom: 10px;
    width: calc(100% / 2);
  }
}
.works-gallery img {
  background: #fff; 
	
}
.works-45 {
  margin: 100px auto;
}


/* ============ 共通レイアウト ============ */
.works-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-item { margin: 0 20px 20px 0; }
.work-item img { width: 100%; height: auto; display: block; }

/* サムネ背景（任意） */
.works-list img { background: #FBFBFB; }

/* レスポンシブ列数 */
@media (max-width: 1024px) {
  .works-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .works-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.work-item { margin: 0 10px 10px 0; }
}

/* ============ 折りたたみ（スムーズ展開アニメーション） ============ */
/* 初期：9件目以降を畳む */
.works-list > li:nth-child(n + 9) {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  overflow: hidden;
  pointer-events: none;
  margin-top: 0;
  transition:
    max-height 0.45s ease,
    opacity 0.35s ease,
    transform 0.35s ease,
    margin 0.35s ease;
}

/* 展開時 */
.readmore-toggle:checked + .works-list > li:nth-child(n + 9) {
  max-height: 1200px;  /* 高さは内容に応じて調整 */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: 0;
}

/* input（チェックボックス）は画面外に退避 */
.readmore-toggle {
  position: fixed;
  top: -100vh;
  left: -100vw;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ボタン（中央配置） */
.readmore-btn {
  display: block;
	width: 200px;
  margin: 16px auto 32px;
  padding: 10px 18px;
  font-size: 14px;
  line-height: 1;
  background: rgba(196,196,196,1.00);
	color: rgba(255,255,255,1.00);
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  user-select: none;
}
.readmore-btn::before { content: attr(data-more); }
.readmore-toggle:checked + .works-list + .readmore-btn::before { content: attr(data-less); }

/* ボタンに矢印アニメ（任意） */
.readmore-btn::after {
  content: " ▼";
  display: inline-block;
  transition: transform 0.25s ease;
}
.readmore-toggle:checked + .works-list + .readmore-btn::after {
  transform: rotate(180deg);
  content: " ▲";
}

/* ============ 白かぶり・高さ制限の対策 ============ */
/* 展開中のリストを前面に & 隠し解除 */
.readmore-toggle:checked + .works-list {
  position: relative;
  z-index: 11;
  overflow: visible !important;
  max-height: none !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

/* 展開しているセクション自体も前面に */
.works-section { position: relative; z-index: 0; }
.works-section:has(.readmore-toggle:checked) { z-index: 10; }

/* フェードやマスク用の疑似要素を無効化 */
.works-section::after,
.works-section::before,
.works-box-container::after,
.works-box-container::before {
  content: none !important;
  display: none !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

/* 親コンテナ側に overflow / 高さ制限がある場合の上書き */
.works-box-container {
  overflow: visible !important;
  max-height: none !important;
}

/* アニメーションを無効化（利用者が設定している場合） */
@media (prefers-reduced-motion: reduce) {
  .works-list > li:nth-child(n + 9),
  .readmore-toggle:checked + .works-list > li:nth-child(n + 9),
  .readmore-btn::after {
    transition: none;
  }
}
