@charset "utf-8";

.title {
  height: 310px;
  background-image: url(../images/field-533541_1280.jpg);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  text-shadow: 1px 1px 10px #4b2c14;
}

.title h1 {
  font-family: 'Noto Serif JP', serif;
  font-family: 'Noto Serif SC', serif;
  font-size: 48px;
  line-height: 52px;
  font-weight: bold;
}

.title p {
  font-family: 'Noto Serif JP', serif;
  font-family: 'Noto Serif SC', serif;
  font-size: 32px;
  margin-top: 15px;
}

.main h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 28px;
  font-weight: bold;
  line-height: 30px;
  text-align: center;
}

.main h4 {
  font-family: 'Noto Serif JP', serif;
  font-size: 24px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
  margin-top: 50px;
}

.content {
  display: block;
  justify-content: space-between;
  width: 930px;
  max-width: 90%;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
}

.content p {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 20px;
  line-height: 30px;
}

.content_image {
  display: flex;
  justify-content: center;
  width: 930px;
  max-width: 90%;
  margin-top: 25px;
  margin-bottom: 40px;
  margin-left: auto;
  margin-right: auto;
  align-items: flex-start;
}

.content img {
  height: 440px;
}

.details{
  margin-bottom: 70px;
}

/* 親コンテナ：2行×3列のグリッドを作成 */
.details_image {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3列（等幅） */
  gap: 20px; /* 画像同士の隙間（必要に応じて調整） */
  width: 930px;
  max-width: 90%;
  margin: 25px auto 0;
}

/* 各画像とテキストを包む枠 */
.content_detail_picture {
  position: relative; /* これが重要！テキストの配置基準になります */
  width: 100%;
  height: 220px; /* 高さを固定 */
}

/* 画像の設定 */
.content_detail_picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.3);
  display: block; /* 画像下の不要な隙間を消す */
}

/* 中央のテキスト設定 */
.content_detail-btn-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px; /* 内側に余白を付けると見やすくなります */
  width: 80%; /* テキストの幅を少し抑える */
  text-align: center; /* 改行された文字も中央に */
  margin: 0; /* 余計なマージンをリセット */
}

@media (max-width: 800px) {

  .content_image {
    display: block;
    width: 500px;
    margin-top: 5px;
  }

  .content_image img {
    width: 100%;
    height: auto;
    margin-top: 5px;
  }

  .main h3 {
    font-size: 24px;
    line-height: 26px;
  }

  .content p {
    font-size: 16px;
    line-height: 20px;
  }

  .main h4{
    font-size: 20px;
    line-height: 22px;
  }

  .details_image {
    display: grid;
    grid-template-columns: 1fr; /* 縦1列に変更 */
    gap: 20px; /* 画像と画像のリテラルな隙間（上下の余白） */
    width: 80%; /* 親の幅自体を80%に絞る */
    max-width: none; /* PC用の指定をリセット */
    margin: 20px auto; /* 上下に余白を作り、左右中央寄せ */
  }

  .content_detail_picture {
    width: 100%; /* 親（details_image）の80%幅いっぱいに広げる */
    height: 200px; /* スマホで見やすい高さに調整 */
  }

  .content_detail-btn-text {
    width: 50%;       /* 8割くらいにするため、少し数値を絞ります */
    min-width: auto;  /* PC版で設定した最小幅をリセット */
    padding: 6px 10px; /* 上下左右の余白も少しタイトに */
    font-size: 0.85rem; /* スマホで見やすいサイズに微調整 */
    line-height: 1.4;  /* 改行された時の行間を整える */
  }
}