/* ==========================================
   ニュース関連専用 (news.css)
========================================== */
/* --- ニュースリスト共通 --- */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 16px 12px;
  /* ★すべてのニュースに共通の余白（12px）を持たせる */
  border-bottom: 0.5px solid var(--color-border-tertiary);
  font-size: 16px;
  align-items: flex-start;
  border-radius: 8px;
  /* ★あらかじめ角を丸くしておく */
  transition: background-color 0.2s, transform 0.2s;
  /* ★動きをなめらかにする設定 */
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 15px;
  color: var(--color-text-tertiary);
  width: 100px;
  flex-shrink: 0;
  padding-top: 2px;
  white-space: nowrap;
}

.news-text {
  font-size: 15px;
  color: var(--color-text-primary);
  line-height: 1.65;
  flex: 1;
}

/* カテゴリバッジ（変更なし） */
.nbadge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 7px;
  vertical-align: middle;
  background: #E6F1FB;
  color: #0C447C;
}

.nbadge.award {
  background: #FAEEDA;
  color: #633806;
}

/* ▼ クリック可能ニュースのアニメーション（ズレの原因だった margin と padding を削除） ▼ */
.clickable-news {
  cursor: pointer;
}

.clickable-news:hover {
  background-color: #f4f6f8;
  transform: translateX(4px);
  /* マウスを乗せると少しだけ右に動く */
}

/* --- ニュース詳細ページ(news.html)用レイアウト --- */
.news-layout {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.news-main-area {
  flex: 1;
}

.news-sidebar {
  width: 140px;
  flex-shrink: 0;
}

.sidebar-inner {
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--color-text-tertiary);
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border-tertiary);
  padding-bottom: 8px;
}

.year-list {
  list-style: none;
  padding: 0;
}

.year-list li {
  margin-bottom: 12px;
}

.year-list a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.year-list a:hover,
.year-list a.active {
  color: #185FA5;
  font-weight: bold;
}

.year-divider {
  font-size: 22px;
  font-weight: bold;
  color: #185FA5;
  border-bottom: 2px solid #e5e7eb;
  margin: 40px 0 16px 0;
  padding-bottom: 8px;
}

.year-divider:first-child {
  margin-top: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 50px;
}

.page-btn {
  padding: 8px 14px;
  border: 1px solid var(--color-border-tertiary);
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.2s;
  font-size: 14px;
}

.page-btn:hover {
  background: #f3f4f6;
}

.page-btn.active {
  background: #185FA5;
  color: #fff;
  border-color: #185FA5;
}

/* --- ニュース詳細ポップアップ用 --- */
.news-modal-content {
  background-color: #fff;
  margin: 3vh auto;
  padding: clamp(20px, 3vw, 40px);
  max-width: 1000px;
  width: 95%;
  height: 94vh;
  display: flex;
  flex-direction: column;
}

#newsModalLinkContent {
  border: 1px solid var(--color-border-tertiary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#newsModalIframe {
  width: 100%;
  height: 100%;
  flex-grow: 1;
}

.news-modal-footer {
  margin-top: 24px;
  text-align: center;
  flex-shrink: 0;
}

#newsModalStandardContent {
  overflow-y: auto;
  flex-grow: 1;
  padding-right: 12px;
}

.modal-image-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.modal-image-gallery img {
  border-radius: 8px;
  max-height: 75vh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .news-layout {
    flex-direction: column-reverse;
    gap: 40px;
  }

  .news-sidebar {
    width: 100%;
  }

  .sidebar-inner {
    position: static;
  }

  .year-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .news-item {
    flex-direction: column;
    gap: 4px;
  }

  .news-date {
    width: auto;
  }
}