/* ==========================================================================
   News（お知らせ）ページ用スタイル
   モノトーン基調・ミニマルBtoB（style.css / sub.css を前提に追加）
   ========================================================================== */

/* ページ切替（一覧 / 詳細） */
.news-view { display: none; }
.news-view.is-active { display: block; }

/* --- 一覧 --- */
.news-section { padding: 40px 0 96px; }

.news-list {
  border-top: 1px solid #e5e5e5;
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px 8px;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
  transition: background .25s ease, padding .25s ease;
}
.news-item:hover { background: #fafafa; }

.news-item-thumb {
  width: 120px;
  height: 84px;
  border-radius: 4px;
  overflow: hidden;
  background: #f2f2f2;
  flex-shrink: 0;
}
.news-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 画像なしのプレースホルダ */
.news-item-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4c4c4;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .1em;
}

.news-item-main { min-width: 0; }
.news-item-date {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .04em;
  color: #888;
  margin-bottom: 6px;
}
.news-item-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  color: #0a0a0a;
  /* 2行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item-arrow {
  font-family: 'Archivo', sans-serif;
  font-size: 20px;
  color: #999;
  transition: transform .25s ease, color .25s ease;
}
.news-item:hover .news-item-arrow { transform: translateX(4px); color: #0a0a0a; }

/* 空・読み込み表示 */
.news-empty, .news-loading {
  padding: 64px 8px;
  text-align: center;
  color: #999;
  font-size: 15px;
  line-height: 1.9;
}

/* --- 詳細 --- */
.news-detail-section { padding: 40px 0 96px; }

.news-detail-head { margin-bottom: 32px; }
.news-detail-date {
  font-family: 'Archivo', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .04em;
  color: #888;
  margin-bottom: 12px;
}
.news-detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
  color: #0a0a0a;
  letter-spacing: 0.01em;
}
.news-detail-image {
  margin: 32px 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f2f2f2;
}
.news-detail-image img { width: 100%; height: auto; display: block; }

.news-detail-body {
  font-size: 16px;
  line-height: 2.0;
  color: #222;
  white-space: pre-wrap;   /* 改行をそのまま反映 */
  word-break: break-word;
}

/* 本文中のURL・メールの自動リンク */
.news-detail-body .news-link {
  color: #1a5fb4;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;      /* 長いURLで折り返し */
  transition: color 0.15s;
}
.news-detail-body .news-link:hover {
  color: #0a3d7a;
  text-decoration: underline;
}

/* 戻るボタン（sub.css の .detail-back を踏襲した簡易版） */
.news-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  transition: color .25s ease;
}
.news-back span { font-size: 18px; }
.news-back:hover { color: #0a0a0a; opacity: 1; }

/* --- レスポンシブ --- */
@media (max-width: 640px) {
  .news-item {
    grid-template-columns: 88px 1fr;
    gap: 16px;
    padding: 20px 4px;
  }
  .news-item-thumb { width: 88px; height: 62px; }
  .news-item-title { font-size: 15px; }
  .news-item-arrow { display: none; }
  .news-detail-title { font-size: 22px; }
}

/* ============================================================
 * プレビューバナー（管理者が公開前に確認する時のみ表示）
 * ============================================================ */
.news-preview-bar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #1a1a1a;
  border-bottom: 2px solid #f5c518;
}
.news-preview-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.news-preview-badge {
  flex: 0 0 auto;
  background: #f5c518;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
}
.news-preview-text {
  flex: 1 1 auto;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
}
.news-preview-text strong { color: #f5c518; }
#news-preview-status { color: #cfcfcf; margin-left: 6px; }
.news-preview-close {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.news-preview-close:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}
/* 下書きプレビュー時の状態ラベル */
.news-preview-status-draft { color: #ff9f43 !important; font-weight: 700; }
.news-preview-status-live { color: #5ad17f !important; font-weight: 700; }

@media (max-width: 640px) {
  .news-preview-bar-inner { padding: 8px 16px; gap: 8px; }
  .news-preview-text { font-size: 12px; width: 100%; order: 3; }
}
