/* ========================================
   下層ページ専用のレイアウト調整CSS
   TOPページには影響しない設計
   ======================================== */

/* 下層ページ全体の調整 */
body:not(.home) {
    padding-top: 64px !important; /* ヘッダー分の余白 */
}

/* SP版の下層ページ調整 */
@media only screen and (max-width: 768px) {
    body:not(.home) {
        padding-top: 17.0666666667vw !important; /* SP版ヘッダー分の余白 */
    }
}

/* 下層ページのコンテンツマージン調整 */
body:not(.home) .edit-post-layout {
    margin-top: 0 !important;
}

body:not(.home) .blogpost_topmargin {
    margin-top: 30px !important;
}

/* 下層ページのパンくずリスト調整 */
body:not(.home) .l--topicPath {
    padding: 15px 0 !important;
    background-color: #f8f8f8 !important;
    margin: 0 0 30px !important;
}

body:not(.home) .l--topicPath__inner {
    max-width: 988px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* 下層ページのメインコンテンツエリア */
body:not(.home) .lb--wrapper {
    padding: 0 20px !important;
    margin: 0 auto !important;
    max-width: 1028px !important;
}

body:not(.home) .lb--container {
    display: flex !important;
    gap: 40px !important;
}

body:not(.home) .lb--contents {
    flex: 1 !important;
    min-width: 0 !important;
}

/* サイドバーの調整 */
body:not(.home) .lb--sidebar {
    width: 300px !important;
    flex-shrink: 0 !important;
}

/* SP版でのサイドバー非表示 */
@media only screen and (max-width: 768px) {
    body:not(.home) .lb--container {
        flex-direction: column !important;
    }
    
    body:not(.home) .lb--sidebar {
        width: 100% !important;
        margin-top: 40px !important;
    }
    
    body:not(.home) .blogpost_topmargin {
        margin-top: 5.3333333333vw !important;
    }
    
    body:not(.home) .lb--wrapper {
        padding: 0 4vw !important;
    }
}

/* 記事リストの調整 */
body:not(.home) .lb--articles__box {
    display: flex !important;
    margin-bottom: 30px !important;
    padding-bottom: 30px !important;
    border-bottom: 1px solid #e5e5e5 !important;
    text-decoration: none !important;
    color: inherit !important;
}

body:not(.home) .lb--articles__box:hover {
    opacity: 0.8 !important;
}

/* 記事サムネイル */
body:not(.home) .lb--articles__box-photo {
    width: 200px !important;
    flex-shrink: 0 !important;
    margin-right: 20px !important;
}

body:not(.home) .lb--articles__box-photo img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
}

/* 記事情報エリア */
body:not(.home) .lb--articles__box-textBox {
    flex: 1 !important;
}

/* ページネーション調整 */
body:not(.home) .lb--pageNation {
    margin: 40px 0 !important;
    text-align: center !important;
}

body:not(.home) .lb--pageNation-list {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* フッター前の余白調整 */
body:not(.home) .l--commonLnks {
    padding: 40px 0 !important;
    background-color: #f8f8f8 !important;
}

body:not(.home) .l--commonLnks-list {
    max-width: 988px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    list-style: none !important;
}

/* home.phpの特別処理（BLOG-TOPページ） */
body.page-template-home {
    padding-top: 64px !important;
}

body.page-template-home .header-menu.header-menu_new {
    position: relative !important;
    margin-top: 0 !important;
    z-index: 1 !important;
}

@media only screen and (max-width: 768px) {
    body.page-template-home {
        padding-top: 17.0666666667vw !important;
    }
}

/* 検索ページとタグページの調整 */
body.search .lb--mainBox,
body.tag .lb--mainBox,
body.category .lb--mainBox {
    background-color: #f8f8f8 !important;
    padding: 40px 0 !important;
    margin-bottom: 30px !important;
}

body.search .lb--mainBox-title,
body.tag .lb--mainBox-title,
body.category .lb--mainBox-title {
    text-align: center !important;
    margin: 0 !important;
}

/* 固定フッターボタンが下層ページで被らないように */
body:not(.home) {
    padding-bottom: 80px !important;
}

@media only screen and (max-width: 768px) {
    body:not(.home) {
        padding-bottom: 20vw !important;
    }
}