@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}


/* 目次全体のスタイル */
.toc {
  background: #f7f9fa; /* ★背景色を最初の明るい色に戻しました */
  border: 2px solid #333333; /* 枠線も元に戻しました */
  border-radius: 8px; /* 角丸 */
  padding: 1.5em;
  margin: 2em 0;
}

/* 「目次」タイトルのスタイル */
.toc-title {
  color: #333333;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  border-bottom: 1px dashed #cccccc;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

/* 目次リストのスタイル */
.toc-list {
  margin: 0;
  padding-left: 0;
  list-style: none; /* デフォルトの丸ポチを消す */
  counter-reset: toc-counter; /* 数字を数えるカウンターをリセット */
}

/* 見出しごとのスタイル（区切り線入り） */
.toc-list li {
  margin: 0;
  padding: 0.6em 0; 
  line-height: 1.6;
  border-bottom: 1px dashed #cccccc; /* 見出しの間の区切り線 */
  position: relative;
  padding-left: 1.8em; /* 数字が入るスペースを左側に確保 */
}

/* 見出しの先頭に自動で数字を追加 */
.toc-list li::before {
  counter-increment: toc-counter; /* カウンターを進める */
  content: counter(toc-counter) "."; /* 数字の後にドットを付ける（例: 1.） */
  position: absolute;
  left: 0;
  top: 0.6em;
  font-weight: bold;
  color: #333333; /* 数字の色 */
}

/* 最後の項目の下線だけを消す */
.toc-list li:last-child {
  border-bottom: none;
}

/* リンクの色とホバー効果 */
.toc-list a {
  text-decoration: none;
  color: #2b5c8f; /* リンクの色を元の青系に戻しました */
  display: block; 
}

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

