@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){
  /*必要ならばここにコードを書く*/
}
/************************************
****　サイドバー
************************************/
#sidebar>.widget{
border-radius:10px;
}
.widget_search{
padding:0;
}
span.fas.fa-search::before{
color:#90C31F;/*検索マーク色変更はこちら*/
}
.sidebar h3{
color:#7b7b7b;
border-radius: 0%;
border-bottom:3px dotted;
border-color:#90C31F;/*タイトル下のライン色変更はこちら*/
padding-bottom:0.3em;
margin-top:-0.5em;
margin-bottom:1em;
}
.widget_recent_entries ul li a, .widget_categories ul li a, .widget_archive ul li a, .widget_pages ul li a, .widget_meta ul li a, .widget_rss ul li a, .widget_nav_menu ul li a {
background-color:#f7f7f7;
margin: 6px 0;
padding: 4px 10px;
border-radius:20px;
transition: 0.4s
}
.widget_recent_entries ul li a:hover, .widget_categories ul li a:hover, .widget_archive ul li a:hover, .widget_pages ul li a:hover, .widget_meta ul li a:hover, .widget_rss ul li a:hover, .widget_nav_menu ul li a:hover{
background-color:#90C31F;/*マウスオーバー時の背景色変更はこちら*/
color:#fff!important;
}
.tagcloud a{
background-color:#f7f7f7;
}
.tagcloud a:hover{
background-color:#90C31F;/*マウスオーバー時の背景色変更はこちら*/
color:#fff!important;
transition: 0.4s ;
}
.nwa .recommended.rcs-card-margin a {
margin: 0 0 1em;
width: 90%;
}
.widget-entry-cards .widget-entry-card-content{
color: #565656;
}
// 出演女優表示（カテゴリ一覧の下に自動挿入）
function eroret_insert_actress_name_after_category($content) {
    if (!is_single()) return $content;

    $actress = get_post_meta(get_the_ID(), 'actress_name', true);
    if (empty($actress)) return $content;

    $actress_html = '
    <p style="text-align:center; border-top:1px dashed #ccc; padding-top:10px; margin:16px 0;">
        <b>出演女優：' . esc_html($actress) . '</b>
    </p>';

    // 「カテゴリ一覧（the_category）」の直後に挿入
    if (strpos($content, 'class="post-categories"') !== false) {
        $content = preg_replace(
            '/(<div class="post-categories".*?<\/div>)/s',
            '$1' . $actress_html,
            $content,
            1
        );
    } else {
        // 念のため見つからなければ末尾手前に
        $content = $actress_html . $content;
    }

    return $content;
}
add_filter('the_content', 'eroret_insert_actress_name_after_category');

