@charset "utf-8";

main {
  background-color: #f4f9f4;
}

article {
  max-width: 600px;
  margin: auto;
  border: 1px solid #c9d8c2; /* ✅ ここで上下左右に線が出る */
  background-color: #fff;
}

section h1 {
    color: #2e4d3c;
    font-size: 1.5em;
    padding: 40px 5% 50px 5%;
}

.day2 {
    font-size: 1em;
    color: #555;
    text-align: center;
    padding-top: 20px;
}

.tags {
  display: block;
  margin: 20px 5%;
}

section {
    text-align: center;
}

section p{
  font-size: 1em;
  text-align: left;
  width: 95%;
  margin: auto;
}

section img,section video{
  width: 95%;
  margin-top: 30px;
}

section video{
  border: 1px solid #000;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  max-width: 80%;
  margin: 40px auto;
  border-top: 1px solid #ccc;
  padding-top: 20px;
  font-size: 1rem;
}

.prev-article,
.next-article {
  color: #2e4d3c;
  text-decoration: none;
}

.prev-article:hover,
.next-article:hover {
  color: #6da06d;
}
/* 🔹関連記事全体ブロック */
#related-articles {
  width: 90%;         
  margin: 40px auto;         
  padding: 40px 20px;
  background-color: #a3c9a8;
  text-align: center;
  border-radius: 8px;
}

/* 🔹見出し（h3）は.related-listの外に置く */
#related-articles h3 {
  font-size: 1.5em;
  margin-bottom: 40px; /* ← これでカードとの隙間を確保 */
  color: #2e4d3c;
  text-align: center;
}

/* 🔹カードリスト（ul） */
.related-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* デフォルト3列 */
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  justify-content: center;
}

/* 🔹各カード（li） */
.related-list li {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.related-list li:hover {
  transform: translateY(-4px);
}

.related-list a {
  display: block;
  color: #2e4d3c;
  text-decoration: none;
  height: 100%;
}

/* 🔹画像 */
.related-list img.thumb-img {
  width: 100%;
  height: 120px;
  padding: 5px;
  object-fit: cover;
  display: block;
  border-radius: 12px;  /* 角を丸く */
}

/* 🔹テキスト */
.related-list .text-block {
  padding: 0.5em 1em 1em;
}

.related-list .sidebar-title {
  font-weight: bold;
  margin-bottom: 0.3em;
  font-size: 0.95em;
  line-height: 1.4;
}

.related-list .sidebar-date {
  color: #888;
  font-size: 0.8em;
}

/* 🔸レスポンシブ対応 */
@media (max-width: 1199px) {
  .related-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .related-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-nav a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #f0f8f0;
  color: #2e4d3c;
  border: 1px solid #b4d8b4;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.article-nav a:hover {
  background-color: #d8f0d0;
}







