@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){
  /*必要ならばここにコードを書く*/
}
function add_custom_footer_to_posts($content) {
  if (is_single() && is_main_query()) {
    $footer = '<div class="custom-footer-box" style="margin-top: 2em; padding: 1em; border-top: 1px solid #ccc;">
      <p><strong>🌿 コラムを読んでくださってありがとうございます。</strong><br>
      私はソマティックエクスペリエンシング®プラクティショナーです。<br>
      心と身体に興味をお持ちの方に個人セッションをご提供しています。<br>
      <a href="https://wholesome.blog/session/" target="_blank">→ セッション案内はこちら</a></p>
    </div>';
    return $content . $footer;
  }
  return $content;
}
add_filter('the_content', 'add_custom_footer_to_posts');

/* 固定ヘッダーでもサブメニューを表示する */
.fixed-header .has-sub {
  display: inline-block;
}

.fixed-header .navi-in > ul li:hover > ul {
  display: block;
}
/* 固定ヘッダーのサブメニューを縦スクロール可能にする */
.fixed-header .navi-in > ul li:hover > ul {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

/* 「トラウマってどんなもの？」連載専用ナビ */
.trauma-series-nav {
  width: 50%;
  margin: 25px auto;
  padding: 11px 18px;
  border: none;
  border-radius: 8px;
  background: #f2f2f2;
}

.trauma-series-nav-title {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.trauma-series-nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.trauma-series-nav-links a {
  flex: 1;
  font-size: 13px;
  text-decoration: none;
}

.trauma-series-prev {
  text-align: left;
}

.trauma-series-next {
  text-align: right;
}

.trauma-series-spacer {
  flex: 1;
}
/* 連載ページだけ、パンくずリストを下げる */
body:has(.trauma-series-nav) .breadcrumb {
  margin-top: 50px !important;
}

/* スマホでは連載ナビを上下2段にする */
@media screen and (max-width: 768px) {
  .trauma-series-nav {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
  }

  .trauma-series-nav-links {
    display: block;
  }

  .trauma-series-nav-links a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
  }

  .trauma-series-prev {
    text-align: left;
    margin-bottom: 10px;
  }

  .trauma-series-next {
    text-align: right;
  }
}