/* =====================
   awabota / miitaku ヘッダー＆本文整形（完全修正版）
   ===================== */

/* --- ヘッダー基本設定（白帯対策） --- */
#header {
  min-height: auto !important;
  height: auto !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* --- 本文余白の標準化（Cocoon標準に戻す） --- */
#content,
#main {
  margin-top: initial !important;
  padding-top: initial !important;
}

/* --- グローバルナビだけを上部固定（崩れ防止） --- */
#navi, #navi-in {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  #navi, #navi-in {
    position: sticky;
    top: 0;
  }
}

/* --- スマホ見出し装飾 --- */
@media (max-width: 768px) {
  .single-post h2 {
    position: relative;
    background-color: #ffffff;
    padding: 0.5em 0.8em;
    font-weight: bold;
    margin-bottom: 1em;
  }

  .single-post h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: red;
  }

  /* スマホ限定：トップページ見出し装飾 */
  body.home .label-1 .text,
  body.home .label-4 .text,
  body.home .label-7 .text,
  body.home .label-8 .text,
  body.home .label-11 .text,
  body.home .labelx-1 .text {
    font-weight: 700;
    border-left: 4px solid #e60012;
    padding-left: 8px;
    display: inline-block;
    line-height: 1.4;
  }
}

/* --- PC/共通見出しデザイン（h2） --- */
h2 {
  position: relative;
  font-weight: bold;
  padding: 0.5em 0.8em;
  background: linear-gradient(to bottom, #f0f0f0 0%, #ffffff 100%);
  margin-bottom: 1em;
}

h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: red;
}

/* --- 万一残る白帯の保険（header before要素など） --- */
.site-header::before,
#header::before {
  content: none !important;
  display: none !important;
}
/* スマホ表示のときヘッダーを高く */
@media (max-width: 767px) {
  #header {
    min-height: 280px !important;  /* 好きな高さに調整（例: 260〜350px） */
  }
}

/* スマホだけ：指定ラベルに縦赤棒＋太字 */
@media (max-width: 768px) {
  body.home .label-1.headline .text,
  body.home .label-4.headline .text,
  body.home .label-7.headline .text,
  body.home .label-8.headline .text,
  body.home .label-11.headline .text,
  body.home .labelx-1.headline .text,
  /* .headline が無い場合の保険 */
  body.home .label-1 .text,
  body.home .label-4 .text,
  body.home .label-7 .text,
  body.home .label-8 .text,
  body.home .label-11 .text,
  body.home .labelx-1 .text {
    font-weight: 700;
    border-left: 4px solid #e60012; /* 縦の赤棒 */
    padding-left: 8px;              /* 棒と文字の間 */
    display: inline-block;          /* 幅を文字に合わせる */
    line-height: 1.4;
  }
}

@media screen and (max-width: 768px) {
  .single-post h2 {
    position: relative;
    background-color: #ffffff; /* 下地白 */
    padding: 0.5em 0.8em;
    font-weight: bold;
    margin-bottom: 1em;
  }

  .single-post h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px; /* 縦ラインの太さ */
    height: 100%;
    background-color: red; /* 赤縦ライン */
  }
}

@media screen and (max-width: 768px) {
  .single-post h2 {
    position: relative;
    background-color: #ffffff; /* 下地白 */
    padding: 0.5em 0.8em;
    font-weight: bold;
    margin-bottom: 1em;
  }

  .single-post h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px; /* 縦ラインの太さ */
    height: 100%;
    background-color: red; /* 赤縦ライン */
  }
}

/* h2 メイク */
h2 {
  position: relative;
  font-weight: bold;
  padding: 0.5em 0.8em;
  background: linear-gradient(to bottom, #f0f0f0 0%, #ffffff 100%);
  margin-bottom: 1em;
}

/* 左赤ライン */
h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px; /* 赤ラインの太さ */
  height: 100%;
  background-color: red;
}