/* ==============================================================
 * お知らせ用 CSS
 * --------------------------------------------------------------
 * 共通：
 *   .news-section            ... セクション全体
 *   .news-section__title     ... 「お知らせ」見出しバー
 *   .news-list               ... 日付＋タイトルの一覧
 *   .news-list__item         ... 1行
 *   .news-list__item--with-thumb ... 右側に画像があるバージョン
 *   .news-more-btn           ... 「他の記事もみる」ボタン
 *
 * 単体記事ページ：
 *   .news-single             ... 記事全体
 * ============================================================== */

/* セクション全体（HOMEと一覧で共用） */
.news-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}

/* right-content-inner 内に置かれている場合（一覧・シングルページ）は外側マージンを詰める */
.right-content-inner .news-section {
  margin: 20px 0 30px;
  padding: 0 30px;
  max-width: none;
}
.right-content-inner .news-single {
  margin: 20px 0 60px;
  padding: 0 30px;
  max-width: none;
}

/* 「お知らせ」見出しバー（HOME用） */
.news-section__title {
      display: block;
    background: #ffa5ab;
    border: 1px solid #f99da4;
    border-radius: 4px;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 2px;
    margin: 0 0 10px;
}

/* 一覧本体 */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list__item {
  border-bottom: 1px solid #e2e2e2;
}

.news-list__item a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 12px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease, color 0.2s ease;
}

.news-list__item a:hover {
  background: #fdf3f4;
  color: #f78893;
}

/* 日付＋タイトルのラッパー */
.news-list__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0; /* flex子要素のellipsisを効かせる */
}

.news-list__date {
  flex-shrink: 0;
  width: 90px;
  font-size: 13px;
  color: #888;
  letter-spacing: 1px;
}

.news-list__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  /* 1行で省略 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 左側アイキャッチ画像（一覧ページのみ） */
.news-list__thumb {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  background: #fdf3f4;
}
.news-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
/* ダミー画像（アイキャッチ未設定時）はトリミングせず全体を表示 */
.news-list__thumb--fallback {
  background: #fff;
  border: 1px solid #f0e0e3;
}
.news-list__thumb--fallback img {
  object-fit: contain;
  padding: 12px;
  background: #fff;
}
/* ダミー画像が読み込めなかった時の最終フォールバック */
.news-list__thumb--noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf3f4 0%, #f9e0e3 100%);
  color: #e5a8b0;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 2px;
}
.news-list__item--with-thumb a:hover .news-list__thumb img {
  transform: scale(1.06);
}

/* 画像付き行のレイアウト（縦幅を広げる） */
.news-list__item--with-thumb a {
  gap: 28px;
  padding: 24px 12px;
}
.news-list__item--with-thumb .news-list__main {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.news-list__item--with-thumb .news-list__date {
  width: auto;
  font-size: 14px;
}
.news-list__item--with-thumb .news-list__title {
  font-size: 16px;
  line-height: 1.6;
  white-space: normal;
  /* 2行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: clip;
}

/* 「他の記事もみる」ボタン */
.news-more-wrap {
  text-align: center;
  margin: 40px 0 10px;
}

.news-more-btn {
  display: inline-block;
  min-width: 280px;
  padding: 16px 28px;
  border: 1px solid #444;
  border-radius: 999px;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 2px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-more-btn:hover {
  background: #f78893;
  color: #fff;
  border-color: #f78893;
}

/* 状態メッセージ */
.news-loading,
.news-empty,
.news-error {
  text-align: center;
  padding: 30px 10px;
  color: #888;
  font-size: 14px;
  list-style: none;
}
.news-error {
  color: #c0392b;
}

/* ページネーション（一覧ページ用） */
.news-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0 10px;
}
.news-pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #444;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}
.news-pagination button:hover:not(:disabled) {
  background: #fdf3f4;
  color: #f78893;
}
.news-pagination button.is-current {
  background: #f78893;
  color: #fff;
  border-color: #f78893;
}
.news-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}


/* ==============================================================
 * 単体記事ページ
 * ============================================================== */

.news-single {
  max-width: 800px;
  margin: 30px auto 60px;
  padding: 0 20px;
}

.news-single__date {
  display: block;
  font-size: 13px;
  color: #888;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.news-single__title {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  line-height: 1.5;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f78893;
}

.news-single__thumb {
  margin: 0 0 24px;
  text-align: center;
}
.news-single__thumb img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.news-single__body {
  font-size: 15px;
  line-height: 1.9;
  color: #444;
}
.news-single__body p {
  margin: 0 0 1em;
}
.news-single__body img {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
}
.news-single__body a {
  color: #f78893;
  text-decoration: underline;
}
.news-single__body h2,
.news-single__body h3 {
  font-weight: bold;
  margin: 1.5em 0 0.5em;
  color: #333;
}
.news-single__body ul,
.news-single__body ol {
  margin: 0 0 1em 1.5em;
}

.news-back-wrap {
  text-align: center;
  margin-top: 50px;
}


/* ==============================================================
 * レスポンシブ（スマホ対応）
 * ============================================================== */

@media (max-width: 768px) {
  /* SP時のヘッダー分の余白を確保（他ページのCSSにある共通ルール） */
  .content_wrap {
    padding-top: 64px;
  }
  .news-section {
    margin: 24px auto;
    padding: 0 12px;
  }
  /* SP時、h4見出しの左右余白(padding: 0 10px)に揃える */
  .right-content-inner .news-section {
    margin: 16px 0 24px;
    padding: 0 10px;
  }
  .right-content-inner .news-single {
    margin: 16px 0 40px;
    padding: 0 10px;
  }
  /* h4 ページタイトル：他ページ同様に上部のスペースを確保 */
  .right-content-inner > h4 {
    margin-top: 0;
  }
  .news-section__title {
    font-size: 14px;
    padding: 12px 14px;
  }

  /* HOME（画像なし）レイアウト */
  .news-list__item:not(.news-list__item--with-thumb) .news-list__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .news-list__item:not(.news-list__item--with-thumb) .news-list__date {
    width: auto;
    font-size: 12px;
  }
  .news-list__item:not(.news-list__item--with-thumb) .news-list__title {
    font-size: 14px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 一覧ページ（画像あり）レイアウト */
  .news-list__item--with-thumb a {
    gap: 14px;
    padding: 16px 8px;
  }
  .news-list__item--with-thumb .news-list__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .news-list__item--with-thumb .news-list__date {
    width: auto;
    font-size: 12px;
  }
  .news-list__item--with-thumb .news-list__title {
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news-list__thumb {
    width: 110px;
    height: 110px;
    border-radius: 6px;
  }
  .news-list__thumb--noimg {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .news-more-wrap {
    margin: 24px 0 0;
  }
  .news-more-btn {
    min-width: 220px;
    padding: 13px 20px;
    font-size: 13px;
  }

  /* 単体記事ページ */
  .news-single {
    margin: 20px auto 40px;
    padding: 0 14px;
  }
  .news-single__title {
    font-size: 18px;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }
  .news-single__body {
    font-size: 14px;
    line-height: 1.8;
  }
}
