body {
  font-family: sans-serif;
  /* background-color: #ebebeb; */
  background-color: #f0ede1;
  margin: 0px;
  /* background-image:
    radial-gradient(#e3e3e3 20%, transparent 30%),
    radial-gradient(#e3e3e3 20%, transparent 30%); */
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  color: #3EB034;
  font-weight: 900;
}

header {
  display: flex;             /* 追加 */
  flex-wrap: wrap;          /* 追加 */
  justify-content: center;   /* 追加 */
  align-items: center;       /* 追加 */
  text-align: center;
  margin-bottom: 20px;
  padding: 20px 5px 20px;
  /* padding-top: 20px;
  padding-bottom: 10px; */
  background-color: #f8f8f8;
  box-shadow:
    6px 6px 10px 0px #9ab1a766,
    -6px -6px 10px 0px #fdfeff,
    inset 2px 2px 1px #ffffff,
    inset -2px -2px 1px #ffffff;
}

        .header-titles {             /* 追加 */
          flex: 7;                 /* 追加 */
          text-align: center;      /* 左右配置の場合の中央揃え */
          margin: 0;               /* 追加 */
        }

        .header-description {       /* 追加 */
          flex: 6;                 /* 追加 */
          text-align: left;      /* 左右配置の場合の中央揃え */
          margin: 0;               /* 追加 */
        }

        header h1 {
          font-size: clamp(2em, calc(100vw / 10), 3em);
          color: #3EB034;
          font-family: 'Zen Maru Gothic', sans-serif;
          font-weight: 900;
          margin-bottom: -5px;
          margin-top: 0px;
        }

        header h2 {
          font-size: clamp(1em, calc(100vw / 20), 1.5em);
          color: #3EB034;
          font-family: 'Zen Maru Gothic', sans-serif;
          font-weight: 500;
          margin-top: 0;
          margin-bottom: 10px;
        }

        header p {
          font-size: clamp(0.5em, calc(100vw / 30), 1.3em);
          font-family: 'Zen Maru Gothic', sans-serif;
          color: #3EB034;
          font-weight: 500;
          padding: 0 20px 0 50px;
          border-left: 2px solid #3EB034;
        }

.subheader {
text-align: center;
margin-top: 50px;
margin-bottom: 30px;
padding-top: 20px;
padding-bottom: 10px;
background-color: #f8f8f8;
box-shadow:
  6px 6px 10px 0px #9ab1a766,
  -6px -6px 10px 0px #e5e5e5,
  inset 2px 2px 1px #ffffff,
  inset -2px -2px 1px #ffffff;
}

    .subheader h1 {
      font-size: 2em;
      color: #3EB034;
      font-family: 'Zen Maru Gothic', sans-serif;
      font-weight: 900;
      margin-bottom: -5px;
      margin-top: 0px;
    }

    .subheader h2 {
      font-size: 1.25em;
      color: #3EB034;
      font-family: 'Zen Maru Gothic', sans-serif;
      font-weight: 500;
      margin-top: 0;
    }

    .subheader p {
      font-family: 'Zen Maru Gothic', sans-serif;
      font-weight: 500;
    }

footer {
text-align: center;
margin-top: 30px;
margin-bottom: 0px;
padding-top: 30px;
padding-bottom: 15px;
/* background-color: #FFFFFF; */
/* background-color: #3EB034; */
background-image: linear-gradient(135deg, #11b83e, #3EB034);
box-shadow:
6px 6px 10px 0px #9ab1a766,
-6px -6px 10px 0px #e5e5e5,
inset 0px 2px 1px #90ffb7,
inset 0px -2px 1px #2cc564;
}
    footer img {
      width: clamp(8em, calc(100vw / 5), 15em); /* レスポンシブな幅 */
      max-width: 200px; /* 最大幅 */
      display: block; /* img をブロック要素にする */
      margin: 0 auto; /* 左右中央揃え */
    }

    footer p {
      font-family: 'Zen Maru Gothic', sans-serif;
      color: #FFFFFF;
      font-weight: 500;
      padding: 0 20px 0 20px;
    }

    .btn {
        background-color: #FFFFFF;
        width: 150px;
        text-align: center;
        margin: auto;
        padding: 10px;
        border-radius: 20px;
        color: #3EB034;
        text-decoration: none;
        box-shadow:
        6px 6px 10px 0px #1c835766;
        /* -6px -6px 10px 0px #47d576; */
    }

    .btn a {
      color: inherit;
    }

.container {
  display: flex;
  flex-wrap: wrap; /* 要素が幅に収まらない場合に折り返す */
  /* max-width: 1200px; */
  padding: 0px 30px;
  margin: 0 auto;
  justify-content: center; /* 追加 */
}

/* 個別ページ用 */
.contents-container {
  border-radius: 20px;
  max-width: 1200px;
  margin: auto;
  margin-bottom: 20px;
  background-color: #f8f8f8;
  padding-bottom: 10px;
  box-shadow:
  6px 6px 10px 0px #8c9f9766,
  /* -6px -6px 10px 0px #d5dfd8, */
  inset 2px 2px 1px #ffffff,
  inset -2px -2px 1px #cecece;
}

.contents-container h1, .contents-container h3 {
  font-size: clamp(1em, calc(100vw / 10), 1.5em);
  background-color: #3EB034;
  color: #FFFFFF;
  text-align: center;
  /* margin: 20px; */
  border-radius: 20px 20px 0px 0px;
  padding: 15px;
  margin-bottom: 10px;
  /* padding-top: 10px; */
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 900;
  box-shadow:
  inset 2px 2px 1px #91d68a,
  inset -2px 0px 1px #5adb8b;
}

.contents-container h3 {
  font-size: clamp(1em, calc(100vw / 10), 1.2em);
}

.text-container {
display: flex;
flex-wrap: wrap; /* 要素が幅に収まらない場合に折り返す */
max-width: 1200px;
margin: 0 auto;
/* background-color: #FFFFFF; */
border: 0px solid #ccc;
box-sizing: border-box; /* paddingとborderを要素の幅に含める */
width: 100%; /* 親要素に合わせて伸縮 */
color: #5b5b5b;
}

/* 個別ページ 画像要素 */
.image-wrapper {
flex: 1; /* 画像領域が可能な限り広がるように */
min-width: 300px; /* 画像がない場合のテキスト領域の最低幅を確保 */
padding-top: 10px;
padding-left: 20px;
}

  .image-wrapper img {
    max-width: 80%;
    height: auto;
    text-align: center;
    margin: 0px;
    padding-left: 30px;
    padding-right: 30px;
    transform: scale(0.9);
    display: block; /* インライン要素の余白問題を解消 */
  }

  figcaption {
    max-width: 80%;
    color: #5b5b5b;
    font: italic smaller sans-serif;
    margin-left: 30px;
    padding: 3px;
    margin-bottom: 20px;
    text-align: center;
  }

/* 個別ページ テキスト要素 */
.text-wrapper {
flex: 2; /* テキスト領域が画像領域よりも広く取るように */
padding: 10px;
}

  .text-wrapper p {
    font-size: 1em;
    margin: 20px 80px 15px 10px;
    font-weight: 500;
  }

  a {
    text-decoration: none;
  }

  .text-wrapper h4{
    margin-left: 10px;
    margin-top: 0px;
    margin-bottom: -10px;
  }

  .text-wrapper ol{
    margin: 20px;
  }

  .text-wrapper li {
    font-size: 0.8em;
  }

  .text-wrapper li::marker {
    font-weight: bold;
  }

  hr {
    border-top: 1px dotted #ccc;
    margin-left: 10px;
    margin-right: 10px;
  }

/* 引用文 */
  .quote-1 {
    max-width: 100%;
    padding: 0.5em 0.5em;
    border-left: 4px solid #f2f2f2;
    color: #979797;
    font-size: 0.9em;
  }

  .quote-1:has(cite) {
    padding-bottom: 0em;
  }

  .quote-1 p {
    margin-top: 0;
  }

  .quote-1 cite {
    display: block;
    color: #737373;
    font-size: .8em;
    text-align: right;
  }


/* 個別ページ 横並び画像 */
.image_container{
display: flex;
flex-wrap: wrap; /* 要素が幅に収まらない場合に折り返す */
max-width: 1200px;
margin: 0 auto;
/* background-color: #FFFFFF; */
border: 0px solid #ccc;
box-sizing: border-box; /* paddingとborderを要素の幅に含める */
width: 100%; /* 親要素に合わせて伸縮 */
}

  .image_brock{
    flex: 1; /* 画像領域が可能な限り広がるように */
    margin-left: 30px;
    margin-right: 30px;
    margin-bottom: 30px;
  }

  .image_brock img {
      max-width: 100%;
      height: auto;
      text-align: center;
      margin: auto;
      transform: scale(1);
      display: block; /* インライン要素の余白問題を解消 */
  }

/* トップページのコンテンツ */
.item {
  position: relative; /* 追加 */
  padding-bottom: 3rem;
  background-color: #f8f8f8;
  /* border: 0px solid #ccc; */
  padding: 15px 15px 4rem;
  margin: 10px;
  border-radius: 20px;
  flex-basis: 400px;
  max-width: 500px;
  min-width: 200px;
  flex-grow: 1;
  box-sizing: border-box;
  box-shadow:
    6px 6px 10px 0px #8c9f9766,
    /* -6px -6px 10px 0px #d5dfd8, */
    inset 2px 2px 1px #ffffff,
    inset -2px -2px 1px #cecece;
}

.item .img-container {  /* 追加 */
  height: 400px;
  /* width: clamp(5em, calc(100)) */
  /* width: 100vw; */
  /* max-width: 600px; */
  /* height: 300px; */
  margin: 0 auto;
  margin-bottom: 20px;
  display: flex;       /* 追加 */
  justify-content: center; /* 追加 */
  align-items: center;   /* 追加 */

}

.item img {
  width: 100%;         /* 変更 */
  height: 100%;        /* 変更 */
  max-width: 400px;
  object-fit: contain;  /* または cover, fill, none, scale-down */
  text-align: center;
  margin: auto;
  display: block;
}

  .item h3 {
    /* background-color: #3EB034; */
    background-image: linear-gradient(135deg, #11b83e, #3EB034);
    color: #ffffff;
    border-radius: 15px 15px 0px 0px;
    padding: 10px;
    margin: -15px -15px 0.5em;
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 900;
    box-shadow:
      inset 2px 2px 1px #91d68a,
      inset -2px 0px 1px #5adb8b;
  }

  .item p {
    font-size: 0.9em;
    margin: 20px 10px 15px 10px;
    font-weight: 500;
  }

  .item a {
    text-decoration: none;
    color: inherit;
    padding: 0px;
  }

  .item:hover {
    transform: scale(1.01);
  }

/* 国旗 */
.flag-icon {
margin-left: 10px;
margin-right: 20px;
/* box-shadow: 3px 3px 0px #ccc ; */
}


/* テーブル */
table {
font-size: 0.8em;
padding: 3px 5px;
box-sizing: border-box; /* paddingとborderを要素の幅に含める */
flex-basis: calc(50% - 0px); /* デフォルトで2つ並べる (余白を考慮) */
}

  table th {
    font-size: 0.8em;
    border: 2px solid #3EB034;
    /* background-color: #3EB034; */
    /* color: #FFFFFF; */
    color: #3EB034;
    font-weight: bold;
    border-radius: 15px;
    padding: 0 20px;
    display: inline-block;
    min-width: 50px;
    text-align: center;
    margin-right: 10px;
  }

  table td{
    padding-top: 3px;
    padding-left: 10px;
    padding-right: 0px;
    display: inline-block;
  }

  @media all and (max-width: 200px) {
    table th, table td {
      display: block;
      width: 100%;
      border-bottom: none;
    }
    table tr:last-child td:last-child {
      border-bottom: 1px solid #ccc;
    }
  }

/* ボタン */
.btn-detail {
  position: absolute; /* 変更 */
  bottom: 20px; /* 調整 */
  left: 50%; /* 追加 */
  transform: translateX(-50%); /* 追加 */
  font-size: 1em;
  flex-direction: column;
  /* background-color: #3EB034; */
  background-image: linear-gradient(135deg, #11b83e, #3EB034);
  color: #FFFFFF;
  border-radius: 25px;
  text-align: center;
  width: 200px;
  max-width: 200px;
  height: 50px;
  margin: 0; /* 変更 */
  padding: 0; /* 追加 */
  display: flex;
  justify-content: center;
  align-items: center; /* 追加 */
  flex-wrap: wrap;
  box-shadow:
    6px 6px 10px 0px #2e9d6d66,
    -6px -6px 10px 0px #fdfeff,
    inset 2px 2px 1px #90ffb7,
    inset -2px -2px 1px #2cc564;
}

.item:hover .btn-detail {
  /* background-color: #fab710; */
  background-image: linear-gradient(135deg, #fec229, #fab710);
  box-shadow:
  6px 6px 10px 0px #ffd05bc7,
  -6px -6px 10px 0px #fdfeff,
  inset 2px 2px 1px #ffe8af,
  inset -2px -2px 1px #ffe8af;
}

/* ブラウザ幅が狭い場合のスタイル */
@media screen and (max-width: 1300px) {
header {
  flex-direction: column; /* 縦並びにする */
  text-align: center;
}

.header-titles,
.header-description {
  width: 100%;           /* 幅を100%にする */
  text-align: center;
}

header p {
  border: none;
  padding: 0;
}
}

/* ブラウザ幅が狭い場合のスタイル */
@media screen and (max-width: 768px) {
   .container{
    padding: 0px 5px;
  }

/* 個別ページ用 */
  .contents-container{
    margin: 10px;
  }

  .text-container {
    flex-direction: column; /* 子要素を縦に並べる */
  }

      .image-wrapper {
        margin-bottom: 0px; /* 負のマージンを解除 */
      }

      .image-wrapper img {
          max-width: 50%;
          height: auto;
          text-align: center;
          margin: 10px auto; /* 縦に並んだ際に上下に余白を追加 */
          display: block; /* インライン要素の余白問題を解消 */
      }

      figcaption {
        font-size: 0.8em;
        max-width: 80%;
        color: #5b5b5b;
        margin-left: 30px;
        padding: 3px;
        margin-top: -20px;
        margin-bottom: 0px;
        text-align: center;
      }

      .text-wrapper {
          padding-top: 0px; /* 上の余白が不要な場合 */
      }

      .text-wrapper p {
        font-size: 0.8em;
        margin: 20px 5px 20px 5px;
      }

  .image_container{
      flex-direction: column; /* 子要素を縦に並べる */
      text-align: center;
      margin-top: -20px;
  }

      .image_brock{
          max-width: 100%;
          margin: -30px 10px -30px 10px;
          padding: 0px 20px 0px 20px;
          margin-right: 10px;
          transform: scale(0.8);
      }

      .image_brock img {
        max-width: 80%;
        transform: scale(0.9);
      }

  .text-wrapper ol{
    font-size: 0.9em;
  }

  footer {
    font-size: 0.7em;
  }

  /* さらに狭い場合は1つにする */
  @media screen and (max-width: 480px) {
      .caption {
        flex-basis: calc(100% - 20px); /* デフォルトで3つ並べる (余白を考慮) */
      }
    }
}
