/* ==========================================================================
   News (お知らせ) セクション スタイルシート
   ========================================================================== */

#news-section {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto 80px auto;
}

/* トップページ(body.home)ではセクション区切り線＋上余白を追加 */
.home #news-section {
  margin-top: 60px;
  padding-top: 60px;
  border-top: 1px solid #e2e8f0;
}

#news-section h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

/* 英語の補助ラベル「News」 */
#news-section h2::before {
  content: "News";
  display: block;
  font-size: 14px;
  color: #0E426D;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

/* お知らせリスト */
#news-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  border-top: 1px solid #e2e8f0;
}

.news-row {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s ease;
}

.news-row:hover {
  background-color: #f7fafc;
}

/* 各お知らせのリンクコンテナ */
.news-item-link {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  text-decoration: none;
  color: #4a5568;
  font-size: 15px;
  transition: color 0.2s ease;
}

.news-item-link:hover {
  color: #2d3748;
}

/* 日付 */
.news-date {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  color: #718096;
  min-width: 110px;
  flex-shrink: 0;
}

/* カテゴリバッジ */
.news-badge {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 20px;
  margin: 0 20px;
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}

/* 種別ごとのバッジ配色 */
.badge-research {
  background-color: #ebf8ff;
  color: #2b6cb0;
}

.badge-event {
  background-color: #fffaf0;
  color: #dd6b20;
}

.badge-award {
  background-color: #ebf8ff;
  color: #2b6cb0;
}

.badge-admin {
  background-color: #edf2f7;
  color: #4a5568;
}

.badge-media {
  background-color: #ebf8ff;
  color: #2b6cb0;
}

/* タイトル */
.news-title {
  flex-grow: 1;
  line-height: 1.5;
  white-space: normal; /* 改行を許可する */
  padding-right: 15px;
}

/* 矢印アイコン */
.news-arrow {
  color: #cbd5e0;
  font-weight: bold;
  transition: transform 0.2s ease, color 0.2s ease;
  margin-left: 10px;
}

.news-item-link:hover .news-arrow {
  transform: translateX(6px);
  color: #3182ce;
}

/* 「一覧を見る」ボタン */
.news-more-btn-container {
  text-align: left;
}

.news-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  border: 1px solid #cbd5e0;
  border-radius: 30px;
  color: #4a5568;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.news-more-btn::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.news-more-btn:hover {
  background-color: #edf2f7;
  color: #2d3748;
  border-color: #a0aec0;
}

.news-more-btn:hover::after {
  transform: translateX(4px);
}

/* 読み込みエラー */
.news-error {
  padding: 20px;
  color: #e53e3e;
  text-align: center;
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 768px) {
  .news-item-link {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .news-date {
    width: auto;
    min-width: auto;
    margin-bottom: 6px;
  }

  .news-badge {
    margin: 0 0 6px 12px;
  }

  .news-title {
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    padding-right: 0;
    margin-top: 4px;
    order: 3; /* タイトルを下部に落とす */
  }

  .news-arrow {
    margin-left: auto;
    order: 2;
  }
}

/* ==========================================================================
   パジネーション（ページ分割）スタイル
   ========================================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  font-size: 15px;
  font-weight: 500;
  color: #4a5568;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  border-color: #cbd5e0;
  background-color: #f7fafc;
  color: #2d3748;
}

.page-btn.active {
  background-color: #0E426D; /* FEDL Blue */
  border-color: #0E426D;
  color: #fff;
  cursor: default;
}

.page-btn:disabled {
  color: #cbd5e0;
  border-color: #edf2f7;
  cursor: not-allowed;
}

/* ==========================================================================
   カテゴリーフィルター スタイル
   ========================================================================== */
.filter-container {
  margin-bottom: 25px;
}

.filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-btn:hover {
  background-color: #edf2f7;
  color: #2d3748;
  border-color: #cbd5e0;
}

.filter-btn.active {
  background-color: #0E426D; /* FEDL Blue */
  border-color: #0E426D;
  color: #fff;
}
