/* iPhone 縦 */

body {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.container {
  display: grid;
  grid-template-areas:
        "header"
        "top-nav"
        "main"
        "recent-posts"
        "category"
        "footer";
  grid-template-rows: auto auto auto auto auto 50px;
  grid-template-columns: 1fr;
  gap: 5px;
}

.header {
  grid-area: header;
  /* Fluid Image
     1024 x 240 の画像なので 
     height に 0 を指定し
     padding-bottom に 240/1024 の比率を指定することで
     画面サイズに合わせて画像を表示することができる
  */
  width: 100%;
  height: 0;
  padding-bottom: 23.43%;
  background-size: cover;
  background-image: url("../images/sky.png");
}

/* https://find-a.jp/seotimes/emphasis_design/ 参照 */
.header h1.emphasis_design36{
  color: #ffffff;
  text-shadow: 2px 2px 5px #f0ac00, -2px 2px 5px #f0ac00, 2px -2px 5px #f0ac00, -2px -2px 5px #f0ac00;
  margin-left: 10px;
}

.top-nav {
  grid-area: top-nav;
}

.top-nav ul {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}

.top-nav ul li {
  list-style: none;
  display: inline-block;
  width: 100px;
  padding: 2px;
  background-color: #0080ff;
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}

.top-nav a {
  text-decoration: none;
}

.main {
  grid-area: main;
  border-style: dashed;
  border-radius: 5px;
  border-color: #404040;
  border-width: 1px;
  padding: 10px;
}

.main p.quote {
  text-align: right;
}

.main table,td,th {
  border-collapse: collapse;
  border: 1px #404040 solid;
}

.main th {
  background-color: deepskyblue;
}

/* リスト全体のスタイル */
.card-list {
  list-style: none; /* ドットを消す */
  padding: 0;
  width: 100%;
  /*max-width: 700px;  カードの最大幅 */
}

/* リストアイテム（カードの枠） */
.card-item {
  margin-bottom: 15px; /* カード間の余白 */
}

  /* カード個別のスタイル */
.card-link {
  display: flex; /* 横並びにする */
  align-items: center; /* 垂直方向の中央揃え */
  text-decoration: none; /* 下線を消す */
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px; /* 角丸 */
  overflow: hidden; /* 角丸からはみ出た画像を表示しない */
  padding: 15px;
  margin-bottom: 15px; /* カード間の余白 */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 影 */
  transition: transform 0.2s; /* ホバー時のアニメーション */
}

/* ホバー時の効果 */
.card-link:hover {
  transform: translateY(-3px); /* ホバー時に少し浮き上がる */
  background-color: #f9f9f9;
}

/* 画像のスタイル */
.card-image {
  width: 120px; /* 画像の幅 */
  height: 120px; /* 画像の高さ */
  object-fit: cover; /* 画像の比率を保ったまま縮小 */
  flex-shrink: 0; /* 画像が小さくなるのを回避 */
  border-radius: 4px; /* 画像の角丸 */
  margin-right: 15px; /* 画像と文字の間の余白 */
}

/* テキスト部分のスタイル */
.card-content h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #333;
}

.card-content p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.recent-posts {
  grid-area: recent-posts;
}

.recent-posts h2 {
  margin-top: 0;
  padding: 5px 0px 5px 5px;
  background-color: #0080ff;
  color: #ffffff;
}

.recent-list {
  list-style: none; /* ドットを消す */
  padding: 0;
  width: 100%;
}

.recent-item {
  font-size: 18px;
}

.recent-link {
  display: flex; /* 横並びにする */
  align-items: center; /* 垂直方向の中央揃え */
  text-decoration: none; /* 下線を消す */
  background-color: #fff;
  padding: 15px;
  margin: 5px;  /* カード間の余白 */
}

.recent-link:hover {
  transform: translateY(-3px); /* ホバー時に少し浮き上がる */
  background-color: #f9f9f9;
}

.recent-image {
  width: 80px; /* 画像の幅 */
  height: 80px; /* 画像の高さ */
  object-fit: cover; /* 画像の比率を保ったまま縮小 */
  flex-shrink: 0; /* 画像が小さくなるのを回避 */
  border-radius: 4px; /* 画像の角丸 */
  margin-right: 15px; /* 画像と文字の間の余白 */
}

.category {
  grid-area: category;
}

.category h2 {
  margin-top: 0;
  padding: 5px 0px 5px 5px;
  background-color: #0080ff;
  color: #ffffff;
}

.category-list {
  list-style: none; /* ドットを消す */
  padding: 0;
  width: 100%;
}

.category-item {
  font-size: 20px;
}

.category-link {
  display: flex; /* 横並びにする */
  align-items: center; /* 垂直方向の中央揃え */
  text-decoration: none; /* 下線を消す */
  background-color: #fff;
  padding: 15px;
  margin: 5px;  /* カード間の余白 */
}

.category-link:hover {
  background-color: #f9f9f9;
}
.footer {
  grid-area: footer;
  background-color: #404040;
  color: white;
}

.footer p {
  text-align: center;
}

@media screen and (min-width:480px) { 
  /* for iPhone Landscape (iPhone 横) */

}

@media screen and (min-width:768px) and ( max-width:1024px) {
  /*for iPad */

.container {
  display: grid;
  grid-template-areas:
        "header   header"
        "top-nav  top-nav"
        "main     recent-posts"
        "main     category"
        "footer   footer";
  grid-template-rows: auto auto auto auto 50px;
  grid-template-columns: auto 300px;
  gap: 5px;
}

}

@media screen and (min-width:1025px) {
/* for PC */

.container {
  display: grid;
  grid-template-areas:
        "header   header"
        "top-nav  top-nav"
        "main     recent-posts"
        "main     category"
        "footer   footer";
  grid-template-rows: auto auto auto auto 50px;
  grid-template-columns: auto 300px;
  /* 横幅は1024でデザインして中央配置 */
  width: 1024px;
  margin: 0 auto;
  gap: 5px;
}

}