/* ==========================================================================
 * Single Post Page Styles (style-single.css)
 * 投稿詳細ページ専用のスタイル
 * ========================================================================== */

/* --------------------------------------------------
 *  1. Layout: Main Content & Sidebar
 *  レイアウト：メインコンテンツとサイドバー
 * -------------------------------------------------- */

/* PC表示時 (幅が992px以上) */
@media (min-width: 992px) {
  .site-content-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 40px; /* メインとサイドバーの間の余白 */
    max-width: 1120px; /* 全体の最大幅 */
    margin: 60px auto; /* 上下の余白と中央寄せ */
    padding: 0 20px;
  }

  /* メインコンテンツエリア (記事) */
  #primary.site-main {
    width: calc(100% - 300px - 40px); /* 全体幅 - サイドバー幅 - gap */
  }

  /* サイドバーエリア */
  #secondary.widget-area {
    width: 300px;
    flex-shrink: 0; /* 幅が縮まないようにする */
  }
}

/* タブレット・スマホ表示時 (幅が991px以下) */
@media (max-width: 991px) {
  .site-content-wrapper {
    padding: 30px 15px; /* 上下左右の余白 */
  }

  #primary.site-main {
    width: 100%;
  }

  #secondary.widget-area {
    width: 100%;
    margin-top: 50px; /* 記事とサイドバーの間の余白 */
  }
}

/* --------------------------------------------------
 *  2. Article Container Styles
 *  記事全体のコンテナスタイル
 * -------------------------------------------------- */
.single-post-article {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .single-post-article {
    padding: 25px;
  }
}

/* --------------------------------------------------
 *  3. Article Header
 *  記事ヘッダー（タイトル、カテゴリー、日付など）
 * -------------------------------------------------- */
.entry-header {
  margin-bottom: 30px;
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
}

.entry-category a {
  display: inline-block;
  background-color: #e60012; /* テーマカラーの赤 */
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 15px;
  transition: opacity 0.2s;
}
.entry-category a:hover {
  opacity: 0.8;
}

h1.entry-title {
  font-size: 2.4rem;
  line-height: 1.4;
  font-weight: 700;
  margin: 0;
}
@media (max-width: 768px) {
  h1.entry-title {
    font-size: 1.8rem;
  }
}

.entry-meta {
  font-size: 0.7rem;
  color: #777;
  margin-top: 15px;
  
  /* --- ▼ ここから追加 ▼ --- */
  display: flex; /* Flexboxを有効にする */
  justify-content: flex-end; /* 中身の要素を右端に寄せる */
  align-items: center; /* 上下中央揃えにする（任意） */
  /* --- ▲ ここまで追加 ▲ --- */
}

.entry-meta span {
  margin: 0 10px; /* span間の余白は維持 */
}

/* もし、一番右のspanだけ右端の余白をなくしたい場合 */
.entry-meta span:last-child {
  margin-right: 0;
}

/* --------------------------------------------------
 *  4. Post Thumbnail & Content
 *  アイキャッチ画像と記事本文
 * -------------------------------------------------- */
.post-thumbnail {
  margin-bottom: 40px;
}
.post-thumbnail img {
  border-radius: 8px;
  width: 100%;
  height: auto;
}

.entry-content {
  line-height: 1.8;
}
.entry-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2.5em 0 1em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid #e60012;
}
.entry-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 1em;
  padding-left: 1em;
  border-left: 5px solid #e60012;
}
.entry-content p {
  margin-bottom: 1.5em;
}
.entry-content a {
  color: #e60012;
  text-decoration: underline;
}
.entry-content a:hover {
  text-decoration: none;
}
.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

/* --------------------------------------------------
 *  5. Article Footer
 *  記事フッター（タグ、シェアボタン）
 * -------------------------------------------------- */
.entry-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.entry-footer > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.entry-footer span {
  font-weight: 700;
  color: #555;
  font-size: 0.9rem;
}
.entry-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.entry-tags a {
  display: block;
  background-color: #f0f0f0;
  color: #555;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
}
.entry-share a {
  font-weight: 600;
  text-decoration: none;
}

/* --------------------------------------------------
 *  6. Post Navigation & Related Posts
 *  記事下コンテンツ（前の記事・次の記事、関連記事）
 * -------------------------------------------------- */
.post-under-contents {
  margin-top: 40px;
}
.navigation.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}
.post-navigation .nav-links .nav-previous,
.post-navigation .nav-links .nav-next {
  flex: 1;
  padding: 20px;
  text-decoration: none;
}
.post-navigation .nav-links .nav-previous {
  text-align: left;
  border-right: 1px solid #ddd;
}
.post-navigation .nav-links .nav-next {
  text-align: right;
}
.nav-subtitle {
  display: block;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 5px;
}
.nav-title {
  font-weight: 700;
  color: #333;
}

.related-posts {
  margin-top: 60px;
}
.related-posts-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 30px;
}

/* --------------------------------------------------
 *  7. Sidebar Widgets
 *  サイドバーウィジェット
 * -------------------------------------------------- */
#secondary.widget-area .widget {
  background-color: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}
#secondary.widget-area .widget-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
#secondary.widget-area ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#secondary.widget-area ul li {
  padding: 8px 0;
  border-bottom: 1px dotted #ddd;
}
#secondary.widget-area ul li:last-child {
  border-bottom: none;
}
#secondary.widget-area a {
  text-decoration: none;
  color: #333;
}
#secondary.widget-area a:hover {
  color: #e60012;
}
#secondary.widget-area .search-form {
  display: flex;
}
#secondary.widget-area .search-field {
  flex-grow: 1;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px 0 0 4px;
}
#secondary.widget-area .search-submit {
  border: 1px solid #e60012;
  background-color: #e60012;
  color: #fff;
  padding: 0 20px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}