/* かわいい丸みのあるフォント */
body {
background-color: #f6fbff; /* 淡い水色 */
  color: #444; /* 落ち着いたグレー */
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic Pro', sans-serif;
}



/* ブログのタイトルを可愛く */
.logo {
  font-family: 'Pacifico', cursive; /* おしゃれな手書き風フォント */
  font-size: 28px;
  font-weight: bold;
  color: #00796B;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* ナビゲーション */
nav {
  display: flex;
  align-items: center;
}

/* メニュー */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px;
}

.menu li {
  position: relative;
}

/* メニューの文字 */
.menu a {
  color: #00796B; /* 落ち着いたグリーン */
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
}

.menu a:hover {
  color: #004D40; /* 少し濃いめでホバー時のアクセント */
}

/* サブメニュー */
.submenu {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  width: 150px;
  z-index: 1000;
}

.submenu li {
  display: block;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.submenu li:last-child {
  border-bottom: none;
}

.submenu a {
  color: #4682b4;
}

/* スマホではクリックで開く */
.dropdown .submenu.active {
  display: block;
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  color: #b2d3df; /* 文字は落ち着いた深緑 */
  border-radius: 5px;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 3px;
  background: #333;
}

/* スマホ・タブレット対応 */
@media (max-width: 768px) {
  nav {
      flex-direction: column;
      align-items: flex-end;
  }

  .menu {
      display: none;
      flex-direction: column;
      background: #b0e0e6;
      position: absolute;
      width: 100%;
      left: 0;
      top: 60px;
      padding: 10px;
  }

  .menu.active {
      display: flex;
  }

  .hamburger {
      display: flex;
  }

  .dropdown .submenu {
      position: static;
      background: transparent;
      box-shadow: none;
      width: auto;
  }

  .submenu li {
      border-bottom: 1px solid #ddd;
      padding-left: 20px;
  }

  .wrapper {
    padding: 15px;
}

h2 {
    font-size: 1.3em;
}

.img1 {
    max-width: 100%;
}

.article-grid {
  grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
}


}

/* ヘッダーとフッターの背景を統一 */
header, footer {
  background-color: #b2d3df; /* 優しいパステルグリーン */
  color: #004D40; /* 文字は落ち着いた深緑 */
  padding: 15px 20px;
  text-align: center;
}


/* SNSアイコンを黒に */
.social-links i {
  font-size: 24px;
  margin-right: 5px;
  color: #000; /* 黒 */
}

.social-links a:hover i {
  color: #333; /* 少し薄い黒（グレー） */
}

.footer-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 900px;
  margin: auto;
}

.footer-section h4 {
  font-size: 18px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section a {
  text-decoration: none;
  color: #333;
}

.footer-section a:hover {
  color: #4682b4;
}

.footer-bottom {
  margin-top: 20px;
  font-size: 14px;
}

/* アイキャッチ画像のスタイル */
.eyecatch {
  width: 80%;
  max-width: 80%;
  aspect-ratio: 16 / 9; /* 16:9の比率を維持 */
  object-fit: cover;  /* 画像を適切にトリミング */
  border-radius: 8px;  /* 角を少し丸める */
  display: block;
  margin: 20px auto;  /* 余白を入れる */
}

@media (max-width: 768px) {
  .eyecatch {
    max-width: 100%;
  }
}

/* アイキャッチ画像のスタイル */
img {
  width: 100%;
  max-width: 1200px;  /* Google推奨サイズ */
  aspect-ratio: 16 / 9; /* 16:9の比率を維持 */
  object-fit: cover;  /* 画像を適切にトリミング */
  border-radius: 8px;  /* 角を少し丸める */
  display: block;
  margin: 0 auto 20px;
}



/* 目次コンテナ */
        /* 目次全体のスタイル */
        .toc-container {
          max-width: 400px;
          background: #fff;
          border: 2px solid #ccc;
          border-radius: 8px;
          padding: 10px;
          box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
          margin: 20px auto; /* 上下20pxの余白、左右は自動で中央寄せ */
          
      }

      /* 目次のタイトル（開閉ボタン） */
      .toc-title {
          display: flex;
          align-items: center;
          justify-content: space-between;
          font-weight: bold;
          padding: 10px;
          cursor: pointer;
          background: #f5f5f5;
          border-radius: 6px;
      }

      .toc-title:hover {
          background: #e0e0e0;
      }

      /* 目次リスト */
      .toc-list {
          list-style: none;
          padding: 0;
          margin: 0;
          display: none;
      }

      .toc-list li {
          padding: 8px 10px;
          border-bottom: 1px solid #ddd;
      }

      .toc-list li:last-child {
          border-bottom: none;
      }

      .toc-list a {
          text-decoration: none;
          color: #0073e6;
          font-weight: bold;
      }

      .toc-list a:hover {
          text-decoration: underline;
      }



      .latest-articles {
        max-width: 1000px;
        margin: 0 auto;
        padding: 20px;
      }
      
      .articles-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
      }
      
      .article-card {
        background: white;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
      }
      
      .article-card:hover {
        transform: translateY(-5px);
      }
      
      .article-card img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        display: block;
      }
      
      .article-content {
        padding: 15px;
      }
      
      .article-card h3 {
        margin: 10px 0;
        font-size: 1.2em;
      }
      
      .article-card a {
        text-decoration: none;
        color: #0073e6;
      }
      
      .article-card p {
        font-size: 0.9em;
        color: #666;
      }

      .blog-intro {
        max-width: 1000px;
        margin: 0 auto;
        padding: 20px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        text-align: center;
      }
      
      .blog-intro h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
      }
      
      .blog-intro p {
        font-size: 1em;
        color: #333;
        line-height: 1.6;
      }

      .category-section {
        max-width: 1000px;
        margin: 20px auto;
        padding: 20px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        text-align: center;
      }
      
      .category-section h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
      }
      

      .category-container {
        display: flex;
        flex-wrap: wrap; /* 折り返し可能 */
        justify-content: center; /* 中央揃え */
        gap: 10px; /* ボタンの間隔 */
      }
      
      .category-button {
        padding: 10px 15px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 5px;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: 0.3s;
      }
      
      .category-button:hover {
        background-color: #0056b3;
      }
      
      /* スマホ対応 */
      @media screen and (max-width: 768px) {
        .category-container {
          display: grid;
          grid-template-columns: repeat(2, 1fr); /* 2列レイアウト */
          gap: 10px;
        }
      }

/* デフォルトのh1スタイル */
h1 {
  font-size: 1.5rem; /* デスクトップ用 */
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

/* スマホ向けの調整 */
@media screen and (max-width: 768px) {
  h1 {
      font-size: 1.3rem; /* スマホ用に小さくする */
      margin: 15px 0;
  }
}
      
  .gallery {
    display: flex;
    flex-direction: column;
}
.gallery-image {
    width: min(80%, 15rem);

    position:relative;

}

.gallery-image img {
    aspect-ratio: 3/4; /*アスペクト比を保持することができる*/
    object-fit: cover; /*画像や置換要素をコンテナにどのように合わせるかを指定する.画像のサイズやアスペクト比を制御し、トリミングや配置をカスタマイズ*/
    width: 100%;
}
.gallery-thumbnails {
    display: grid;
    gap: 10px;  /*行や列の隙間を定義*/
    grid-template-columns: repeat(5, 1fr); /*縦列の幅を指定。第1引数に{繰り返す数}、第２引数に{繰り返す数値}を入れる*/
    list-style: none;
    margin: 3px;

}
.gallery-thumbnails img {
    aspect-ratio: 3/4;
    object-fit: cover; /*コンテンツはアスペクト比が固定されたまま、要素のサイズに収まるように表示されます。要素とコンテンツのアスペクト比が合わない場合、コンテンツが合わせるようにトリミングされます。*/
    cursor: pointer; /*マウスカーソルの形状を変えることができます。*/
    max-width: 150px;
    height: auto;
}



.modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
  padding: 10px;
}

.modal-content {
  min-width: 75%; /* 最小幅を親要素に合わせる */
  min-height: 75%; /* 最小高さを親要素に合わせる */
  object-fit: contain;
}



.modal.active {
  opacity: 1;
  visibility: visible;
}




#close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}


.mokuji{

  background-color: #e1f6fe;
  border: 3px solid #b2d3df;
  text-align: center;
  margin: 5px;
  margin-bottom: 15px;
  color: #004D40;
}


.mokuji_title{
  border-bottom: 3px solid  #b2d3df;
  background-color: #b2d3df ;
  font-weight: bolder;
  color: #004D40;
}

.sum_item{
  display: flex;
  flex-direction: column;
}

h3 {
  font-size: 1.0em; /* 適宜調整 */
}

.mokuji_li{
  list-style: none;
}

/* モバイルファーストのレスポンシブデザイン */
@media only screen and (max-width: 768px) {
  .modal-content {
      width: 80%; /* モバイル向けにサイズ調整 */
      height: auto;
  }
}
