@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
img {
    margin-bottom: 15px !important;
}
.logo-text {
    padding: 10px 0 10px !important;
}
@media screen and (max-width: 834px) {
    main.main, div.sidebar {
        padding-top: 3px !important;
    }


/* 3. リンク要素全体をカードにする (Flexboxを維持) */
.p-postList__item a.p-postList__link {
    display: flex !important; 
    flex-direction: column !important;
    text-decoration: none !important;
    color: #333 !important;
    height: 100% !important;
}

/* 4. ★★★ サムネイルエリアの安定化と 3:2 横長比率への変更 ★★★ */
.p-postList__thumb {
    width: 100% !important;
    height: 0 !important; 
    /* 横長 (3:2) の比率を強制 (2/3 = 0.6667) */
    padding-bottom: 66.67% !important; 
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 0 !important; 
}

/* 5. サムネイル画像（imgタグ）の表示調整 */
.p-postList__thumb img {
    position: absolute !important; 
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    margin: 0 !important;
    padding: 0 !important;
}

/* 6. テキストエリア（タイトルを格納）の調整 */
.p-postList__body {
    padding: 8px 10px !important; 
    min-height: auto !important; 
    flex-grow: 1 !important; 
    margin: 0 !important; 
    background: none !important;
}

/* 7. タイトル行数の制限とデザイン調整 */
.p-postList__title {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important; 
    
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important; 
    overflow: hidden !important;
    
    margin: 0 !important; 
    padding: 0 !important;
    
    line-height: 1.3 !important; 
    font-size: 14px !important; 
    font-weight: bold !important; 
    color: #333 !important;
    height: auto !important; 
}

/* --- スマホ表示の調整 (600px以下) --- */
@media screen and (max-width: 600px) {
    .p-postList {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 8px !important;
    }
    .p-postList__item {
        border-radius: 4px !important; 
    }
    .p-postList__body {
        padding: 6px 8px !important; 
    }
    .p-postList__title {
        font-size: 13px !important;
    }
}

/* --- スマホ表示の調整 (600px以下) --- */
@media screen and (max-width: 600px) {
    .p-postList {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 8px !important;
    }
    .p-postList__item {
        border-radius: 4px !important; 
    }
    .p-postList__body {
        padding: 6px 8px !important; 
    }
    .p-postList__title {
        font-size: 13px !important;
    }
}
/* --- 漫画サイト用スタイル終了 --- */
/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}