@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){
  /*必要ならばここにコードを書く*/
}


/* =========================================
   Cocoonの全カードを「ラボ風ログデータ」に強制統一
========================================= */

/* --- 1. カード全体のコンテナ --- */

.related-entry-card-wrap,
.widget-entry-card,
.popular-entry-card,
.new-entry-card {
  display: flex !important;
  flex-direction: row !important;
  background-color: #ffffff !important;
  border: 1px solid #000000 !important;
  border-radius: 0 !important; /* 角丸を強制排除 */
  margin-bottom: 0px !important;
  padding: 0 !important;
  transition: all 0.1s !important;
  box-shadow: none !important;
  clear: both !important;
}

/* ホバー時の全体反転（中の要素すべての色を強制的に白へ） */

.related-entry-card-wrap:hover,
.widget-entry-card:hover,
.popular-entry-card:hover,
.new-entry-card:hover {
  background-color: #000000 !important;
  border-color: #000000 !important;
  z-index: 1;
}

.related-entry-card-wrap:hover *,
.widget-entry-card:hover *,
.popular-entry-card:hover *,
.new-entry-card:hover * {
  color: #ffffff !important;
  border-color: #555555 !important; /* 点線などを少し暗いグレーにして馴染ませる */
}


/* --- 2. 左側：サムネイル領域 --- */
/* Cocoonデフォルトの float（回り込み）を完全解除してFlexで並べる */
.card-thumb {
  float: none !important; 
  width: 140px !important;
  min-width: 140px !important;
  flex-shrink: 0 !important;
  border-right: 1px solid #000000 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}
.card-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  filter: grayscale(30%) contrast(1.2) !important;
  transition: filter 0.2s !important;
  display: block !important;
}
/* ホバーで色を戻す */

.related-entry-card-wrap:hover .card-thumb img,
.widget-entry-card:hover .card-thumb img,
.popular-entry-card:hover .card-thumb img {
  filter: grayscale(0%) contrast(1) !important;
}


/* --- 3. 右側：コンテンツ領域 --- */
.card-content {
  padding: 15px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  justify-content: center !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important; /* Cocoonデフォルトの横幅指定を無効化 */
}

/* メタ情報（カテゴリ・日付など） */
.card-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  font-size: 0.7em !important;
  font-family: monospace !important;
  color: #666666 !important;
  border-bottom: 1px dotted #cccccc !important;
  padding: 0 0 6px 0 !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: 1px !important;
}

/* 不要なアイコン（フォルダや時計マーク）を消去 */
.card-meta .fas,
.card-meta .far {
  display: none !important;
}

/* カテゴリバッジ（Cocoonの設定による絶対配置やリボン装飾をリセット） */
.cat-label,
.entry-category {
  position: static !important;
  background: none !important;
  color: inherit !important;
  padding: 0 !important;
  margin-right: 15px !important;
  font-weight: normal !important;
  border-radius: 0 !important;
  font-size: 1em !important;
}
.cat-label::before,
.entry-category::before {
  content: "CAT: ";
}

/* 日付を右側に押しやる */
.post-date,
.post-update {
  margin-left: auto !important; 
}


/* --- 4. タイトル --- */
.card-title,
.entry-card-title,
.related-entry-card-title {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  font-size: 1.1em !important;
  font-weight: bold !important;
  line-height: 1.4 !important;
  letter-spacing: 1px !important;
  color: inherit !important;
}


/* --- 5. 概要テキスト --- */
.card-snippet,
.entry-card-snippet,
.related-entry-card-snippet {
  font-size: 0.8em !important;
  color: #555555 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important; /* 2行で「...」と省略 */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}


/* --- 6. スマホ用レイアウト調整 --- */
@media (max-width: 600px) {

  .related-entry-card-wrap,
  .widget-entry-card,
  .popular-entry-card,
  .new-entry-card {
    padding: 10px 0 !important;
  }
  .card-thumb {
    width: 80px !important;
    min-width: 80px !important;
    border-right: none !important;
    margin-right: 15px !important;
  }
  .card-content {
    padding: 0 !important;
  }
  .card-meta {
    flex-wrap: wrap !important;
  }
  .post-date,
  .post-update {
    margin-left: 0 !important; /* スマホでは右寄せ解除 */
  }
}

/* カテゴリバッジの装飾を消してテキスト化 */
.entry-category {
  background: none !important;
  color: inherit !important;
  padding: 0 !important;
  margin-right: 15px !important;
  font-weight: normal !important;
  border-radius: 0 !important;
}
.entry-category::before {
  content: "CAT: ";
}

/* 日付を右寄せ */
.post-date {
  margin-left: auto !important; 
}


/* --- 4. タイトル --- */
h2.entry-card-title,
h3.entry-card-title {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  font-size: 1.1em !important;
  font-weight: bold !important;
  line-height: 1.4 !important;
  letter-spacing: 1px !important;
  color: inherit !important;
}


/* --- 5. 概要テキスト --- */
.entry-card-snippet {
  font-size: 0.8em !important;
  color: #555555 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important; /* 2行で省略 */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.entry-card-wrap.a-wrap:hover .entry-card-snippet {
  color: #cccccc !important;
}


/* --- 6. スマホ用レイアウト調整 --- */
@media (max-width: 600px) {
  .entry-card-wrap.a-wrap {
    padding: 10px 0 !important;
  }
  .entry-card-thumb {
    width: 80px !important;
    border-right: none !important;
    margin-right: 15px !important;
  }
  .entry-card-content {
    padding: 0 !important;
  }
  .entry-card-meta {
    flex-wrap: wrap !important;
  }
  .post-date {
    margin-left: 0 !important;
  }
}