@charset "UTF-8";

/* 共通部分 */

.blog {
  padding-block: clamp(48px, 6vw, 96px);
}

.page-blog-list .blog__layout {
  display: flex;
  gap: 40px;
}

/* メイン8割 */
.blog__main {
  flex: 0 0 80%;
}

/* サイドバー2割 */
.page-blog-list .blog__sidebar {
  flex: 0 0 20%;
}

/* ブログカード */
.blog__link {
  display: flex;
  gap: 20px;
  align-items: stretch; /* 高さを揃える */
}

.blog__item {
  display: flex;
  background-color: #fff;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  gap: 16px;
}
.blog__item:last-child {
  margin-bottom: 0;
}
/* サムネイル */
.blog__thumb img {
  width: 228px;
  height: 124px;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* 本文エリア */
.blog__body {
  flex: 1;
  height: 124px; /* サムネと揃える */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  padding-block: 8px;
}

/* タイトル */
.blog__item-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* メタ情報 */
.blog__meta {
  display: flex;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
}

.blog__meta-link {
  text-decoration: underline;
  color: inherit;
}

/* 抜粋（2行で省略） */
.blog__excerpt {
  font-size: 16px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* サイドバー */
.sidebar__title {
  font-size: 15px;
  margin-bottom: 12px;
  font-weight: bold;
}

.sidebar__list {
  font-size: 13px;
  margin-bottom: 32px;
}

.sidebar__list li {
  margin-bottom: 8px;
}

.sidebar__month {
  margin-top: 8px;
}

.sidebar__month-select {
  padding: 8px 32px;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #563c54;
  border-radius: 10px;
  background-color: #fff;
  color: #563c54;
  appearance: none;
  background-image: url("../../images/bloglist/Union_bottom.png");
  background-repeat: no-repeat;
  background-position: right 6px center;
}

/* aタグの装飾を消す */
.sidebar__list a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500; /* ← Medium */
}

/* 行頭アイコン */
.sidebar__list a::before {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url("../../images/bloglist/list_icon.svg");
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
}

/* カテゴリーアコーディオン（sidebar-accordion.js 連携） */
.blog__sidebar ul.children {
  margin-top: 0.5em;
  margin-left: 1em;
}
.blog__sidebar ul.children ul.children {
  margin-left: 1em;
}
.blog__sidebar ul.children.hide {
  display: none;
}

/* 子カテゴリを持つ親の a タグはクリックでページ遷移しない（JS 側で preventDefault） */
.blog__sidebar .cat-item > a {
  cursor: pointer;
}

/* ページネーション全体 */
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-block: 100px;
}

/* 数字リンク（paginate_links() が出力する .page-numbers） */
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #f991b9;
  background-color: transparent;
  color: #f991b9;
  font-size: 16px;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* 現在ページ */
.pagination .page-numbers.current {
  background: linear-gradient(135deg, #f0acc0, #e98dbd);
  color: #ffffff;
  border-color: transparent;
}

/* ホバー（現在ページ以外） */
.pagination .page-numbers:not(.current):hover {
  background: linear-gradient(135deg, #f0acc0, #e98dbd);
  color: #fff;
  border-color: transparent;
}

/* 前へ・次へ矢印 */
.pagination .prev.page-numbers,
.pagination .next.page-numbers {
  font-size: 18px;
  font-weight: bold;
}

.pagination .prev.page-numbers {
  margin-right: 47px;
}

.pagination .next.page-numbers {
  margin-left: 47px;
}

/* 省略記号 */
.pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: #f991b9;
  letter-spacing: -6px;
  width: auto;
  padding: 0 4px;
}
/* SP対応 */
@media (max-width: 768px) {
/*   .page-blog-list .blog__sidebar {
    display: none;
  } */

  .page-blog-list .blog__layout {
    display: flex;
    flex-direction: column;
    margin: clamp(24px, 3vw, 48px) auto 0;
  }
  .blog__main {
    padding: 0;
  }
  .blog__link {
    width: 100%;
  }
  .blog__item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 auto; /* 中央寄せ */
    margin-bottom: 16px;
    box-sizing: border-box; /* padding含めて403pxに収める */
    align-items: center;
    padding: 16px 24px;
  }
  .blog__thumb {
    width: 100%;
  }
  .blog__thumb img {
    width: 100%;
    height: auto;
  }

  .blog__item-title {
    order: 1;
    font-size: 18px;
  }

  .blog__body {
    padding-block: 0;
    width: 100%;
  }

  .blog__meta {
    order: 2;
    font-size: 10px;
    gap: 0;
  }

  .blog__excerpt {
    display: none;
  }

  /* ページネーション */
  .pagination .prev.page-numbers {
    margin-right: 16px;
  }

  .pagination .next.page-numbers {
    margin-left: 16px;
  }

  .pagination .page-numbers.dots {
    padding: 0;
    letter-spacing: -8px;
  }
}
