html,
body {
  height: 100%;
  color: #ffffff;
  background-color: #929292;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====== グリッド ====== */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 100px;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ====== カード ====== */
.news-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  color: #111;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.news-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  display: block;
  background: #eee;
}

.news-content {
  padding: 20px;
}

.news-date {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #111;
}

.news-description {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
}

/* ====== モーダル ====== */
/* .modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
} */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  padding: 20px; /* モーダル周辺のスペース */
  overflow: auto; /* ビューポートが小さい場合に画面全体でスクロール可能にする */
}

.modal.active {
  display: flex;
}
#modal-body h3 {
  font-size: 18px;
  font-weight: bold;
}

/* モーダル内部のコンテンツ領域：高さ制限と内部スクロールを付与 */
.modal .modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 40px); /* ビューポートに収まる最大高さ */
  box-sizing: border-box;
  padding: 24px;
  overflow: auto; /* コンテンツが多い時はここでスクロール */
  color: #333;
}

/* 閉じるボタンは常に見えるように最前面に */
.modal .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
  background: transparent;
  border: none;
}

.modal .modal-title {
  font-size: 1.8rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.modal .modal-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.modal .modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
  display: block;
  object-fit: cover;
}

.modal .modal-text {
  color: #333;
  line-height: 1.8;
  white-space: pre-line; /* 改行を反映させる */
  font-size: 1.2rem;
}
