/* ===== News table (white rows + thick black separators) ===== */

/* ========= News detail：カード全体 ========= */
.news-detail {
  max-width: var(--container, 1100px);
  margin: 48px auto;
  padding: 0 12px;
  color: var(--fg, #f5f5f5);
}

/* 白カード本体（サイズ小さめ＆横長） */
.news-card-box {
  max-width: 880px;
  /* PCで横に広め、全体は小ぶり */
  margin: 0 auto;
  background: #fff;
  color: #111;
  border: 2px solid #000;
  box-shadow: 0 8px 0 #000;
  /* 黒い太めの影 */
  padding: clamp(12px, 2vw, 22px);
}

/* カード幅にそろう黒帯 */
.news-card-box .news-titlebar {
  background: #000;
  color: #fff;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(16px, 1.8vw, 20px);
  padding: 10px 14px;
  margin: 0 0 12px;
}

/* 日付行（左寄せ） */
.news-date-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 700;
}

.news-date-row .dot {
  width: 12px;
  height: 12px;
  background: #000;
}

/* タイトル（中央） */
.news-head {
  text-align: center;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  margin: 0 0 10px;
}

/* タイトル列を中央寄せ（PC/SP共通） */
.news-cell-title {
  text-align: center !important;
}

/* a自体も中央寄せ（他のCSSに負けないよう保険） */
.news-cell-title a {
  display: inline-block;
  width: 100%;
  text-align: center !important;
}

/* 本文 */
.news-body {
  line-height: 1.8;
}

.news-body img,
.news-body video,
.news-body iframe {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
}

/* 詳細本文を中央寄せ（段落にも効かせる） */
.news-body {
  text-align: center !important;
}
.news-body p {
  text-align: center !important;
}

/* ヒーロー画像：はみ出さない＆縦長になり過ぎない */
.news-hero {
  width: 100%;
  height: auto;
  max-height: 340px;
  /* PC だとこの上限 */
  object-fit: contain;
  /* 収まるように */
  
  background: #fff;
  margin: 8px auto 12px;
}

/* ボタン行中央 */
.actions,
.button-center {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* ======= SP（640px以下） ======= */
@media (max-width: 640px) {
  .news-detail {
    margin: 36px auto;
    padding: 0 10px;
  }

  .news-card-box {
    width: calc(100% - 20px);
    max-width: 640px;
    padding: 12px;
    
  }

  .news-card-box .news-titlebar {
    font-size: 16px;
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  .news-head {
    font-size: clamp(16px, 4.5vw, 20px);
    margin-bottom: 8px;
  }

  .news-hero {
    max-height: 220px;
    /* スマホで縦長になり過ぎない */
    object-fit: contain;
  }
}

.news-wrap {
  max-width: var(--container, 1100px);
  margin: 80px auto;
  padding: 0 16px;
}

/* 見出し */
.news-titlebar {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(26px, 4vw, 44px);
  color: var(--fg, #f5f5f5);
  margin: 0 0 18px;
}

/* テーブル全体：行間を空けてカード風に */
.news-table {
  width: 100%;
  
  
}

/* 行（白帯 + 枠 + 下に太い黒ライン） */
.news-table tbody tr {
  background: #fff;
  color: #111;
  
  
  /* 角丸にしない */
  
}

/* セル */
.news-table td {
  padding: 18px 20px;
  vertical-align: middle;
}

/* 1列目：■ + 日付（PC） */
.news-cell-date {
  white-space: nowrap;
  font-weight: 600;
  width: 260px;
}

.news-cell-date .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #000;
  margin-right: 12px;
  vertical-align: middle;
  
  /* ■は四角 */
}

.news-table .news-cell-date,
.news-table .news-cell-title a {
  color: #111 !important; /* ← 日付とタイトルも黒 */
}

/* 2列目：タイトル */
.news-cell-title a {
  color: inherit;
  text-decoration: none;
}

.news-cell-title a:hover {
  text-decoration: underline;
}

/* 空表示 */
.news-empty {
  text-align: center;
  padding: 28px 16px;
}

/* Homeの他CSSに負けないようにリンク色を固定（必要なら残す） */
.home-news .news-wrap a,
.home-news .news-cell-title a {
  color: inherit !important;
  text-decoration: none;
}

.home-news .news-wrap a:hover,
.home-news .news-cell-title a:hover {
  text-decoration: underline;
}

/* ======== SP layout for News: date 1st line / title 2nd line ======== */
@media (max-width: 640px) {
  /* 余白と行間（カード間隔） */
  .news-wrap {
    margin: 40px auto 60px;
    padding: 0 12px;
  }

  .news-table {
    
    
    /* カード間のすき間 */
  }

  /* 1カード（角丸なし＆太い黒影） */
  .news-table tbody tr {
    display: block;
    background: #fff;
    color: #111;
    
    
    /* 角丸にしない */
    
    /* 太い黒ライン（影） */
    padding: 14px 14px;
  }

  /* セルは縦積みにする */
  .news-table td {
    display: block;
    width: 100% !important;
    padding: 0;
    /* 内側余白は tr で管理 */
  }

  /* ■ + 日付（1行目） */
  .news-cell-date {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    white-space: nowrap;
    /* 日付を改行させない */
    margin: 2px 0 10px;
    font-size: clamp(14px, 4vw, 18px);
  }

  .news-cell-date .dot {
    width: 14px;
    height: 14px;
    background: #000;
    
    /* 四角の■ */
    flex: 0 0 14px;
    margin-right: 10px;
  }

  /* タイトル（2行目） */
  .news-cell-title a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    line-height: 1.6;
    font-size: clamp(14px, 4vw, 18px);
  }

  .news-cell-title a:hover {
    text-decoration: underline;
  }
}

.news-detail .news-titlebar {
  background: #000;
  color: #fff;
  padding: 14px 18px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(18px, 2.2vw, 22px);
  margin-bottom: 16px;
}

/* 共通：ボタンを中央に */
.actions,
.button-center {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.news-card-box {
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .news-detail {
    margin: 56px auto;
    padding: 0 12px;
  }

  .news-card-box {
    padding: 14px;
  }

  .news-head {
    font-size: clamp(16px, 4.4vw, 20px);
  }
}

.pagination {
  margin: 30px 0;
  text-align: center;
}

.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 4px;
  padding: 8px 14px;
  
  
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: 0.3s;
}

.pagination a:hover {
  background: #333;
  color: #fff;
  
}

.pagination .current {
  background: #333;
  color: #fff;
  font-weight: bold;
  cursor: default;
  
}

/* ニュースタイトルの文字色を黒に固定*/
.news-table .news-cell-title,
.news-table .news-cell-title a {
  color: #111 !important;
}

.news-detail .news-head {
  color: #111 !important;
}

.news-wrap .news-table td.news-empty,
.home-news .news-wrap .news-table td.news-empty {
  color: var(--muted, #d5c7b8) !important;
  background: none !important;
  text-shadow: none !important;
  
}

/* ==== News detail page ==== */
.news-detail {
  padding: 40px 16px 60px;
}

.news-card-box {
  max-width: 880px;
  margin: 0 auto;
}

/* 日付・タイトル周りは既存の .news-meta / .news-heading をそのまま利用 */

.news-hero {
  margin: 18px auto 10px;
}

/* 画像はカードの幅内に収める */
.news-hero img,
.news-thumb {
  display: block;
  max-width: 100%;   /* カード幅を超えない */
  height: auto;
  margin: 0 auto;
  
  object-fit: contain;
}

/* 本文 */
.news-content {
  margin-top: 18px;
  line-height: 1.8;
}

/* 戻るボタンを中央に */
.news-detail-nav {
  margin-top: 24px;
  text-align: center;
}

/* ================================
   お知らせ詳細ページ 修正パッチ
================================ */

/* カード全体 */
.news-detail {
  display: flex;
  justify-content: center;
}

.news-card-box {
  max-width: 820px;
  background: #fff;
  
  
  padding: 24px 20px 32px;
  margin: 24px;
}

/* タイトルバー */
.news-titlebar {
  background: #000;
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 20px;
  padding: 10px 0;
  margin-bottom: 16px;
}

/* 日付 */
.news-meta {
  font-weight: 700;
  margin-bottom: 6px;
}

/* ✅ 記事タイトル：黒・小さめ */
.news-heading {
  color: #000 !important;
  font-size: 22px;
  text-align: center;
  margin: 10px 0 18px;
}

/* ✅ 画像はカード内に必ず収める */
.news-thumb {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto 20px;
  
}

/* ✅ 本文は中央寄せ */
.news-content {
  text-align: center;
  line-height: 1.9;
  margin-top: 12px;
}

/* ボタン */
.news-back {
  text-align: center;
  margin-top: 24px;
}

/* SP向け微調整 */
@media (max-width: 640px) {
  .news-heading {
    font-size: 18px;
  }

  .news-content {
    font-size: 14px;
  }
}


/* ================================
   PC表示で画像が本文に被らないようにする
=============================== */

/* 画像の下に必ず余白を取る */
.news-thumb {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px auto 32px;
  clear: both;
}

/* PC表示専用制御 */
@media screen and (min-width: 769px) {

  .news-card-box {
    overflow: hidden;  /* 浮きを殺す */
  }

  .news-thumb {
    max-height: 420px;        /* デカすぎない */ 
    object-fit: contain;      /* はみ出さない */ 
  }

  .news-content {
    clear: both;              /* 絶対に重ならない */ 
    margin-top: 12px;
  }
}


/* =====================================
   画像と本文の重なり完全防止
===================================== */

.news-card-box {
  position: relative;
  overflow: visible;
}

/* 画像の衝突防止 */
.news-thumb {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
  margin-bottom: 40px;   /* 下に空間を作る */
}

/* 黒線（下ボーダーなど）を本文より下に追いやる */
.news-content {
  position: relative;
  z-index: 2;
  margin-top: 10px;
}

/* PC表示での最大制御 */
@media screen and (min-width: 769px) {

  .news-thumb {
    max-height: 420px;
    object-fit: contain;
    margin-bottom: 48px;
  }
}


/* ===============================
   DETAILページ 画像被り完全解消
=============================== */

/* カード全体を伸びる箱にする */
.news-card-box {
  position: relative;
  overflow: hidden;   /* 枠線より外に出さない */
}

/* 枠線のせいで被るので無効化 */
.news-card-box,
.news-detail .news-card-box,
.news-detail {
  
}

/* 画像をカード内で収める */
.news-thumb {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: contain;
  margin: 30px auto 50px auto;
  position: relative;
  z-index: 1;
}

/* 本文は必ず画像より下 */
.news-content {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  text-align: center;
}

/* PC時に上下スペース確保 */
@media screen and (min-width: 769px) {
  .news-thumb {
    margin-bottom: 60px;
  }
}

/* ====== DETAIL 黒線 強制除去 FINAL ====== */
.news-detail *, 
.news-detail *::before-disabled, 
.news-detail *::after-disabled {
  
}
.news-thumb {
  margin-bottom: 70px !important;
}

/* ▼ 強制的に画像下の線を消す */
.news-hero,
.news-thumb {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.news-hero::before-disabled,
.news-hero::after-disabled,
.news-thumb::before-disabled,
.news-thumb::after-disabled {
  content: none !important;
  display: none !important;
}

/* ▼ news 詳細ページ：画像が本文に被らないようにする */
.news-hero {
  position: static !important;
  display: block !important;
  width: 100%;
  max-width: 100%;
  height: auto !important;
  margin: 16px 0 !important;
  padding: 0 !important;
}

.news-thumb {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;   /* ← 縦を自動に */
  object-fit: contain !important;
  margin: 0 auto !important;
  position: static !important;
}

/* ▼ 本文が画像に被らないようクリア */
.news-content {
  clear: both !important;
  margin-top: 16px !important;
}

.news-card-box {
  overflow: visible !important;
  height: auto !important;
}

/* === お知らせ一覧の縦線を消す === */
.news-list td,
.news-list th {
  border-left:none !important;
}
