.illustration_wrapper {
  margin: 150px auto 100px;
}

.illusta_title {
  text-align: center;
  font-size: 80px;
  font-weight: bold;
}

.category_link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  margin: 50px auto 0;
  font-size: 35px;
}

.illustration_category {
  padding: 100px 0;
  width: 100%;
}

.illustration_category:last-child {
  background-color: #e5e5e6;
}

.illustration_list {
  width: 90%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.illustration_thumbnail {
  flex: 0 0 calc((100% - 180px) / 7);
  aspect-ratio: 1 / 1; /* 正方形を維持 */
  overflow: hidden; /* はみ出し防止 */
  display: flex; /* 中央配置 */
  align-items: center;
  justify-content: center;
}

#situation_category .illustration_list {
  gap: 70px;
}

.illustration_thumbnail_situation {
  flex: 0 0 calc((100% - 210px) / 4);
  aspect-ratio: 1 / 1; /* 正方形を維持 */
  overflow: hidden; /* はみ出し防止 */
  display: flex; /* 中央配置 */
  align-items: center;
  justify-content: center;
}

.illustration_thumbnail img {
  width: 100%; /* コンテナにフィット */
  height: 100%; /* 縦横同じサイズ */
  object-fit: cover; /* 縦横比を維持しつつトリミング */
  display: block;
}

.illustration_thumbnail_situation img {
  width: 100%; /* コンテナにフィット */
  height: 100%; /* 縦横同じサイズ */
  object-fit: cover; /* 縦横比を維持しつつトリミング */
  display: block;
}

.illust_text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  max-width: 900px;
  margin: 0 auto;
}

.about_sns_area {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  margin-top: 100px;
  margin-bottom: 100px;
  font-size: 30px;
}

.about_sns_area p {
  font-weight: bold;
  font-size: 35px;
}

.about_sns_area img {
  width: 50px;
}

/* 拡大時のオーバーレイ */
.image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

/* 表示時 */
.image-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 拡大画像 */
.image-overlay img {
  max-width: 90%;
  max-height: 90%;
  cursor: pointer;
}

/* サムネイルのデフォルト */
.clickable-thumbnail {
  cursor: pointer;
  transition: transform 0.2s;
}

.clickable-thumbnail:hover {
  transform: scale(1.05);
}

/* タブレット用スタイル（768px-1023px） */
@media (min-width: 768px) and (max-width: 1023px) {
  .illustration_wrapper {
    margin: 120px auto 40px;
  }

  .illusta_title {
    font-size: 65px;
  }

  .category_link {
    font-size: 28px;
    gap: 40px;
    margin: 40px auto 0;
  }

  .illustration_category {
    padding: 40px 0;
  }

  .illustration_category:last-child {
    padding: 80px 0;
  }

  .illustration_list,
  #situation_category .illustration_list {
    width: 95%;
    justify-content: flex-start;
    gap: 20px;
  }

  .illustration_thumbnail {
    flex-basis: calc((100% - 100px) / 6);
  }

  .illustration_thumbnail_situation {
    flex-basis: calc((100% - 40px) / 3);
  }

  .illust_text {
    font-size: 20px;
    max-width: 1000px;
  }

  .about_sns_area {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 40px;
  }
}

@media (max-width: 767px) {
  .illustration_wrapper {
    margin-top: 0;
  }

  .illusta_title {
    font-size: 27px;
    width: 90%;
    margin: 0 auto;
  }

  .illustration_list,
  #situation_category .illustration_list {
    gap: 10px;
    justify-content: flex-start;
  }

  .illustration_thumbnail {
    flex-basis: calc((100% - 40px) / 5);
  }

  /* 2列 → 総gap = 1×10px = 10px */
  .illustration_thumbnail_situation {
    flex-basis: calc((100% - 10px) / 2);
  }

  .illustration_category {
    padding: 50px 0;
  }

  .illustration_category:last-child {
    background-color: #fff;
    padding: 50px 0;
  }

  .illust_text {
    width: 80%;
    margin: 0 auto 50px;
    font-size: 11px;
  }

  .category_link {
    font-size: 15px;
    gap: 50px;
  }

  .about_sns_area {
    margin: 0;
  }

  .about_sns_area p {
    font-size: 16px;
  }
}

@media (max-width: 399px) {
  .illusta_title {
    font-size: 24px;
  }
}
