@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
*/

/************************************
** ブランドカラー（共通変数）
************************************/
:root {
  --brand-blue: rgb(30,85,140);
  --brand-blue-light: #6e9bbe;
  --brand-red: #cd202c;
  --brand-red-soft: #d28287;
  --brand-green: #28734b;
}

/************************************
** 見出しデザイン（h1〜h4）
************************************/

/* 共通リセット：Cocoon初期装飾を打ち消す */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* h1：淡い青背景＋左に濃いバー */
.entry-content h1 {
  background-color: #e6f0fa;
  border-left: 8px solid var(--brand-blue);
  color: rgb(51,51,51);
  font-size: 28px;
  font-weight: 700;
  padding: 12px 16px;
  margin: 40px 0 24px;
  line-height: 1.4;
}

/* h2：文字下に2本ライン（上：水色、下：濃青＝右下にずらす） */
.entry-content h2,
.article h2,
.post h2 {
  position: relative;
  font-size: 24px;
  font-weight: 700;
  color: rgb(51,51,51);
  margin: 36px 0 32px;
  padding-bottom: 10px; /* 下の濃青ラインぶんの余白を少し大きめに */
  line-height: 1.4;
}

/* 上の水色ライン（基準の長方形） */
.entry-content h2::before,
.article h2::before,
.post h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;           /* 基準位置 */
  width: 100%;         /* コンテナ幅いっぱい */
  height: 4px;         /* 短辺 */
  background-color: #cce0f5;
}

/* 下の濃青ライン（同じ大きさを右下45度方向へ短辺2本ぶんずらす） */
.entry-content h2::after,
.article h2::after,
.post h2::after {
  content: "";
  position: absolute;
  left: 8px;           /* 右方向へ 4px×2 = 8px */
  bottom: -8px;        /* 下方向へ 4px×2 = 8px */
  width: 100%;         /* 大きさは水色と同じ */
  height: 4px;         /* 短辺も同じ */
  background-color: var(--brand-blue);
}

/* h3：左に濃青バーのみ（下線なし） */
.entry-content h3,
.article h3,
.post h3 {
  position: relative;
  font-size: 20px;
  font-weight: 600;
  color: rgb(51,51,51);
  margin: 28px 0 24px;
  padding-left: 16px; /* バーとの距離を少し広めに */
  line-height: 1.5;
}

/* 左の縦バー（上下2色＋隙間） */
.entry-content h3::before,
.article h3::before,
.post h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;               /* 線の幅（短辺） */
  height: 120%;             /* 現在より約2割増し（100% → 120%） */
  background: linear-gradient(
    to bottom,
    var(--brand-blue) 0%,             /* 上：薄い青 */
    var(--brand-blue) 45%,            /* 上の色の終わり */
    transparent 45%,        /* 隙間開始 */
    transparent 55%,        /* 隙間終了（正方形） */
    #cce0f5 55%,  /* 下：濃い青開始 */
    #cce0f5 100%  /* 下の色の終わり */
  );
}

/* h4：文字下に2色ライン（左：濃青／右：淡青） */
.entry-content h4,
.article h4,
.post h4 {
  position: relative;
  font-size: 18px;
  font-weight: 600;
  color: rgb(51,51,51);
  margin: 24px 0 16px;
  padding-left: 20px;     /* h4全体のインデント */
  padding-bottom: 8px;
  line-height: 1.4;
}

/* 下の2色ライン（濃青30%＋淡青70%、開始位置を右にずらす） */
.entry-content h4::after,
.article h4::after,
.post h4::after {
  content: "";
  position: absolute;
  left: 20px;             /* ← 線の開始位置を右にずらす */
  bottom: 0;
  width: calc(100% - 20px); /* ← 右端まで届くように調整 */
  height: 3px;
  background: linear-gradient(to right,
    var(--brand-blue) 0%,
    var(--brand-blue) 30%,
    #cce0f5 30%,
    #cce0f5 100%
  );
}

/************************************
** ボックスデザイン
************************************/
.box-info {
  background: #f0f5fa;
  border-left: 4px solid var(--brand-blue-light);
  padding: 12px 16px;
  margin: 20px 0;
}

.box-alert {
  background: #fbe9eb;
  border-left: 4px solid var(--brand-red);
  padding: 12px 16px;
  margin: 20px 0;
  color: var(--brand-red);
  font-weight: 600;
}

.box-note {
  background: #f7e9ea;
  border-left: 4px solid var(--brand-red-soft);
  padding: 12px 16px;
  margin: 20px 0;
}

.box-success {
  background: #e8f3ed;
  border-left: 4px solid var(--brand-green);
  padding: 12px 16px;
  margin: 20px 0;
}

/************************************
** レスポンシブ（スマホ）
************************************/
@media (max-width: 599px) {
  body {
    line-height: 1.8;
  }
  p {
    margin-bottom: 1.2em;
  }
}

/************************************
** グローバルメニュー罫線（PC）
************************************/
#navi {
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

#navi ul li {
  border-right: 1px solid #ddd;
  border-left: none;
  border-bottom: none;
}

#navi ul li:last-child {
  border-right: none;
}

#navi ul li:first-child {
  border-left: 1px solid #ddd;
}

/************************************
** グローバルメニュー罫線（スマホ）
************************************/
#navi-in {
  border-bottom: 1px solid #ddd;
}

#navi-in ul li {
  border-left: 1px solid #ddd !important;
  border-right: 1px solid #ddd !important;
  border-bottom: 1px solid #ddd !important;
}

#navi-in ul li:last-child {
  border-bottom: 1px solid #ddd !important;
}

/************************************
** シェアボタン
************************************/
.sns-share a,
.share-button a {
  background-color: #333333;
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.sns-share a:hover,
.share-button a:hover {
  background-color: #4d4d4d;
  color: #ffffff;
}

/* サイドバー見出し（L字型装飾） */
.widget-title,
.sidebar h3,
#sidebar h3 {
  position: relative;
  font-size: 20px;
  font-weight: 700;
  color: rgb(51,51,51);
  padding-left: 16px;
  margin: 24px 0 16px;
}

/* 左の縦線（濃青） */
.widget-title::before,
.sidebar h3::before,
#sidebar h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--brand-blue);
}

/* 上の横線 → 実際は「文字の下端に沿った横線」に変更 */
.widget-title::after,
.sidebar h3::after,
#sidebar h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* ← top: 0 → bottom: 0 に変更 */
  width: 100%;
  height: 1px; /* ← 少し細くして繊細に */
  background-color: var(--brand-blue); /* ← 色を濃いめに変更 */
}

.widget-title {
  background: none !important;
  border: none !important;
}

/* --- 箇条書きの記号をシンプルに変更（目次除外＋左寄せ＋余白調整） --- */

/* 第1階層：- に変更＋スペース追加 */
.entry-content ul:not(.toc-list) li::marker {
  content: "- ";
}

/* 第2階層：・ に変更＋スペース追加 */
.entry-content ul:not(.toc-list) ul li::marker {
  content: "・ ";
}

/* 第3階層：– に変更＋スペース追加 */
.entry-content ul:not(.toc-list) ul ul li::marker {
  content: "– ";
}

/* 箇条書きの上下余白を狭くする */
.entry-content ul:not(.toc-list) {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.entry-content ul:not(.toc-list) li {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  margin-left: 1em; /* 左寄せ調整（必要に応じて微調整） */
}

/* 段落同士の間隔を狭くする */
.entry-content p {
  text-indent: 1em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* 段落の字下げ（本文） */
.entry-content p {
  text-indent: 1em;
}

/* 画像周り（figure内）の段落は字下げしない */
.entry-content figure p,
.entry-content figure figcaption,
.entry-content .wp-block-image p {
  text-indent: 0 !important;
}
