/* 最新情報。企業情報のオフセット型ではなく、1200pxを中央に置く中央寄せ型。
   装飾リング・見出しを持たない1枚パネルなので、ヒーロー直下からの余白は
   セクション側の margin-top で取る（パネル側の負マージンは打ち消す）。 */
.content-section.news {
  width: min(var(--content-width), calc(100% - 2 * var(--gutter)));
  margin: 80px auto 0;
}

.section-panel.news-panel {
  margin-top: 0;
  border-radius: 8px;
  overflow: hidden;
}

/* タブ。この頁はナンバリングを持たず、5つとも同じ120px幅で左詰めにする */

/* 共通の .tabs は高さ47px固定。ここは下に16pxの余白を足すぶん高さを可変にする
   （border-box のままだと padding が47pxを食ってアクティブラインの三角が切れる） */
.news-tabs {
  width: 100%;
  height: auto;
  padding-bottom: 16px;
}

.news-tabs .tab {
  flex: 0 0 120px;
  width: 120px;
}

/* 一覧テーブル
   PCは 日付 / カテゴリー / タイトル を横一列、SPはカテゴリーとタイトルを縦積みにする。
   マークアップは共通のまま、包み要素（.news-head-stack / .news-item-body）を
   PCでは display: contents で透過させて1列に並べている。 */

.news-table {
  width: 100%;
  padding-top: 8px;
}

.news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--heading-rule);
}

.news-head-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.news-head-stack {
  display: contents;
}

.news-col-label {
  color: #808080;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.news-col-date {
  flex: 0 0 56px;
  width: 56px;
}

.news-col-category {
  flex: 0 0 88px;
  width: 88px;
}

.news-col-title {
  flex: 1 1 auto;
  min-width: 0;
}

.news-col-link {
  flex: 0 0 120px;
  width: 120px;
}

.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--heading-rule);
}

.news-item[hidden] {
  display: none;
}

.news-item-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.news-item-body {
  display: contents;
}

.news-date {
  flex: 0 0 56px;
  width: 56px;
  color: #2e2e2e;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.7;
  white-space: nowrap;
}

.news-badge {
  flex: 0 0 90px;
  width: 88px;
  min-width: 84px;
  padding: 3px 0;
  border-radius: 999px;
  background: #4a4a4a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.275px;
  line-height: 1.5;
  white-space: nowrap;
}

.news-title {
  flex: 1 1 auto;
  min-width: 0;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  text-decoration: underline;
}

.news-pdf {
  flex: 0 0 120px;
  width: 120px;
  padding: 8px 14px;
  border: 1px solid var(--heading-rule);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--heading-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}

.news-pdf-icon {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.news-empty {
  margin: 0;
  padding: 40px 16px;
  border-bottom: 1px solid var(--heading-rule);
  color: #808080;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

/* ページ送り。ボタンはJSが生成する（assets/script.js の [data-news]） */

.news-pager {
  padding-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.news-pager:empty {
  display: none;
}

.news-page {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--heading-rule);
  border-radius: 6px;
  background: #fff;
  color: #4a4f57;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.news-page.is-active {
  border-color: #e60012;
  background: #e60012;
  color: #fff;
}

.news-page:focus-visible,
.news-pdf:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* タッチ環境ではタップ後にホバーが残るため、ホバーを持つ環境だけに限定する */
@media (hover: hover) {
  .news-pdf:hover,
  .news-page:not(.is-active):hover {
    border-color: #808080;
  }

  .news-title:hover {
    color: var(--red);
  }
}

@media (max-width: 767px) {
  /* SPはパネルを画面幅いっぱいに敷く（左右のガターを持たない） */
  .content-section.news {
    width: 100%;
    margin-top: 0;
  }

  .section-panel.news-panel {
    padding: 64px 20px;
    border-radius: 0;
  }

  /* 5つで600pxあり画面に収まらないので、タブ列だけ横スクロールさせる。
     共通CSSがSPで付ける高さ可変・48pxの下限はこの頁では使わない */
  .news-tabs {
    padding-bottom: 8px;
    align-items: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .news-tabs::-webkit-scrollbar {
    display: none;
  }

  .news-tabs .tab-title {
    min-height: 0;
    line-height: 1.8;
    white-space: nowrap;
  }

  /* 見出し行は 日付48px + gap16px、データ行は 日付56px + gap8px で、
     どちらもカテゴリー列の開始位置が64pxに揃う（Figma実測） */
  .news-head {
    align-items: center;
    padding: 8px 0;
  }

  .news-head-main {
    gap: 16px;
  }

  .news-head-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .news-col-label {
    font-size: 12px;
    line-height: 1.25;
  }

  .news-col-date {
    flex: 0 0 48px;
    width: 48px;
  }

  /* 縦積みにすると flex-basis が高さの指定になってしまうので、幅は width で持たせる */
  .news-col-category,
  .news-col-title {
    flex: 0 0 auto;
    width: 88px;
  }

  /* リンク列の見出しは PDF ボタン列（80px）の真上に置く。
     残り幅で伸ばすと、幅が広がったときにボタンから離れていく */
  .news-col-link {
    flex: 0 0 80px;
    width: 80px;
  }

  .news-item {
    padding: 16px 0;
  }

  .news-item-main {
    gap: 8px;
  }

  .news-item-body {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }

  .news-badge {
    flex: 0 0 auto;
    width: 84px;
  }

  .news-title {
    flex: 0 0 auto;
    width: 100%;
  }

  .news-pdf {
    flex: 0 0 80px;
    width: 80px;
    flex-direction: column;
    gap: 2px;
  }

  .news-empty {
    padding: 32px 0;
  }
}
