@charset "UTF-8";

/* =========================================================
   NEWS一覧ページ（archive-news.php / CPT news アーカイブ /news/）
   DOM構造は Media(archive.php) / 会社概要(company.css) をベンチマークにミラー。
   クラス名はページ固有（news_archive_*）。挙動は main.js の body.loaded(fadeIn)/js_page_top を流用。
   方式 B1: 全件 DOM 出力＋ news.js でカテゴリ絞込＆クライアント側ページネーション（10件/頁）。
========================================================= */

/* ラッパー（= company_wrapper / media_wrapper 相当）。
   下端を丸く（= .media_wrapper と揃える。overflow:hidden で暗色 inner の下端をクリップ）。PC 80px / SP 40px。 */
.news_archive_wrapper {
  position: relative;
  background-color: #f3f0ed;
  overflow: hidden;
  border-radius: 0 0 80px 80px;
}

/* 背景の侍ウォーターマーク（= company_bg 相当。既存 media 画像を流用） */
.news_archive_bg {
  background: url(../img/media/media_bg_passive.png) top / cover no-repeat;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
}
body.loaded .news_archive_bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url(../img/media/media_bg_active.png) top / cover no-repeat;
  opacity: 0;
  transform: scale(1.05);
  animation: newsFadeInScale 1.2s ease 0.5s forwards;
}
@keyframes newsFadeInScale {
  0% { opacity: 0; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* タイトル（= company_title 相当。Michroma 120px） */
.news_archive_title_wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
}
.news_archive_title {
  margin: 190px 110px 90px;
  font-size: 120px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #000;
  text-align: center;
  opacity: 0;
}
body.loaded .fadeIn {
  animation: newsFadeIn 0.8s ease 0.6s forwards;
}
@keyframes newsFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* メイン（= .company 相当。屋根＋写真帯は background-image + padding-top で配置）
   ※ background-color は付けない（屋根画像上部の角切り三角が暗色で塗られ、明色のタイトル域と不整合になるため。暗色は inner 側で持つ） */
.news_archive {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background-image: url(../img/news/news_roof_pc.webp);
  background-position: center 0;
  background-repeat: no-repeat;
  background-size: 100%;
  padding-top: 23vw; /* 屋根（写真帯）の高さ分の余白。aspect 3840:897 ≒ 23.4vw（やや手前で暗色 inner と重ね、明色のスキマを防ぐ） */
  color: #fff;
}

/* 暗色の帯（= company_inner 相当。幅は持たせず全幅、背景色はここで） */
.news_archive_inner {
  background-color: #1a1a1a;
  padding: 150px 40px 140px;
}

/* 本文の幅（= company_inner_content 相当） */
.news_archive_inner_content {
  max-width: 800px;
  margin: 0 auto;
}

/* 見出し（◆ お知らせ。= company_head 流用） */
.news_archive_head {
  margin: 0 0 40px;
  font-family: "Yuji Syuku", serif;
  font-size: 28px;
  line-height: 1.57;
  letter-spacing: .08em;
  color: #fff;
}
.news_archive_head::before {
  content: "◆";
  display: inline-block;
  font-size: .6em;
  color: #e3c092;
  margin-right: .6em;
  transform: translateY(-.15em);
}

/* =========================================================
   カテゴリタブ
========================================================= */
.news_archive_tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 40px;
}
.news_archive_tab {
  flex: 1 0 0;
  min-width: 210px;
  min-height: 60px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #333;
  color: #fff;
  font-family: "Yuji Syuku", serif;
  font-feature-settings: "palt" 1, "pwid" 1;
  font-size: 28px;
  line-height: 1.57;
  text-align: center;
  border: none;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease;
}
/* ホバー時・アクティブ時はカテゴリ色（--tab-color）。
   「すべて」は --tab-color を持たないため赤(#c11f1f)にフォールバック。 */
.news_archive_tab:hover,
.news_archive_tab.is-active,
.news_archive_tab.is-active:hover {
  background-color: var(--tab-color, #c11f1f);
}

/* =========================================================
   記事リスト
========================================================= */
.news_archive_item {
  display: block;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
/* .news_archive_item:first-child {
  border-top: 1px solid #e2e8f0;
} */
.news_archive_item:hover {
  background-color: #3e3e3e;
}
.news_archive_item_top {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
}
.news_archive_item_cat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  max-width: 150px;
  margin-right: 20px;
  padding: 2px 10px;
  border-radius: 10px;
  font-family: "Yuji Syuku", serif;
  font-feature-settings: "palt" 1;
  font-size: 16px;
  line-height: 1.75;
  color: #fff;
  text-align: center;
}
.news_archive_item_date {
  font-family: "Yuji Syuku", serif;
  font-feature-settings: "palt" 1;
  font-size: 16px;
  line-height: 1.75;
  color: #fff;
}
.news_archive_item_title {
  font-family: "Yuji Syuku", serif;
  font-feature-settings: "palt" 1;
  font-size: 16px;
  line-height: 1.75;
  color: #fff;
}

.news_archive .no_article {
  padding: 40px 0;
}

/* =========================================================
   ページネーション（中身は news.js が生成）
========================================================= */
/* 見え方は media（.wp-pagenavi）に合わせる。仕組みは B1（JS生成）のまま。 */
.news_archive_pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
}
.news_archive_pagination:empty {
  display: none;
}
/* 数字・省略（= .media .page / .wp-pagenavi .page,.current,.extend） */
.news_archive_page,
.news_archive_ellipsis {
  margin: 0 10px;
  width: 24px;
  text-align: center;
  font-family: "Yuji Syuku", serif;
  font-size: 16px;
  line-height: 1;
  color: #fff;
}
.news_archive_page {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.news_archive_page.is-active {
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* 前へ/次へ（= .media .previouspostslink / .nextpostslink。40px丸・白枠・前後マージン30px） */
.news_archive_arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: none;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.news_archive_arrow--prev { margin-right: 30px; }
.news_archive_arrow--next { margin-left: 30px; }
.news_archive_arrow:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* =========================================================
   SP（750基準：font=min(値/750*100vw,値px)、padding/gap=calc(値/750*100vw)）
========================================================= */
@media (max-width: 750px) {
  /* 黒背景の下端を丸く（= .media_wrapper SP と揃える。overflow:hidden で暗色 inner の下端をクリップ） */
  .news_archive_wrapper {
    border-radius: 0 0 40px 40px;
  }
  .news_archive_title {
    margin: 110px 16px 50px;
    font-size: min(48px, 12vw);
  }
  .news_archive {
    background-image: url(../img/news/news_roof_sp.webp);
    padding-top: 47vw; /* SP屋根 aspect 750:365 ≒ 48.7vw */
  }
  .news_archive_inner {
    padding: calc(100 / 750 * 100vw) calc(40 / 750 * 100vw) calc(160 / 750 * 100vw);
  }
  .news_archive_head {
    margin: 0 0 calc(40 / 750 * 100vw);
    font-size: min(40 / 750 * 100vw, 20px);
  }

  /* タブ：2列（5つ→2,2,1。最後は半幅左寄せ）。
     width を明示し box-sizing:border-box（reset）で 2列ぴったりに割る。 */
  .news_archive_tabs {
    gap: calc(20 / 750 * 100vw);
    padding-bottom: calc(80 / 750 * 100vw);
  }
  .news_archive_tab {
    flex: 0 0 auto;
    width: calc((100% - (20 / 750 * 100vw)) / 2);
    min-width: 0;
    min-height: calc(80 / 750 * 100vw);
    padding: calc(20 / 750 * 100vw);
    font-size: min(56 / 750 * 100vw, 56px);
  }
  /* 最後のタブは全幅（タブ総数が奇数のとき最終行に1つ＝それを 100% に） */
  .news_archive_tab:last-child {
    width: 100%;
  }

  /* 記事リスト */
  .news_archive_item {
    padding: calc(40 / 750 * 100vw) calc(40 / 750 * 100vw);
  }
  .news_archive_item_top {
    padding:calc(16 / 750 * 100vw) 0 calc(16 / 750 * 100vw);
  }
  .news_archive_item_cat {
    width:calc(100/750*100vw);
    margin-right: calc(40 / 750 * 100vw);
    border-radius: calc(10 / 750 * 100vw);
    font-size: min(28 / 750 * 100vw, 14px);
    line-height: 2;
  }
  .news_archive_item_date {
    font-size: min(calc(28 / 750 * 100vw), 28px);
  }
  .news_archive_item_title {
    font-size: min(calc(32 / 750 * 100vw), 32px);
  }

  /* ページネーション（= media SP と同値） */
  .news_archive_pagination {
    padding-top: calc(120 / 750 * 100vw);
  }
  .news_archive_page,
  .news_archive_ellipsis {
    margin: 0 min(10 / 750 * 100vw, 10px);
    width: min(48 / 750 * 100vw, 48px);
    font-size: min(32 / 750 * 100vw, 32px);
  }
  .news_archive_arrow {
    width: min(80 / 750 * 100vw, 80px);
    height: min(80 / 750 * 100vw, 80px);
    font-size: min(36 / 750 * 100vw, 36px);
  }
  .news_archive_arrow--prev { margin-right: min(60 / 750 * 100vw, 60px); }
  .news_archive_arrow--next { margin-left: min(60 / 750 * 100vw, 60px); }
}
