/* news.css — お知らせ・導入事例ページ専用スタイル
 *
 * css/style.css（PRECSS: bl_ / el_ / ly_）は変更しない。
 * ここでは Task 6・7 が生成する news/ と case/ のマークアップに対応するクラスだけを追加する。
 * html は font-size:62.5%（1rem=10px）だが、メディアクエリの em/rem は
 * ブラウザ初期値（16px）基準になるため、48rem は既存の 48em と同じ 768px を指す。
 */

:root {
  /* カテゴリバッジの色。白文字（#fff）とのコントラスト比 4.5:1 以上を確保している
   * （case 4.74 / feature 5.72 / service 4.82 / partner 5.30 / notice 4.66）。
   * case はブランドカラー #1B85B3 を基準に、白文字でも読めるようわずかに濃くした。
   * feature は同じ青系だが case よりも深いトーンにして明度差で見分けられるようにしている。
   */
  --news-case: #197BA6;
  --news-feature: #0E6E93;
  --news-service: #22815B;
  --news-partner: #6D5DBE;
  --news-notice: #66777F;
  --news-brand: #1B85B3;
  --news-brand-light: #29ABE2;
  /* ブランドカラー #1B85B3 は白背景・14px文字だと 4.16:1 で AA(4.5:1) 未達のため、
   * 少し濃くした色を用意する（白文字向けではなく文字色として使う）。コントラスト比 5.72:1。
   * 変数名はホバー用として作られたが、M3 対応で本文中のリンク（.bl_newsSource a /
   * .bl_article_company a / .bl_articleBody a / .bl_articleSource a）の通常状態にも
   * 適用し、ホバーと共用している（変数名のリネームは影響範囲が広いため見送った）。 */
  --news-brand-hover-text: #0E6E93;
}

/* ==========================================================================
   ヘッダー配色の上書き（白背景・黒文字化）

   トップページ / /download/ / /inquiry/ はヘッダーの下に緑の帯を敷いて白いナビを
   その上に載せる作りだが、生成ページ（news/ と case/、および記事ページ）にはその帯が
   無いため、素のヘッダーは白背景に白文字（ロゴ fill:white）になり不可視になる。

   同じ問題は /status/ に先行して存在し、css/status.css の冒頭でヘッダー背景を白固定・
   ロゴとPCメニュー文字を黒/ブランドグリーンに上書きして解決している。ここではその上書きを
   news.css にも複製する。

   news.css はトップページ（index.html）からも読み込む（お知らせ枠のカード・バッジ表示に
   必要なため）が、トップページのヘッダーは緑のヒーローの上に白文字で載る設計であり、
   生成ページと同じ白背景・黒文字化を適用すると壊れる。そのためこのヘッダー上書きブロックの
   セレクタだけ `.subpage` 配下に限定し、`<body class="subpage">` を持つ生成ページ
   （news/ と case/、および記事ページ）にのみ効くようにする。カード・バッジ・記事本文・
   パンくず・絞り込み・ページャーなど、この節より下のスタイルはページ種別を問わず必要なため
   `.subpage` では絞り込まない。

   ハンバーガーメニュー用の .bl_mainNavigation_bar / _text / _toggle の上書きも
   同様に `.subpage` 配下に限定する（トグルボタン自体はモバイル幅でのみ表示されるよう
   style.css 側で制御されているため、デスクトップ幅には影響しない）。
   ========================================================================== */

/* ヘッダー背景を白固定 */
.subpage .bl_header,
.subpage .bl_header.is_active,
.subpage .bl_header.js_active,
.subpage .bl_header.fixed,
.subpage .bl_header.is_scroll,
.subpage .bl_header.js_scroll {
  background: #fff !important;
}

/* 上部説明文 */
.subpage .bl_header_logo .el_logo_description,
.subpage .bl_header_logo .el_logo_description path {
  fill: #000 !important;
}

/* matocaロゴ */
.subpage .bl_header_logo .el_logo_name,
.subpage .bl_header_logo .el_logo_name path,
.subpage .bl_header_logo .el_logo_background {
  fill: #70b842 !important;
}

/* マトカ文字 */
.subpage .bl_header_logo .el_logo_kana,
.subpage .bl_header_logo .el_logo_kana path {
  fill: #fff !important;
}

/* ロゴ固定 */
.subpage .bl_header_logo,
.subpage .bl_header_logo * {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

/* PCメニュー文字 */
.subpage .bl_mainNavigation_link,
.subpage .bl_mainNavigation_english {
  color: #000 !important;
}

/* ハンバーガー線を黒固定 */
.subpage .bl_mainNavigation_bar {
  background: #000 !important;
}

/* MENU文字を黒固定 */
.subpage .bl_mainNavigation_text,
.subpage .bl_mainNavigation_text__close {
  color: #000 !important;
}

/* ボタン自体の透過対策 */
.subpage .bl_mainNavigation_toggle {
  opacity: 1 !important;
}

/* ==========================================================================
   パンくずリスト
   news/case のテンプレートは <nav class="bl_breadcrumb"><ol class="bl_breadcrumb_list">
   という構造で、style.css の .bl_breadcrumb{display:flex} は <ol> ではなく <nav> に
   付いてしまうため、そのままでは一覧が横並びにならない。bl_breadcrumb_list に
   flex を付け直す。アンカーにも class が付いていないため要素セレクタで指定する。
   ========================================================================== */
.bl_breadcrumb_list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.bl_breadcrumb_item a {
  color: #00645a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bl_breadcrumb_item a:hover {
  text-decoration: none;
}

/* ==========================================================================
   絞り込みボタン（お知らせ一覧のみ。導入事例一覧には出ない）
   ========================================================================== */
.bl_newsFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.el_newsFilter {
  padding: 0.6em 1.4em;
  border: 1px solid #cfd8db;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s linear, border-color 0.15s linear, color 0.15s linear;
}

.el_newsFilter:hover {
  border-color: var(--news-brand);
  color: var(--news-brand-hover-text);
}

.el_newsFilter.is_on {
  border-color: var(--news-brand);
  background: var(--news-brand);
  color: #fff;
}

/* ==========================================================================
   一覧（モバイル1列 / 48rem(=768px)以上で2列）
   ========================================================================== */
.bl_newsList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 30px;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .bl_newsList {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* トップページの「お知らせ」セクションに埋め込まれる一覧。JS の対象外（js_ が付かない） */
.bl_newsList__top {
  margin-top: 30px;
}

/* ==========================================================================
   カード
   <a class="bl_newsCard_link"> の入れ子リンクを作らないため、カード内リンクは
   これ1本だけの前提。クリック領域はカード全体（display:block）。
   ========================================================================== */
.bl_newsCard {
  overflow: hidden; /* サムネイルをカードの角丸で切り取るため */
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s linear, transform 0.2s linear;
}

.bl_newsCard:hover {
  box-shadow: 0 8px 26px 0 rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

.bl_newsCard_link {
  display: block;
  color: inherit;
}

/* サムネイル。カード上部いっぱい・16:9・object-fit:cover で敷き詰める。
   画像自体が16:9で書き出されているため、object-fit:coverはクロップせず全体表示になる。
   画像を持たないカードでは bl_newsCard_thumb 自体を出力しない。 */
.bl_newsCard_thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: #eee;
}

.bl_newsCard_thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* テキスト部分。padding はここに寄せ、サムネイルはフチなしで出す。 */
.bl_newsCard_body {
  display: block;
  padding: 24px;
}

.bl_newsCard_meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bl_newsCard_date {
  color: #777;
  font-size: 1.3rem;
}

.bl_newsCard_title {
  display: block;
  margin-top: 14px;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.5;
}

.bl_newsCard_summary {
  display: block;
  margin-top: 10px;
  color: #555;
  font-size: 1.4rem;
  line-height: 1.8;
}

/* 導入事例カード（一覧上は el_newsBadge__case と同じ青系だが、タイトルに社名が入るため
   少し強調する） */
.bl_newsCard__case .bl_newsCard_title {
  color: var(--news-case);
}

/* ==========================================================================
   カテゴリバッジ
   ========================================================================== */
.el_newsBadge {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.2em 0.8em;
  border-radius: 999px;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.el_newsBadge__case {
  background: var(--news-case);
}

.el_newsBadge__feature {
  background: var(--news-feature);
}

.el_newsBadge__service {
  background: var(--news-service);
}

.el_newsBadge__partner {
  background: var(--news-partner);
}

.el_newsBadge__notice {
  background: var(--news-notice);
}

/* 導入事例の業種バッジ（カテゴリバッジと違い枠線のみ・背景は薄色） */
.el_industryBadge {
  display: inline-block;
  padding: 0.2em 0.8em;
  border: 1px solid var(--news-case);
  border-radius: 999px;
  color: var(--news-case);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

/* ==========================================================================
   ページャー（JS が組み立てる。要素は news-filter.js が生成する）
   ========================================================================== */
.bl_newsPager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.el_newsPagerButton {
  padding: 0.6em 1.4em;
  border: 1px solid #cfd8db;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s linear, border-color 0.15s linear, color 0.15s linear;
}

.el_newsPagerButton:hover:not(:disabled) {
  border-color: var(--news-brand);
  color: var(--news-brand-hover-text);
}

.el_newsPagerButton:disabled {
  opacity: 0.4;
  cursor: default;
}

.el_newsPagerInfo {
  color: #555;
  font-size: 1.4rem;
  font-weight: 500;
}

/* PR TIMES への外部リンク（一覧下部） */
.bl_newsSource {
  margin-top: 30px;
  text-align: right;
  font-size: 1.3rem;
}

.bl_newsSource a {
  color: var(--news-brand-hover-text);
}

/* ==========================================================================
   絞り込み・ページングで JS が付け外しする表示制御
   ========================================================================== */
.is_hidden {
  display: none;
}

/* ==========================================================================
   記事ページ（お知らせ詳細・導入事例詳細）
   ========================================================================== */
.bl_article {
  margin-top: 30px;
}

.bl_article_header {
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e5e5;
}

.bl_article_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.bl_article_date {
  color: #777;
  font-size: 1.4rem;
}

.bl_article_title {
  margin-top: 16px;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.5;
}

@media (min-width: 48rem) {
  .bl_article_title {
    font-size: 3rem;
  }
}

.bl_article_company {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 14px;
  color: #444;
  font-size: 1.5rem;
  font-weight: 500;
}

.bl_article_company a {
  color: var(--news-brand-hover-text);
}

.bl_article_hero {
  margin-top: 30px;
}

.bl_article_hero img {
  /* 元画像の自然幅より大きく引き伸ばさない（幅指定を width:100% にしない）。
     カラム幅より画像が大きいときは max-width:100% で縮める。 */
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ==========================================================================
   記事本文
   ========================================================================== */
.bl_articleBody {
  margin-top: 30px;
}

.bl_articleBody h2 {
  position: relative;
  margin-top: 2em;
  padding-left: 0.8em;
  border-left: 6px solid var(--news-brand);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.5;
}

.bl_articleBody h2:first-child {
  margin-top: 0;
}

.bl_articleBody h3 {
  margin-top: 1.6em;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.6;
}

.bl_articleBody p {
  margin-top: 1.5em;
  line-height: 1.9;
}

.bl_articleBody p:first-child {
  margin-top: 0;
}

.bl_articleBody img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 12px;
}

.bl_articleBody ul,
.bl_articleBody ol {
  margin-top: 1.5em;
  padding-left: 1.4em;
  line-height: 1.9;
}

.bl_articleBody li + li {
  margin-top: 0.4em;
}

.bl_articleBody blockquote {
  margin-top: 1.5em;
  padding: 1em 1.4em;
  border-left: 4px solid #cfd8db;
  background: #f7f9fa;
  color: #555;
}

.bl_articleBody hr {
  margin: 2em 0;
  border: none;
  border-top: 1px solid #e5e5e5;
}

/* 表・コードブロックは生 HTML で書く逃げ道（設計書 6 節）に対応する最低限のスタイル。
 * ラッパー要素が無い前提で、table 自身に display:block; overflow-x:auto; を当てて
 * モバイル幅でも横スクロールに収める（横溢れ・横スクロールバーの二重発生を防ぐ）。
 */
.bl_articleBody table {
  display: block;
  width: 100%;
  margin-top: 1.5em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 1.4rem;
}

.bl_articleBody th,
.bl_articleBody td {
  padding: 0.6em 1em;
  border: 1px solid #cfd8db;
  text-align: left;
  white-space: nowrap;
}

.bl_articleBody th {
  background: #f7f9fa;
  font-weight: 700;
}

.bl_articleBody pre {
  margin-top: 1.5em;
  padding: 1em 1.2em;
  overflow-x: auto;
  border-radius: 8px;
  background: #f7f9fa;
  font-size: 1.3rem;
  line-height: 1.7;
}

.bl_articleBody a {
  color: var(--news-brand-hover-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bl_articleBody strong {
  font-weight: 700;
}

/* PR TIMES 配信の追記（複数配信日をまとめる記事で使う） */
.bl_articleRelease {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid #e5e5e5;
}

.bl_articleRelease_title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.6;
}

.bl_articleRelease_title time {
  color: #777;
  font-size: 1.3rem;
  font-weight: 500;
}

/* 出典（PR TIMES）表記。本文・release セクション共通 */
.bl_articleSource {
  margin-top: 1.2em;
  padding-top: 1em;
  border-top: 1px solid #e5e5e5;
  color: #777;
  font-size: 1.3rem;
  text-align: right;
}

.bl_articleSource a {
  color: var(--news-brand-hover-text);
}

/* 記事下部のCTA */
.bl_articleCta {
  margin-top: 50px;
  padding: 30px;
  border-radius: 20px;
  background: rgba(27, 133, 179, 0.08);
  text-align: center;
}

.bl_articleCta_text {
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.8;
}

.bl_articleCta_buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

@media (min-width: 48rem) {
  .bl_articleCta_buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* 本文中のインラインアイコン（外部リンクの「別タブで開く」マーク等） */
.el_icon__inline {
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.3em;
  vertical-align: -0.05em;
  fill: currentColor;
}
