/* ==========================================================================
   NEWS 共通パーツ：J-Connection の装飾（このサイトだけの指定）
   基本の CSS は同じフォルダの news-parts.css（全サイト共通の原本のコピー。そちらは直さない）。
   news-parts.css のあとに読み込まれる（functions.php）。

   - 色は白・黒・グレーだけ（jc-base.css の変数を使う）
   - wp-style.css の「.entry-content img / figure / a / p / h3 / ul」の指定がパーツの中にも当たるので、
     .entry-content を頭に付けて共通 CSS の並びに戻している
   - .gallery・img.alignnone・.wp-caption は今までの記事と同じ見え方に戻している
     （スマホのギャラリーは 1 列、間隔・余白は wp-style.css と同じ）
   ========================================================================== */

/* 色・間隔（共通 CSS の変数を上書き） */
:root {
  --np-accent: var(--color-black);
  --np-btn-bg: var(--color-white);
  --np-btn-color: var(--color-black);
  --np-btn-hover-bg: var(--color-white);
  --np-btn-radius: 999px;
  --np-btn-min-width: 0px;
  --np-btn-padding: 0.75rem 2rem;
  --np-block-gap: var(--sp-lg);           /* 今までの記事の画像・figure の上下の余白と同じ */
  --np-line: var(--color-gray);
  --np-muted: var(--color-dim);
  --np-box-bg: var(--color-lightgray);
  --np-box-line: var(--color-gray);
  --np-gallery-gap: var(--sp-xs);         /* 今までの [gallery] と同じ */
  --np-gallery-sp-cols: 1;                /* 今までの [gallery] はスマホで 1 列 */
}

/* --------------------------------------------------------------------------
   今までの記事の見え方を保つ（共通 CSS が WordPress 標準のクラスにも当たるため）
   -------------------------------------------------------------------------- */
.entry-content .gallery {
  margin: var(--sp-xl) 0;
}

.entry-content .wp-caption-text {
  margin: 0;
}

.entry-content .gallery .gallery-caption {
  font-size: var(--fs-sm);
}

/* 注：ギャラリーの行と行の間は、共通 CSS で 8px に詰まる。
   今までは wp-style.css の「.entry-content figure { margin: var(--sp-lg) 0 }」が画像 1 枚ずつにも当たり、
   行の間が 40px＋8px＋40px 空いていた（2026-11-21 に確認。本番の公開 NEWS では /news/15923/ の 1 件だけ）。
   元の空き方に戻すなら、ここに次を足す：
   .entry-content .gallery .gallery-item { margin: var(--sp-lg) 0 !important; } */

/* スタッフのアバター画像（One User Avatar）は class に alignnone が付く。
   共通 CSS の img.alignnone の上下の余白が、本文の外（サイドバー・投稿者欄）のアバターにも当たるので消す */
img.avatar.alignnone {
  margin: 0;
}

/* --------------------------------------------------------------------------
   wp-style.css の本文の指定（.entry-content img / figure / p / h3 / ul）を、パーツの中では打ち消す
   -------------------------------------------------------------------------- */
.entry-content .np-col > * {
  margin: 0;
}

.entry-content .np-col > * + * {
  margin-top: 0.8em;
}

.entry-content .np-media__img,
.entry-content .np-item img {
  margin: 0;
}

.entry-content .np-media__body > :first-child,
.entry-content .np-box > :first-child {
  margin-top: 0;
}

.entry-content .np-media__body > :last-child,
.entry-content .np-box > :last-child {
  margin-bottom: 0;
}

.entry-content .np-btn-wrap {
  margin: var(--sp-xl) 0;               /* 今までのリンクボタンと同じ */
}

.entry-content .np-list {
  margin: 1.5em 0;
}

/* テキストリンク：今までの本文のリンクと同じ黒い下線（wp-style.css の border-bottom）にそろえる */
.entry-content a.np-link,
.entry-content a.np-link:link,
.entry-content a.np-link:visited {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   リンクボタン：今までのリンクボタン（.s-news-single__link-btn）と同じ形
   白地・黒枠・丸・右に矢印。カーソルを乗せると黒が左から入る
   -------------------------------------------------------------------------- */
.entry-content a.np-btn,
.entry-content a.np-btn:link,
.entry-content a.np-btn:visited,
.entry-content a.np-btn:hover,
.entry-content a.np-btn:focus-visible {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  border: 1px solid var(--color-black);
  background: var(--color-white);
  color: var(--color-black);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: color 0.4s var(--ease-out-expo);
}

.entry-content a.np-btn::after {
  content: "\f138";                      /* Bootstrap Icons の bi-arrow-right */
  font-family: "bootstrap-icons";
  font-weight: 400;
  line-height: 1;
}

.entry-content a.np-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-black);
  transform: translateX(-101%);
  transition: transform 0.5s var(--ease-out-expo);
}

@media (hover: hover) and (pointer: fine) {
  .entry-content a.np-btn:hover {
    color: var(--color-white);
    opacity: 1;
  }

  .entry-content a.np-btn:hover::before {
    transform: translateX(0);
  }
}

/* --------------------------------------------------------------------------
   商品リスト：今までの商品グリッド（.p-product-grid）と同じ見た目
   グレーの枠で区切った正方形の画像・小さい文字・価格は太字
   -------------------------------------------------------------------------- */
.entry-content .np-items {
  gap: 0;
}

.entry-content .np-item {
  margin: -1px 0 0 -1px;
  border: 1px solid var(--color-gray);
}

.entry-content .np-item a,
.entry-content .np-item a:link,
.entry-content .np-item a:visited {
  height: 100%;
  border-bottom: none;
}

.entry-content .np-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.entry-content .np-item__name,
.entry-content .np-item__price {
  padding: 0 0.75rem;
  font-size: var(--fs-xs);
}

.entry-content .np-item__name {
  margin-top: 0;
  padding-top: var(--sp-xs);
}

.entry-content .np-item__price {
  padding-bottom: var(--sp-sm);
  font-weight: 700;
}

/* カーソルを乗せたときの下線は付けない（サイト全体の a:hover の薄くなる表現にそろえる） */
.entry-content .np-item a:hover .np-item__name {
  text-decoration: none;
}
