/* =========================================================
   News Archive / Single  —  cleaned (styles unchanged)
   scope: .news-page / #news-archive / .single-news
   ========================================================= */

/* ------------------------------
   見出し（section-label → 英語 → 日本語大見出し）
------------------------------ */
main#news-archive {
    padding: 80px 0;
}

.news-contents {
  padding: clamp(56px, 7vw, 100px) 0
}

section#news {
  width: calc(100% - 60px);
  max-width: 1200px;
  margin: 0 auto;
}

#news .postcontent a {
  color: var(--blue);
}
.news-page .section-label,
#news-archive .section-label {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  color: #111;
  margin-bottom: 10px;
}

.news-page .section-label::before,
#news-archive .section-label::before {
  content: "●";
  margin-right: 6px;
  color: var(--blue);
  font-size: .7em;
  line-height: 1;
}

/* 英語の小見出し / 大見出し */
.news-hero {
  padding: clamp(56px, 8vw, 120px) 0 10px;
}

.news-hero .title_en {
  color: var(--blue);
  font-weight: 800;
  letter-spacing: .12em;
  font-size: clamp(14px, 1.8vw, 18px);
  margin: 0 0 4px;
}

.news-hero__title {
  font-family: "Poppins", "Zen Kaku Gothic Antique", system-ui, sans-serif;
  font-weight: 800;
  color: var(--blue);
  font-size: clamp(44px, 8vw, 140px);
  line-height: 1.1;
  letter-spacing: .02em;
  margin: 0 0 .4em;
}

/* コンテナ幅 */
#news .wrap {
  /* width: calc(100% - 60px); */
  max-width: 1200px;
  margin: 0 auto 80px;
}

/* ------------------------------
   レイアウト（左：フィルタ／右：一覧・本文）
------------------------------ */
/* ====== Gridの並び順をエリア指定で制御 ====== */
.news-grid {
  display: grid;
  align-items: start;
  gap: 28px;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-areas: "side main";     /* PC: 左サイド / 右メイン */
}

/* 各要素をエリアに割り当て（HTMLはそのまま） */
.news-side { grid-area: side; }
.news-cards, .news-list { grid-area: main; }

/* モバイルではメイン→サイドの順に */
@media (max-width: 980px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    grid-template-areas:
      "main"
      "side";
  }
  .news-side { margin-top: 4px; }
}

/* ====== サイド（カテゴリ/アーカイブ）を2カラムに ====== */
@media (max-width: 980px) {
  .news-cats,
  .news-years {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));  /* 2カラム */
    gap: 10px 12px;
    text-align: center;
  }

  /* カテゴリのピルを幅いっぱいに */
  .news-cats .pill {
    width: 100%;
    justify-content: center;
  }

  /* 年アーカイブのリンクも幅いっぱいに */
  .news-years .year-link {
    display: block;
    width: 100%;
    padding: 8px 0;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
  }
  .news-years .year-link.is-active {
    border-color: #111;
    box-shadow: 0 0 0 2px #111 inset;
  }
}

/* さらに狭い端末では1カラムに落とす場合（任意） */
/*
@media (max-width: 480px) {
  .news-cats, .news-years {
    grid-template-columns: 1fr;
  }
}
*/

/* ------------------------------
   サイド：フィルタ
------------------------------ */
aside.news-side {
  text-align: left;
}

@media (max-width:720px) {
  aside.news-side {
    text-align: center;
  }
}

.news-side .filter-group+.filter-group {
  margin-top: 40px;
}

.filter-title {
  font-size: 1.6rem;
  letter-spacing: .12em;
  color: #0f172a;
  opacity: .8;
  margin-bottom: 40px;
}

.news-cats,
.news-years {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.pill.is-active {
  border-color: #111;
  color: #111;
  box-shadow: 0 0 0 2px #111 inset;
}

.pill:hover {
  border-color: #9ca3af;
}

.pill:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--blue) 60%, white);
  outline-offset: 2px;
}

.year-link {
  display: inline-block;
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
  font-size: 1.6rem;
}

.year-link:hover {
  text-decoration: underline;
}


/* ------------------------------
   一覧行
------------------------------ */
.news-list {
  border-top: 1px solid #e5e7eb;
  min-width: 0;
  margin-bottom: 12px;
}

.news-row {
  display: grid;
  align-items: center;
  margin: 0;
  grid-template-columns: 240px minmax(0, 1fr);
  column-gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.news-row dd,
.news-row dt {
  margin: 0;
}

/* 左列（日付＋カテゴリ） */
.news-row .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 28px;
  padding: 0 10px;
  line-height: 1;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
}

.badge:hover {
  opacity: .9;
}

.badge:focus-visible {
  outline: 2px solid color-mix(in oklab, white 60%, var(--blue));
  outline-offset: 2px;
}

/* スラッグ別カラー（地域情報=area も含む） */
.badge--oshirase,
.badge--news,
.badge--info {
  background: var(--blue, #135ba4);
}

.badge--area,
.badge--chiiki,
.badge--local {
  background: var(--red, #d82a2a);
}

/* 右列（タイトル） */
.news-row .title a {
  display: block;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.8;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.6rem;
}

.news-row .title a:hover {
  text-decoration: underline;
}

/* 980px以下は2行まで表示 */
@media (max-width:980px) {
  .news-row .title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
  }
}

p.news-empty {
  font-size: 1.6rem;
}

/* ------------------------------
   Pagination（<ul class="page-numbers">）
------------------------------ */
.page-numbers {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 24px 0 8px;
}

.page-numbers li {
  list-style: none;
}

.page-numbers a,
.page-numbers span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  line-height: 1;
  border: 1px solid #111;
  border-radius: 50%;
  color: #111;
  text-decoration: none;
  font-weight: 700;
}

.page-numbers .current {
  background: #111;
  color: #fff;
}

.page-numbers .prev,
.page-numbers .next {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.page-numbers a:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--blue, #135ba4) 65%, white);
  outline-offset: 2px;
}

/* ------------------------------
   Single（本文・共通要素）
------------------------------ */
.news-article {
  min-width: 0;
}

/* ← 重複をここに集約 */
.single-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
}

.single-meta .date-badge {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
}

.single-thumb {
  margin: 0 0 18px;
}

.single-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.postcontent {
  font-size: 16px;
  line-height: 1.9;
  color: #111;
  margin: 0 auto;
}

.postcontent p {
  line-height: 2.5;
  letter-spacing: 0.1em;
  margin: 40px auto 80px;
}

.postcontent h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.4;
  margin: 1.6em 0 .6em;
  font-weight: 800;
  color: #0f172a;
}

.postcontent h3 {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  margin: 1.4em 0 .5em;
  font-weight: 700;
}

.postcontent ul,
.postcontent ol {
  margin: .8em 0 .8em 1.2em;
}

.postcontent img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 16:9 埋め込み */
.postcontent .embed-16x9,
.postcontent .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16/9;
}

.postcontent .embed-16x9 iframe,
.postcontent .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* テーブル（下線のみ） */
.postcontent table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.postcontent th,
.postcontent td {
  padding: 10px 8px;
  border: 0;
}

.postcontent tr {
  border-bottom: 1px solid #e5e7eb;
}

/* 引用 */
.postcontent blockquote {
  margin: 1.2em 0;
  padding: .6em .9em;
  border-left: 4px solid var(--blue, #135ba4);
  background: #f8fafc;
}

/* タグ */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 18px 0 8px;
  padding: 0;
  list-style: none;
}

.single-tags a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
}

/* シェア */
.share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.share dt {
  font-size: 12px;
  letter-spacing: .12em;
  color: #0f172a;
  opacity: .8;
}

.share dd {
  margin: 0;
  display: flex;
  gap: 10px;
}

.share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  text-decoration: none;
  font-weight: 700;
  color: #0f172a;
}

.share a:hover {
  border-color: #9ca3af;
}

/* 前後ナビ＋一覧へ */
.post-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 0;
}

.post-nav .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #111;
  color: #111;
  text-decoration: none;
  font-weight: 700;
}

.post-nav .prev a,
.post-nav .next a {
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
}

.post-nav .prev a:hover,
.post-nav .next a:hover {
  text-decoration: underline;
}

/* ------------------------------
   Single HERO（カテゴリピル + 右上日付 + 大見出し）
------------------------------ */
.single-hero {
  padding: clamp(32px, 6vw, 72px) 0 8px;
}

.single-hero .wrap {
  max-width: 1120px;
}

.single-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* ピル（代表カテゴリ） */
.pill-pill {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: var(--blue);
}

.pill-pill.badge--area {
  background: var(--red);
}

.pill-pill.badge--press,
.pill-pill.badge--press-release {
  background: #f1b90b;
  color: #1f2937;
}

/* 日付 / タイトル */
.single-date {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #6b7280;
}

.single-title {
  font-family: "Zen Kaku Gothic Antique", system-ui, sans-serif;
  font-weight: 800;
  color: #0f172a;
  font-size: clamp(28px, 4.6vw, 40px);
  line-height: 1.5;
  margin: 6px 0 10px;
}

/* ------------------------------
   Single：旧ヒーロー（news-hero を使う場合の調整）
------------------------------ */
.single-news .news-hero {
  padding: clamp(36px, 6vw, 72px) 0 8px;
}

.single-news .title_en {
  font-size: clamp(12px, 1.6vw, 16px);
  margin-bottom: 2px;
}

/* ------------------------------
   Responsive
------------------------------ */
@media (max-width:980px) {
  .postcontent {
    max-width: 100%;
  }
}

@media (max-width:720px) {
  .single-meta {
    flex-wrap: wrap;
  }

  .post-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .post-nav .back {
    justify-content: center;
  }

  .single-title {
    font-size: clamp(24px, 6vw, 36px);
  }

  .pill-pill {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }

  .single-date {
    font-size: 12px;
  }

  .news-hero {
    padding: clamp(36px, 8vw, 56px) 0 6px;
  }

  .news-hero__title {
    font-size: clamp(28px, 7vw, 38px);
  }
}

@media (min-width:1280px) {
  .news-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .news-row {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

/* ==============================
   News Cards (3-column grid)
   ============================== */
.news-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
  margin: 0 0 12px;
}

@media (max-width: 980px) {
  .news-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .news-cards {
    grid-template-columns: 1fr;
  }
}

.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
}

.news-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Thumb */
/* 画像ホバーでふわっと拡大 */
.news-card__thumb {
  overflow: hidden;                  /* 既に指定済みでもOK（念のため） */
}

.news-card__thumb img,
.news-card__thumb .noimg {
  transition: transform .35s ease;   /* なめらかに */
  transform-origin: center center;
  will-change: transform;
}

/* マウスホバー & キーボードフォーカス（アクセシビリティ対応） */
.news-card:hover .news-card__thumb img,
.news-card:focus-within .news-card__thumb img,
.news-card:hover .news-card__thumb .noimg,
.news-card:focus-within .news-card__thumb .noimg {
  transform: scale(1.06);            /* お好みで 1.04～1.08 くらいに */
}

/* キーボード操作の視認性（任意） */
.news-card__link:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--blue, #135ba4) 65%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 動きを控えたい利用者向け */
@media (prefers-reduced-motion: reduce) {
  .news-card__thumb img,
  .news-card__thumb .noimg {
    transition: none;
  }
}

/* Title */
.news-card__title {
  padding: 12px 14px 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.6;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* 2行で省略 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__title:hover {
  text-decoration: underline;
}

/* Meta (date + cats) */
.news-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 14px;
}

.news-card__meta .date {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #6b7280;
  white-space: nowrap;
}

.news-card__meta .cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

/* 既存 .badge を流用（色は既存のまま） */
.news-card .badge {
  height: 24px;
  padding: 0 10px;
  font-size: 1.4rem;
}

/* ==============================
   Post images — global look & feel
   scope: .postcontent
   ============================== */

:root{
  --img-radius: 12px;
  --img-border: #e5e7eb;
  --img-shadow: 0 8px 20px rgba(0,0,0,.06);
}

/* 基本：figure / 画像 */
.postcontent .wp-block-image,
.postcontent figure.wp-caption,
.postcontent img {
  margin: clamp(14px, 2.2vw, 22px) auto;
}

.postcontent .wp-block-image img,
.postcontent figure.wp-caption img,
.postcontent img:not(.emoji){
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--img-radius);
  border: 1px solid var(--img-border);
  background: #fff;
  box-shadow: var(--img-shadow);
}

/* キャプション（Gutenberg/クラシック両対応） */
.postcontent .wp-element-caption,
.postcontent figure.wp-caption figcaption{
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-top: 8px;
}

/* 画像リンク：軽いホバー演出（PCのみ） */
@media (hover:hover){
  .postcontent a:not(.no-zoom) img{
    transition: transform .25s ease, box-shadow .25s ease;
  }
  .postcontent a:hover img{
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
  }
}

/* 配置：中央寄せ */
.postcontent .aligncenter,
.postcontent figure.aligncenter{ text-align:center; }
.postcontent .aligncenter img,
.postcontent img.aligncenter{ margin-left:auto; margin-right:auto; }

/* 配置：左右回り込み（PC） */
.postcontent .alignleft,
.postcontent img.alignleft{
  float: left;
  margin: 4px 20px 12px 0;
  max-width: 46%;
}
.postcontent .alignright,
.postcontent img.alignright{
  float: right;
  margin: 4px 0 12px 20px;
  max-width: 46%;
}
/* SPでは回り込み解除して読みやすく */
@media (max-width: 720px){
  .postcontent .alignleft,
  .postcontent .alignright,
  .postcontent img.alignleft,
  .postcontent img.alignright{
    float:none; display:block; margin: 12px auto; max-width: 100%;
  }
}

/* ――― Gutenbergの「ワイド」「全幅」対応 ――― */

/* ワイド（本文幅より少し広く） */
.postcontent .alignwide{
  width: min(1200px, 100vw - 40px);
  margin-left: 50%;
  transform: translateX(-50%);
}

/* 全幅（ブラウザ幅いっぱい） */
.postcontent .alignfull{
  width: 100vw;
  max-width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
  border-left: 0; border-right: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ギャラリー（Gutenberg） */
.postcontent .wp-block-gallery{
  margin: clamp(14px,2vw,22px) 0 clamp(18px,2.4vw,26px);
  gap: 10px;
}
.postcontent .wp-block-gallery .wp-block-image{ margin: 0; }
.postcontent .wp-block-gallery img{
  border-radius: 10px;
  border: 1px solid var(--img-border);
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 旧クラシックの .wp-caption 幅調整 */
.postcontent .wp-caption{ max-width: 100%; }

/* オプション：トリミング前提のアスペクト比ユーティリティ */
.postcontent .img-16x9,
.postcontent .img-4x3{
  position: relative; overflow: hidden; border-radius: var(--img-radius);
  border: 1px solid var(--img-border); box-shadow: var(--img-shadow);
}
.postcontent .img-16x9{ aspect-ratio: 16 / 9; }
.postcontent .img-4x3 { aspect-ratio: 4 / 3; }
.postcontent .img-16x9 > img,
.postcontent .img-4x3  > img{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

/* 画像を“枠なしで”出したい箇所用（任意） */
.postcontent .img-plain img{
  border: 0; box-shadow: none; background: transparent; border-radius: 0;
}

/* ダーク背景のセクション上でもエッジが沈まないように（任意） */
@media (prefers-color-scheme: dark){
  .postcontent .wp-block-image img,
  .postcontent figure.wp-caption img{
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 8px 20px rgba(0,0,0,.35);
  }
}
