body {
  margin: 0;
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* --- ヘッダー設定（PC/共通） --- */
.hero {
  width: 100%;
  min-height: 350px;
  background-color: #fcdd11; /* イラストの背景色と合わせる #FF7676 */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 50px;
}

/* PCでは背景画像として右に配置 */
@media (min-width: 601px) {
  .hero {
    background-image: url("title01.webp");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
  }
  .hero-content {
    padding-left: 5%;
    max-width: 50%; /* 文字がイラストに被らないように制限 */
  }
}

/* --- スマホ版の劇的ビフォーアフター --- */
@media (max-width: 600px) {
  .hero {
    flex-direction: column-reverse; /* イラストを上に、文字を下に並べる */
    justify-content: center;
    padding: 40px 0;
    min-height: auto;
  }

  /* スマホでは擬似要素でイラストを「独立した画像」のように上に表示 */
  .hero::before {
    content: "";
    display: block;
    width: 100%;
    height: 200px; /* イラストの表示高さ */
    background: url("title02.webp") no-repeat center center;
    background-size: contain;
    margin-bottom: 20px;
  }

  .hero-content {
    padding: 0 20px;
    text-align: center;
  }

  .main-title {
    font-size: 2.2rem;
    line-height: 1.2;
    /* スマホでは縁取りを少し細くしてスッキリさせる */
    text-shadow:
      2px 2px 0 #fff,
      -2px 2px 0 #fff,
      2px -2px 0 #fff,
      -2px -2px 0 #fff;
  }

  .sub-title {
    font-size: 0.85rem;
    margin-top: 10px;
  }
}

/* グリッドレイアウト */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.post-card:hover {
  transform: translateY(-5px);
}
.post-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.post-content {
  padding: 20px;
}
.post-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
/* .post-excerpt { font-size: 0.9rem; color: #666; } */

.post-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6; /* 行間を指定することで3行の高さを安定させる */
  max-height: 4.8em; /* line-height × 3行分。万が一の保険 */

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* 英語ブログで重要な単語の折り返し設定 */
  word-break: break-all;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-top: 40px;
}
.pagination a {
  display: block;
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}
/* 現在のページ（反転） */
.pagination a.active {
  background: #333;
  color: #fff;
  border-color: #333;
}
/* ホバー時 */
.pagination a:hover:not(.active) {
  background: #eee;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}
