@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){
  /*必要ならばここにコードを書く*/
}
// カルーセルのカード構造に特定のクラスを追加して、CSSで操作しやすくする
add_filter('cocoon_part__tmp/carousel-entry-card', function($content) {
  // タイトル部分をスパン（または特定のクラス）で囲み、CSSでの「重ね」を容易にする
  $content = preg_replace('/class="carousel-entry-card-title card-title"/', 'class="carousel-entry-card-title card-title overlay-title"', $content);
  return $content;
});
/* --- 改ページナビを数字と＜＞だけにする（Cocoon完全対策版） --- */

/* 1. Cocoon独自の「前へ」「次へ」という巨大なボタンを完全に消し去る */
.pagination-next-link,
.page-link-prev-next {
    display: none !important;
}

/* 2. すべてのボタン（数字と矢印）をきれいな正方形に統一 */
#main .page-numbers,
#main .page-number,
#main .page-link-link {
    background-color: #DA020E !important; /* 通常時の赤 */
    color: #ffffff !important;            /* 文字は白 */
    border: none !important;              /* ピンク枠を完全に消去 */
    border-radius: 6px !important;        /* 角を少し丸く */
    
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    
    font-weight: bold !important;
    font-size: 14px !important;
    margin: 4px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important;
    vertical-align: middle !important;
}

/* 3. 現在選択されているページ（濃い赤） */
#main .page-numbers.current,
#main .page-number.current,
#main .page-link-link.current {
    background-color: #8C0109 !important;
    color: #ffffff !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3) !important; /* 立体感 */
}

/* 4. Cocoonの「前ページ」「次ページ」用の矢印キーを「＜」「＞」に変換 */
#main .page-link-prev {
    font-size: 0 !important; /* 「前へ」の文字を非表示に */
}
#main .page-link-prev::before {
    content: "＜" !important;  /* 代わりの矢印を挿入 */
    font-size: 14px !important;
    font-weight: bold !important;
    color: #ffffff !important;
}

#main .page-link-next {
    font-size: 0 !important; /* 「次へ」の文字を非表示に */
}
#main .page-link-next::before {
    content: "＞" !important;  /* 代わりの矢印を挿入 */
    font-size: 14px !important;
    font-weight: bold !important;
    color: #ffffff !important;
}

/* 5. マウスを載せたときのホバー色 */
#main .page-numbers:not(.current):hover,
#main .page-number:not(.current):hover,
#main .page-link-link:not(.current):hover {
    background-color: #ff1a1a !important;
}