/* =================================================================
   IEYA 通常投稿記事専用スタイル（single-post.css）
   すべてのセレクタを .ieya-single-post 配下にスコープ。
   既存テーマ style.css のグローバル定義との衝突を防ぐ。
   ================================================================= */

/* ----------------------------------------------------------------
   1. ラッパー全体の基本設定
   ---------------------------------------------------------------- */
.ieya-single-post {
    background: #f5f3f0;
    font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Arial, sans-serif;
    color: #3d3d3d;
    line-height: 1.9;
    /* ヘッダー（70px固定）の下から始まり、フッター前に余白を確保 */
    padding-bottom: 96px;
}
.ieya-single-post * {
    box-sizing: border-box;
}
.ieya-single-post a {
    color: #8B7355;
    text-decoration: none;
}
.ieya-single-post a:hover {
    color: #6B5444;
}

/* ----------------------------------------------------------------
   2. メイン記事エリア
   ---------------------------------------------------------------- */
.ieya-single-post main {
    max-width: 1032px;
    /* 上マージン = 固定ヘッダー高さ70px + 余白40px */
    margin: 110px auto 0;
    padding: 56px 56px 80px;
    background: #ffffff;
    box-shadow: 0 4px 32px rgba(0,0,0,.07);
    border-radius: 2px;
}

/* パンくず */
.ieya-single-post .breadcrumb {
    font-size: 12px;
    color: #8a8580;
    letter-spacing: .3px;
    margin-bottom: 28px;
}
.ieya-single-post .breadcrumb a {
    color: #8a8580;
}
.ieya-single-post .breadcrumb a:hover {
    color: #8B7355;
}

/* カテゴリタグ */
.ieya-single-post .category-tag {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #8B7355;
    color: #8B7355;
    background: transparent;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    border-radius: 2px;
    margin-bottom: 20px;
}
.ieya-single-post .category-tag.cat-property {
    border-color: #5C7A60;
    color: #5C7A60;
}
.ieya-single-post .category-tag.cat-news {
    border-color: #6B5444;
    color: #6B5444;
}

/* 記事タイトル（style.css の .article-title を上書き） */
.ieya-single-post h1.article-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 38px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .5px;
    margin-bottom: 20px;
    color: #3d3d3d;
}

/* メタ情報行 */
.ieya-single-post .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 13px;
    color: #6b6b6b;
    letter-spacing: .3px;
    padding-bottom: 32px;
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
}
.ieya-single-post .meta-row span b {
    color: #8a8580;
    font-weight: 500;
    margin-right: 6px;
}

/* アイキャッチ */
.ieya-single-post .eyecatch {
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 48px;
    border-radius: 2px;
    overflow: hidden;
}
.ieya-single-post .eyecatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ieya-single-post .eyecatch--empty {
    width: 100%;
    aspect-ratio: 16/9;
    background: #e8e0d4;
    margin-bottom: 48px;
    border-radius: 2px;
}

/* ----------------------------------------------------------------
   3. 本文エリア
      style.css の .article-body / 段落スタイル を確実に上書き
   ---------------------------------------------------------------- */
.ieya-single-post .article-body {
    margin-bottom: 0;
}
.ieya-single-post .article-body p {
    font-size: 16px;
    margin-bottom: 28px;
    letter-spacing: .2px;
    line-height: 1.9;
    color: #3d3d3d;
}

/* style.css のドロップキャップをリセット */
.ieya-single-post .article-body p:first-of-type::first-letter {
    font-size: inherit;
    color: inherit;
    float: none;
    line-height: inherit;
    margin: 0;
    font-weight: inherit;
}

/* 見出し h2（IEYA_post_template.css に準拠） */
.ieya-single-post .article-body h2 {
    font-family: 'Noto Serif JP', serif;
    font-size: 26px;
    font-weight: 600;
    margin: 56px 0 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #8B7355;
    letter-spacing: .5px;
    color: #3d3d3d;
}
.ieya-single-post .article-body h2:first-child {
    margin-top: 0;
}

/* 見出し h3（style.css のデザインに近い形で維持） */
.ieya-single-post .article-body h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 20px;
    font-weight: 600;
    color: #3d3d3d;
    margin: 40px 0 18px;
    padding-left: 16px;
    border-left: 3px solid #8B7355;
    letter-spacing: .5px;
    line-height: 1.5;
}

/* リスト */
.ieya-single-post .article-body ul,
.ieya-single-post .article-body ol {
    margin: 0 0 28px 22px;
}
.ieya-single-post .article-body li {
    font-size: 16px;
    margin-bottom: 10px;
}

/* ハイライトボックス（投稿者がカスタムHTMLブロックで使用する想定） */
.ieya-single-post .article-body .highlight-box {
    background: #fff;
    border-left: 4px solid #8B7355;
    padding: 24px 28px;
    margin: 0 0 32px;
    font-size: 15px;
    color: #5a5a5a;
    letter-spacing: .2px;
}
.ieya-single-post .article-body .highlight-box p {
    margin: 0;
    font-size: 15px;
}
.ieya-single-post .article-body .highlight-box p + p {
    margin-top: 12px;
}

/* ---- 本文内の汎用画像スタイル（the_content() 出力に対応） ---- */
/* 通常の img タグ */
.ieya-single-post .article-body img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    margin: 0 0 12px;
}

/* figure 要素（Gutenberg の wp-block-image 含む） */
.ieya-single-post .article-body figure {
    margin: 0 0 40px;
}
.ieya-single-post .article-body figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    overflow: hidden;
    margin: 0;
}

/* figcaption */
.ieya-single-post .article-body figcaption {
    font-size: 13px;
    color: #8a8580;
    text-align: center;
    letter-spacing: .3px;
    margin-top: 10px;
    line-height: 1.6;
}

/* inline-figure（IEYA_post_template.css のクラス。本文内に手動挿入された場合） */
.ieya-single-post .article-body figure.inline-figure {
    margin: 0 0 40px;
}
.ieya-single-post .article-body figure.inline-figure .frame {
    width: 100%;
    aspect-ratio: 3/2;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}
.ieya-single-post .article-body figure.inline-figure .frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin: 0;
}

/* ----------------------------------------------------------------
   4. タグリスト
   ---------------------------------------------------------------- */
.ieya-single-post .tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 32px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
}
.ieya-single-post .tag-list .tag-label {
    font-size: 12px;
    color: #8a8580;
    letter-spacing: .5px;
    margin-right: 4px;
}
.ieya-single-post .tag-list a {
    font-size: 13px;
    background: #eee7de;
    color: #6B5444;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: .3px;
    transition: all .25s;
}
.ieya-single-post .tag-list a:hover {
    background: #8B7355;
    color: #fff;
}

/* ----------------------------------------------------------------
   5. 前後記事ナビゲーション
   ---------------------------------------------------------------- */
.ieya-single-post .post-nav {
    max-width: 1032px;
    margin: 48px auto 0;
    padding: 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.ieya-single-post .post-nav a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    padding: 24px;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    transition: all .3s ease;
    color: #3d3d3d;
}
.ieya-single-post .post-nav a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    color: #3d3d3d;
}
.ieya-single-post .post-nav .dir {
    font-size: 11px;
    color: #8B7355;
    letter-spacing: 1.5px;
    font-weight: 600;
}
.ieya-single-post .post-nav .title {
    font-size: 14px;
    color: #3d3d3d;
    letter-spacing: .2px;
    line-height: 1.6;
}
.ieya-single-post .post-nav .next {
    text-align: right;
    align-items: flex-end;
}

/* ----------------------------------------------------------------
   6. 関連記事
   ---------------------------------------------------------------- */
.ieya-single-post .related-section {
    max-width: 1032px;
    margin: 64px auto 0;
    padding: 0;
}
.ieya-single-post .related-section h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 28px;
    text-align: center;
    color: #3d3d3d;
}
.ieya-single-post .related-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 28px;
}
.ieya-single-post .related-card {
    background: #fff;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
    transition: all .3s ease;
    cursor: pointer;
}
.ieya-single-post .related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
}
.ieya-single-post .related-card .thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.ieya-single-post .related-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ieya-single-post .related-card .body {
    padding: 20px;
}
.ieya-single-post .related-card .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #8a8580;
    margin-bottom: 10px;
    letter-spacing: .3px;
}
.ieya-single-post .related-card .cat {
    color: #8B7355;
    font-weight: 600;
}
.ieya-single-post .related-card .title {
    font-size: 14px;
    line-height: 1.6;
    color: #3d3d3d;
}

/* ----------------------------------------------------------------
   7. 一覧に戻る
   ---------------------------------------------------------------- */
.ieya-single-post .back-to-list {
    display: flex;
    justify-content: center;
    margin: 64px auto 80px;
}
.ieya-single-post .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #8B7355;
    color: #fff;
    padding: 16px 44px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .8px;
    border-radius: 2px;
    transition: all .3s cubic-bezier(.25,.46,.45,.94);
}
.ieya-single-post .back-btn:hover {
    background: #6B5444;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(139,115,85,.3);
}

/* ----------------------------------------------------------------
   8. レスポンシブ（768px 以下）
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
    .ieya-single-post main {
        margin: 90px auto 0;
        padding: 40px 20px 56px;
    }
    .ieya-single-post h1.article-title {
        font-size: 26px;
    }
    .ieya-single-post .eyecatch {
        margin-bottom: 32px;
    }
    .ieya-single-post .meta-row {
        gap: 12px;
    }
    /* 前後記事: 縦積み */
    .ieya-single-post .post-nav {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    /* 関連記事: 1カラム */
    .ieya-single-post .related-grid {
        grid-template-columns: 1fr;
    }
    .ieya-single-post .related-section {
        padding: 0 20px;
    }

}

/* ----------------------------------------------------------------
   9. レスポンシブ（480px 以下）
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
    .ieya-single-post h1.article-title {
        font-size: 22px;
    }
    .ieya-single-post .article-body p {
        font-size: 15px;
    }
    .ieya-single-post .article-body h2 {
        font-size: 21px;
    }
}
