/* =========================================================
   Blog (一覧 / 記事 / トップのブログセクション)
   黒背景 + kakida-yellow のサイトトーンに合わせる
   ========================================================= */

.c-blog-page {
  padding-top: clamp(160px, 16vw, 220px) !important;
  padding-bottom: clamp(80px, 10vw, 140px) !important;
  color: #fff;
}

.c-blog-page__inner {
  width: min(100% - var(--kakida-shell-padding) * 2, 1100px);
  margin-inline: auto;
}

/* ---------- 一覧ヘッダー ---------- */

.c-blog-page__header {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-inline: var(--kakida-shell-padding);
}

.c-blog-page__en {
  font-family: var(--kakida-jost);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--kakida-yellow);
  margin: 0 0 12px;
}

.c-blog-page__title {
  font-family: var(--kakida-mincho);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.2;
  color: var(--kakida-yellow);
  margin: 0;
}

.c-blog-page__lead,
.c-blog-page__header p:not(.c-blog-page__en) {
  margin: 20px auto 0;
  max-width: 40em;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1.9;
}

.c-blog-page__empty {
  text-align: center;
  color: var(--kakida-text-muted);
  padding-block: 60px;
}

/* ---------- カテゴリー ---------- */

.c-blog-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  padding-inline: var(--kakida-shell-padding);
}

.c-blog-cats__item {
  border: 1px solid rgba(175, 150, 0, 0.6);
  border-radius: 100px;
  padding: 6px 18px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.c-blog-cats__item:hover,
.c-blog-cats__item.is-current {
  background: var(--kakida-yellow);
  border-color: var(--kakida-yellow);
  color: #000;
}

/* ---------- カードグリッド ---------- */

.c-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 48px) clamp(20px, 2.5vw, 32px);
}

@media (max-width: 960px) {
  .c-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .c-blog-grid {
    grid-template-columns: 1fr;
  }
}

.c-blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

.c-blog-card__thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #1a1a1a;
  display: grid;
  place-items: center;
}

.c-blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.c-blog-card__link:hover .c-blog-card__thumb img {
  transform: scale(1.04);
}

.c-blog-card__noimage {
  font-family: var(--kakida-mincho);
  font-weight: 900;
  font-size: 28px;
  color: rgba(175, 150, 0, 0.35);
}

.c-blog-card__body {
  padding-top: 16px;
}

.c-blog-card__meta,
.c-blog-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--kakida-jost);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--kakida-text-muted);
}

.c-blog-card__cat {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 11px;
  line-height: 1;
  padding: 5px 10px;
  background: var(--kakida-yellow);
  color: #000;
  text-decoration: none;
}

.c-blog-card__title {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  transition: color 0.2s ease;
}

.c-blog-card__link:hover .c-blog-card__title {
  color: var(--kakida-yellow);
}

.c-blog-card__excerpt {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- ボタン (一覧へ) ---------- */

.c-blog-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 260px;
  padding: 16px 32px;
  border: 1px solid var(--kakida-yellow);
  border-radius: 100px;
  color: var(--kakida-yellow);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.c-blog-more::after {
  content: '';
  width: 12px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'><path d='M0 5h10M6 1l4 4-4 4' stroke='black' stroke-width='1.2' fill='none'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'><path d='M0 5h10M6 1l4 4-4 4' stroke='black' stroke-width='1.2' fill='none'/></svg>") no-repeat center / contain;
}

.c-blog-more:hover {
  background: var(--kakida-yellow);
  color: #000;
}

/* ---------- ページネーション ---------- */

.c-blog-pagination {
  margin-top: clamp(48px, 6vw, 72px);
}

.c-blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.c-blog-pagination .page-numbers {
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding-inline: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: var(--kakida-jost);
  text-decoration: none;
}

.c-blog-pagination .page-numbers.current,
.c-blog-pagination a.page-numbers:hover {
  background: var(--kakida-yellow);
  border-color: var(--kakida-yellow);
  color: #000;
}

.c-blog-pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- トップのブログセクション ---------- */

.c-kakida-blog {
  padding-bottom: clamp(60px, 8vw, 90px);
}

.c-kakida-blog__more {
  text-align: center;
  margin: clamp(40px, 5vw, 56px) 0 0;
}

/* ---------- 記事ページ ---------- */

.c-blog-article {
  width: min(100% - var(--kakida-shell-padding) * 2, 760px);
  margin-inline: auto;
}

.c-blog-article__header {
  text-align: center;
}

.c-blog-article__header .c-blog-article__meta {
  justify-content: center;
}

.c-blog-article__title {
  margin: 20px 0 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
}

.c-blog-article__eyecatch {
  margin: clamp(32px, 5vw, 48px) 0 0;
}

.c-blog-article__eyecatch img {
  width: 100%;
  height: auto;
  display: block;
}

.c-blog-article__content {
  margin-top: clamp(40px, 5vw, 56px);
  font-size: 16px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

.c-blog-article__content > * + * {
  margin-top: 1.6em;
}

.c-blog-article__content h2 {
  margin-top: 2.6em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--kakida-yellow);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.5;
  color: #fff;
}

.c-blog-article__content h3 {
  margin-top: 2.2em;
  padding-left: 0.8em;
  border-left: 3px solid var(--kakida-yellow);
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.5;
  color: #fff;
}

.c-blog-article__content h4 {
  margin-top: 2em;
  font-size: 17px;
  color: var(--kakida-yellow);
}

.c-blog-article__content a {
  color: var(--kakida-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.c-blog-article__content ul,
.c-blog-article__content ol {
  padding-left: 1.5em;
}

.c-blog-article__content ul {
  list-style: disc;
}

.c-blog-article__content ol {
  list-style: decimal;
}

.c-blog-article__content li + li {
  margin-top: 0.4em;
}

.c-blog-article__content img {
  max-width: 100%;
  height: auto;
}

.c-blog-article__content figure {
  margin-inline: 0;
}

.c-blog-article__content figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--kakida-text-muted);
  text-align: center;
}

.c-blog-article__content blockquote {
  margin-inline: 0;
  padding: 1em 1.4em;
  border-left: 3px solid var(--kakida-yellow);
  background: #111;
  color: rgba(255, 255, 255, 0.8);
}

/* 表: 幅が足りないときは表だけ横スクロール(ページ全体は揺らさない) */
.c-blog-article__content .wp-block-table {
  margin-inline: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.c-blog-article__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.7;
}

/* ブロックエディタ既定の「固定幅のセル」は列が均等割りになり、
   長文の列が潰れるため、内容に応じた列幅にする */
.c-blog-article__content table.has-fixed-layout {
  table-layout: auto;
}

.c-blog-article__content th,
.c-blog-article__content td {
  min-width: 5em;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: left;
  vertical-align: top;
}

@media (max-width: 600px) {
  .c-blog-article__content table {
    min-width: 600px;
    font-size: 13px;
  }

  /* 横スクロールできることを示す: 上に案内文、右端(左端)に影
     影は background-attachment: local / scroll の組み合わせで、
     端までスクロールすると自然に消える */
  .c-blog-article__content .wp-block-table {
    background:
      linear-gradient(to right, #000 30%, rgba(0, 0, 0, 0)) left center / 40px 100% no-repeat local,
      linear-gradient(to left, #000 30%, rgba(0, 0, 0, 0)) right center / 40px 100% no-repeat local,
      linear-gradient(to right, rgba(175, 150, 0, 0.45), rgba(175, 150, 0, 0)) left center / 16px 100% no-repeat scroll,
      linear-gradient(to left, rgba(175, 150, 0, 0.45), rgba(175, 150, 0, 0)) right center / 16px 100% no-repeat scroll;
  }

  .c-blog-article__content .wp-block-table::before {
    content: "← 横にスクロールできます →";
    position: sticky;
    left: 0;
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--kakida-yellow);
  }

  /* ブロックを使わずに貼られた表もはみ出さないようにする */
  .c-blog-article__content > table {
    display: block;
    overflow-x: auto;
    min-width: 0;
  }
}

.c-blog-article__content th {
  background: #111;
}

.c-blog-article__content hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.c-blog-article__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: clamp(56px, 7vw, 80px);
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.c-blog-article__nav-next {
  text-align: right;
}

.c-blog-article__nav a {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
}

.c-blog-article__nav a:hover {
  color: var(--kakida-yellow);
}

.c-blog-article__nav a span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--kakida-jost);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--kakida-yellow);
}

@media (max-width: 600px) {
  .c-blog-article__nav {
    grid-template-columns: 1fr;
  }

  .c-blog-article__nav-next {
    text-align: left;
  }
}

.c-blog-article__back {
  margin: clamp(48px, 6vw, 64px) 0 0;
  text-align: center;
}
