@charset "UTF-8";
/* お知らせ一覧（news/index.html）。ページの骨格は common.css のテキストページ（tx-*）を使用 */

.nw-years {
  --nw-new: var(--gold);                  /* 「NEW!」の文字色 */
  --nw-body-pt: 8px;                      /* 年の見出し → 最初の記事 */
  --nw-body-pb: clamp(18px, 2.6vh, 28px); /* 最後の記事 → 年の区切り線 */
  --nw-gap: clamp(15px, 2.3vh, 21px);     /* 記事の区切り線 → 上下の記事 */
  --nw-thumb-offset: 7px;                 /* 写真の上端を日付の文字に揃える量 */
  border-top: 1px solid var(--color-line-strong);
}

/* =========================================
   年別の開閉ブロック（<details open> の年が最初から開く）
========================================= */
.nw-year { border-bottom: 1px solid var(--color-line-strong); }

.nw-year__head {
  list-style: none; cursor: pointer; position: relative;
  display: flex; align-items: baseline; gap: 10px;
  padding: clamp(13px, 1.8vh, 18px) 48px clamp(13px, 1.8vh, 18px) 4px;
  transition: color .4s var(--ease-expo);
}
.nw-year__head::-webkit-details-marker { display: none; }
.nw-year__head:hover { color: var(--gold); }

.nw-year__num {
  font-family: var(--font-en); font-weight: 500;
  font-size: clamp(25px, 2.7vw, 33px); line-height: 1.1; letter-spacing: 0.06em;
  color: var(--color-text); transition: color .4s var(--ease-expo);
}
.nw-year__head:hover .nw-year__num { color: var(--gold); }
.nw-year__unit { font-family: var(--font-serif); font-size: 13.5px; letter-spacing: 0.1em; color: var(--color-gray); }

/* 開閉アイコン（＋／−） */
.nw-year__icon { position: absolute; right: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); }
.nw-year__icon::before,
.nw-year__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--color-text); transform: translate(-50%, -50%);
  transition: transform .45s var(--ease-expo), opacity .45s var(--ease-expo);
}
.nw-year__icon::before { width: 16px; height: 1px; }
.nw-year__icon::after { width: 1px; height: 16px; }
.nw-year[open] > .nw-year__head .nw-year__icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.nw-year__body { padding: var(--nw-body-pt) 4px var(--nw-body-pb); }

/* =========================================
   記事1件（写真〈任意〉／日付＋NEW!／見出し／本文）
========================================= */
.nw-item + .nw-item { margin-top: var(--nw-gap); padding-top: var(--nw-gap); border-top: 1px solid var(--color-line); }

.nw-item__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.nw-item__date {
  font-family: var(--font-en); font-weight: 500;
  font-size: clamp(15.5px, 1.5vw, 16.5px); line-height: 1.3; letter-spacing: 0.08em;
  color: var(--color-gray);
}
/* 「NEW!」は js/news.js が自動で付ける */
.nw-chip-new {
  font-family: var(--font-en); font-weight: 700; font-style: italic;
  font-size: 14px; line-height: 1; letter-spacing: 0.1em;
  color: var(--nw-new);
}

.nw-item__title {
  font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(15px, 1.5vw, 16.5px); line-height: 1.6; letter-spacing: 0.04em;
  color: var(--color-text);
  margin-top: 10px;
}

/* 写真のある記事だけ「写真＋文章」の並びにする */
.nw-item__thumb { margin: var(--nw-thumb-offset) 0 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-cream); }
.nw-item + .nw-item:has(> .nw-item__thumb) { padding-top: calc(var(--nw-gap) - var(--nw-thumb-offset)); }
.nw-year__body > .nw-item:first-child:has(> .nw-item__thumb) { margin-top: calc(var(--nw-thumb-offset) * -1); }
.nw-item__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.nw-item:has(> .nw-item__thumb) {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "thumb meta"
    "thumb title"
    "thumb body";
  column-gap: clamp(20px, 2.4vw, 32px);
  align-items: start;
}
.nw-item:has(> .nw-item__thumb) > .nw-item__thumb { grid-area: thumb; }
.nw-item:has(> .nw-item__thumb) > .nw-item__meta  { grid-area: meta; }
.nw-item:has(> .nw-item__thumb) > .nw-item__title { grid-area: title; }
.nw-item:has(> .nw-item__thumb) > .nw-item__body  { grid-area: body; }

.nw-item__body { margin-top: 4px; }
.nw-item__body p { font-size: 14px; line-height: 1.75; letter-spacing: 0.04em; color: var(--color-gray); overflow-wrap: anywhere; }
.nw-item__body p + p { margin-top: 0.6em; }

.nw-item__body a { color: var(--color-text); border-bottom: 1px solid var(--color-line-strong); transition: color .4s var(--ease-expo), border-color .4s var(--ease-expo); }
.nw-item__body a:hover { color: var(--gold); border-color: var(--gold); }

/* PDFリンク：<a class="nw-pdf"> の末尾に書類アイコンが付く */
.nw-item__body a.nw-pdf {
  border-bottom: 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  text-decoration-color: var(--color-line-strong);
  transition: color .4s var(--ease-expo), text-decoration-color .4s var(--ease-expo);
}
.nw-item__body a.nw-pdf:hover { text-decoration-color: var(--gold); }
.nw-pdf::after { content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-left: 0.3em; vertical-align: -0.16em; background: currentColor; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a1.5 1.5 0 0 0-1.5 1.5v15A1.5 1.5 0 0 0 7 21h10a1.5 1.5 0 0 0 1.5-1.5V7.5z"></path><path d="M14 3v4.5h4.5"></path><path d="M9 13h6M9 16.5h6"></path></svg>') no-repeat center/contain; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a1.5 1.5 0 0 0-1.5 1.5v15A1.5 1.5 0 0 0 7 21h10a1.5 1.5 0 0 0 1.5-1.5V7.5z"></path><path d="M14 3v4.5h4.5"></path><path d="M9 13h6M9 16.5h6"></path></svg>') no-repeat center/contain; }

/* =========================================
   トップページから記事を指定して開いたとき（js/news.js）
   移動先の記事に一瞬うっすら下地を敷く
========================================= */
.nw-item,
.nw-year { scroll-margin-top: 120px; }
.nw-item { position: relative; isolation: isolate; }
.nw-item::before {
  content: ""; position: absolute; z-index: -1;
  left: 0; right: 0; top: 0; bottom: calc(var(--nw-gap) * -1);
  background: rgba(var(--rgb-accent), 0.12);
  opacity: 0; pointer-events: none;
}
.nw-year__body > .nw-item:last-child::before { bottom: calc(var(--nw-body-pb) * -1); }
.nw-year__body > .nw-item:first-child::before { top: calc(var(--nw-gap) * -1); }
.nw-year__body > .nw-item:first-child:has(> .nw-item__thumb)::before { top: calc(var(--nw-thumb-offset) - var(--nw-gap)); }
.nw-item.is-target::before { animation: nw-target 2.6s var(--ease-power) 0.3s both; }
@keyframes nw-target {
  0%, 35% { opacity: 1; }
  100%    { opacity: 0; }
}

@media screen and (max-width: 900px) {
  .nw-year__head { padding-right: 36px; }
  .nw-year__icon { right: 4px; width: 14px; height: 14px; }
  .nw-year__icon::before { width: 14px; }
  .nw-year__icon::after { height: 14px; }

  .nw-years { --nw-body-pt: 5px; }

  .nw-item,
  .nw-year { scroll-margin-top: 84px; }

  .nw-item__meta { gap: 4px 10px; }
  .nw-item__title { font-size: 15px; }
  .nw-item__body p { font-size: 13.5px; line-height: 1.75; }

  /* 写真のある記事：写真の右は日付＋見出し、本文は写真の下に横幅いっぱい */
  .nw-item:has(> .nw-item__thumb) {
    grid-template-columns: clamp(96px, 26vw, 140px) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "thumb meta"
      "thumb title"
      "body  body";
    column-gap: 14px;
  }
  .nw-item:has(> .nw-item__thumb) > .nw-item__title { margin-top: 6px; }
  .nw-item:has(> .nw-item__thumb) > .nw-item__body { margin-top: 12px; }
}
