/* ==========================================================================
   NEWS セクション
   ========================================================================== */

.news-section {
  background-color: #fff;
  padding-bottom: 80px; /* 下の余白 */
}

/* リストコンテナ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 15px; /* アイテム間の隙間 */
  margin-bottom: 40px;
}

/* 各ニュースアイテム（帯） */
.news-item {
  background: var(--bg-gray); /* 薄いグレー背景 */
  transition: 0.3s;
}

/* ピン止め記事 */
.news-item.is-pinned {
  border-left: 3px solid #e8a000;
  background: #fffbf0;
}
.news-item.is-pinned:hover {
  background: #fff5d6;
}
.info-pin-icon {
  color: #e8a000;
  font-size: 0.75em;
  margin-right: 5px;
  transform: rotate(-30deg);
  display: inline-block;
  vertical-align: middle;
}

.news-item:hover {
  background: #eefbf9; /* ホバー時にほんのりエメラルド色に */
  transform: translateX(5px); /* 少し右に動く */
}

/* リンク全体をブロック化してクリック可能に */
.news-link {
  display: flex;
  align-items: stretch; /* 高さを揃える */
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-main);
  min-height: 60px; /* 帯の高さ確保 */
}

/* 左側のコンテンツエリア */
.news-content {
  flex: 1;
  display: flex;
  align-items: center;
  /* padding: 20px 30px; */
  flex-wrap: wrap; /* スマホで折り返す用 */
  gap: 20px;
}

/* カテゴリーラベル */
.news-cat {
  background: var(--emerald); /* エメラルドグリーン */
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  padding: 6px 20px;
  min-width: 150px;
  height: 100%;
  justify-content: center;
  align-items: center;
  display: flex;
}

/* ニュースタイトル */
.news-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
  flex: 1; /* 余ったスペースを埋める */
}

/* 右端の矢印ボックス */
.news-arrow {
  background: var(--emerald);
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: 0.3s;
}

/* ホバー時の矢印の動き */
.news-item:hover .news-arrow i {
  transform: translateX(3px);
}

/* ==========================================================================
   News Detail Styles (記事詳細ページ専用)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Article Header (記事タイトルエリア)
   -------------------------------------------------------------------------- */
.article-header {
  background-color: #f4f8fb; /* 優しいグレー（JILAFブルーのごく薄い色） */
  padding: 140px 0 60px; /* ヘッダーの高さを考慮 */
  border-bottom: 1px solid #eef2f5;
}

.article-header__inner {
  max-width: 880px; /* 読みやすい幅に制限 */
  margin: 0 auto;
}

/* 日付とカテゴリ */
.article-meta {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-family: var(--font-en);
}

.article-date {
  font-size: 1rem;
  color: #666;
  margin-right: 20px;
  font-weight: 700;
}

.article-cat {
  background: var(--jilaf); /* ブランドカラー */
  color: #fff;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 2px;
  font-weight: 700;
}

/* 記事タイトル */
.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
  color: #333;
  margin: 0;
}

/* --------------------------------------------------------------------------
   2. Article Body (本文エリア)
   -------------------------------------------------------------------------- */
/* 読みやすさのために幅を制限して中央寄せ */
.article-content-width {
  max-width: 800px;
  margin: 0 auto;
}

/* アイキャッチ画像 */
.article-thumbnail {
  margin: 0 0 50px;
  border-radius: 8px;
  overflow: hidden;
}

.article-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* 本文内の画像（Firebaseのリッチエディタ等で挿入される画像） */
.content-box figure {
  /* margin: 40px 0; */
}

.content-box figcaption {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  margin-top: 10px;
}

.content-box img {
  max-height: 400px;
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 40px auto;
}

@media screen and (max-width: 1024px) {
  .content-box img {
    max-height: 320px;
    margin: 30px auto;
  }
}

@media screen and (max-width: 768px) {
  .content-box img {
    max-height: 260px;
    margin: 20px auto;
  }
}

/* --------------------------------------------------------------------------
   3. Attached Files (関連ファイルエリア)
   -------------------------------------------------------------------------- */
.article-files {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  margin-top: 60px;
  border: 1px solid #eee;
}

.file-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
}

.file-title::before {
  content: "\f0c6"; /* クリップアイコン */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #999;
  margin-right: 10px;
}

/* --------------------------------------------------------------------------
   4. Pagination (前後の記事)
   -------------------------------------------------------------------------- */
.article-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.article-nav a {
  text-decoration: none;
  color: #666;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  transition: color 0.3s;
}

.article-nav a:hover {
  color: var(--orange);
}

.article-nav a.center {
  font-weight: 700;
  border: 1px solid #ddd;
  padding: 10px 30px;
  border-radius: 50px;
}
.article-nav a.center:hover {
  background: var(--jilaf);
  color: #fff;
  border-color: var(--jilaf);
}

.article-nav i {
  margin: 0 10px;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Responsive (スマホ対応)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  .article-header {
    padding: 75px 0 25px;
  }

  .article-title {
    font-size: 1.3rem;
  }

  .article-thumbnail {
    margin-bottom: 30px;
  }

  .article-files {
    padding: 20px;
    margin-top: 30px;
  }

  .file-title {
    font-size: 0.95rem;
  }

  /* ナビゲーションを縦積みに */
  .article-nav {
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
  }
  .article-nav a.center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

/* --- PDFボタン専用のカラー上書き設定 --- */

/* アイコンを強制的に「PDFの赤」にする */
.c-btn--pdf .btn-icon {
  color: #d32f2f !important;
}

/* ホバーした時も、アイコンは赤のまま（あるいは白などお好みで） */
.c-btn--pdf:hover .btn-icon {
  color: #d32f2f; /* ホバー時も赤を維持する場合 */
  /* color: #fff;  ホバー時は白抜きにしたい場合はこちら */
}

/* （オプション）ホバー時に枠線や文字も赤くしたい場合 */
.c-btn--pdf:hover {
  border-color: #d32f2f;
  background: #fff5f5; /* 薄い赤の背景 */
  color: #d32f2f;
}

/* ==========================================================================
   NEWS Section Responsive
   ========================================================================== */

/* --- タブレット・中画面 (900px以下) --- */
@media (max-width: 900px) {
  .news-cat {
    min-width: 120px; /* カテゴリー幅を少し削ってタイトル領域を確保 */
    font-size: 0.9rem;
  }

  .news-title {
    font-size: 0.9rem; /* 文字を少し小さく */
  }

  .news-content {
    padding-right: 10px; /* 矢印との間隔を確保 */
  }
}

/* --- スマホ (768px以下) --- */
@media (max-width: 768px) {
  .news-section {
    padding-bottom: 60px; /* 下余白を少し詰める */
  }

  /* 各アイテムの構造を組み替え */
  .news-link {
    flex-direction: column; /* 矢印を切り離す場合はここを調整 */
    position: relative; /* 矢印を絶対配置にするため */
  }

  .news-content {
    flex-direction: column; /* カテゴリーとタイトルを縦並びに */
    align-items: flex-start; /* 左寄せ */
    gap: 10px; /* 隙間を詰める */
    padding: 20px; /* 全体に余白を作る */
    padding-right: 60px; /* 右側の矢印と被らないように */
  }

  .news-cat {
    min-width: auto; /* 幅固定を解除 */
    height: auto;
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 4px; /* スマホではタグっぽく見せる */
  }

  .news-title {
    width: 100%;
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* 矢印ボックスを右側に固定 */
  .news-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px; /* スマホでは少し細く */
  }

  .news-item:hover {
    transform: none; /* スマホでは横移動させない方が誤操作が少ない */
  }

  /* 一覧ボタンを中央寄せに（スマホでは押しやすく） */
  .news-btn-area {
    text-align: center;
    margin-top: 30px;
  }

  .btn-view-all {
    width: 100%; /* ボタンを横いっぱいに */
    max-width: 300px;
  }
}
