/* =========================================================
   中国故事成語サイト ── 特集ページ共通スタイル (feature.css)
   武廟六十四将ページのデザインを汎用化したもの。
   人物カード／合戦カード／名所カードを共通の見た目で表示する。
   ========================================================= */
:root {
  --bg-deep:       #3B2F1E;
  --bg-dark:       #5C4A32;
  --bg-warm:       #8B7355;
  --bg-main:       #F5EFE0;
  --bg-light:      #FAF6ED;
  --bg-card:       #FFFDF7;
  --bg-accent:     #EDE4D0;
  --text-main:     #3B2F1E;
  --text-sub:      #6B5D4F;
  --text-light:    #8B7F72;
  --text-on-dark:  #F5EFE0;
  --accent-red:    #B5453A;
  --accent-gold:   #C4973B;
  --accent-green:  #5B7A5E;
  --border:        #D8CEBC;
  --border-light:  #E8E0D0;
  /* カテゴリ用カラー（タグ・カード上端の色分けに使う） */
  --c1:#C4973B;  /* 金 */
  --c2:#B5453A;  /* 赤 */
  --c3:#5B7A5E;  /* 緑 */
  --c4:#4A6378;  /* 青 */
  --c5:#9C6B3F;  /* 茶（テラコッタ） */
  --c6:#8B7F72;  /* 灰 */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.9;
  font-size: 16px;
  font-weight: 400;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-dark) 40%, var(--bg-warm) 100%);
  color: var(--text-on-dark);
  text-align: center;
  padding: 80px 20px 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 20% 80%, rgba(196,151,59,0.15), transparent),
    radial-gradient(ellipse 400px 400px at 80% 20%, rgba(181,69,58,0.12), transparent);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 1px solid rgba(245,239,224,0.3);
  padding: 6px 20px;
  border-radius: 30px;
  margin-bottom: 24px;
  font-weight: 500;
  color: var(--accent-gold);
}
.hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.hero h1 span { color: var(--accent-gold); }
.hero p {
  font-size: 17px;
  max-width: 660px;
  margin: 0 auto;
  opacity: 0.85;
  line-height: 1.8;
}

/* ===== NAV ===== */
.toc-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.toc-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}
.toc-bar a {
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
  font-weight: 500;
  flex-shrink: 0;
}
.toc-bar a:hover { background: var(--bg-accent); color: var(--accent-red); }

/* ===== MAIN ===== */
.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ===== BREADCRUMB ===== */
.breadcrumb { padding: 16px 0 0; font-size: 13px; color: var(--text-light); }
.breadcrumb a { color: var(--text-sub); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-red); }

/* ===== INTRO ===== */
.intro { padding: 40px 0 10px; }
.intro p { font-size: 16px; color: var(--text-sub); line-height: 2; margin-bottom: 16px; }
.intro-highlight {
  background: var(--bg-card);
  border-left: 4px solid var(--accent-gold);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 30px 0;
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.9;
}

/* ===== SECTION ===== */
.fsection { padding: 44px 0 10px; border-top: 1px solid var(--border-light); }
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-red);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.fsection h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-main);
  line-height: 1.4;
}
.fsection h2 .dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}
.fsection > p { font-size: 15px; color: var(--text-sub); line-height: 2; margin-bottom: 10px; }

/* ===== FILTER ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.filter-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { background: var(--bg-accent); }
.filter-btn.active { background: var(--bg-deep); color: var(--text-on-dark); border-color: var(--bg-deep); }

/* ===== GRID & CARD ===== */
.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin: 28px 0 10px;
}
/* 横長カード（合戦・名所など）用 */
.fgrid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.fcard {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s, transform 0.2s;
}
.fcard.b1 { border-top-color: var(--c1); }
.fcard.b2 { border-top-color: var(--c2); }
.fcard.b3 { border-top-color: var(--c3); }
.fcard.b4 { border-top-color: var(--c4); }
.fcard.b5 { border-top-color: var(--c5); }
.fcard.b6 { border-top-color: var(--c6); }
.fcard:hover { box-shadow: 0 8px 26px rgba(59,47,30,0.13); transform: translateY(-4px); }

.fphoto { position: relative; width: 100%; height: 230px; background: var(--bg-accent); overflow: hidden; }
.fgrid.wide .fphoto { height: 200px; }
.fphoto img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.fphoto .placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--bg-warm), var(--bg-dark));
  color: rgba(245,239,224,0.85);
  font-family: 'Noto Serif JP', serif;
  font-size: 56px; font-weight: 700; text-align: center; line-height: 1.1;
}

.ftag {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(59,47,30,0.78);
  padding: 3px 11px;
  border-radius: 12px;
}
.ftag.t1 { background: var(--c1); }
.ftag.t2 { background: var(--c2); }
.ftag.t3 { background: var(--c3); }
.ftag.t4 { background: var(--c4); }
.ftag.t5 { background: var(--c5); }
.ftag.t6 { background: var(--c6); }

.fbody { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.fname {
  font-family: 'Noto Serif JP', serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}
.fname .sub {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 6px;
}
.fmeta { font-size: 12px; font-weight: 600; color: var(--accent-gold); margin: 4px 0 10px; }
.fdesc { font-size: 13.5px; color: var(--text-sub); line-height: 1.85; }

/* ===== AD ===== */
.ad-slot { margin: 40px 0; padding: 10px 0; text-align: center; min-height: 100px; }

/* ===== SOURCE NOTE ===== */
.source-note {
  font-size: 12.5px;
  color: var(--text-light);
  line-height: 1.8;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 40px 0;
}
.source-note a { color: var(--text-sub); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-deep);
  color: var(--text-on-dark);
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
}
.site-footer .footer-brand {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.site-footer .footer-links { margin-bottom: 14px; }
.site-footer .footer-links a {
  color: var(--text-on-dark);
  opacity: 0.8;
  text-decoration: none;
  font-size: 13px;
  margin: 0 10px;
}
.site-footer .footer-links a:hover { opacity: 1; }
.site-footer p { font-size: 13px; opacity: 0.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero { padding: 60px 16px 50px; }
  .toc-bar-inner { justify-content: flex-start; }
  .container { padding: 0 14px; }
  .fgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .fgrid.wide { grid-template-columns: 1fr; }
  .fphoto { height: 180px; }
  .fname { font-size: 18px; }
  .fdesc { font-size: 12.5px; }
}
