/* 題名 */
/* セクション全体 */
.title-section {
  position: relative;
  width: 100%;
  height: 400px; /* PCの高さ */
  overflow: hidden;
}

/* 中身のラッパーをposition:relativeに */
.title-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 画像 */
.title-section .title-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 文字のラッパーを中央配置（flexで） */
.title-section .title-text {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0; と同じ */
  display: flex;
  align-items: center; /* 上下中央 */
  justify-content: center; /* 左右中央 */
}

/* 見出し */
.title-section .title-text h2 {
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  font-size: 35px;
  font-family: "Courgette", cursive;
  font-family: "Eczar", serif;
  font-family: "Hina Mincho", serif;
  font-family: "Noto Sans JP", sans-serif;
  font-family: "Noto Serif JP", serif;
}

/* ================= スマホ（〜480px） ================= */
@media screen and (max-width: 480px) {
  .title-section {
    height: 200px; /* スマホ用の高さ */
    margin-top: 79px; /* 固定ヘッダー分をこちらで取る */
  }

  .title-section .title-img {
    height: 100%;
    margin-top: 0; /* ★ここが重要：画像には margin-top をつけない */
  }

  .title-section .title-text h2 {
    font-size: 20px;
  }
}

/* 480〜767px（スマホ横・小タブ） */
@media screen and (min-width: 480px) and (max-width: 767px) {
  .title-section {
    height: 260px;
    margin-top: 79px;
  }

  .title-section .title-text h2 {
    font-size: 24px;
  }
}

/* 768〜1024px（タブレット） */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .title-section {
    height: 320px;
    margin-top: 79px;
  }

  .title-section .title-text h2 {
    font-size: 28px;
  }
}
