/* 投稿ページ全体 */
.gutenberg-blocks {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--spacing-large) var(--spacing-small);
}

/* 投稿タイトル */
.post-title {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-xl);
  color: var(--color-main);
  margin-bottom: var(--spacing-small);
  position: relative;
}

.post-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  margin-top: 0.5rem;
  animation: underline-slide-in 0.6s ease forwards;
}

@keyframes underline-slide-in {
  from {
    width: 0;
  }
  to {
    width: 60px;
  }
}

/* メタ情報 */
.post-meta {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
  color: var(--color-sub);
  margin-bottom: var(--spacing-medium);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-meta strong {
  font-weight: 600;
}

/* アイキャッチ画像 */
.post-thumbnail {
  margin-bottom: var(--spacing-medium);
  text-align: center;
}

.post-thumbnail img {
  max-width: 100%;
  border-radius: var(--border-radius, 8px);
}

/* 目次 */
.post-toc {
  background-color: var(--color-bg);
  border: 1px solid var(--color-line);
  padding: var(--spacing-medium);
  margin-bottom: var(--spacing-large);
  border-radius: var(--border-radius, 8px);
}

.post-toc h2 {
  font-size: var(--font-size-lg);
  color: var(--color-main);
  margin-bottom: var(--spacing-small);
}

.post-toc ul {
  padding-left: 1.5rem;
  list-style: disc;
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

/* 投稿本文 */
.post-content {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-main);
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: var(--spacing-large);
  margin-bottom: var(--spacing-small);
  color: var(--color-main);
}

.post-content p {
  margin-bottom: var(--spacing-small);
}

/* ページネーション */
.post-pagination {
  margin-top: var(--spacing-large);
  text-align: center;
}

.post-pagination span {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-line);
  border-radius: var(--border-radius, 6px);
}

/* SNSシェアボタン：別途で isshin_ippo_output_post_share_buttons 側で指定する想定 */

/* 関連記事セクション */
.related-posts {
  margin-top: var(--spacing-large);
  padding-top: var(--spacing-large);
  border-top: 1px solid var(--color-line);
}

.related-posts h2 {
  font-size: var(--font-size-lg);
  color: var(--color-main);
  margin-bottom: var(--spacing-medium);
}

.related-posts ul {
  list-style: none; /* ← 追加 */
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-small);
}


.related-posts li {
  background-color: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius, 8px);
  padding: var(--spacing-small);
  transition: box-shadow 0.3s ease;
}

.related-posts li:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.related-posts img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius, 4px);
  margin-bottom: 0.5rem;
}

.related-posts a {
  display: block;
  color: var(--color-main);
  font-weight: 500;
  text-decoration: none;
}

.related-posts a:hover {
  color: var(--color-accent);
}

/* 投稿ページのアイキャッチ画像 */
.post-thumbnail {
  margin-bottom: 1.5rem;
  text-align: center; /* 画像中央寄せ */
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  max-width: 1200px; /* 最大幅 */
  aspect-ratio: 16 / 9; /* 16:9比率 */
  object-fit: cover; /* トリミング維持 */
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.post-thumbnail img:hover,
.post-thumbnail img:focus {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* スマホ対応（600px以下） */
@media screen and (max-width: 600px) {
  .post-thumbnail img {
    max-width: 100%;
    border-radius: 4px;
  }
}


/* 目次コンテナ */
.post-toc {
  background-color: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--border-radius, 8px);
  padding: var(--spacing-medium);
  margin-bottom: var(--spacing-large);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-main);
}

/* 目次タイトル */
.post-toc > h2 {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-lg);
  color: var(--color-main);
  margin-bottom: var(--spacing-small);
  font-weight: 600;
  position: relative;
}

/* 目次リスト */
.post-toc ul {
  list-style: none;       /* 「・」を消す */
  padding-left: 0;
  margin: 0;
}

/* 目次リストアイテム */
.post-toc ul li {
  margin-bottom: 0.5rem;
}

/* 目次リンク */
.post-toc ul li a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-toc ul li a:hover,
.post-toc ul li a:focus {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* h3見出し（サブ階層）用のインデント */
.post-toc ul li ul {
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.post-toc ul li ul li {
  margin-bottom: 0.25rem;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-sm);
}



/* この記事を書いた人セクション */
.post-author-info {
  max-width: 960px;
  margin: 4rem auto;
  padding: 0 1rem;
  background-color: var(--color-bg);
  color: var(--color-main);
}

.post-author-info > h2 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-xl);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.5rem;
}

.author-box {
  display: flex;
  gap: 2rem; /* var(--spacing-medium) */
  align-items: flex-start;
  flex-wrap: wrap;
}

.author-avatar {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

.author-avatar a {
  display: block;
  width: 100%;
  height: 100%;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-avatar:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5); /* アクセントカラーの影 */
}

.author-details {
  flex: 1 1 0;
  min-width: 200px;
}

.author-name {
  font-size: 1.25rem; /* 小見出しサイズ */
  line-height: var(--line-height-lg);
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--color-main);
}

.author-name a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.author-name a:hover,
.author-name a:focus {
  color: var(--color-accent-light);
  text-decoration: underline;
}

.author-description {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-sub);
  white-space: pre-line;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-avatar {
    margin-bottom: 1rem;
  }

  .author-details {
    min-width: auto;
  }

  .author-name {
    font-size: 1.125rem;
  }
}



/* ============================= */
/* 共通のボタンスタイル */
/* ============================= */

.cta-button {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background-color: var(--color-accent); /* メインカラー */
  border-radius: 50px;
  text-decoration: none; /* 下線をなくす */
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  margin-top: 25px;
  width: auto; /* 通常時は自動幅 */
}

/* ホバー時のボタンスタイル */
.cta-button:hover {
  background-color: var(--color-primary-hover); /* ホバーカラー */
  color: #000;
  box-shadow: 0 7px 20px rgba(29, 78, 216, 0.6);
  transform: translateY(-4px); /* 浮き上がるエフェクト */
  outline-offset: 2px;
  outline: 2px solid var(--color-accent);
}

/* アクセシビリティのためのフォーカススタイル */
.cta-button:focus-visible {
  outline: 2px solid var(--color-accent);
  text-decoration: none; /* フォーカス時の下線をなくす */
}

/* アクティブ時（クリック時）のスタイル */
.cta-button:active {
  text-decoration: none; /* クリック時の下線をなくす */
}

