/* ==========================================================
   お知らせ（news__）… 一覧（固定ページ news）・詳細（single-news.php）・TOP の「お知らせ」（[top_news]）
   ※ TOP でもカードを使うので、functions.php で TOP でも読み込む
   ※ 色はすべて css/common.css の :root 変数を使用。レスポンシブは元のクラスの直下に書く
   ========================================================== */

/* 一覧：見出しの写真がヘッダーの下まで広がるので上の余白なし */
body.shion-page main.news {
  padding-top: 0 !important;
}
/* 詳細：写真の見出しがないので、固定ヘッダーの高さぶん空ける（スクロール後のヘッダー 80px／SP 64px） */
body.shion-page main.news--single {
  padding-top: 80px !important;
}
@media (max-width: 767px) {
  body.shion-page main.news--single {
    padding-top: 64px !important;
  }
}

.news__hero {
  --hero-img: var(--hero-news, url("../wp-content/uploads/2026/11/news-main.webp"));
  --hero-img-sp: var(--hero-news-sp, url("../wp-content/uploads/2026/11/news-main-sp.webp"));
}

/* ---------- パンくず（詳細） ---------- */
.news__crumb-bar {
  padding-block: 24px;
}

.news__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-text-sub);
}

.news__crumb-item:not(:last-child)::after {
  content: "／";
  margin-left: 8px;
}

.news__crumb-link:hover {
  color: var(--color-text);
}

/* ---------- 絞り込み ---------- */
/* 料金・サービスのページ内メニューと同じく、スクロールするとヘッダーの下に貼り付く。
   ページの一番下（相談の帯・フッターの上）まで出しておく（2026-11-27 指定）。
   sticky は親の箱の終わりで外れるので、一覧ページの main だけ display: contents で箱をなくし、
   親を body（本番は本文の外枠 .entry-content。ヘッダー・フッターも本文に貼ってある）にする */
body.shion-page main.news:not(.news--single) {
  display: contents;
}
.news__filter-bar {
  position: sticky;
  top: 80px;   /* スクロール後のヘッダー（PC 80px）のすぐ下 */
  z-index: 50;   /* ヘッダー（100）より下、カードより上 */
  scroll-margin-top: 80px;   /* 絞り込み・ページ送りのリンク（#news_list）で移動したとき、ヘッダーの下に来るように */
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-white);
}
@media (max-width: 767px) {
  .news__filter-bar {
    top: 64px;
    scroll-margin-top: 64px;
  }
}
/* common.css の html { scroll-padding-top: 96px } が上の scroll-margin-top に足されて 96px 下に止まるので、一覧ページでは 0 にする */
html:has(.news__filter-bar) {
  scroll-padding-top: 0;
}

.news__filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 32px;
  width: min(1080px, 100% - var(--gutter) * 2);
  margin: 0 auto;
  padding-block: 18px 14px;
  font-size: 14px;
  letter-spacing: 0.12em;
  transition: padding 0.3s ease, font-size 0.3s ease;
}
@media (max-width: 767px) {
  .news__filter {
    gap: 8px 20px;
    padding-block: 14px 10px;
    font-size: 13px;
  }
}
/* ヘッダーの下に貼り付いたとき（js/anchor_nav.js の .is-stuck）はパディングと文字を小さくして低くする */
.news__filter-bar.is-stuck .news__filter {
  padding-block: 8px 4px;
  font-size: 13px;
}
@media (max-width: 767px) {
  .news__filter-bar.is-stuck .news__filter {
    padding-block: 6px 2px;
    font-size: 12px;
  }
}

.news__section {
  padding-block: 72px 160px;
}
@media (max-width: 767px) {
  .news__section {
    padding-block: 48px 96px;
  }
}

.news__filter-link {
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  color: var(--color-text-sub);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.news__filter-link:hover,
.news__filter-link[aria-current="true"] {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* ---------- カード（3列。参考サイトの「お知らせ」） ---------- */
.news__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 40px;
}
@media (max-width: 899px) {
  .news__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 20px;
  }
}
@media (max-width: 479px) {
  .news__list {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.news__card {
  display: block;
}

.news__thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 20px;
  background: var(--color-paper);
}

.news__img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 告知画像（縦長・正方形）が見切れないよう全体を表示。余白は和紙色 */
  transition: transform 0.8s ease;
}
.news__card:hover .news__img,
.news__card:hover .news__thumb.is-visible .news__img {   /* 幕の演出（common__reveal）の「表示後は transform:none」より強くする */
  transform: scale(1.04);
}

.news__card-body {
  padding-inline: 12px;
}
@media (max-width: 479px) {
  .news__card-body {
    padding-inline: 0;
  }
}

.news__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--color-text-sub);
}

.news__card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
  transition: opacity 0.3s ease;
}
.news__card:hover .news__card-title {
  opacity: 0.6;
}

.news__empty {
  text-align: center;
  color: var(--color-text-sub);
}

/* ---------- ページ送り ---------- */
.news__pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 72px;
}

.news__pager-link,
.news__pager-current,
.news__pager-gap {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding-inline: 12px;
  font-size: 14px;
}

.news__pager-link {
  border: 1px solid var(--color-line);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.news__pager-link:hover {
  background: var(--color-brand);
  color: var(--color-white);
}

.news__pager-current {
  border: 1px solid var(--color-brand);
  background: var(--color-brand);
  color: var(--color-white);
}

/* ---------- 詳細 ---------- */
.news__article {
  padding-block: 64px 160px;
}
@media (max-width: 767px) {
  .news__article {
    padding-block: 32px 96px;
  }
}

.news__article-inner {
  width: min(760px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.news__article-head {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-line);
}

.news__article-head .news__meta {
  font-size: 12px;
}

.news__article-title {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.08em;
}
@media (max-width: 767px) {
  .news__article-title {
    font-size: 20px;
  }
}

.news__eyecatch {
  margin: 0 0 48px;
}

.news__eyecatch-img {
  width: auto;
  max-width: 100%;
  max-height: 640px;
  margin-inline: auto;
}

.news__body {
  font-size: 15px;
  line-height: 2.4;
}

.news__body > * + * {
  margin-top: 1.6em;
}

.news__body p {
  margin: 0;
  text-align: start;
}

.news__body h2 {
  margin-top: 2.4em;
  padding-left: 16px;
  border-left: 1px solid var(--color-text);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
}

.news__body h3 {
  margin-top: 2em;
  font-size: 17px;
  font-weight: 400;
}

.news__body img {
  max-width: 100%;
  height: auto;
}

.news__body a {
  text-decoration: underline;
}

.news__pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--color-line);
}
@media (max-width: 599px) {
  .news__pn {
    grid-template-columns: 1fr;
  }
}

.news__pn-item--next {
  grid-column: 2;
  text-align: right;
}
@media (max-width: 599px) {
  .news__pn-item--next {
    grid-column: auto;
  }
}

.news__pn-link {
  display: block;
  transition: opacity 0.3s ease;
}
.news__pn-link:hover {
  opacity: 0.6;
}

.news__pn-label {
  display: block;
  font-size: 11px;
  color: var(--color-text-sub);
}

.news__pn-title {
  display: block;
  font-size: 14px;
  line-height: 1.8;
}

.news__back {
  margin-top: 64px;
  text-align: center;
}

/* 「お知らせ一覧へ戻る」：ボタンは中央のまま、文字の左に左向きの矢印（2026-11-27） */
.news__back-btn {
  gap: 14px;
}
.news__back-btn::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}
.news__back-btn:hover::before {
  transform: translateX(-4px) rotate(45deg);
}
