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

/* =========================
 記事下（ボトム）のSNSシェア全体を左寄せ
 =========================*/
.sns-share.ss-bottom {
  text-align: left;
}

/* ボタン群の左寄せ（環境差に備えて複数指定） */
.sns-share.ss-bottom .sns-share-buttons,
.sns-share.ss-bottom .share-buttons,
.sns-share.ss-bottom ul {
  justify-content: flex-start !important;
  text-align: left;
  margin-left: 0;
}

/* シェアメッセージも左寄せしたい場合 */
.sns-share.ss-bottom .sns-share-message {
  text-align: left !important;
}

/* =========================
   Cocoon SNSボタンを全て「ロゴだけ」にする
   （シェアボタン / フォローボタン共通）
========================= */

/* 文字キャプションを消す（クラス差分対策込み） */
.sns-share .button-caption,
.sns-share .social-caption,
.sns-follow .button-caption,
.sns-follow .social-caption {
  display: none !important;
}

/* 一部スキンで span 直書きされる場合の保険（件数表示は残す） */
.sns-share a > span:last-child:not(.share-count),
.sns-follow a > span:last-child {
  display: none !important;
}

/* アイコンだけになった時の中央寄せ */
.sns-share li a,
.sns-follow li a,
.sns-share a,
.sns-follow a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
}

/* アイコン周りの余白を少し整える */
.sns-share .social-icon,
.sns-follow .social-icon {
  margin: 0 !important;
}

/* =====================================
   EASOBI 表示まとめ（最終版）
   - 固定ページ：.easobi-grid を 5列 (grid)
   - カテゴリ：.ect-3-columns を 5列 (width 19%)
   - 共通：画像そのものに太めグレー枠
   - カテゴリ：高さ揃え（タイトル2行固定 + 余計な情報非表示）
   - カテゴリ：タイトルを太字にしない + 1段階小さく
   - 固定ページ：画像比率はカテゴリと同じ 4:3（高さを揃える）
===================================== */


/* -------------------------------------
   1) 固定ページ（.easobi-grid）列数
------------------------------------- */
.page .easobi-grid{
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

@media (max-width: 1023px){
  .page .easobi-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
}

@media (max-width: 767px){
  .page .easobi-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}


/* -------------------------------------
   2) カテゴリ（.ect-3-columns）列数
------------------------------------- */
.ect-3-columns .entry-card-wrap,
.ect-3-columns .ad-area{
  width: 19% !important; /* 5列 */
  box-sizing: border-box;
  margin-bottom: 12px;
}

@media (max-width: 1023px){
  .ect-3-columns .entry-card-wrap,
  .ect-3-columns .ad-area{
    width: 32% !important; /* 3列 */
  }
}

@media (max-width: 767px){
  .ect-3-columns .entry-card-wrap,
  .ect-3-columns .ad-area{
    width: 49% !important; /* 2列 */
  }
}


/* -------------------------------------
   3) 共通：画像そのものに太めグレー枠
------------------------------------- */
.page .easobi-grid-thumb img,
.ect-3-columns .entry-card-thumb img{
  border: 3px solid #b5b5b5 !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  display: block !important;
}


/* -------------------------------------
   4) 固定ページ：画像比率を 4:3 に揃える
   （「正方形化」関連は全部撤去）
------------------------------------- */
.page .easobi-grid-thumb{
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
}

.page .easobi-grid-thumb img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}


/* -------------------------------------
   5) カテゴリ：高さを揃える（固定ページに寄せる）
------------------------------------- */

/* 余計な情報を消す（高さブレの原因） */
.ect-3-columns .entry-card-snippet,
.ect-3-columns .entry-card-meta,
.ect-3-columns .entry-card-info,
.ect-3-columns .post-date,
.ect-3-columns .cat-label,
.ect-3-columns .entry-categories,
.ect-3-columns .entry-comments,
.ect-3-columns .entry-tags{
  display: none !important;
}

/* タイトル：2行固定 + 太字なし + 1段階小さく */
.ect-3-columns .entry-card-title,
.ect-3-columns .entry-card-title a{
  font-weight: 400 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;

  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;

  min-height: calc(1.35em * 2) !important;
}

/* カード下の余白を詰める（高さ差を減らす） */
.ect-3-columns .entry-card-content{
  padding-bottom: 0 !important;
}

/* カテゴリ(.ect-3-columns)の画像高さを揃える（4:3固定 + cover） */
.ect-3-columns .entry-card-thumb {
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
}

/* 画像を枠いっぱいに */
.ect-3-columns .entry-card-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
/* =========================================
   Cocoon 関連記事をPCで8列表示する 完全版
   まず以前の関連記事CSSは削除してから使う
   ========================================= */

/* 一覧全体 */
#related-entries .related-entry-cards {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 1カード */
#related-entries .related-entry-card-wrap {
  box-sizing: border-box !important;
  width: calc((100% - 84px) / 8) !important;   /* 12px × 7 */
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  flex: 0 0 calc((100% - 84px) / 8) !important;
}

/* カード本体 */
#related-entries .related-entry-card-wrap .related-entry-card {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-decoration: none !important;
}

/* サムネイル枠 */
#related-entries .related-entry-card-thumb,
#related-entries .related-entry-card figure,
#related-entries .related-entry-card .eye-catch {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  background: #f5f5f5 !important;
}

/* 画像そのもの */
#related-entries .related-entry-card-thumb img,
#related-entries .related-entry-card figure img,
#related-entries .related-entry-card .eye-catch img,
#related-entries .related-entry-card img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* タイトルやメタ */
#related-entries .related-entry-card-content {
  display: block !important;
  padding: 8px 6px !important;
}

#related-entries .related-entry-card-title {
  display: block !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  margin: 0 0 4px !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* 抜粋を消してコンパクト化 */
#related-entries .related-entry-card-snippet {
  display: none !important;
}

/* 日付・投稿者など */
#related-entries .related-entry-card-date,
#related-entries .related-entry-card-author,
#related-entries .post-date,
#related-entries .post-author {
  font-size: 11px !important;
  line-height: 1.4 !important;
}

/* ラベルの位置崩れ防止 */
#related-entries .cat-label {
  z-index: 2 !important;
}

/* タブレット */
@media screen and (max-width: 1024px) {
  #related-entries .related-entry-card-wrap {
    width: calc((100% - 36px) / 4) !important; /* 12px × 3 */
    flex: 0 0 calc((100% - 36px) / 4) !important;
  }
}

/* スマホ */
@media screen and (max-width: 767px) {
  #related-entries .related-entry-card-wrap {
    width: calc((100% - 12px) / 2) !important; /* 12px × 1 */
    flex: 0 0 calc((100% - 12px) / 2) !important;
  }
}
/* 関連記事タイトルを1行で省略 */
#related-entries .related-entry-card-title,
#related-entries .entry-card-title,
#related-entries .related-entry-card-content .related-entry-card-title,
#related-entries .card-title {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.4 !important;
  min-height: 1.4em !important;
  max-height: 1.4em !important;
}
/* =========================================
   コメント欄デザイン 完成版
   ・ベース色は #C9C9C9
   ・「コメント」タイトル文字は白
   ・「返信」「コメントを返信」の文字は白
   ・返信ボタン/送信ボタンは黒ベース
   ・枠のつながりと余白を調整
   ========================================= */

/* コメント欄全体の余白 */
#comments,
.comments-area {
  margin-top: 36px !important;
}

/* コメント一覧全体の余計な上枠は消す */
.comment-list {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* コメントタイトル帯 */
.comment-title {
  margin: 0 !important;
  padding: 14px 20px !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
  font-weight: normal !important;
  color: #fff !important;
  background: #000 !important;
  border: 2px solid #000 !important;
  border-bottom: none !important;
  border-radius: 10px 10px 0 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
  letter-spacing: 0.08em !important;
}

/* タイトル前のアイコン */
.comment-title:before {
  font-family: FontAwesome;
  content: '\f27b';
  color: #fff !important;
  margin-right: 10px;
  font-size: 0.95em;
  vertical-align: middle;
}

/* コメント本文側の枠 */
.commets-list {
  border: 2px solid #000 !important;
  border-top: none !important;
  padding: 20px 20px 0 20px !important;
  margin: 0 !important;
  background: #fff !important;
}

/* 親コメント単位の区切り線 */
.commets-list > li {
  border-top: 2px dashed #E0E0E0 !important;
  margin: 30px 0 !important;
  padding-top: 20px !important;
}

.commets-list > li:first-child {
  border-top: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 返信コメントの左線 */
.commets-list .children {
  border-left: 2px solid #D6D6D6 !important;
  margin: 0 0 0 18px !important;
  padding-left: 18px !important;
}

/* アバター */
.commets-list .avatar {
  float: left !important;
  border-radius: 50% !important;
  margin-right: 10px !important;
}

/* コメント本文 */
.commets-list .comment-content {
  background: #E2E2E2 !important;
  padding: 8px 12px !important;
  margin: 10px 0 6px 0 !important;
  border-radius: 10px !important;
  position: relative !important;
}

/* 吹き出しの三角 */
.commets-list .comment-content::before {
  content: "" !important;
  position: absolute !important;
  top: -14px !important;
  left: 50px !important;
  border-style: solid !important;
  border-color: transparent transparent #E2E2E2 transparent !important;
  border-width: 0 20px 20px 0 !important;
}

/* 吹き出し内テキスト */
.commets-list .comment-content p {
  font-size: 14px !important;
  margin: 0.6em 0 !important;
  line-height: 1.6em !important;
}

/* 返信ボタン */
.commets-list .comment-reply-link {
  color: #fff !important;
  border: 1px solid #000 !important;
  border-radius: 20px !important;
  background: #000 !important;
  padding: 1px 12px !important;
  transition: 0.3s !important;
}

.commets-list .comment-reply-link:hover {
  color: #fff !important;
  background: #333 !important;
  border-color: #333 !important;
}

/* 下余白の調整 */
.commets-list .comment-body {
  margin-bottom: 0 !important;
}

/* コメント送信ボタン */
#respond input[type="submit"],
#respond .submit,
.comment-form input[type="submit"],
.comment-form .submit,
#submit {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #000 !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
}

/* 送信ボタンのホバー */
#respond input[type="submit"]:hover,
#respond .submit:hover,
.comment-form input[type="submit"]:hover,
.comment-form .submit:hover,
#submit:hover {
  background: #333 !important;
  color: #fff !important;
  border-color: #333 !important;
}

/* 「コメントを返信」見出しなど、返信フォーム周辺 */
#respond h3,
#respond .comment-reply-title,
.comment-respond .comment-reply-title,
#reply-title,
#reply-title a,
#cancel-comment-reply-link {
  color: #fff !important;
}

/* スマホ */
@media screen and (max-width: 767px) {
  #comments,
  .comments-area {
    margin-top: 28px !important;
  }

  .comment-title {
    font-size: 20px !important;
    padding: 12px 14px !important;
  }

  .commets-list {
    padding: 14px 14px 0 14px !important;
  }
}

/* =========================================
 固定ページの日付非表示
   ========================================= */
.page .date-tags {
display: none;
}