/* ============================================================
   common.css
   index.html と content-detail.html で共通のスタイル
   ============================================================ */

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #faf8f5;
}

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 2px solid #841615;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ── Sidebar ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #3d3530;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.nav-item:hover { background: #f3eded; color: #841615; }
.nav-item.active { background: #841615; color: #fff; }
.nav-item .icon { width: 16px; text-align: center; font-size: 0.78rem; }
.nav-sub { padding-left: 1.5rem; }
.nav-sub .nav-item { font-size: 0.78rem; color: #5a504a; }
.public-section .nav-item:hover { background: #d1f0e6; color: #1a6b52; }
.member-section .nav-item:hover { background: #f9e0e0; color: #841615; }

.section-header-public {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #1a6b52;
  color: #fff;
  border-radius: 7px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.section-header-member {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #841615;
  color: #fff;
  border-radius: 7px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.section-header-guideline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #151784;
  color: #fff;
  border-radius: 7px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
  font-family: 'Noto Serif JP', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.member-section { background: #fdf8f5; border-left: 3px solid #841615; }
.public-section { background: #f5f9f7; border-left: 3px solid #2d8a6a; }
.guideline-section { background: #f5fafd; border-left: 3px solid #151784; }

/* ── Sidebar：content-detail 固有の active 強化 ── */
.nav-item.active { color: #fff !important; }
.nav-item.active * { color: inherit !important; opacity: 1 !important; }

/* ── Sidebar セクションタイトル ── */
.sidebar-section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #841615;
  font-weight: 600;
}

/* ── Sidebar：index 固有 ── */
.public-section .nav-item:hover .icon i { color: #1a6b52 !important; }
.section-sep { border-top: 1px solid #e8e2da; margin: 0.75rem 0; }

/* ── Badges ── */
.badge-public { background: #e8f4f0; color: #1a6b52; border: 1px solid #b5d8cd; }
.badge-member { background: #fdf0e8; color: #8b4a0e; border: 1px solid #f0c99a; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f0ece6; }
::-webkit-scrollbar-thumb { background: #c9b8b0; border-radius: 10px; }

/* ── 関連カード ── */
.related-card {
  background: #fff;
  border: 1px solid #e8e2da;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.related-card:hover {
  box-shadow: 0 6px 20px rgba(132, 22, 21, 0.1);
  transform: translateY(-2px);
}


/* ── Mobile sidebar ── */
#sidebar-overlay { display: none; }
@media (max-width: 1023px) {
  #main-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    position: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    height: 100vh;
  }
  #main-sidebar.open { transform: translateX(0); }
  #sidebar-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
  }
  #hamburger-btn { display: flex !important; }
}
@media (min-width: 1024px) {
  #hamburger-btn { display: none; }
}
