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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/* 一覧カードのサムネイル比率調整(2026-07-19)
   デフォルトの thumb-wide(16:9, 320x180) だと画像の縦幅が狭く、
   タイトル・抜粋に対して画像の存在感が乏しいため、4:3(320x240)へ変更。
   width/height/object-fit/flex等は一切変更せず、Cocoon側が用意している
   --card-ratio カスタムプロパティの値だけを上書きする最小限の変更。 */
.thumb-wide {
  --card-ratio: 4 / 3;
}

/* サイドバー(人気記事/新着記事)専用タイトル冒頭の【タグ】を目立たせる(2026-08-02)
   font-weightのみだと視認性が弱いため、少しだけ文字サイズも上げる。
   abf_wrap_sidebar_tag()(functions.php)が【タグ】部分だけをこのクラスで囲む。 */
.abf-sidebar-tag {
  font-weight: bold;
  font-size: 1.08em;
}

/************************************
** サイト全体デザイン(暖色ベージュ系、2026-08-03)
   ユーザー提供の参考イメージ(templates/理想デザイン.png)・ロゴ
   (templates/Favori Icom.png)から実際に色を抽出して色数値を決定した。
   Cocoon本体のCSSは一切変更せず、この子テーマCSSで上書きするだけ
   (wp-adminのスキン設定等は使わない)。
************************************/
:root {
  --favori-cream: #F7F3EC;       /* ページ全体の背景 */
  --favori-cream-light: #FCF9F4; /* カード・ヘッダー下段の背景(ロゴの背景色と同じ) */
  --favori-taupe: #C2B9B0;       /* ヘッダー上段(キャッチコピー帯) */
  --favori-taupe-dark: #A89A8C;  /* 罫線・二次的なベージュ */
  --favori-accent: #C08966;      /* テラコッタ系アクセント(リンク・ボタン・ランキング番号) */
  --favori-accent-dark: #A66F4F; /* アクセントのhover色 */
  --favori-text: #3D3B38;        /* 本文・見出しの濃いグレー系文字色 */
  --favori-sage: #9CAA96;        /* ロゴの葉の色(セージグリーン)、カテゴリラベル等に使用 */
}

/* ページ全体の背景を温かみのあるクリーム色に */
body {
  background-color: var(--favori-cream);
}

/* ヘッダー(2026-08-03改訂): 「タウペの帯」+「ロゴを後から貼り付けた」ような
   2ブロック構成だと浮いて見えるという指摘を受け、帯とロゴを1枚の連続した
   グラデーションにまとめ、ロゴがその帯の中から生まれたように見せる。
   タウペ→クリームへなめらかに変化する背景の「途中」にロゴを半分めり込ませて
   配置することで、帯とロゴを一体化させる。

   2026-08-03再修正: 変更が反映されないという報告を受け再調査した結果、
   Cocoonの適用中スキン(natural-green)が内側の#header要素(class="header")へ
   直接 background-color:#86cfcf(水色)を指定しており、これが外側の
   #header-containerの背景の手前に描画されて隠していたことが判明した。
   #header-containerだけでなく#header自体もIDセレクタで明示的に上書きする
   (クラスセレクタのスキンより優先させる)。 */
#header-container,
#header {
  background: linear-gradient(
    to bottom,
    var(--favori-taupe) 0%,
    var(--favori-taupe) 15%,
    var(--favori-cream-light) 62%,
    var(--favori-cream-light) 100%
  ) !important;
  padding-bottom: 8px;
}
.tagline {
  /* 2026-08-03: 背景のタウペ(#C2B9B0)は明るい色のため白文字だとコントラストが
     低く読みにくかった。濃い文字色+太字+やや大きめのサイズに変更する。 */
  margin: 0;
  padding: 14px 0 0;
  color: var(--favori-text) !important;
  text-align: center;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.logo-header {
  margin: 0;
  /* ロゴの上半分がタウペ側、下半分がクリーム側の境目にかかるように配置する */
  padding: 18px 0 26px;
  text-align: center;
}
/* テキストロゴを円形バッジ画像に差し替える(background-imageで表示し、
   元のテキストはtext-indentで視覚的にのみ隠す。スクリーンリーダー・SEO向けの
   テキスト自体は残すため、display:noneではなくこの方式にする)。
   border-radius:50%で正円に切り抜き、帯と同系色の縁取り+影を付けることで
   「背景の帯からロゴが生まれた」ような一体感を出す(単なる貼り付けに見えない
   ようにするのが目的)。 */
.logo-header .site-name-text-link {
  display: inline-block;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background-image: url('https://202607152106dby4kb8j.conohawing.com/wp-content/uploads/2026/08/favori-logo.png');
  background-size: cover;
  background-position: center;
  border: 6px solid var(--favori-cream-light);
  box-shadow:
    0 0 0 3px var(--favori-taupe),
    0 8px 18px rgba(61, 59, 56, 0.22);
}
.logo-header .site-name-text {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-indent: -9999px;
}

/* ナビゲーションメニュー */
#navi {
  background: #ffffff;
  border-bottom: 1px solid #eee;
}
#navi .item-label {
  color: var(--favori-text);
  font-weight: 600;
}
#navi .menu-item > a:hover .item-label {
  color: var(--favori-accent);
}

/* 記事一覧カード: 角丸+ソフトシャドウでやわらかい印象に */
.entry-card-wrap {
  background: var(--favori-cream-light);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(61, 59, 56, 0.08);
  border: none;
  overflow: hidden;
}
.entry-card-title {
  color: var(--favori-text);
}

/* サイドバーウィジェット共通(検索ボックス・見出し) */
.widget-title {
  color: var(--favori-text);
  border-bottom: 2px solid var(--favori-accent);
  padding-bottom: 8px;
}
.wp-block-search__input {
  border-color: var(--favori-taupe-dark);
  border-radius: 6px 0 0 6px;
}
.wp-block-search__button {
  background: var(--favori-text);
  border-color: var(--favori-text);
  color: #ffffff;
  border-radius: 0 6px 6px 0;
}

/* サイドバー(人気記事/新着記事)カードのランキングバッジ(2026-08-03改訂)。
   「茶色い丸に数字だけだと見づらい・順位感が無い」という指摘を受け、
   1〜3位を金・銀・銅のリボン(旗)型バッジへ変更した。丸ではなく下端が
   尖ったリボン形状(clip-path)にすることで「順位・賞」らしい見た目にし、
   4位以降は控えめな色のリボンで区別する。Cocoon標準の「ランキング番号を
   表示する」ウィジェット設定には依存せず、CSSカウンターのみで実現する
   (人気記事・新着記事どちらのウィジェットでも共通で効く)。 */
.popular-entry-cards,
.new-entry-cards {
  counter-reset: favori-rank;
}
.popular-entry-card-link,
.new-entry-card-link {
  counter-increment: favori-rank;
  position: relative;
}
.popular-entry-card-link::before,
.new-entry-card-link::before {
  content: counter(favori-rank);
  position: absolute;
  top: -4px;
  left: 0;
  width: 26px;
  height: 34px;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%);
  background: linear-gradient(160deg, #cbbdae, #9c9186);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 24px;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
/* 1位=金 */
.popular-entry-card-link:nth-of-type(1)::before,
.new-entry-card-link:nth-of-type(1)::before {
  background: linear-gradient(160deg, #f8e08e, #c99a2e);
}
/* 2位=銀 */
.popular-entry-card-link:nth-of-type(2)::before,
.new-entry-card-link:nth-of-type(2)::before {
  background: linear-gradient(160deg, #ededed, #a8a8a8);
}
/* 3位=銅 */
.popular-entry-card-link:nth-of-type(3)::before,
.new-entry-card-link:nth-of-type(3)::before {
  background: linear-gradient(160deg, #e6b17e, #a9672c);
}

/* リンク・アクセントカラー */
a {
  color: var(--favori-accent);
}
a:hover {
  color: var(--favori-accent-dark);
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  .logo-header .site-name-text-link {
    width: 150px;
    height: 150px;
  }
}

/*480px以下*/
@media screen and (max-width: 480px){
  .logo-header .site-name-text-link {
    width: 120px;
    height: 120px;
  }
}
