@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
*/
/* ============================================================
   ツールの本音 — カスタムCSS v2
   横展開設計：CSS カスタムプロパティで色・フォントを一元管理
   最終更新：2026-03-29
   ============================================================ */

/* ------------------------------------------------------------
   横展開用 CSS カスタムプロパティ
   新ブログを作る際はここを変えるだけでベーススタイルが適用される
   ------------------------------------------------------------ */
:root {
  /* カラー */
  --primary:        #1e3a5f;
  --primary-dark:   #152b47;
  --primary-light:  #2a4f7a;
  --accent:         #e84545;
  --bg:             #f8f9fa;
  --content-bg:     #ffffff;
  --text:           #333333;
  --subtext:        #6c757d;
  --border:         #dee2e6;

  /* フォント */
  --heading-font: 'Noto Serif JP', serif;
  --body-font:    'Noto Sans JP', sans-serif;
}

/* ------------------------------------------------------------
   Google Fonts
   ------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Serif+JP:wght@400;700&display=swap');

/* ------------------------------------------------------------
   ベース
   ------------------------------------------------------------ */
body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
}

/* ------------------------------------------------------------
   ヘッダー（上段：ロゴ・サイト名・タグライン）
   ------------------------------------------------------------ */
#header,
.header {
  background-color: var(--primary) !important;
  padding: 0.35em 0 !important;
}

#header a,
.header a {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* サイト名 */
#header .site-name,
.header .site-name,
#header .site-name-text,
.header .site-name-text {
  font-family: var(--heading-font) !important;
  font-size: 1em !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

/* タグライン（キャッチコピー） */
#header .tagline,
.header .tagline {
  font-family: var(--body-font) !important;
  font-size: 0.72em !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-top: 0.15em;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   カテゴリナビ（下段：ヘッダー直下のナビゲーションバー）
   ------------------------------------------------------------ */
#navi,
.navi {
  background-color: var(--primary-dark) !important;
  border-top: 3px solid var(--accent) !important;
  border-bottom: none !important;
}

#navi .navi-in,
.navi .navi-in {
  max-width: 100%;
}

#navi .navi-in > ul,
.navi .navi-in > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

#navi .navi-in > ul > li,
.navi .navi-in > ul > li {
  display: flex;
  align-items: center;
}

#navi .navi-in > ul > li > a,
.navi .navi-in > ul > li > a {
  font-family: var(--body-font) !important;
  font-size: 0.75em !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  letter-spacing: 0.03em;
  padding: 0.4em 1em !important;
  display: flex !important;
  align-items: center !important;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.15s, color 0.15s;
}

#navi .navi-in > ul > li > a:hover,
.navi .navi-in > ul > li > a:hover,
#navi .navi-in > ul > li.current-menu-item > a,
.navi .navi-in > ul > li.current-menu-item > a,
#navi .navi-in > ul > li.current-menu-ancestor > a {
  background-color: rgba(255, 255, 255, 0.13) !important;
  color: #ffffff !important;
}

/* ------------------------------------------------------------
   記事コンテンツ
   ------------------------------------------------------------ */
.entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

/* H2 見出し — Serif + 左ボーダー */
.entry-content h2 {
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  border-bottom: 1px solid var(--border);
  padding: 0.4em 0 0.4em 0.75em;
  margin: 2em 0 1em;
  background: none;
  line-height: 1.5;
}

/* H3 見出し — Serif + 下線 */
.entry-content h3 {
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.3em;
  margin: 1.75em 0 0.75em;
  line-height: 1.5;
}

/* H4 見出し — Sans（可読性重視） */
.entry-content h4 {
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5em 0 0.5em;
}

/* リンク */
.entry-content a {
  color: var(--primary);
  text-decoration: underline;
}

.entry-content a:hover {
  color: var(--accent);
}

/* 強調 */
.entry-content strong {
  color: var(--primary);
}

/* ------------------------------------------------------------
   比較テーブル
   ------------------------------------------------------------ */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.entry-content th,
.entry-content td {
  padding: 0.75em 1em;
  border: 1px solid var(--border);
  vertical-align: middle;
  font-size: 15px;
}

.entry-content th {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-align: left;
}

.entry-content tr:nth-child(even) td {
  background-color: var(--bg);
}

/* ------------------------------------------------------------
   引用（blockquote）
   ------------------------------------------------------------ */
.entry-content blockquote {
  border-left: 4px solid var(--border);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  background-color: var(--bg);
  color: var(--subtext);
  font-style: normal;
}

/* ------------------------------------------------------------
   情報ボックス（まとめ・注意）
   ------------------------------------------------------------ */
.info-box,
.summary-box {
  background-color: var(--bg);
  border-left: 4px solid var(--primary);
  padding: 1em 1.25em;
  margin: 1.5em 0;
  border-radius: 0;
}

.warning-box {
  background-color: #fff8f8;
  border-left: 4px solid var(--accent);
  padding: 1em 1.25em;
  margin: 1.5em 0;
  border-radius: 0;
}

/* ------------------------------------------------------------
   アフィリエイトCTAボタン
   ------------------------------------------------------------ */
.affiliate-cta {
  margin: 2em 0;
  padding: 1.5em;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 4px;
  text-align: center;
}

.affiliate-cta__label {
  margin: 0 0 0.75em;
  font-size: 0.875em;
  color: var(--subtext);
}

.affiliate-cta__button {
  display: inline-block;
  padding: 0.875em 2.5em;
  background: var(--primary);
  color: #ffffff !important;
  font-size: 1em;
  font-weight: 700;
  text-decoration: none !important;
  border-radius: 4px;
  transition: background 0.2s;
}

.affiliate-cta__button:hover {
  background: var(--primary-dark);
  color: #ffffff !important;
}

/* ------------------------------------------------------------
   アクセントバッジ・ラベル
   ------------------------------------------------------------ */
.badge-accent {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75em;
  font-weight: 700;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.4em;
}

/* ------------------------------------------------------------
   サイドバー — 全体
   ------------------------------------------------------------ */
.sidebar .widget,
#sidebar .widget {
  margin-bottom: 1.75em;
}

/* ウィジェットタイトル（クラシック + ブロック両対応） */
.sidebar .widget-title,
#sidebar .widget-title,
#sidebar .wp-block-heading,
.sidebar .wp-block-heading,
#sidebar .wp-block-group > .wp-block-group__inner-container > h2,
#sidebar .wp-block-group > div > h2 {
  font-family: var(--body-font) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  background-color: var(--primary) !important;
  padding: 0.5em 0.85em !important;
  margin: 0 0 0.85em !important;
  letter-spacing: 0.04em;
  border-left: 4px solid var(--accent) !important;
}

/* ------------------------------------------------------------
   サイドバー — プロフィール（著者情報ウィジェット）
   ------------------------------------------------------------ */
.sidebar .author-widget-box,
#sidebar .author-widget-box,
.sidebar .author-box,
#sidebar .author-box,
.sidebar .profile-widget,
#sidebar .profile-widget {
  background-color: var(--content-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 1.25em;
}

/* プロフィール名 */
.sidebar .author-widget-name,
#sidebar .author-widget-name {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1em;
  color: var(--primary);
  margin-bottom: 0.5em;
}

/* プロフィール説明 */
.sidebar .author-widget-description,
#sidebar .author-widget-description {
  font-size: 0.875em;
  color: var(--subtext);
  line-height: 1.7;
}

/* ------------------------------------------------------------
   サイドバー — 「このブログについて」ボックス
   .blog-about-box クラスを付けたカスタムHTMLウィジェットに適用
   ------------------------------------------------------------ */
.blog-about-box {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 1em 1.1em;
  font-size: 0.875em;
  color: var(--subtext);
  line-height: 1.75;
}

.blog-about-box strong {
  color: var(--primary);
  display: block;
  margin-bottom: 0.4em;
  font-size: 1em;
}

/* ------------------------------------------------------------
   サイドバー — カテゴリリスト
   ------------------------------------------------------------ */
.sidebar .cat-item,
#sidebar .cat-item {
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.sidebar .cat-item a,
#sidebar .cat-item a {
  display: block;
  padding: 0.5em 0.25em 0.5em 0.5em;
  color: var(--text) !important;
  font-size: 0.9em;
  font-weight: 700;
  text-decoration: none !important;
  transition: color 0.15s, padding-left 0.15s;
}

.sidebar .cat-item a:hover,
#sidebar .cat-item a:hover {
  color: var(--primary) !important;
  padding-left: 0.9em;
}

/* カテゴリ件数バッジ */
.sidebar .cat-item a .cat-count,
#sidebar .cat-item a .cat-count,
.sidebar .cat-item .cat-count,
#sidebar .cat-item .cat-count {
  float: right;
  font-size: 0.8em;
  color: var(--subtext);
  font-weight: 400;
}

/* ------------------------------------------------------------
   サイドバー — おすすめ記事ボックス
   ------------------------------------------------------------ */
.recommend-box {
  padding: 0.25em 0;
}

.recommend-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recommend-list li {
  border-bottom: 1px solid var(--border);
  padding: 0.6em 0;
}

.recommend-list li:last-child {
  border-bottom: none;
}

.recommend-list li a {
  font-size: 0.85em;
  color: var(--text) !important;
  text-decoration: none !important;
  line-height: 1.5;
  display: block;
  padding-left: 0.9em;
  position: relative;
}

.recommend-list li a::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.65em;
  top: 0.3em;
}

.recommend-list li a:hover {
  color: var(--primary) !important;
}

/* ------------------------------------------------------------
   記事カード — 白カード＋hover影
   ------------------------------------------------------------ */
.entry-card,
.card-entry {
  background: var(--content-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 4px !important;
  margin-bottom: 1.25em !important;
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.entry-card:hover,
.card-entry:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07) !important;
}

.entry-card .entry-card-title,
.card-entry .entry-card-title {
  font-size: 1em !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--text) !important;
}

/* ------------------------------------------------------------
   フッター
   ------------------------------------------------------------ */
#footer,
.footer {
  background-color: var(--primary) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

#footer a,
.footer a {
  color: rgba(255, 255, 255, 0.85) !important;
}

#footer a:hover,
.footer a:hover {
  color: #ffffff !important;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ------------------------------------------------------------
   モバイル対応
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  body {
    font-size: 15px;
  }

  .entry-content h2 {
    font-size: 18px;
  }

  .entry-content h3 {
    font-size: 16px;
  }

  .entry-content th,
  .entry-content td {
    font-size: 14px;
    padding: 0.5em 0.75em;
  }

  .affiliate-cta__button {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  /* モバイルではカテゴリナビを非表示（Cocoonのモバイルナビで代替） */
  #navi,
  .navi {
    display: none !important;
  }

  /* モバイルヘッダーを半分の高さに */
  #header,
  .header {
    padding: 0.15em 0 !important;
  }

  /* モバイル記事カード：floatリセット → 縦積みレイアウト */
  /* Cocoon はデスクトップで .entry-card-thumb を float:left するため、
     モバイルでは float を解除して縦積みに切り替える */
  .entry-card .entry-card-thumb,
  .card-entry .entry-card-thumb {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .entry-card .entry-card-thumb img,
  .card-entry .entry-card-thumb img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
  }
}
