/* ==========================================================================
   1. デザインシステム（変数定義）
   ========================================================================== */
:root {
  /* メインカラー */
  --navy: #0f2d54;
  --gray: #4b4c4c;
  --jilaf: #00428e;
  --jilaf2: #18a59f;
  --navy-gradient: linear-gradient(
    to right,
    #1b539c 0%,
    #2062b3 50%,
    #4495e5 100%
  );
  --orange: #d95e40;
  --emerald: #23ac9a;
  --color-labor: #1658a0;
  --color-grassroots: #c62828;
  --color-training: #2d8c66;
  --color-pr: #e6b422;
  --accent-red: #e60012;
  --white: #ffffff;
  /* 背景色 */
  --bg-light: #f9fbfc;
  --bg-gray: #f4f7f6;

  /* テキスト色 */
  --text-main: #333333;
  --text-sub: #666666;
  --text-white: #ffffff;

  /* 余白・サイズ */
  --section-space: 100px; /* セクション間の余白 */
  --container-width: 1200px;

  /* 共通の影・角丸（DBセクション等と統一） */
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 20px 40px rgba(15, 45, 84, 0.2);
}

/* ==========================================================================
   2. ベースのリセット & タイポグラフィ
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* アンカーリンクを滑らかに */
  overflow-x: hidden; /* 横はみ出しによるスクロール防止 */
}

body {
  font-family: "Noto Sans JP", "Montserrat", sans-serif;
  color: var(--text-main);
  background-color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 画面の高さを最低でも100%にする */
  margin: 0;
  overflow-x: hidden; /* 横はみ出しによるスクロール防止 */
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ==========================================================================
   3. 共通レイアウトパーツ
   ========================================================================== */
.main-area {
  flex: 1;
  display: flex; /* mainの中もFlexにして、footerを下に押し出す */
  flex-direction: column;
  margin-left: 80px;
  /* これにより、フッターが自動的に一番下へ押し出されます */
}
#footer {
  margin-top: auto; /* これで自動的に一番下へ着地します */
  width: 100%;
}
@media (max-width: 900px) {
  .main-area {
    margin-left: 0;
  }
}

/* コンテンツ幅を制限するコンテナ */
.l-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* セクションの基本設定 */
.l-section {
  padding: var(--section-space) 0;
  position: relative;
}

.l-w100 {
  width: 100% !important;
}

.l-w90 {
  width: 90% !important;
}

.l-w80 {
  width: 80% !important;
}

.l-w70 {
  width: 70% !important;
}

.l-w60 {
  width: 60% !important;
}

.l-w50 {
  width: 50% !important;
}

.l-w40 {
  width: 40% !important;
}

.l-w30 {
  width: 30% !important;
}
.l-w20 {
  width: 20% !important;
}

.d-flex {
  display: flex !important;
}

/* グリッド背景（DBセクション等で多用） */
.u-bg-grid {
  background-color: var(--bg-light);
  background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ==========================================================================
   4. 共通コンポーネント
   ========================================================================== */

/* セクションタイトル */
/* セクションタイトル（共通） */
.c-section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative; /* 念のため基準点に */

  /* フレックスボックスで縦並びの中央揃えを確実に */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 英語タイトル */
.c-section-header .en {
  font-family: "Montserrat", sans-serif; /* 変数があれば var(--font-en) */
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 10px; /* 日本語との間隔 */
  letter-spacing: 0.05em;
}

/* 日本語タイトル */
.c-section-header .jp {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-sub); /* または #666 */
  display: block;
}

/* --- ここが追加する「横線」のコード --- */
.c-section-header::after {
  content: "";
  display: block;
  width: 60px; /* 線の長さ（お好みで調整） */
  height: 3px; /* 線の太さ */

  /* 色：ネイビー単色ならこれ */
  background: var(--navy);

  /* 色：メニューと同じグラデーションにするならこっち（おすすめ！） */
  /* background: var(--navy-gradient); */

  margin-top: 20px; /* 文字との距離 */
  border-radius: 3px; /* 線の端を少し丸くする */
}
/* 共通ボタン */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  font-weight: bold;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: 0.3s;
  border: none;
}

.c-btn--primary {
  background: var(--navy) !important;
  color: #fff;
}

.c-btn--orange {
  background: var(--orange) !important;
  color: #fff;
}

.c-btn--red {
  background: var(--accent-red) !important;
  color: #fff;
}

.c-btn--red:hover {
  background: var(--accent-red) !important;
}

.c-btn:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

/* --- MSF風ボタンのスタイル --- */
.c-btn {
  /* ベース設定 */
  display: inline-flex;
  align-items: center;
  justify-content: space-between; /* テキストとアイコンを両端に配置 */

  width: 280px; /* MSFのように少し横長に固定（お好みで調整） */
  padding: 12px 20px 12px 30px; /* 右側のパディングはアイコン用に調整 */

  background-color: var(--jilaf); /* JILAFネイビー */
  color: #fff;
  border-radius: 50px; /* 完全な丸み */
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(15, 45, 84, 0.3); /* 影で浮かせる */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* ボタン内のテキスト */
.btn-text {
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* 右側の丸いアイコンエリア */
.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  background-color: #fff; /* アイコン背景は白 */
  border-radius: 50%; /* 正円にする */
  color: var(--jilaf); /* 矢印の色はネイビー */

  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

/* --- ホバー時のアニメーション --- */
.c-btn:hover {
  background-color: #0f3d70; /* 少し明るいネイビーに */
  transform: translateY(-2px); /* 少し浮く */
  box-shadow: 0 8px 20px rgba(15, 45, 84, 0.4);
}

/* ホバー時に矢印だけ右に動く */
.c-btn:hover .btn-icon {
  transform: translateX(5px);
  background-color: var(
    --emerald
  ); /* お好みで矢印背景をエメラルドに変化させてもオシャレ！ */
  color: #fff; /* その場合矢印は白に */
}

/* ==========================================================================
   5. ヘルパークラス（微調整用）
   ========================================================================== */
.u-mt-20 {
  margin-top: 20px !important;
}

.u-mt-40 {
  margin-top: 40px !important;
}
.u-pt-20 {
  padding-top: 20px !important;
}
.u-pt-40 {
  padding-top: 40px !important;
}
.u-mb-40 {
  margin-bottom: 40px !important;
}
.u-text-center {
  text-align: center !important;
}
.u-text-right {
  text-align: right !important;
}

.t-font-bold {
  font-weight: bold;
}

/* ==========================================================================
   Utility Switching (出し分け設定)
   ========================================================================== */

/* デフォルト（PC）の設定 */
.sp-only {
  display: none !important; /* スマホ用は隠す */
}

/* スマホ表示（900px以下）の設定 */
@media (max-width: 900px) {
  .pc-only {
    display: none !important; /* PC用は隠す */
  }
  .sp-only {
    display: flex !important; /* スマホ用を表示！ */
  }
}

/* --- ローディング画面全体 --- */
/* ローディング中のスクロール禁止用クラス */
body.is-loading {
  overflow: hidden;
  height: 100vh; /* 画面の高さを固定してスクロールを殺す */
}
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999999;
}

/* 終了時のフェードアウトをより長く、高級に */
.loader.fade-out {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.loader__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader__logo-img {
  width: 150px; /* 少し小さくして余白を強調 */
  height: auto;
  opacity: 0;
  transform: translateY(5px);
  animation: logoReveal 1.2s forwards cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes logoReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 極細プログレスライン --- */
.loader__line {
  position: fixed;
  top: 60%;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--jilaf);
  transform: translateY(60px);
  /* 読み込み中もずっと表示。transitionはさらに速めてもOK */
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 全幅表示用 */
.loader__line.is-full {
  width: 100%;
}

/* 全体のフェードアウト：ここは少しゆっくり（0.8s）消すと高級感が出ます */
.loader.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* ==========================================================================
   COMMON COMPONENTS Responsive (共通パーツ)
   ========================================================================== */

/* --- タブレット・中画面 (900px以下) --- */
@media (max-width: 900px) {
  :root {
    --section-space: 60px; /* セクション間の余白を小さくして間延びを防ぐ */
  }

  /* セクションタイトルの調整 */
  .c-section-header {
    margin-bottom: 40px;
  }

  .c-section-header .en {
    font-size: 2rem; /* 2.5rem -> 2rem */
  }
}

/* --- スマホ (768px以下) --- */
@media (max-width: 768px) {
  :root {
    --section-space: 40px;
  }

  /* 1. コンテナのパディングを少し狭めてコンテンツ幅を確保 */
  .l-container {
    padding: 0 15px;
  }

  /* 2. セクションタイトルの文字サイズ・余白調整 */
  .c-section-header {
    margin-bottom: 25px;
  }

  .c-section-header .en {
    font-size: 1.5rem;
    letter-spacing: 0.02em;
  }

  .c-section-header .jp {
    font-size: 0.75rem;
  }

  .c-section-header::after {
    margin-top: 12px;
    width: 40px;
  }

  /* 3. ボタン (c-btn) のレスポンシブ化 */
  .c-btn {
    width: 100%;
    max-width: 260px;
    padding: 8px 10px 8px 18px;
  }

  .btn-text {
    font-size: 0.85rem;
  }

  .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  /* ヘルパークラスの調整 */
  .u-mb-40 {
    margin-bottom: 20px !important;
  }

  .u-mt-40 {
    margin-top: 20px !important;
  }

  .u-pt-40 {
    padding-top: 20px !important;
  }
}

/* ==========================================================================
   Pagination (ページネーション)
   ========================================================================== */
.pagination-area {
  margin-top: 60px; /* リストとの余白 */
  display: flex;
  justify-content: center; /* 中央寄せ */
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 10px; /* ボタン同士の間隔 */
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 共通のボタンスタイル（円形） */
.page-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px; /* 指でタップしやすいサイズ */
  height: 44px;
  border-radius: 50%; /* 完全な円 */
  text-decoration: none;
  color: #333;
  font-family: var(--font-en); /* 英数字フォント */
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
  border: 1px solid transparent; /* 枠線の場所を確保 */
}

/* 通常時のホバー（マウスを乗せた時） */
a.page-link:hover {
  background: #f0f4f8; /* 薄いブルーグレー */
  color: var(--jilaf);
  transform: translateY(-2px); /* 軽く浮き上がる */
}

/* 現在のページ（Active） */
.page-link.active {
  background: var(--jilaf); /* JILAFブルー */
  color: #fff;
  pointer-events: none; /* クリック無効化 */
  box-shadow: 0 4px 10px rgba(22, 88, 160, 0.3); /* 影をつける */
}

/* 前へ・次へボタンの装飾 */
.page-link.prev,
.page-link.next {
  border: 1px solid #ddd; /* 薄い枠線 */
  color: var(--jilaf);
  font-size: 0.9rem;
}

.page-link.prev:hover,
.page-link.next:hover {
  border-color: var(--jilaf);
  background: var(--jilaf);
  color: #fff;
}

/* 省略リーダー（...） */
.page-item.dot {
  color: #999;
  font-family: var(--font-en);
  letter-spacing: 2px;
  padding: 0 5px;
}

/* --- スマホ対応 --- */
@media screen and (max-width: 768px) {
  .pagination-area {
    margin-top: 40px;
  }

  .pagination-list {
    gap: 6px; /* 間隔を詰める */
  }

  .page-link {
    width: 36px; /* 少し小さく */
    height: 36px;
    font-size: 0.9rem;
  }
}

/* --- トップへ戻るボタン --- */
.page-top {
  position: fixed;
  cursor: pointer;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--jilaf); /* 紺色 */
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  z-index: 100;
  opacity: 0; /* 最初は隠す */
  visibility: hidden; /* クリックもできない状態に */
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* スクロール後に追加されるクラス */
.page-top.is-show {
  opacity: 1;
  visibility: visible;
}

.page-top:hover {
  background-color: var(--orange); /* ホバーでオレンジに */
  transform: translateY(-5px); /* 少し浮く */
}

.page-top i {
  font-size: 1.2rem;
}

/* スマホでは少し位置を調整 */
@media screen and (max-width: 768px) {
  .page-top {
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
  }

  .d-flex {
    flex-direction: column;
  }
}

.c-map-embed {
  width: 100%; /* 親要素の幅いっぱいに広げる */
  aspect-ratio: 4 / 3; /* 縦横比を指定（4:3 が地図には一般的） */
}

.c-map-embed iframe {
  width: 100%;
  height: 100%;
}

/* スマホでもう少し正方形に近づけたい場合（お好みで） */
@media screen and (max-width: 600px) {
  .c-map-embed {
    aspect-ratio: 1 / 1; /* スマホでは正方形で見やすく */
  }
}
/* カテゴリ別の背景色設定 */
.bg-ir {
  background-color: #1658a0 !important;
  color: #fff;
} /* 青 */
.bg-gr {
  background-color: #c62828 !important;
  color: #fff;
} /* 緑 */
.bg-world {
  background-color: #ffc107 !important;
  color: #333;
} /* 黄 */
.bg-other {
  background-color: #6c757d !important;
  color: #fff;
} /* グレー */
