/*
Theme Name: Cocoon Child — オトコの家族白書
Template:   cocoon-master
Version:    1.1.0
Description: オトコの家族白書 カスタムデザイン（ネイビー×オレンジ）
*/

/* ============================================================
   カラー変数
   ============================================================ */
:root {
  --brand-navy:   #1a3a5c;
  --brand-orange: #f5a623;
  --brand-light:  #f0f5fb;
  --text-main:    #2d2d2d;
  --text-sub:     #5a6a7a;
  --bg-body:      #f7f9fb;
  --radius-md:    10px;
  --radius-lg:    14px;
  --shadow-sm:    0 2px 8px rgba(26,58,92,.08);
  --shadow-md:    0 4px 16px rgba(26,58,92,.12);
}

/* ============================================================
   全体・ボディ
   ============================================================ */
body {
  background: var(--bg-body) !important;
  color: var(--text-main) !important;
  font-family: &amp;#039;Hiragino Kaku Gothic ProN&amp;#039;, &amp;#039;Hiragino Sans&amp;#039;, &amp;#039;BIZ UDPGothic&amp;#039;, Meiryo, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  line-height: 1.85 !important;
}

/* ============================================================
   ヘッダー
   ============================================================ */
#header {
  background: var(--brand-navy) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.18) !important;
}
#header .header-logo-text a,
#header .site-name-text {
  color: #fff !important;
  font-weight: bold;
  letter-spacing: .5px;
}
#header .tagline,
#header .header-description {
  color: rgba(255,255,255,.65) !important;
  font-size: 12px !important;
}

/* ============================================================
   グローバルナビ
   ============================================================ */
#navi .navi-in &amp;gt; ul &amp;gt; li &amp;gt; a {
  color: rgba(255,255,255,.88) !important;
  font-weight: 500;
  transition: background .2s;
}
#navi .navi-in &amp;gt; ul &amp;gt; li:hover &amp;gt; a,
#navi .navi-in &amp;gt; ul &amp;gt; li.current-menu-item &amp;gt; a {
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  border-radius: 4px;
}

/* ============================================================
   記事コンテナ
   ============================================================ */
.entry-content,
.article-body {
  font-size: 16px !important;
  line-height: 1.9 !important;
  color: var(--text-main) !important;
}
.article {
  background: #fff !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 36px 40px !important;
}
@media (max-width: 768px) {
  .article {
    padding: 20px 16px !important;
    border-radius: 0 !important;
  }
}

/* リード文（最初の段落）を少し大きく */
.article .entry-content &amp;gt; p:first-of-type,
.article-body &amp;gt; p:first-child {
  font-size: 17px !important;
  line-height: 1.85;
  color: #3a4a5a;
}

/* ============================================================
   記事見出し H2 / H3 / H4
   ============================================================ */
.article h2,
.entry-content h2 {
  background: linear-gradient(90deg, #e8f0f8 0%, transparent 100%) !important;
  border-left: 5px solid var(--brand-orange) !important;
  color: var(--brand-navy) !important;
  padding: 12px 18px !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  font-size: 21px !important;
  margin: 40px 0 18px !important;
  font-weight: bold;
}
.article h3,
.entry-content h3 {
  color: var(--brand-navy) !important;
  border-bottom: 2px solid #d0dce8 !important;
  border-left: none !important;
  background: none !important;
  padding: 6px 0 8px 0 !important;
  font-size: 17px !important;
  margin: 32px 0 14px !important;
  font-weight: bold;
}
.article h4,
.entry-content h4 {
  color: var(--text-main) !important;
  font-size: 15px !important;
  font-weight: bold;
  margin: 20px 0 8px !important;
  padding-left: 12px;
  border-left: 3px solid var(--brand-orange);
}

/* ============================================================
   段落・リスト
   ============================================================ */
.entry-content p {
  margin-bottom: 1.4em;
}
.entry-content ul,
.entry-content ol {
  padding-left: 1.6em;
  margin: 1em 0 1.4em;
}
.entry-content li {
  margin-bottom: .5em;
  line-height: 1.8;
}
.entry-content ul li::marker {
  color: var(--brand-orange);
}

/* ============================================================
   テーブル
   ============================================================ */
.entry-content table,
.article table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 24px 0 28px !important;
  font-size: 14px !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  box-shadow: var(--shadow-sm) !important;
}
.entry-content table th,
.article table th {
  background: var(--brand-navy) !important;
  color: #fff !important;
  padding: 10px 14px !important;
  text-align: left !important;
  font-weight: bold !important;
  white-space: nowrap;
}
.entry-content table td,
.article table td {
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2eaf2 !important;
  vertical-align: top;
  background: #fff;
}
.entry-content table tr:nth-child(even) td,
.article table tr:nth-child(even) td {
  background: #f5f8fc !important;
}
.entry-content table tr:last-child td {
  border-bottom: none !important;
}
@media (max-width: 600px) {
  .entry-content table,
  .article table {
    font-size: 13px !important;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   ショートコード カスタムボックス（子テーマ実装）
   ============================================================ */
.sc-box {
  border-radius: var(--radius-md);
  margin: 28px 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sc-box-title {
  padding: 9px 18px;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: .3px;
}
.sc-box-content {
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.8;
}
.sc-box-content &amp;gt; *:first-child { margin-top: 0 !important; }
.sc-box-content &amp;gt; *:last-child  { margin-bottom: 0 !important; }

/* [memo] — 情報ボックス（青） */
.sc-memo {
  border: 1px solid #90caf9;
}
.sc-memo .sc-box-title {
  background: #1e88e5;
  color: #fff;
}
.sc-memo .sc-box-content {
  background: #e3f2fd;
}

/* [alert] — 警告ボックス（オレンジ） */
.sc-alert {
  border: 1px solid #ffb74d;
}
.sc-alert .sc-box-title {
  background: #fb8c00;
  color: #fff;
}
.sc-alert .sc-box-content {
  background: #fff8e1;
}

/* [box class=&amp;quot;box-green&amp;quot;] — ポイントボックス（ネイビー/グリーン） */
.sc-box-type {
  border: 1px solid #90a4ae;
}
.sc-box-type .sc-box-content {
  background: #eceff1;
}
.sc-box-type.box-green {
  border: 1px solid #a5c8f0;
}
.sc-box-type.box-green .sc-box-content {
  background: var(--brand-light);
  border-left: 4px solid var(--brand-navy);
}

/* [checklist] — チェックリストボックス（緑） */
.sc-checklist {
  border: 1px solid #a5d6a7;
}
.sc-checklist .sc-box-content {
  background: #e8f5e9;
}
.sc-checklist .sc-box-content ul {
  list-style: none !important;
  padding-left: 0 !important;
}
.sc-checklist .sc-box-content ul li::before {
  content: &amp;quot;✅ &amp;quot;;
  margin-right: 4px;
}

/* ============================================================
   アフィリエイト CTAボックス
   ============================================================ */
.af-box {
  position: relative;
  border: 2px solid var(--brand-orange);
  border-radius: var(--radius-lg);
  padding: 28px 24px 36px;
  margin: 40px 0;
  background: linear-gradient(135deg, #fffcf5 0%, #ffffff 100%);
  text-align: center;
  box-shadow: 0 4px 20px rgba(245,166,35,.15);
}
.af-box.af-blue {
  border-color: var(--brand-navy);
  background: linear-gradient(135deg, #f0f5fb 0%, #ffffff 100%);
  box-shadow: 0 4px 20px rgba(26,58,92,.1);
}
.af-box .af-label {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 9px;
  color: #bbb;
  font-weight: normal;
  letter-spacing: 0.5px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  margin-bottom: 0;
}
.af-box.af-blue .af-label {
  color: #bbb;
}
.af-box .af-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--brand-navy);
  margin: 0 0 10px;
}
.af-box .af-desc {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 22px;
  line-height: 1.8;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.af-box .af-btn {
  display: inline-block;
  background: var(--brand-orange);
  color: #fff !important;
  font-weight: bold;
  font-size: 15px;
  padding: 14px 44px;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(245,166,35,.5);
  transition: all .25s ease;
  letter-spacing: .5px;
}
.af-box .af-btn:hover {
  background: #e09410;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245,166,35,.55);
}
.af-box.af-blue .af-btn {
  background: var(--brand-navy);
  box-shadow: 0 4px 14px rgba(26,58,92,.35);
}
.af-box.af-blue .af-btn:hover {
  background: #122a44;
  box-shadow: 0 6px 18px rgba(26,58,92,.4);
}

/* ============================================================
   目次 (Cocoon内蔵)
   ============================================================ */
.toc-title,
#toc_container .toc_title {
  background: var(--brand-navy) !important;
  color: #fff !important;
  font-weight: bold;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 10px 18px !important;
}
#toc_container,
.toc {
  background: var(--brand-light) !important;
  border: 1px solid #c0d5ea !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  margin: 28px 0 !important;
}
#toc_container ul,
.toc ul {
  padding: 14px 18px 14px 32px !important;
  margin: 0 !important;
}
#toc_container a,
.toc a {
  color: var(--brand-navy) !important;
  text-decoration: none;
  font-size: 14px;
}
#toc_container a:hover,
.toc a:hover {
  color: var(--brand-orange) !important;
  text-decoration: underline;
}

/* ============================================================
   記事メタ（投稿日・更新日・カテゴリ）
   ============================================================ */
.post-date,
.date,
.entry-date,
.meta-date {
  color: var(--text-sub) !important;
  font-size: 13px !important;
}
.post-categories a,
.category-link,
.cat-label {
  background: var(--brand-navy) !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 2px 10px !important;
  font-size: 12px !important;
  text-decoration: none !important;
}

/* ============================================================
   サイドバー アフィリエイトウィジェット
   ============================================================ */
.widget.af-widget {
  border: 2px solid var(--brand-orange);
  border-radius: var(--radius-md);
  padding: 20px;
  background: linear-gradient(135deg, #fffcf5, #fff);
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.widget.af-widget .widget-title {
  font-size: 13px;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--brand-orange);
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-weight: bold;
}
.widget.af-widget .af-widget-btn {
  display: block;
  background: var(--brand-orange);
  color: #fff !important;
  font-size: 13px;
  font-weight: bold;
  padding: 10px;
  border-radius: 50px;
  text-decoration: none !important;
  text-align: center;
  margin-top: 10px;
  transition: background .2s;
}
.widget.af-widget .af-widget-btn:hover {
  background: #e09410;
}

/* サイドバー 通常ウィジェット */
#sidebar .widget {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
#sidebar .widget-title {
  font-size: 15px;
  font-weight: bold;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--brand-orange);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

/* ============================================================
   記事カード（一覧・関連記事）
   ============================================================ */
.a-wrap,
.card,
.post-list-thumb {
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  transition: transform .22s ease, box-shadow .22s ease !important;
  box-shadow: var(--shadow-sm) !important;
  background: #fff !important;
}
.a-wrap:hover,
.card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-md) !important;
}
.a-wrap .card-title,
.card .card-title {
  color: var(--text-main) !important;
  font-weight: bold;
  font-size: 15px;
  line-height: 1.6;
}

/* ============================================================
   パンくずリスト
   ============================================================ */
#breadcrumb,
.breadcrumb {
  font-size: 12px !important;
  color: var(--text-sub) !important;
  padding: 10px 4px !important;
}
#breadcrumb a,
.breadcrumb a {
  color: var(--brand-navy) !important;
}
#breadcrumb a:hover,
.breadcrumb a:hover {
  color: var(--brand-orange) !important;
}

/* ============================================================
   ページネーション
   ============================================================ */
.pagination a,
.page-numbers {
  border-radius: 6px !important;
  border: 1px solid #d0dce8 !important;
  color: var(--brand-navy) !important;
}
.pagination .current,
.page-numbers.current {
  background: var(--brand-navy) !important;
  color: #fff !important;
  border-color: var(--brand-navy) !important;
}

/* ============================================================
   ボタン・CTA（Cocoon標準ボタン上書き）
   ============================================================ */
.btn-wrap a,
.btn,
.wp-block-button__link {
  background: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
  border-radius: 50px !important;
  font-weight: bold !important;
  transition: all .2s !important;
}
.btn-wrap a:hover,
.btn:hover {
  background: #e09410 !important;
  transform: translateY(-1px);
}

/* ============================================================
   フッター
   ============================================================ */
#footer {
  background: var(--brand-navy) !important;
  color: rgba(255,255,255,.72) !important;
  margin-top: 60px !important;
}
#footer a {
  color: rgba(255,255,255,.8) !important;
}
#footer a:hover {
  color: var(--brand-orange) !important;
}
.footer-copyright {
  font-size: 12px !important;
  color: rgba(255,255,255,.5) !important;
}

/* ============================================================
   リンクスタイル
   ============================================================ */
.entry-content a:not(.af-btn):not(.btn) {
  color: #1565c0 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.entry-content a:not(.af-btn):not(.btn):hover {
  color: var(--brand-orange) !important;
}

/* ============================================================
   strong / b の強調
   ============================================================ */
.entry-content strong,
.entry-content b {
  color: var(--brand-navy);
  font-weight: bold;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 768px) {
  .article h2,
  .entry-content h2 {
    font-size: 18px !important;
    padding: 10px 14px !important;
  }
  .article h3,
  .entry-content h3 {
    font-size: 16px !important;
  }
  .af-box {
    padding: 22px 16px 32px;
  }
  .af-box .af-btn {
    font-size: 14px;
    padding: 12px 28px;
  }
  .sc-box-content {
    padding: 14px 16px;
    font-size: 14px;
  }
  .entry-content &amp;gt; p:first-of-type {
    font-size: 15px !important;
  }
}

/* ============================================================
   サイト名（視認性強化）
   ============================================================ */
.site-name-text,
#header .site-name-text,
h1.logo-text .site-name-text,
.logo-text .site-name-text,
.logo .site-name-text {
  color: #fff !important;
  font-size: 28px !important;
  font-weight: bold !important;
  letter-spacing: .06em !important;
  text-shadow: 0 1px 6px rgba(0,0,0,.45) !important;
  line-height: 1.25 !important;
}
h1.logo-header,
h1.logo-text {
  margin: 0 !important;
  padding: 16px 0 !important;
}
.header-in {
  padding: 0 20px !important;
}

/* ============================================================
   固定ページ（プライバシーポリシー等）
   ============================================================ */
.page-template-default .article,
.page .article {
  max-width: 860px;
}
.page-template-default .entry-content table th {
  width: 180px;
  white-space: nowrap;
}

/* ============================================================
   フッターナビ（ポリシーリンク）
   ============================================================ */
#footer-nav a,
.footer-nav a {
  color: rgba(255,255,255,.75) !important;
  font-size: 12px !important;
  margin: 0 8px !important;
}
#footer-nav a:hover,
.footer-nav a:hover {
  color: var(--brand-orange) !important;
}

/* ============================================================
   ナビゲーションバー背景色（追加 2026-05）
   ============================================================ */
#navi,
.navi {
  background-color: #1a3a5c !important;
  border-bottom: 2px solid #f5a623 !important;
}

/* ドロップダウンメニューの背景 */
#navi .navi-in &gt; ul &gt; li &gt; ul.sub-menu {
  background-color: #1a3a5c !important;
  border-top: 2px solid #f5a623 !important;
}
#navi .navi-in &gt; ul &gt; li &gt; ul.sub-menu li a {
  color: rgba(255,255,255,.88) !important;
  border-bottom: 1px solid rgba(255,255,255,.1) !important;
}
#navi .navi-in &gt; ul &gt; li &gt; ul.sub-menu li a:hover {
  background: rgba(245,166,35,.2) !important;
}

/* ============================================================
   ① ナビゲーション視認性改善
   ============================================================ */
/* リンクの余白・フォント強化 */
#navi .navi-in > ul > li > a {
  padding: 0 18px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
}
/* ホバー時のアクセントカラー強調 */
#navi .navi-in > ul > li:hover > a,
#navi .navi-in > ul > li.current-menu-item > a {
  background: rgba(245,166,35,.25) !important;
  color: #fff !important;
}

/* ============================================================
   ② サイドバーウィジェットタイトル統一スタイル
   ============================================================ */
.sidebar .widget-title,
.sidebar h2.wp-block-heading,
.sidebar .widgettitle {
  background: #1a3a5c !important;
  color: #fff !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 4px 4px 0 0 !important;
  margin: 0 0 12px !important;
  letter-spacing: 0.05em !important;
}
/* カテゴリーリンク */
.sidebar .wp-block-categories a,
.sidebar .cat-item a {
  color: #1a3a5c !important;
  font-size: 13px !important;
  text-decoration: none !important;
}
.sidebar .wp-block-categories a:hover,
.sidebar .cat-item a:hover {
  color: #f5a623 !important;
  text-decoration: underline !important;
}

/* ============================================================
   ③ フッタースタイル（充実化対応）
   ============================================================ */
#footer,
.footer {
  background: #1a3a5c !important;
  color: rgba(255,255,255,0.85) !important;
  padding: 40px 0 20px !important;
}
.footer .widget-title,
.footer h2.wp-block-heading,
.footer .widgettitle {
  color: #f5a623 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-bottom: 2px solid rgba(245,166,35,.4) !important;
  padding-bottom: 8px !important;
  margin-bottom: 14px !important;
  background: transparent !important;
  padding-top: 0 !important;
  border-radius: 0 !important;
}
.footer a {
  color: rgba(255,255,255,.8) !important;
  text-decoration: none !important;
}
.footer a:hover {
  color: #f5a623 !important;
}
.footer p, .footer li {
  color: rgba(255,255,255,.75) !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
}
/* フッターボトムバー */
#footer-bottom, .footer-bottom {
  background: #0e2340 !important;
  color: rgba(255,255,255,.5) !important;
  font-size: 12px !important;
  padding: 12px 0 !important;
  text-align: center !important;
  border-top: 1px solid rgba(255,255,255,.1) !important;
}

/* ============================================================
   ナビゲーションリンク色・サイズ最終修正（優先度最高）
   ============================================================ */
#navi .navi-in > ul > li > a,
#navi .navi-in > ul > li > a:link,
#navi .navi-in > ul > li > a:visited {
  color: rgba(255,255,255,0.92) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 0 18px !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
}
#navi .navi-in > ul > li:hover > a,
#navi .navi-in > ul > li.current-menu-item > a,
#navi .navi-in > ul > li.current-menu-ancestor > a {
  color: #fff !important;
  background: rgba(245,166,35,0.3) !important;
}

/* ============================================================
   カテゴリーナビゲーション（ホームページ記事一覧上部）
   ============================================================ */
.otoko-cat-nav {
  background: #f0f5fb;
  border: 1px solid #d0dff0;
  border-radius: 12px;
  padding: 24px 20px;
  margin: 0 0 32px;
}
.otoko-cat-nav__title {
  text-align: center;
  color: #1a3a5c !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  margin: 0 0 18px !important;
  letter-spacing: 0.05em !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.otoko-cat-nav__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.otoko-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 2px solid #1a3a5c;
  border-radius: 10px;
  padding: 14px 18px;
  text-decoration: none !important;
  color: #1a3a5c !important;
  min-width: 110px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(26,58,92,.08);
}
.otoko-cat-btn:hover {
  background: #1a3a5c;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,58,92,.2);
}
.otoko-cat-btn__emoji {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
}
.otoko-cat-btn__name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
}
.otoko-cat-btn__count {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.otoko-cat-btn:hover .otoko-cat-btn__count {
  color: rgba(255,255,255,.7);
}
/* モバイル */
@media (max-width: 600px) {
  .otoko-cat-nav__grid { gap: 8px; }
  .otoko-cat-btn { min-width: 90px; padding: 10px 12px; }
  .otoko-cat-btn__emoji { font-size: 22px; }
}