/* ------------------------------
   RESET（余計な隙間を消す）
------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

/* 追加：メニュー（ナビゲーション）をスマホでも横並びにする */
nav, .nav-list, ul {
  display: flex;
  flex-wrap: wrap; /* スマホで画面からはみ出そうな場合は自動で折り返す */
  gap: 15px;
  list-style: none;
  padding: 10px 20px;
}

/* ------------------------------
   HERO セクション
------------------------------ */
.hero {
  position: relative;
  width: 100%;
  height: 60vh; /* デスクトップ時の高さ */
  background: #000; /* 文字が白いので背景を黒にして見やすく */
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .6s ease;
}

.slide.active {
  opacity: 1;
}

/* 修正：画像コンテナがHero全体の高さいっぱいになるように修正 */
.slide-placeholder {
  width: 100%;
  height: 100%;
}

/* 修正：画像をHero全体の高さいっぱいまで広げ、横長を維持 */
.slide-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* アスペクト比を維持したまま、綺麗に切り抜いて横長表示 */
  display: block;
}

/* HERO キャプション */
.hero-caption {
  position: absolute;
  bottom: 30px;
  left: 20px;
  right: 20px; /* 右側にも余白を作って文字の折り返しを安全にする */
  color: #fff;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  z-index: 10; /* 画像より確実に前面に出す */
}

.hero-caption h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  word-break: break-word;
}

.hero-caption p {
  font-size: 1.1rem;
  line-height: 1.4;
}

/* スライドのドット */
.slide-dots {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
}

.dot.active {
  background: #fff;
}

/* ------------------------------
   PORTFOLIO セクション
------------------------------ */
.section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.section-label {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 5px;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 30px;
}

/* グリッド配置 */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3列 */
  gap: 20px;
}

/* 作品枠 */
.portfolio-item {
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形に揃える */
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

/* 作品画像 */
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ------------------------------
   レスポンシブ（スマホ対応）
------------------------------ */
@media (max-width: 768px) {
  /* 修正：スマホでもHeroの画像をしっかり横長で確保（文字と重ならない高さ） */
  .hero {
    height: 50vh; /* スマホでの画面の高さ50%分を確保 */
  }

  /* 修正：スマホ用に文字サイズを小さく調整して、はみ出しと重なりを防止 */
  .hero-caption h1 {
    font-size: 1.8rem;
  }
  
  .hero-caption p {
    font-size: 0.95rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr); /* スマホは2列 */
  }
}

@media (max-width: 480px) {
  /* 修正：極端に画面が狭いスマホ用 */
  .hero {
    height: 55vh; /* 文字量に対して画像が潰れないよう、少し高さを出す */
  }

  .hero-caption h1 {
    font-size: 1.5rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(1, 1fr); /* 1列 */
  }
}
