/* ==========================================================================
   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: var(--fedl-blue);
  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;
}

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

/* タイトル */
.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: var(--fedl-blue); /* FEDL Blue */
  border-color: var(--fedl-blue);
  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: var(--fedl-blue); /* FEDL Blue */
  border-color: var(--fedl-blue);
  color: #fff;
}


/* ==========================================================================
   News Detail (お知らせ詳細) ページ専用共通スタイル (news-detail.css)
   ========================================================================== */

#event-detail-section {
  width: 90%;
  max-width: 1200px;
  margin: 40px auto 80px auto;
  background-color: #ffffff;
}

/* メイン見出し */
#event-detail-section h2 {
  font-size: 28px;
  color: #333;
  margin-top: 0;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 10px;
  border-bottom: none;
}

#event-detail-section h2::before {
  display: none !important;
}

.news-breadcrumb {
  font-size: 14px;
  font-weight: 600;
  color: #a0aec0;
  margin-bottom: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.news-breadcrumb a {
  color: var(--fedl-blue);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.news-breadcrumb a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.news-breadcrumb .separator {
  margin: 0 8px;
  color: #cbd5e0;
}

/* 小見出し */
#event-detail-section h3 {
  font-size: 20px;
  color: #1a202c;
  margin: 35px 0 18px 0;
  font-weight: 700;
  border-left: 4px solid var(--fedl-blue);
  padding-left: 12px;
  line-height: 1.35;
}

/* 本文段落 */
#event-detail-section p {
  font-size: 15.5px;
  color: #4a5568;
  line-height: 1.85;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: justify;
}

/* 画像スタイル */
#event-detail-section img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  margin: 15px auto;
  display: block;
}

/* 複数写真のグリッドレイアウト用 */
.event-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.event-photo-grid img {
  margin: 0 !important;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* テーブルスタイル（スコアブックなど用） */
#event-detail-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  font-size: 14.5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  border-radius: 6px;
  overflow: hidden;
}

#event-detail-section th, 
#event-detail-section td {
  border: 1px solid #edf2f7;
  padding: 12px 16px;
  text-align: center;
}

#event-detail-section th {
  background-color: #f7fafc;
  font-weight: 600;
  color: #2d3748;
}

#event-detail-section tr:nth-child(even) {
  background-color: #fcfdfe;
}

/* リスト表示 */
#event-detail-section ul, 
#event-detail-section ol {
  margin: 15px 0 20px 24px;
  color: #4a5568;
  line-height: 1.8;
}

#event-detail-section li {
  margin-bottom: 8px;
}

/* 強調表示 */
#event-detail-section b, 
#event-detail-section strong {
  color: #2d3748;
}

/* モバイル対応 */
@media (max-width: 768px) {
  #event-detail-section {
    width: 92%;
    margin: 30px auto 60px auto;
  }
  #event-detail-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  #event-detail-section h3 {
    font-size: 18px;
    margin: 25px 0 15px 0;
  }
  #event-detail-section p {
    font-size: 14.5px;
  }
  #event-detail-section th, 
  #event-detail-section td {
    padding: 8px 10px;
    font-size: 13px;
  }
}
