.works-submenu {
  margin-top: -10px;
  margin-left: 0px; 
  line-height: 1.4; 
  list-style: none;
  padding-left: 0; 
}

.works-submenu li {
  margin-bottom: 3px; 
}

.works-submenu a {
  text-decoration: none;
  color: #333;
  display: inline-block;
}

nav .works-submenu a {
  font-size: 13px !important;
  color: #292929;
}

/* worksと統一した左揃え */
.works-container {
  width: 100%;
  padding-left: 40px;
  padding-right: 40px;
  box-sizing: border-box;
}

/* タイトルセクション */
.title-section {
  margin-bottom: 40px;
}

.title-section h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 14px;
  color: #000000;
}

/* グリッド */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-content: start;
  align-items: start;
}

/* 各画像 */
.work-item {
  position: relative;
  width: 100%;
  text-align: left;
}

.work-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

#mazekoze .image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* ←最大4列に変更 */
  gap: 12px;
  margin: 0 auto;
  padding: 0 16px;
}

#mazekoze .image-grid img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

/* 画面幅が1000px以下のとき：3列 */
@media (max-width: 1000px) {
  #mazekoze .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 画面幅が700px以下のとき：2列 */
@media (max-width: 700px) {
  #mazekoze .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 画面幅が450px以下のとき：1列 */
@media (max-width: 450px) {
  #mazekoze .image-grid {
    grid-template-columns: 1fr;
  }
}

/* boundary専用ギャラリー */
.gallery-boundary .image-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding-left: 40px;
  padding-right: 40px;
  box-sizing: border-box;
}

.gallery-boundary .work-item {
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.gallery-boundary .work-item img {
  width: calc(33.333% - 13.33px);
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.3s ease;
}



/* モバイル対応 */
@media (max-width: 768px) {
  .gallery-boundary .work-item {
    flex-direction: column;
  }

  .gallery-boundary .work-item img {
    width: 100%;
  }
}


/* テキスト説明 */
.detail-description {
  font-size: 14px;
  color: #333;
  line-height: 1.8;
  max-width: 720px;
  margin-top: 40px;
}


/* レスポンシブ */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .works-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .works-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}


#page-top {
  z-index: 9999;         
}
