@charset "UTF-8";
/* =========================================================
   新着情報ページ 専用スタイル
   （archive-news.php ／ single-news.php）

   ※ functions.php が assets/css/ 内のCSSを自動で読み込みます
   ※ style.css（共通）のあとに読み込まれます
   ※ ページタイトル帯・パンくずは style.css の
     全ページ共通パーツ（.page-hero / .breadcrumb）を使用しています
   ※ トップページの「.info-list / .info-item」と干渉しないよう、
     クラス名は「news-archive / news-list / news-item / news-tag /
     news-detail / news-pager」でコンポーネント化しています

   ■ 一覧（design/news_PC.jpg ／ design/news_SP.jpg）
     PC … 日付 ／ カテゴリータグ ／ タイトル の横並び
     SP … 1行目に 日付 ＋ タグ、2行目にタイトル

   ■ 詳細（design/news_detail.jpg）
     右上にタグ＋日付 → 中央ぞろえのタイトル → アイキャッチ → 本文
========================================================= */

.l-news {
  --news-dark: #2c2c2c;          /* カテゴリータグの背景 */
  --news-dot: #c9c9c9;           /* 行間の点線 */
  --news-line: #d5d5d5;          /* 詳細ページ・見出し下の罫線 */

  --news-col-date: 146px;        /* 日付カラムの幅（タグの開始位置） */
  --news-col-cat: 149px;         /* タグカラムの幅（タイトルの開始位置） */
}

/* 共通インナー（style.css の --container: 1200px に合わせる） */
.news-archive__inner,
.news-detail__inner {
  max-width: calc(var(--container) + 40px);
  margin: 0 auto;
  padding: 0 20px;
}


/* =========================================================
   1. カテゴリータグ（一覧・詳細で共通）

   ・黒地に白文字の矩形
   ・下端の少し上に、カテゴリーごとの色のラインが入る
     色は PHP 側から CSS変数 --news-tag-accent で渡しています
     （functions.php の infini_home_news_term_color()）
========================================================= */
.news-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 29px;
  padding: 3px 12px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .1em;
  background-color: var(--news-dark);
}

/* カテゴリーごとの色のライン */
.news-tag::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 2px;
  background-color: var(--news-tag-accent, var(--color-blue));
}


/* =========================================================
   2. 一覧エリア
========================================================= */
.news-archive {
  margin-top: 42px;
  padding-bottom: 100px;
}

.news-archive__empty {
  padding: 40px 0;
  font-size: 1.6rem;
  text-align: center;
  letter-spacing: .1em;
}


/* =========================================================
   3. 一覧の1行

   ・日付 ／ タグ ／ タイトル の3カラム
   ・行間は点線（最終行の下には引きません）
========================================================= */
.news-item {
  display: grid;
  grid-template-columns: var(--news-col-date) var(--news-col-cat) minmax(0, 1fr);
  align-items: center;
  padding: 33px 0;
}

/* 行間の点線（1pxの点を7px間隔で並べる） */
.news-item + .news-item {
  background-image: repeating-linear-gradient(
    to right,
    var(--news-dot) 0,
    var(--news-dot) 1px,
    transparent 1px,
    transparent 7px
  );
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 100% 1px;
}

.news-item__date {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.4;
  letter-spacing: .06em;
}

.news-item__title {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .04em;
}

.news-item__link {
  color: inherit;
  text-decoration: none;
  transition: color .3s;
}

.news-item__link:hover {
  color: var(--color-blue);
  opacity: 1;
}


/* =========================================================
   4. 詳細ページ
========================================================= */
.news-detail {
  margin-top: 52px;
  padding-bottom: 100px;
}

/* --- 投稿日・カテゴリータグ（右上） --- */
.news-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 18px;
}

.news-detail__date {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.4;
  letter-spacing: .06em;
}

/* --- タイトル（中央ぞろえ・下に罫線＋青のアクセント） --- */
.news-detail__title {
  position: relative;
  margin-top: 23px;
  padding-bottom: 45px;
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .04em;
  text-align: center;
}

/* グレーの罫線（中央に324px） */
.news-detail__title::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 324px;
  max-width: 100%;
  height: 1px;
  transform: translateX(-50%);
  background-color: var(--news-line);
}

/* 青のアクセント（罫線の中央） */
.news-detail__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 66px;
  height: 1px;
  transform: translateX(-50%);
  background-color: var(--color-blue);
}

/* --- アイキャッチ画像（コンテンツ幅いっぱい） ---
   アイキャッチ未設定のときは <figure> ごと出力されないため、
   下の .news-detail__body と同じ余白（72px）にそろえておけば
   タイトルと本文の間に余計な余白は生まれません。 */
.news-detail__thumb {
  margin: 72px 0 0;
}

.news-detail__img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- 本文 --- */
.news-detail__body {
  margin-top: 72px;
  font-size: 1.7rem;
  line-height: 1.85;
  letter-spacing: .06em;
  overflow-wrap: anywhere;
}

/* エディターで入力した段落・改行（wpautop）の見え方をそろえる */
.news-detail__body > *:first-child {
  margin-top: 0;
}

.news-detail__body > *:last-child {
  margin-bottom: 0;
}

.news-detail__body p {
  margin: 0 0 1.8em;
}

.news-detail__body h2,
.news-detail__body h3,
.news-detail__body h4 {
  margin: 2em 0 .8em;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .08em;
}

.news-detail__body h2 { font-size: 2.2rem; }
.news-detail__body h3 { font-size: 2rem; }
.news-detail__body h4 { font-size: 1.8rem; }

.news-detail__body ul,
.news-detail__body ol {
  margin: 0 0 1.8em;
  padding-left: 1.5em;
}

.news-detail__body ul { list-style: disc; }
.news-detail__body ol { list-style: decimal; }

.news-detail__body li + li {
  margin-top: .4em;
}

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

.news-detail__body a {
  color: var(--color-blue);
  text-decoration: underline;
}

.news-detail__body blockquote {
  margin: 0 0 1.8em;
  padding: 16px 24px;
  border-left: 3px solid var(--news-line);
  background-color: #f7f7f7;
}

.news-detail__body table {
  width: 100%;
  margin: 0 0 1.8em;
  border-collapse: collapse;
}

.news-detail__body th,
.news-detail__body td {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  text-align: left;
}


/* =========================================================
   5. ページ送り
========================================================= */
.news-pager {
  margin-top: 70px;
}

.news-pager__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.news-pager__item .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;
  height: 33px;
  padding: 0 4px;
  border-radius: 50%;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}

.news-pager__item .page-numbers.current {
  color: #fff;
  background-color: var(--news-dark);
}

.news-pager__item a.page-numbers:hover {
  color: var(--color-blue);
  opacity: 1;
}


/* =========================================================
   6. タブレット（〜1024px）
========================================================= */
@media screen and (max-width: 1024px) {

  .l-news {
    --news-col-date: 128px;
    --news-col-cat: 128px;
  }

  .news-item__date,
  .news-detail__date {
    font-size: 1.8rem;
  }

  .news-item__title {
    font-size: 1.7rem;
  }

  .news-detail__title {
    font-size: 2.3rem;
  }

  .news-detail__body {
    font-size: 1.6rem;
  }
}


/* =========================================================
   7. SP（〜767px）
      一覧は「1行目：日付＋タグ ／ 2行目：タイトル」の2段組みにする
========================================================= */
@media screen and (max-width: 767px) {

  .l-news {
    --news-col-date: 146px;
  }

  /* --- 一覧 --- */
  .news-archive {
    margin-top: 26px;
    padding-bottom: 70px;
  }

  .news-item {
    grid-template-columns: var(--news-col-date) minmax(0, 1fr);
    grid-template-areas:
      "date cat"
      "title title";
    align-items: center;
    padding: 28px 0;
  }

  .news-item__date {
    grid-area: date;
    font-size: 1.8rem;
  }

  .news-item__cat {
    grid-area: cat;
  }

  .news-item__title {
    grid-area: title;
    margin-top: 18px;
    font-size: 1.7rem;
    line-height: 1.75;
  }

  .news-tag {
    min-width: 92px;
    font-size: 1.3rem;
  }

  /* --- 詳細 --- */
  .news-detail {
    margin-top: 30px;
    padding-bottom: 70px;
  }

  .news-detail__date {
    font-size: 1.8rem;
  }

  .news-detail__title {
    margin-top: 20px;
    padding-bottom: 28px;
    font-size: 1.9rem;
    line-height: 1.7;
  }

  .news-detail__title::before {
    width: 200px;
  }

  .news-detail__title::after {
    width: 58px;
  }

  .news-detail__thumb {
    margin-top: 36px;
  }

  .news-detail__body {
    margin-top: 36px;
    font-size: 1.5rem;
    line-height: 1.85;
    letter-spacing: .04em;
  }

  .news-detail__body h2 { font-size: 1.9rem; }
  .news-detail__body h3 { font-size: 1.75rem; }
  .news-detail__body h4 { font-size: 1.6rem; }

  /* --- ページ送り --- */
  .news-pager {
    margin-top: 46px;
  }

  .news-pager__list {
    gap: 12px;
  }

  .news-pager__item .page-numbers {
    min-width: 28px;
    height: 28px;
    font-size: 1.6rem;
  }
}
