/*
Theme Name: Cocoon Child
Template: cocoon-master
*/

/* ✅ PC表示用：バナー画像とキャッチコピーの調整 */
@media screen and (min-width: 768px){
  .pc-banner img {
    max-width: 70% !important;
    height: auto;
    max-height: 300px;
    display: block;
    margin: 0 auto;
  }

  .pc-banner .catchphrase {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 6px;
  }

  .sidebar {
    display: block !important;
  }
}

/* ✅ モバイル表示用：ナビメニュー＆説明文非表示 */
@media screen and (max-width: 768px){
  .navi-menu-content a {
    color: #0066cc !important;
    text-decoration: underline !important;
    padding: 10px 15px;
    display: block;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
  }

  .navi-menu-content a:hover {
    background-color: #eef7ff;
  }

  .sub-menu-description {
    display: none !important;
    height: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
  }
}

/* ✅ その他の画像調整 */
.entry-thumb img {
  max-width: 70%;
  height: auto;
}

/* ✅ カテゴリボックスの調整 */
@media screen and (min-width: 768px) {
  .category-flex {
    display: flex;
    justify-content: center;
    gap: 16px;
  }

  .category-flex .cat-box {
    width: 30%;
  }
}

@media screen and (max-width: 767px) {
  .category-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .category-flex .cat-box {
    width: 45%;
  }

  .category-flex .cat-box:nth-child(1) {
    width: 70%;
    margin: 0 auto;
  }
}

/* ✅ カテゴリラベルとトップ矢印非表示 */
.cat-label,
.top-menu-icon .fa-arrow-up {
  display: none !important;
}

/* ✅ スライドサイドバー（右＆左）スタイル */
#slide-sidebar,
#slide-sidebar-right {
  position: fixed;
  top: 0;
  width: 270px;
  height: 100%;
  background-color: #fff;
  box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  z-index: 9998;
  padding: 16px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

#slide-sidebar {
  left: -270px;
}
#slide-sidebar.open {
  left: 0;
}

#slide-sidebar-right {
  right: -270px;
}
#slide-sidebar-right.open {
  right: 0;
}

/* ✅ スライドボタンの基本スタイル */
#menu-toggle,
#slide-toggle-btn {
  position: fixed;
  top: 15px;
  z-index: 9999;
}

#menu-toggle {
  left: 15px;
}

#slide-toggle-btn {
  right: 15px;
}

#menu-toggle button,
#slide-toggle-btn button {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}
/* ✅ スライドサイドバー表示用ボタンのスタイル */
#slide-toggle-btn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 10000;
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  font-size: 20px;
}
/* 404タイトルの色を変更 */
body.error404 h1.entry-title{
  color:#e60033 !important;
}

/* デフォ404画像を消す */
body.error404 img.not-found{
  display:none !important;
}
/* 404タイトルの色を変更（当たり確認） */
body.error404 h1.entry-title{
  color: #e60033 !important;
}

/* Cocoonのデフォ404画像を消す */
body.error404 img.not-found{
  display: none !important;
}
/* 404タイトルの色を強制変更 */
html body.error404 h1.entry-title {
  color: #e60033 !important;
  background: rgba(230,0,51,.08) !important;
  border: 2px solid #e60033 !important;
  padding: 6px !important;
}

/* Cocoonのデフォ404画像を強制で消す */
html body.error404 img.not-found {
  display: none !important;
}
/* 404専用：ページ内に「.not-found」画像があるときだけ適用（:has を使用） */
article.post:has(img.not-found) h1.entry-title{
  color:#e60033 !important;
  background:rgba(230,0,51,.08) !important;
  border:2px solid #e60033 !important;
  padding:6px !important;
}

/* 404のグレー画像を消す */
article.post:has(img.not-found) img.not-found{
  display:none !important;
}

/* タイトル直下に自作イラストを表示（画像URLを差し替え） */
article.post:has(img.not-found) h1.entry-title::after{
  content:"";
  display:block;
  width:320px; height:220px;
  margin:12px auto 8px;
  background:url("https://YOUR-DOMAIN/wp-content/uploads/your-404.png") no-repeat center/contain;
}
/* 404タイトルの色だけ変更 */
article.post:has(img.not-found) h1.entry-title {
  color: #e60033 !important;
}

/* Cocoonのデフォ404画像を消す */
article.post:has(img.not-found) img.not-found {
  display: none !important;
}

/* タイトル直下に自作イラストを表示 */
article.post:has(img.not-found) h1.entry-title::after {
  content: "";
  display: block;
  width: 320px;
  height: 220px;
  margin: 12px auto 8px;
  background: url("https://te-tsuduki-guide.com/wp-content/uploads/2025/08/toramiteru-mu5.png") no-repeat center/contain;
}
