/* =========================================================
   News Single (scoped)
========================================================= */

.nfu-newsSingle {
  /* theme variables */
  --nfu-bg: #0b102a;
  --nfu-text: rgba(255, 255, 255, 0.92);
  --nfu-muted: rgba(255, 255, 255, 0.7);
  --nfu-border: rgba(255, 255, 255, 0.14);
  --nfu-panel: rgba(255, 255, 255, 0.06);
  --nfu-link: #f2b705;

  background: var(--nfu-bg);
  color: var(--nfu-text);
  margin-top: 70px;
}

.nfu-newsSingle[data-theme="light"] {
  --nfu-bg: #f4f6ff;
  --nfu-text: #0b102a;
  --nfu-muted: rgba(11, 16, 42, 0.72);
  --nfu-border: rgba(11, 16, 42, 0.12);
  --nfu-panel: rgba(11, 16, 42, 0.04);
  --nfu-link: #1b2988;

  background: var(--nfu-bg);
  color: var(--nfu-text);
}

.nfu-newsSingle a:hover {
  opacity: 0.9;
}

.nfu-newsSingle__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-right: var(--wp--style--root--padding-right);
  padding-left: var(--wp--style--root--padding-left);
}

/* =========================================================
   Hero (TOPICS / 活動報告) - archive寄せ
========================================================= */

.nfu-newsSingleHero {
  padding: 40px 0 28px;
  padding-right: var(--wp--style--root--padding-right);
  padding-left: var(--wp--style--root--padding-left);
}

.nfu-newsSingleHero__inner {
  max-width: 1280px;
  margin: 0 auto;
  /* フロントの雰囲気寄せ。色は後で多聞が調整しやすいように薄味 */
  position: relative;
  background: radial-gradient(
    ellipse at 0% 40%,
    rgb(0 194 255 / 22%),
    rgba(6, 16, 42, 0) 40%
  );
}

.nfu-newsSingleHero__kicker {
  letter-spacing: 0.12em;
  font-weight: 1000;
  font-size: 14px;
  color: var(--nfu-muted);
}

.nfu-newsSingleHero__pageTitle {
  margin: 10px 0 10px;
  font-weight: 1000;
  font-size: 48px;
  line-height: 1.1;
}

.nfu-newsSingleHero__breadcrumbs {
  margin-top: 12px;
}

/* breadcrumbs 側のリンク色だけ整える（breadcrumbs.php のクラスに依存しないよう薄く） */
.nfu-newsSingle .nfu-breadcrumbs,
.nfu-newsSingle .nfu-breadcrumbs a {
  color: var(--nfu-muted);
  text-decoration: none;
  font-size: 12px;
}
.nfu-newsSingle .nfu-breadcrumbs a:hover {
  text-decoration: underline;
}

/* =========================================================
   Layout
========================================================= */

/* WPが混ぜた謎の <br> / 空の <p> が Grid を壊すので排除 */
.nfu-newsSingle__layout > br,
.nfu-newsSingle__layout > p:empty {
  display: none !important;
}

/* さらに保険：direct child の p が来ても layout を壊さない */
.nfu-newsSingle__layout > p {
  margin: 0 !important;
}

.nfu-newsSingle__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-top: 28px;
  align-items: start;
}

/* =========================================================
   Main
========================================================= */

.nfu-newsSingle__main {
  min-width: 0;
}

.nfu-newsSingle__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--nfu-muted);
  font-size: 13px;
}

.nfu-newsSingle__badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--nfu-border);
  border-radius: 999px;
  background: var(--nfu-panel);
  color: var(--nfu-text);
  font-size: 12px;
  font-weight: 700;
}

.nfu-newsSingle__title {
  margin: 10px 0 14px;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 900;
}

.nfu-newsSingle__divider {
  height: 1px;
  background: var(--nfu-border);
  margin: 0 0 40px;
}

.nfu-newsSingle__featured {
  margin: 0 0 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--nfu-border);
  background: var(--nfu-panel);
}

.nfu-newsSingle__featuredImg {
  width: 100%;
  height: auto;
  display: block;
}

/* 本文：カード化しない（背景は透明、余白だけ） */
.nfu-newsSingle__content {
  color: var(--nfu-text);
  line-height: 1.9;
  font-size: 15px;
}

/* 本文内の画像調整（ざっくり） */
.nfu-newsSingle__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--nfu-border);
}

.nfu-newsSingle__content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nfu-newsSingle__backBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--nfu-border);
  background: transparent;
  color: var(--nfu-link);
  font-weight: 800;
  text-decoration: none;
}

/* =========================================================
   Prev/Next Nav (中部大寄せ + タイトル表示)
========================================================= */

.nfu-newsSingleNav {
  margin-top: 100px;
  border-top: 1px solid var(--nfu-border);
  display: grid;
  grid-template-columns: 1fr;
}

/* Prev/Next Nav 内に wpautop が紛れ込ませた空の <p>/<br> が grid を壊すので排除 */
.nfu-newsSingleNav > br,
.nfu-newsSingleNav > p:empty {
  display: none !important;
}

/* さらに保険：空じゃない p が来ても余計なマージンで崩さない */
.nfu-newsSingleNav > p {
  margin: 0 !important;
}

@media (min-width: 1024px) {
  .nfu-newsSingle__layout {
    grid-template-columns: 1fr 320px; /* 右にサイドバー固定 */
    gap: 40px;
  }
}

.nfu-newsSingleNav__item {
  padding: 16px 0;
  text-decoration: none;
  color: var(--nfu-text);
}

@media (min-width: 768px) {
  .nfu-newsSingleNav {
    grid-template-columns: 1fr 1fr;
  }
}

.nfu-newsSingleNav__label {
  display: block;
  font-size: 12px;
  color: var(--nfu-muted);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.nfu-newsSingleNav__postTitle {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 800;
}

.nfu-newsSingleNav__item:hover {
  opacity: 0.9;
}

.nfu-newsSingleNav__item.is-disabled {
  opacity: 0.45;
}

/* =========================================================
   Sidebar (一覧ページ寄せ)
========================================================= */

.nfu-newsSingle__sidebar {
  min-width: 0;
  margin-top: 130px;
}

@media (min-width: 768px) {
  .nfu-newsSingleNav__prev {
    padding-right: 18px;
    border-right: 1px solid var(--nfu-border);
  }
  .nfu-newsSingleNav__next {
    padding-left: 18px;
    text-align: right;
  }
}
@media (max-width: 768px) {
  .nfu-newsSingle__sidebar {
    margin-top: 0px;
  }
}
