@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){
  /*必要ならばここにコードを書く*/
}
/* ===========================================
   1. サイト全体の基本（フォント・背景色）
   =========================================== */
body {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-weight: 400;
    color: #333; 
    line-height: 1.9;
    letter-spacing: 0.05em;
    background-color: #f6f3ed !important;
}

/* 2. 全ての白い箱を背景に馴染ませる（透過） */
#main, #sidebar, .main, .widget, 
.entry-card-content, .related-entry-card, .related-entry-card-content,
.new-entry-card, .new-entry-cards {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ===========================================
   3. レイアウト修正（崩れを直す）
   =========================================== */
#content {
    display: flex;
    justify-content: space-between;
}
.main { width: 68% !important; margin-right: 0 !important; }
#sidebar { width: 28% !important; }
.entry-content { padding: 0 15px !important; }

/* 崩れた新着記事の並びを元に戻す */
.entry-card-wrap {
    display: flex !important;
    flex-direction: row !important;
}

@media screen and (max-width: 1023px) {
    #content { display: block; }
    .main, #sidebar { width: 100% !important; }
}

/* ===========================================
   4. サイドバーのタイトル（お気に入りの18px）
   =========================================== */
.sidebar h3, .widget-title {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-weight: 500 !important;   
    font-size: 18px !important; 
    letter-spacing: 0.15em !important; 
    color: #555 !important;        
    text-align: center !important; 
    border: none !important;       
    margin-bottom: 20px !important;
}
.sidebar h3::after {
    content: ''; display: block; width: 30px; height: 1px;
    background-color: #ccc; margin: 8px auto 0;            
}
/* ===========================================
   5. 【真・解決版】新着と関連のサイズを適正に揃える
   =========================================== */

/* 1. 小さすぎた「新着記事」のサイズを読みやすく戻す */
.widget_recent_entries ul li a,
.entry-card-title,
.new-entry-card-title {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 14px !important;    /* 読みやすい標準サイズに戻す */
    font-weight: 500 !important;
    line-height: 1.6 !important;
    color: #444 !important;
}

/* 2. 変わらなかった「関連記事（List Category Posts）」を新着に合わせる */
/* プラグイン特有のクラス名を直接指定します */
.lcp_catlist li a,
.lcp_catlist li {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 14px !important;    /* 新着記事と同じサイズに強制 */
    font-weight: 500 !important;
    line-height: 1.6 !important;
    color: #444 !important;
    text-decoration: none !important;
}

/* 3. 関連記事のリストの「点（中黒）」を消して見た目を揃える */
.lcp_catlist {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* 4. 関連記事の各行の間に余白を作り、新着記事の感覚に合わせる */
.lcp_catlist li {
    margin-bottom: 12px !important;
    background: none !important;
    border: none !important;
}

/* ===========================================
   6. 見出しを背景に馴染ませ、浮きを解消する
   =========================================== */

/* H2見出し：白浮きを消し、上下の間隔を適正にする */
.entry-content h2 {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 22px !important;    /* サイズを少し控えめにして馴染ませる */
    font-weight: 700 !important;
    color: #333 !important;
    background-color: transparent !important; /* 白い背景を完全に消す */
    
    /* 装飾：下線を細く、色を少し薄くして「圧」を下げる */
    border-bottom: 1px solid #ccc !important; 
    padding: 0 0 10px 0 !important; /* 内側の余白を削る */
    margin-top: 45px !important;    /* 上の空きすぎを解消 */
    margin-bottom: 25px !important; /* 下の空きすぎを解消 */
    box-shadow: none !important;    /* もし影があれば消す */
}

/* H3見出し：よりシンプルにして本文に溶け込ませる */
.entry-content h3 {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: #444 !important;
    background-color: transparent !important;
    
    /* 装飾：横線ではなく、控えめな左線のみ */
    border-left: 2px solid #ccc !important;
    border-bottom: none !important;
    padding: 0 0 0 12px !important;
    margin-top: 35px !important;
    margin-bottom: 20px !important;
}

/* 本文との一体感を出すための微調整 */
.entry-content {
    background-color: transparent !important;
}

/* ===========================================
   7. 人気記事ランキングのデザインを整える
   =========================================== */

/* ランキング全体を新着記事と同じカード形式にする */
.popular-entry-cards.default {
    background-color: transparent !important;
    border: none !important;
}

/* 各記事（カード）の背景と枠線を消して馴染ませる */
.popular-entry-card {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 10px 0 !important; /* 上下にゆとりを作る */
    margin-bottom: 5px !important;
}

/* ランキングのタイトル文字を明朝体＆適正サイズにする */
.popular-entry-card-title {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 14px !important; /* 読みやすいサイズ */
    font-weight: 500 !important;
    line-height: 1.5 !important;
    color: #444 !important;
}

/* 画像（サムネイル）の端を少し整える */
.popular-entry-card-thumb img {
    border: none !important;
    padding: 0 !important;
    border-radius: 2px !important; /* ほんの少し角を丸くして上品に */
}

/* 画像と文字の間の隙間を調整 */
.popular-entry-card-content {
    padding-left: 15px !important;
}

/* ===========================================
   7. 人気記事ランキングを「王家の番付」風にする
   =========================================== */

/* 数字（順位）を「勲章」のような円形バッジにする */
.p-rank-up .r-one, .p-rank-up .r-two, .p-rank-up .r-three, .p-rank-up .r-common {
    background-color: #d4af37 !important; /* アンティークゴールド */
    color: #fff !important;
    font-family: 'Times New Roman', serif !important; /* 数字をよりクラシックに */
    font-size: 14px !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
    border-radius: 50% !important; /* 丸くする */
    border: 1px solid #fff !important; /* 白い縁取りで際立たせる */
    top: -8px !important;
    left: -8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 4位以下は銀色（落ち着いたグレー）にする */
.p-rank-up .r-common {
    background-color: #999 !important;
}

/* 記事カードを少し浮き立たせて「選ばれし記事」感を出す */
.popular-entry-card {
    background-color: rgba(255, 255, 255, 0.4) !important; /* ほんのり透ける白 */
    border-radius: 4px;
    padding: 12px !important;
    margin-bottom: 12px !important;
    transition: all 0.3s;
}

/* マウスを乗せた時の反応 */
.popular-entry-card:hover {
    background-color: rgba(255, 255, 255, 0.7) !important;
    transform: translateX(5px); /* 少し右にスライド */
}

/* タイトルを太くして、格調を高く */
.popular-entry-card-title {
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

/* ===========================================
   8. よくある質問（アコーディオン）を背景に馴染ませる
   =========================================== */

/* 全体の枠線と影を消して、背景に溶け込ませる */
.ui-accordion .ui-accordion-header,
.ui-accordion .ui-accordion-content {
    background-color: transparent !important; /* 白背景を透明に */
    border: none !important;                 /* 枠線を消す */
    box-shadow: none !important;             /* 強い影を消す */
}

/* 質問部分 (Q) のデザイン調整 */
.ui-accordion .ui-accordion-header {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #444 !important;
    border-bottom: 1px solid #ddd !important; /* 細い下線で区切りを作る */
    padding: 15px 0 !important;
    margin-top: 10px !important;
}

/* 質問の左にあるアイコン (Q) の色を柔らかく */
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
    background-color: #888 !important; /* 真っ黒からグレーへ */
}

/* 回答部分 (A) のデザイン調整 */
.ui-accordion .ui-accordion-content {
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #555 !important;
    padding: 20px 10px 30px 40px !important; /* Aの位置を少し右に寄せて読みやすく */
}



/* マウスを乗せた時にうっすら色を変える（クリックできることを示す） */
.ui-accordion .ui-accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* ===========================================
   9. 画像のキャプションの白浮きを解消する
   =========================================== */

/* 画像とキャプションを囲む「白い枠」を完全に消す */
.wp-block-image figcaption,
.wp-caption,
.entry-content figcaption {
    background-color: transparent !important; /* 白背景を透明に */
    border: none !important;                 /* 枠線を消す */
    box-shadow: none !important;             /* 影を消す */
    margin-top: 5px !important;              /* 画像との距離を微調整 */
    color: #666 !important;                  /* 文字色を少し柔らかいグレーに */
    font-size: 0.85em !important;            /* 少し小さくして控えめに */
    font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", serif !important;
}

/* キャプションの下に余計な余白があれば詰める */
.wp-block-image {
    margin-bottom: 2em !important;
    background-color: transparent !important;
}

/* ===========================================
   10. 画像やブロック周りのグレーの枠線を消す
   =========================================== */

/* 画像の周りの枠線と影をリセット */
.entry-content img,
.wp-block-image img,
.wp-caption,
.wp-block-image figcaption {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* ボックス（白枠）などの境界線を消す */
.entry-content .sp-block,
.entry-content .common-box,
.entry-content .p-box,
.entry-content blockquote {
    border: none !important;
    box-shadow: none !important;
}

/* ついでに「Q&A」の画像の周りの白い余白も消す（もし残っていれば） */
.entry-content figure {
    padding: 0 !important;
    margin: 1em 0 !important;
    background-color: transparent !important;
}

/* ===========================================
   17. トップページのバナー間の余白を調整
   =========================================== */

/* 1. 縦に並ぶ大きなバナー同士の間に隙間を作る */
.entry-content a img.alignnone {
    margin-bottom: 20px !important; /* 画像の下に20pxの空きを作る */
    display: block !important;
}

/* 2. 2カラム（横並び）エリアの調整 */
.column-wrap {
    margin-bottom: 20px !important; /* カラムブロック自体の下に隙間を */
}

.column-left, .column-right {
    padding: 0 !important; /* 内側の余計な余白をリセット */
}

/* 3. スマホで横並びが縦になった時の画像の間隔 */
@media screen and (max-width: 480px) {
    .column-wrap .column-left img,
    .column-wrap .column-right img {
        margin-bottom: 20px !important; /* スマホで縦に並んだ時も隙間を確保 */
    }
}

/* 4. 「物語の入り口を探す」などの見出し画像の前後にゆとりを */
.wp-image-6541 {
    margin-top: 40px !important;
    margin-bottom: 30px !important;
}

/* ===========================================
   18. スマホでランキングのタイトルを最後まで表示する
   =========================================== */

@media screen and (max-width: 480px) {
    /* 1. タイトルの文字数制限（省略）を解除して全て表示する */
    .entry-card-title,
    .related-entry-card-title,
    .popular-entry-card-title {
        display: block !important;
        white-space: normal !important; /* 折り返しを許可 */
        overflow: visible !important;
        text-overflow: clip !important;
        max-height: none !important;   /* 高さ制限を撤廃 */
        height: auto !important;
    }

    /* 2. 画像と文字のバランスを調整（文字を少し小さくして収まりを良くする） */
    .popular-entry-card-title {
        font-size: 13px !important;    /* スマホで読みやすいサイズ */
        line-height: 1.4 !important;
        margin-top: 5px !important;
    }

    /* 3. ランキングのカード全体の高さを内容に合わせる */
    .popular-entry-card {
        height: auto !important;
        padding-bottom: 15px !important;
    }
}

