/*
 * news/assets/css/style.css
 * Niflon BS4 デザイン統合版 — ニュースリスト＋詳細ページ共通
 */

/* ================================================================
   ニュースリスト (index.php)
   ================================================================ */
.news-content {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.newslist {
  padding: 0;
  margin: 0;
}

.newslist li {
  margin: 0;
  padding: 1em 0;
  border-bottom: 1px solid #e8ecef;
  list-style-type: none;
  color: #333;
  font-size: 0.9rem;
}

.newslist li:last-child {
  border-bottom: none;
}

/* カテゴリバッジ（リストと詳細共通） */
.category-name {
  display: inline-block;
  width: 80px;
  margin-right: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
}

.cat-0 .category-name { background-color: #1b3d6e; }
.cat-1 .category-name { background-color: #32cd32; }
.cat-2 .category-name { background-color: #f08080; }
.cat-3 .category-name { background-color: #ffa500; }
.cat-4 .category-name { background-color: #824880; }
.cat-5 .category-name { background-color: #1e90ff; }
.cat-6 .category-name { background-color: #6c848d; }

/* 詳細ページのカテゴリバッジは幅を少し広く */
.detail-cat .category-name {
  width: auto;
  padding: 3px 14px;
  font-size: 0.78rem;
}

.category-name:hover {
  opacity: 0.75;
  color: #fff;
  text-decoration: none;
}

/* 日付・タイトル（リスト） */
.up_ymd {
  margin-right: 0.75rem;
  color: #888;
  font-size: 0.85rem;
}

.newslist-head .title {
  font-weight: 600;
  color: #1b3d6e;
  margin-right: 0.5rem;
}

.newslist-head .title a {
  color: #1b3d6e;
  text-decoration: none;
  transition: color 0.2s;
}

.newslist-head .title a:hover {
  color: #3a6ea8;
  text-decoration: underline;
}

/* New! バッジ */
.new-label {
  display: inline-block;
  padding: 1px 8px;
  background-color: #e63946;
  border-radius: 3px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}

/* サムネイル・本文（リスト） */
.newslist-body {
  margin-top: 0.6rem;
}

.thumbnail-wrapper {
  width: 110px;
  margin-right: 1rem;
  float: left;
  overflow: hidden;
  border-radius: 4px;
}

@media (min-width: 768px) {
  .thumbnail-wrapper {
    width: 180px;
  }
}

.thumbnail-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.comment {
  display: block;
  color: #555;
  font-size: 0.88rem;
  line-height: 1.75;
  overflow: hidden;
}

/* ページャー */
.pager {
  padding: 0.5em 0;
  text-align: right;
  clear: both;
  font-size: 0.88rem;
}

.pager a {
  display: inline-block;
  margin: 0 3px;
  padding: 4px 10px;
  background: #1b3d6e;
  color: #fff;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
}

.pager a:hover {
  background: #3a6ea8;
  color: #fff;
  text-decoration: none;
}

/* ================================================================
   詳細ページ (news.php)
   ================================================================ */

/* 記事タイトル */
.detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1b3d6e;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #1b3d6e;
  line-height: 1.5;
}

/* 日付（詳細） */
.detail-up_ymd {
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #888;
  text-align: right;
}

/* 本文エリア */
.detail {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .detail {
    padding: 0 1rem;
  }
}

.detail-text {
  padding: 0.5em 0;
  font-size: 0.95rem;
  line-height: 1.9;
  color: #333;
}

.detail-text a {
  color: #1b3d6e;
  text-decoration: underline;
}

.detail-text a:hover {
  color: #3a6ea8;
}

.detail-text span {
  line-height: 2;
}

/* 添付ファイル */
.detail-upfile {
  margin: 1.5rem 0;
  text-align: center;
}

.detail-upfile img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-upfile a {
  display: inline-block;
  padding: 0.5em 1.5em;
  border: 1px solid #1b3d6e;
  border-radius: 4px;
  color: #1b3d6e;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.detail-upfile a:hover {
  background: #1b3d6e;
  color: #fff;
}

/* 戻るボタンエリア */
.transition-btn {
  margin-top: 3rem;
  text-align: center;
  padding-bottom: 2rem;
}

/* ================================================================
   headline.php (iframeコンテンツ)
   ================================================================ */
.guidance {
  font-size: 0.8rem;
  text-align: right;
  margin-top: 0.5rem;
}

.guidance a {
  font-weight: 700;
  color: #1b3d6e;
  text-decoration: underline;
}

/* iframe 表示時のボディリセット */
body.iframe_item {
  background: #fff;
  margin: 0;
  padding: 8px 12px;
}
