/*
Theme Name:   AFFINGER6EX Child - fumy-s
Theme URI:    https://fumy-s.com
Description:  AFFINGER6EX 完全オリジナル子テーマ / fumy-s 専用カスタムデザイン
Author:       fumy-s
Author URI:   https://fumy-s.com
Template:     affinger
Version:      1.1.0
License:      GNU General Public License v2 or later
Text Domain:  fumy-s-child
*/

/* ============================================================
   CSS変数定義
   ============================================================ */
:root {
  --fs-ai:    #1A2744;
  --fs-kon:   #0D1B3E;
  --fs-fuji:  #3D5A80;
  --fs-nuri:  #7B4F3A;
  --fs-koke:  #2C4A3E;
  --fs-washi: #F4F0E8;
  --fs-cream: #FDFBF6;
  --fs-sumi:  #1C1C1C;
  --fs-gin:   #D0C8B8;
  --fs-gold:  #B8965A;
  --fs-gold2: #D4AE72;
}

/* ============================================================
   AFFINGER インラインスタイル打ち消し
   AFFINGERはstyle属性で色を直接出力するため
   CSSフィルターで強制上書きする
   ============================================================ */

/* ヘッダー全体 */
#header,
#header-in,
#site-header,
.site-header {
  background-color: var(--fs-kon) !important;
  border-bottom: 1px solid rgba(184,150,90,0.25) !important;
  box-shadow: none !important;
}

/* ヘッダー内のインラインbgを打ち消す */
#header [style*="background"],
#header-in [style*="background"] {
  background-color: var(--fs-kon) !important;
  background-image: none !important;
}

/* サイトロゴ */
#site-title,
#site-title a,
#site-title a:link,
#site-title a:visited {
  color: var(--fs-washi) !important;
  font-family: 'EB Garamond', serif !important;
  font-size: 22px !important;
  letter-spacing: 0.15em !important;
}

/* サイトキャッチフレーズ */
#site-description,
.site-description {
  color: rgba(244,240,232,0.4) !important;
  font-size: 11px !important;
  letter-spacing: 0.15em !important;
}

/* ============================================================
   グローバルナビ
   ============================================================ */
#navi,
#navi-in,
.navi-in,
#nav,
.global-nav {
  background-color: var(--fs-kon) !important;
}

#navi [style*="background"],
.navi-in [style*="background"] {
  background-color: var(--fs-kon) !important;
}

/* ナビリンク */
#navi .menu-content > li > a,
#nav .menu-content > li > a,
.navi-in > ul > li > a {
  color: rgba(244,240,232,0.75) !important;
  font-family: 'Shippori Mincho', serif !important;
  font-size: 13px !important;
  letter-spacing: 0.08em !important;
  background: transparent !important;
  transition: color 0.2s !important;
}

#navi .menu-content > li > a:hover,
.navi-in > ul > li > a:hover {
  color: var(--fs-washi) !important;
  background: transparent !important;
}

/* ドロップダウン */
#navi .menu-content .sub-menu,
.navi-in .sub-menu {
  background-color: var(--fs-ai) !important;
  border: 1px solid rgba(184,150,90,0.2) !important;
  box-shadow: 0 4px 20px rgba(13,27,62,0.3) !important;
}

#navi .menu-content .sub-menu a,
.navi-in .sub-menu a {
  color: rgba(244,240,232,0.7) !important;
  border-bottom: 1px solid rgba(184,150,90,0.1) !important;
  font-family: 'Shippori Mincho', serif !important;
  font-size: 12px !important;
}

#navi .menu-content .sub-menu a:hover,
.navi-in .sub-menu a:hover {
  background: rgba(184,150,90,0.1) !important;
  color: var(--fs-washi) !important;
}

/* ============================================================
   サイト背景・ラッパー
   ============================================================ */
body,
body.home,
body.single,
body.archive,
body.page {
  background-color: var(--fs-washi) !important;
  font-family: 'Noto Sans JP', sans-serif !important;
  font-size: 15px !important;
  line-height: 2 !important;
  color: var(--fs-sumi) !important;
}

#wrapper,
#contents,
#contents-in,
#main,
#main-contents,
.main-contents-in,
#container {
  background-color: var(--fs-washi) !important;
}

/* インラインbgを全て打ち消す（最重要） */
#wrapper [style*="background-color"],
#contents [style*="background-color"],
#main [style*="background-color"] {
  background-color: transparent !important;
}

/* ============================================================
   記事見出し h2 / h3 / h4
   ============================================================ */
.entry-content h2,
.article-content h2,
#main-contents h2 {
  font-family: 'Shippori Mincho', serif !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: var(--fs-ai) !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border-left: 3px solid var(--fs-gold) !important;
  border-bottom: 1px solid var(--fs-gin) !important;
  border-top: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding: 8px 0 12px 16px !important;
  margin: 48px 0 20px !important;
  letter-spacing: 0.04em !important;
  line-height: 1.55 !important;
  box-shadow: none !important;
}

/* AFFINGERのh2インライン color を打ち消す */
.entry-content h2[style],
.article-content h2[style] {
  color: var(--fs-ai) !important;
  background-color: transparent !important;
}

.entry-content h3,
.article-content h3,
#main-contents h3 {
  font-family: 'Shippori Mincho', serif !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--fs-ai) !important;
  background: none !important;
  background-color: transparent !important;
  border-left: none !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--fs-gin) !important;
  border-radius: 0 !important;
  padding: 4px 0 10px !important;
  margin: 36px 0 16px !important;
  letter-spacing: 0.04em !important;
  position: relative !important;
  box-shadow: none !important;
}

.entry-content h3::after,
.article-content h3::after {
  content: '' !important;
  position: absolute !important;
  bottom: -1px !important; left: 0 !important;
  width: 32px !important; height: 1px !important;
  background: var(--fs-gold) !important;
}

.entry-content h4,
.article-content h4 {
  font-family: 'Shippori Mincho', serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--fs-ai) !important;
  background: none !important;
  background-color: transparent !important;
  border-left: 2px solid var(--fs-fuji) !important;
  border-radius: 0 !important;
  padding: 2px 0 2px 12px !important;
  margin: 28px 0 12px !important;
}

/* ============================================================
   記事カード
   ============================================================ */
/* AFFINGERカードの背景インライン打ち消し */
.a-wrap,
.a-wrap.cf,
.article-card-thumb,
.card-thumb {
  background-color: var(--fs-cream) !important;
}

.a-wrap[style*="background"],
.a-thumb[style*="background"] {
  background-color: var(--fs-cream) !important;
}

/* カード共通 */
.a-wrap,
.article-list .a-wrap,
.a-articles .a-wrap {
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background-color: var(--fs-cream) !important;
  transition: border-color 0.3s, box-shadow 0.3s !important;
  overflow: hidden !important;
}

.a-wrap:hover {
  border-bottom-color: var(--fs-gold) !important;
  box-shadow: 0 2px 16px rgba(26,39,68,0.08) !important;
  transform: none !important;
}

/* サムネイル比率 */
.a-wrap .eye-catch,
.a-wrap .a-thumb {
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
}

.a-wrap .eye-catch img,
.a-wrap .a-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease !important;
}

.a-wrap:hover .eye-catch img,
.a-wrap:hover .a-thumb img {
  transform: scale(1.04) !important;
}

/* カードタイトル */
.a-wrap .a-title,
.a-wrap .card-title,
.a-wrap h3,
.a-wrap h2 {
  font-family: 'Shippori Mincho', serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--fs-ai) !important;
  line-height: 1.6 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 6px 0 !important;
}

/* ============================================================
   カテゴリラベル（インライン color 打ち消し）
   ============================================================ */
.cat-label,
.label-cat,
.a-cat-label {
  border-radius: 0 !important;
  font-family: 'EB Garamond', serif !important;
  font-size: 10px !important;
  letter-spacing: 0.15em !important;
  padding: 2px 9px !important;
}

/* インラインで設定された色を上書き */
.cat-label[style*="background"],
.label-cat[style*="background"] {
  border-radius: 0 !important;
}

/* スラッグ別カラー */
.cat-label.content-strategy,
a[href*="/content-strategy"] .cat-label,
.term-content-strategy .cat-label {
  background: linear-gradient(90deg,#1A2744,#3D5A80) !important;
  color: #fff !important;
}

.cat-label.mind-temperament,
a[href*="/mind-temperament"] .cat-label,
.term-mind-temperament .cat-label {
  background: linear-gradient(90deg,#1A2744,#2C4A3E) !important;
  color: #fff !important;
}

.cat-label.life-design,
a[href*="/life-design"] .cat-label,
.term-life-design .cat-label {
  background: linear-gradient(90deg,#0D2B23,#2C4A3E) !important;
  color: #fff !important;
}

/* ============================================================
   サイドバー
   ============================================================ */
#sidebar,
#sidebar-in,
.sidebar-in,
.widget-area {
  background-color: var(--fs-washi) !important;
}

#sidebar [style*="background"],
.widget-area [style*="background"] {
  background-color: transparent !important;
}

.widget-title,
#sidebar h3,
.sidebar h3,
#sidebar .widgettitle,
.widgettitle {
  font-family: 'Shippori Mincho', serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--fs-ai) !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-bottom: 1px solid var(--fs-gin) !important;
  border-radius: 0 !important;
  padding: 0 0 10px !important;
  margin-bottom: 16px !important;
  letter-spacing: 0.1em !important;
  position: relative !important;
}

.widget-title::after,
#sidebar h3::after,
.widgettitle::after {
  content: '' !important;
  position: absolute !important;
  bottom: -1px !important; left: 0 !important;
  width: 22px !important; height: 1px !important;
  background: var(--fs-gold) !important;
}

/* サイドバーリンク */
#sidebar .widget ul li a,
.widget-area ul li a {
  font-family: 'Shippori Mincho', serif !important;
  font-size: 13px !important;
  color: var(--fs-ai) !important;
  transition: padding-left 0.2s, color 0.2s !important;
}

#sidebar .widget ul li a:hover,
.widget-area ul li a:hover {
  color: var(--fs-fuji) !important;
  padding-left: 4px !important;
}

/* ============================================================
   フッター
   ============================================================ */
#footer,
#footer-in,
.footer-in,
footer {
  background-color: var(--fs-kon) !important;
  border-top: 1px solid rgba(184,150,90,0.2) !important;
  color: rgba(244,240,232,0.45) !important;
}

/* フッターのインラインbgを打ち消す */
#footer [style*="background"],
#footer-in [style*="background"],
footer [style*="background"] {
  background-color: var(--fs-kon) !important;
}

#footer a,
#footer-in a,
footer a {
  color: rgba(244,240,232,0.5) !important;
  transition: color 0.2s !important;
}

#footer a:hover,
#footer-in a:hover,
footer a:hover {
  color: var(--fs-washi) !important;
}

#copyright,
.copyright,
#footer .copy,
.footer-copy {
  font-family: 'EB Garamond', serif !important;
  font-size: 11px !important;
  color: rgba(244,240,232,0.25) !important;
  background: transparent !important;
  letter-spacing: 0.06em !important;
}

#footer .widget-title,
#footer .widgettitle,
.footer-in .widget-title {
  color: var(--fs-gold) !important;
  border-bottom-color: rgba(184,150,90,0.2) !important;
}

/* ============================================================
   ボタン
   ============================================================ */
.btn,
.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.more-link {
  font-family: 'Shippori Mincho', serif !important;
  background-color: var(--fs-gold) !important;
  color: var(--fs-kon) !important;
  border: 1px solid var(--fs-gold) !important;
  border-radius: 0 !important;
  letter-spacing: 0.1em !important;
  transition: all 0.3s !important;
  box-shadow: none !important;
}

.btn:hover,
.button:hover,
input[type="submit"]:hover,
.more-link:hover {
  background-color: transparent !important;
  color: var(--fs-gold) !important;
}

/* ボタンのインラインスタイル打ち消し */
.btn[style*="background"],
.button[style*="background"],
a.btn[style],
a.button[style] {
  background-color: var(--fs-gold) !important;
  color: var(--fs-kon) !important;
  border-color: var(--fs-gold) !important;
}

/* ============================================================
   パンくず
   ============================================================ */
#breadcrumb,
.breadcrumb,
.breadcrumbs {
  background: transparent !important;
  font-family: 'EB Garamond', serif !important;
  font-size: 12px !important;
  color: #aaa !important;
  letter-spacing: 0.06em !important;
}

#breadcrumb a,
.breadcrumb a {
  color: var(--fs-fuji) !important;
}

/* ============================================================
   ページネーション
   ============================================================ */
.pagination .page-numbers,
.wp-pagenavi a,
.wp-pagenavi span,
.pager a {
  font-family: 'EB Garamond', serif !important;
  background-color: var(--fs-cream) !important;
  color: var(--fs-ai) !important;
  border: 1px solid var(--fs-gin) !important;
  border-radius: 0 !important;
  transition: all 0.2s !important;
}

.pagination .page-numbers:hover,
.wp-pagenavi a:hover {
  background-color: var(--fs-ai) !important;
  color: var(--fs-washi) !important;
  border-color: var(--fs-ai) !important;
}

.pagination .page-numbers.current,
.wp-pagenavi span.current {
  background-color: var(--fs-gold) !important;
  color: var(--fs-kon) !important;
  border-color: var(--fs-gold) !important;
}

/* ============================================================
   blockquote・ボックス
   ============================================================ */
.entry-content blockquote {
  border-left: 2px solid var(--fs-gold) !important;
  background: rgba(184,150,90,0.05) !important;
  border-radius: 0 !important;
}

.af-box,
.box-m,
.box-l,
.box-r,
[class*="box-"] {
  border-radius: 0 !important;
  border-top: 2px solid var(--fs-gold) !important;
  box-shadow: none !important;
}

/* ============================================================
   著者ボックス
   ============================================================ */
.author-box,
.prof-box,
#prof-box,
.st-prof-wrap {
  background-color: var(--fs-cream) !important;
  border: 1px solid var(--fs-gin) !important;
  border-top: 2px solid var(--fs-gold) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ============================================================
   スクロールトップ
   ============================================================ */
#page-top,
.page-top,
#scrolltop {
  background-color: var(--fs-ai) !important;
  border-radius: 0 !important;
  border: 1px solid rgba(184,150,90,0.3) !important;
  color: var(--fs-gold) !important;
}

#page-top:hover,
.page-top:hover {
  background-color: var(--fs-gold) !important;
  color: var(--fs-kon) !important;
}

/* ============================================================
   リンク全般
   ============================================================ */
a {
  color: var(--fs-fuji) !important;
  transition: color 0.2s !important;
}

a:hover {
  color: var(--fs-ai) !important;
}

/* ============================================================
   モバイル対応
   ============================================================ */
@media (max-width: 768px) {
  #sp-menu-open,
  .sp-menu-bar,
  #sp-header {
    background-color: var(--fs-kon) !important;
    border-bottom: 1px solid rgba(184,150,90,0.2) !important;
  }

  #sp-menu-open [style*="background"],
  .sp-menu-bar [style*="background"] {
    background-color: var(--fs-kon) !important;
  }

  #sp-menu-wrap,
  .sp-menu-wrap {
    background-color: var(--fs-ai) !important;
  }

  #sp-menu-wrap a,
  .sp-menu-wrap a {
    color: rgba(244,240,232,0.8) !important;
    border-bottom: 1px solid rgba(184,150,90,0.1) !important;
    font-family: 'Shippori Mincho', serif !important;
  }

  #sp-menu-wrap a:hover,
  .sp-menu-wrap a:hover {
    background: rgba(184,150,90,0.08) !important;
    color: var(--fs-washi) !important;
  }

  /* ハンバーガーライン */
  .menu-bar__line,
  .sp-menu-open__line {
    background-color: rgba(244,240,232,0.8) !important;
  }
}

/* ============================================================
   AFFINGER 記事内ボックス・リスト 色設定上書き
   ============================================================ */

/* ── チェックリスト・ポイントリスト ── */
/* AFFINGERのデフォルト黄・オレンジアイコンを紺系に */
.st-list-check li::before,
.st-list-2 li::before,
.st-list-3 li::before,
.st-mybox .st-list li::before,
.check-list li::before,
ul.check-list > li::before {
  color: #3D5A80 !important;
}

/* ── ポイントボックス（黄色帯タイトル） ── */
/* タイトル帯 */
.st-mybox-title,
.st-mybox .st-mybox-title,
[class*="mybox"] .st-mybox-title,
.af-title,
.box-title {
  background: linear-gradient(90deg, #1A2744, #3D5A80) !important;
  color: #F4F0E8 !important;
  border-color: #1A2744 !important;
}

/* タイトルアイコン */
.st-mybox-title .st-mybox-icon,
.af-title .af-icon,
.box-title i,
.st-mybox-title i {
  color: #B8965A !important;
}

/* ボックス本体の枠線 */
.st-mybox,
[class*="st-mybox"],
.af-box,
.box-m,
.box-l,
.box-r,
[class*="box-"] {
  border-color: #1A2744 !important;
  border-top: 2px solid #3D5A80 !important;
  background-color: #F9F8F5 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ── 黄色背景ボックス → 深紺薄背景に ── */
.st-mybox.st-yellow,
.st-mybox[style*="background:#fff9"],
.st-mybox[style*="background: #fff9"],
.st-mybox[style*="background:#fffde"],
.st-mybox[style*="background: #fffde"],
[class*="mybox"][style*="background:#ff"] {
  background-color: #F0F3F8 !important;
  border-color: #3D5A80 !important;
}

/* ── オレンジ・黄色系タイトル帯 → 紺グラデに ── */
.st-mybox-title[style*="background:#f"],
.st-mybox-title[style*="background: #f"],
.st-mybox-title[style*="background:rgb"],
[class*="mybox"] [style*="background:#f5"],
[class*="mybox"] [style*="background:#ff"],
[class*="mybox"] [style*="background:#e6"],
[class*="mybox"] [style*="background:#fd"],
[class*="mybox"] [style*="background:#fb"] {
  background: linear-gradient(90deg, #1A2744, #3D5A80) !important;
  color: #F4F0E8 !important;
}

/* ── テーブル風リスト（視点①②③のような構成） ── */
.st-dl dt,
.af-dl dt,
[class*="st-dl"] dt {
  background: linear-gradient(90deg, #1A2744, #2C4A3E) !important;
  color: #F4F0E8 !important;
  border-color: #1A2744 !important;
}

.st-dl dd,
.af-dl dd,
[class*="st-dl"] dd {
  border-color: #D0C8B8 !important;
  background: #FDFBF6 !important;
}

/* ── ラベル付きボックス全般 ── */
.label-box,
.st-label-box,
[class*="label-box"] {
  border-color: #1A2744 !important;
}

.label-box-title,
.st-label-box-title,
[class*="label-box-title"] {
  background: linear-gradient(90deg, #1A2744, #3D5A80) !important;
  color: #F4F0E8 !important;
  border-radius: 0 !important;
}

/* ── AFFINGERの「st-step」ステップボックス ── */
.st-step-title,
[class*="st-step"] .step-title {
  background: linear-gradient(90deg, #1A2744, #2C4A3E) !important;
  color: #F4F0E8 !important;
}

.st-step-num,
[class*="st-step"] .step-num {
  background: #1A2744 !important;
  color: #B8965A !important;
  border-color: #B8965A !important;
}

/* ── 鉛筆アイコン・汎用アイコン系の色 ── */
.st-mybox-icon,
[class*="mybox"] .box-icon,
.af-icon {
  color: #3D5A80 !important;
}

/* ── インラインスタイルで設定された黄・オレンジを強制上書き ── */
/* AFFINGERはインラインでアイコン色を設定するためフィルターで対処 */
.entry-content .st-mybox [style*="color:#f"],
.entry-content .st-mybox [style*="color: #f"],
.entry-content [class*="mybox"] [style*="color:#e"],
.entry-content [class*="mybox"] [style*="color:#d"] {
  color: #3D5A80 !important;
}

/* ── 追加CSSで設定されたAFFINGERデフォルト色の上書き ── */
/* h2装飾帯のデフォルト黄・オレンジ */
.entry-content h2[style*="background"],
.entry-content h2[style*="border-color"],
.article-content h2[style*="background"] {
  background: none !important;
  background-color: transparent !important;
  border-left-color: #B8965A !important;
}

/* h3装飾のデフォルト色 */
.entry-content h3[style*="border-color"],
.entry-content h3[style*="background"],
.article-content h3[style*="border-color"] {
  border-bottom-color: #D0C8B8 !important;
  background: none !important;
}

/* ============================================================
   ロゴサイズ強制調整（AFFINGER標準ヘッダー使用時）
   ============================================================ */
#site-logo img,
#site-logo-img img,
#header .site-logo img,
#header-in .site-logo img,
#logo img,
#logo-area img,
.header-logo img,
.site-header img,
#header img.logo,
#header img[class*="logo"],
#header-in img,
.custom-logo,
.custom-logo-link img {
  height: 32px !important;
  width: auto !important;
  max-width: 160px !important;
  max-height: 32px !important;
  object-fit: contain !important;
}
