@charset "utf-8";

/* =====================================
共通項目
===================================== */
/* トップページ：３カラム */
.blog-list--home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* ブログページ：２カラム */
.blog-list--archive {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

/* =====================================
ブログページ（トップ）
===================================== */
.blog-box {
  display: grid;
  grid-template-columns: 1fr 295px;
  gap: 80px;
}
.blog-list__item {
  display: none; /*始めは非表示*/
}
.blog-list__item.on {
  display: block; /*onクラス付与で画面に表示*/
}
/* ページネーションの現在のページ「.active」クラスを付与して色を変える */
.pagination .number > a.active {
  background-color: #272727;
  color: #ffffff;
}
.pagination {
  width: 70%;
  margin: 50px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  list-style-type: none;
}
.pagination .number {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  text-align: center;
  cursor: pointer;
  background-color: #E6DDDD;
  color: #272727;
  padding: 10px 0;
  font-size: 1.2rem;
}
.unordered-list li a:hover,
.unordered-list li a:focus,
.archive-list__item li a:hover,
.archive-list__item li a:focus {
  color: #ff0000;
  text-decoration: underline;
}
.search-box {
  position: relative;
}
.search-box::after {
  content: '';
  width: 26px;
  height: 26px;
  background-image: url(../images/search-icon.png);
  position: absolute;
  top: 10px;
  right: 10px;
}
.search-box__bar {
  width: 100%;
  height: 45px;
  padding: 5px;
}
.archive-list {
 list-style-type: none;
}
.archive-list__seireki {
  line-height: 2em;
}
.archive-list__seireki::before {
  content: '▶';
  padding-right: 0.5em;
}
/* openクラスが付与されたら▼ */
.archive-list__seireki.js-active::before {
  content: '▼';
}
.archive-list__item {
  display: none; /*始めは非表示*/
  list-style: disc;
  padding-left: 2.5em;
  line-height: 2em;
}
.unordered-list__title {
	font-size: 1.25rem;
    font-weight: bold;
}

/* =====================================
ブログページ（詳細）
===================================== */
/* 大見出し */
.blog-box__title {
  font-size: 2.5rem;
  margin-bottom: 10px;
  line-height: 1.2em;
  word-break: break-word; /* 表示範囲最後まで来た時、（単語が長かろうが短かろうが）単語の途中で改行 */
  overflow-wrap: break-word; /* 表示範囲に収まらない長い連続する文字列を、途中で改行 */
}
/* インデックス */
.index-box {
  background-color: #F6F4F4;
  padding: 30px;
}
.index-box__title {
  font-size: 1.375rem;
  text-align: center;
  padding-bottom: 20px;
}
.major-heading {
  font-size: 1.875rem;
  border-top: 8px solid #2665D1;
  border-bottom: 8px solid #2665D1;
  padding: 15px 0;
  margin-bottom: 25px;
}
.blog-box__text {
  margin-bottom: 25px;
}
.small-heading {
  font-size: 1.125rem;
  margin-bottom: 10px;
  color: #2665D1;
}
.ordered-list {
  list-style-type: decimal;
  line-height: 1.5em;
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 1.375rem;
  font-weight: bold;
}
.item-photo {
  margin: 15px 0;
}
.book-box {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 25px;
  background-color: #fff;
  padding: 25px;
  box-shadow: 0 0 8px gray;
}
.book-box__photo {
  width: 140px;
  height: 197px;
  object-fit: cover;
}
.book-box__title {
  font-size: 1.5rem;
  line-height: 1.2em;
  margin-bottom: 10px;
}
.publisher-name {
  padding-bottom: 44px;
}
.shopping-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.shopping-sites li a {
  display: inline-block;
  padding: 7px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: bold;
}
.kindle-btn {
  background-color: #2665D1;
}
.amazon-btn {
  background-color: #FF8800;
}
.rakuten-btn {
  background-color: #CF4944;
}
.yahoo-btn {
  background-color: #51A7E8;
}
/* codeタグでソースコードの文字列を表示 */
.code-box {
  width: 100%;
  margin: 0 auto 15px;
  padding: 15px;
  border-radius: 5px; /*角丸*/
  background-color: #25292f; /*背景色*/
  color: #ffffff; /*文字色*/
  white-space: pre-wrap; /*はみ出したときに折り返す*/
}
/* 注意書き */
.blog-notes {
  display: flex;
  flex-wrap: wrap;
}
.blog-notes a {
  display: inline-block;
  padding: 0 5px;
  color: #ff0000;
  text-decoration: underline;
}
/* 画像のキャプション */
.caption-box {
  text-align: center;
  font-weight: bold;
}
/* 著者名・投稿日・最終更新日を横並びに整列 */
.post-meta {
    display: flex;
    gap: 1em; /* 要素間の余白 */
    align-items: center;
    flex-wrap: wrap; /* スマホで折り返し可能に */
    font-size: 0.9rem;
    color: #555;
    margin-top: 10px;
}
.post-meta time,
.post-meta p {
    display: flex;
    align-items: center;
    gap: 0.3em;
}
/* アイキャッチが無い場合は「No Image」を表示 */
.blog-list__noimage {
  width: 100%;
  height: 180px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  border: 1px solid #ddd;
}
/* アイキャッチのサイズを制御する */
.wp-block-post-featured-image :where(img) {
  max-width: 925px !important;
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* =====================================
ブレークポイント1166px以下
===================================== */
@media screen and (max-width: 1166px) {
  /* トップページのブログ一覧：３カラム → ２カラム */
  .blog-list--home {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* =====================================
ブレークポイント1030px以下
===================================== */
@media screen and (max-width: 1030px) {
  /* ブログページの一覧：２カラム → １カラム */
  .blog-list--archive {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* blog-box（サイドバー付きレイアウト）も１カラムに */
  .blog-box {
    grid-template-columns: 1fr;
  }
}


/* =====================================
ブレークポイント744px以下
===================================== */
@media screen and (max-width: 744px) {
  /* トップページのブログ一覧：３カラム → ２カラム */
  .blog-list--home {
    grid-template-columns: 1fr;
  }
}

/* ====================================
ブレークポイント603px以下
==================================== */
@media screen and (max-width: 603px) {
  /* タイトル */
  .heading {
    font-size: 4rem;
  }
  /* ブログのタイトル */
  .blog-box__title {
    font-size: 1.875rem;
  }
  /* 大見出し */
  .major-heading {
    font-size: 1.5625rem;
  }
  /* 中見出し */
  .subheading {
    font-size: 1.25rem;
  }
  /* 小見出し */
  .small-heading {
    font-size: 1rem;
  }

  /* 本のタイトル */
  .book-box__title {
    font-size: 1.2rem;
  }

  /* ブログの詳細ページ */
  .book-box {
    grid-template-columns: 1fr;
  }
  .book-box__left {
    display: flex;
    justify-content: center;
  }
  .book-box__photo {
    width: 40%;
    height: auto;
  }
}
