/*
Page: Blog Single Post
Loaded only on single post pages
Note: Also requires components/yt-embed.css if videos are embedded
*/

/* ============================
   Blog Single Post ヘッダー & 関連記事
   ============================ */

/* シングル記事ページ全体：ブログ専用余白リセット */
body.single-post .site-header{
  margin-bottom: 0 !important;
}

/* === シングル記事 ヘッダー === */
body.single-post .breadcrumbs{
  max-width: 900px;
  margin: 32px auto 20px;
  padding: 0 20px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: .04em;
}
body.single-post .breadcrumbs a{
  color: #64748b;
  text-decoration: none;
  transition: color .2s ease;
}
body.single-post .breadcrumbs a:hover{
  color: #1D4382;
}

/* カテゴリーバッジ */
body.single-post .cat-links{
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 0 20px;
}
body.single-post .cat-links a{
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #1D4382, #60a5fa);
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(29, 67, 130, .2);
  transition: transform .3s ease, box-shadow .3s ease;
}
body.single-post .cat-links a:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(29, 67, 130, .3);
}

/* 記事タイトル */
body.single-post .entry-title,
body.single-post .post_ttl,
body.single-post h1.post-title{
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 20px;
  font-size: clamp(24px, 3.2vw, 38px) !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
  letter-spacing: .01em;
  color: #0f172a;
  border: none !important;
}

/* メタ情報エリア（日付・著者） */
body.single-post .entry-meta,
body.single-post .post-meta,
body.single-post .meta-data{
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 16px 20px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  font-size: 13px;
  color: #64748b;
}
body.single-post .entry-meta a,
body.single-post .post-meta a,
body.single-post .meta-data a{
  color: #1D4382;
  text-decoration: none;
  font-weight: 600;
  transition: color .2s ease;
}
body.single-post .entry-meta a:hover,
body.single-post .post-meta a:hover,
body.single-post .meta-data a:hover{
  color: #60a5fa;
}

/* 日付アイコン（擬似要素で追加） */
body.single-post .meta-date::before,
body.single-post .posted-on::before,
body.single-post time.published::before{
  content: '📅';
  margin-right: 6px;
  opacity: .5;
  font-size: 12px;
}
body.single-post .author::before,
body.single-post .byline::before,
body.single-post .vcard::before{
  content: '✏️';
  margin-right: 6px;
  opacity: .5;
  font-size: 12px;
}

/* アイキャッチ画像 */
body.single-post .post-thumbnail,
body.single-post .entry-thumbnail{
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 20px;
  display: block;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible !important;
}
body.single-post .post-thumbnail img,
body.single-post .entry-thumbnail img,
body.single-post .attachment-post-thumbnail,
body.single-post img.wp-post-image{
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  display: block;
  border-radius: 16px;
  box-shadow:
    0 4px 16px rgba(15, 23, 42, .06),
    0 20px 48px rgba(29, 67, 130, .12);
  transition: transform .6s ease;
}
body.single-post .post-thumbnail:hover img,
body.single-post .entry-thumbnail:hover img{
  transform: scale(1.01);
}

/* === Recommend 関連記事 === */
body.single-post .post-recommend,
body.single-post #recommend,
body.single-post .recommend-block{
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 80px 0 60px;
  padding: 80px 40px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  box-sizing: border-box;
}
body.single-post .post-recommend h2,
body.single-post #recommend h2,
body.single-post .recommend-block h2,
body.single-post h1.recommend,
body.single-post h2.recommend{
  max-width: 1200px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: clamp(22px, 2.6vw, 32px) !important;
  font-weight: 800 !important;
  color: #0f172a;
  letter-spacing: .02em;
  border: none !important;
  padding: 0 !important;
  position: relative;
}
body.single-post .post-recommend h2::before,
body.single-post #recommend h2::before,
body.single-post .recommend-block h2::before{
  content: 'RELATED POSTS';
  display: block;
  font-size: .4em;
  letter-spacing: .4em;
  font-weight: 700;
  color: #1D4382;
  margin-bottom: 12px;
}
body.single-post .post-recommend h2::after,
body.single-post #recommend h2::after,
body.single-post .recommend-block h2::after{
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #1D4382, #60a5fa);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* Recommend記事リスト（グリッド化） */
body.single-post .post-recommend ul,
body.single-post #recommend ul,
body.single-post .recommend-block ul{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
body.single-post .post-recommend ul li,
body.single-post #recommend ul li,
body.single-post .recommend-block ul li{
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .04),
    0 6px 16px rgba(15, 23, 42, .06);
  transition: transform .4s cubic-bezier(.4,0,.2,1),
              box-shadow .4s cubic-bezier(.4,0,.2,1);
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
}
body.single-post .post-recommend ul li:hover,
body.single-post #recommend ul li:hover,
body.single-post .recommend-block ul li:hover{
  transform: translateY(-8px);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, .08),
    0 32px 56px rgba(29, 67, 130, .18);
}
body.single-post .post-recommend ul li img,
body.single-post #recommend ul li img,
body.single-post .recommend-block ul li img{
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.4,0,.2,1);
}
body.single-post .post-recommend ul li:hover img,
body.single-post #recommend ul li:hover img,
body.single-post .recommend-block ul li:hover img{
  transform: scale(1.08);
}
body.single-post .post-recommend ul li a,
body.single-post #recommend ul li a,
body.single-post .recommend-block ul li a{
  display: block;
  padding: 16px 20px 20px;
  font-weight: 700;
  font-size: .92em;
  line-height: 1.55;
  color: #0f172a;
  text-decoration: none;
  letter-spacing: .01em;
  transition: color .25s ease;
}
body.single-post .post-recommend ul li a:first-child{
  padding: 0;
}
body.single-post .post-recommend ul li a:hover,
body.single-post #recommend ul li a:hover{
  color: #1D4382;
}

/* 日付 */
body.single-post .post-recommend ul li .post-date,
body.single-post .post-recommend ul li time,
body.single-post #recommend ul li .post-date,
body.single-post #recommend ul li time{
  display: block;
  margin: 0 20px 16px;
  padding: 0 0 0 28px;
  font-size: .7em;
  font-weight: 600;
  letter-spacing: .12em;
  color: #94a3b8;
  text-transform: uppercase;
  position: relative;
}
body.single-post .post-recommend ul li .post-date::before,
body.single-post #recommend ul li .post-date::before{
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: #cbd5e1;
}

/* === Responsive === */
@media (max-width: 900px){
  body.single-post .post-recommend,
  body.single-post #recommend{
    padding: 60px 24px;
  }
  body.single-post .post-recommend ul,
  body.single-post #recommend ul{
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (max-width: 600px){
  body.single-post .post-recommend ul,
  body.single-post #recommend ul{
    grid-template-columns: 1fr;
  }
}

/* 親テーマの干渉を強力にリセット */
body.single-post .post-recommend ul li,
body.single-post #recommend ul li,
body.single-post .recommend-block ul li{
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-indent: 0 !important;
}
body.single-post .post-recommend ul li::before,
body.single-post #recommend ul li::before,
body.single-post .recommend-block ul li::before{
  display: none !important;
  content: none !important;
}
body.single-post .post-recommend ul li::marker,
body.single-post #recommend ul li::marker,
body.single-post .recommend-block ul li::marker{
  display: none !important;
}
/* Recommend内 a タグの正常化 */
body.single-post .post-recommend ul li a,
body.single-post #recommend ul li a,
body.single-post .recommend-block ul li a{
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
}
body.single-post .post-recommend ul li a:first-child,
body.single-post #recommend ul li a:first-child{
  display: block;
  padding: 0 !important;
}
body.single-post .post-recommend ul li a:last-child,
body.single-post #recommend ul li a:last-child{
  display: block;
  padding: 16px 20px 20px !important;
}

