@charset "utf-8";
/* ============================================================================
   解決ガイドの導線  guide.css
   五月女建設 家の傾き相談室（katamukisoudan.com）

   ■ 対象
     ・目次（.ksd-toc）           … inc/guide-hub.php が本文に差し込む
     ・ハブへの戻り帯（.hub-back） … template-parts/hub-back.php（見た目は .link-card）
     ・一覧ページの固定表示（.hub-pickup） … page-works.php

   ■ 読み込み
     functions.php の add_css_js() で、解決ガイドの記事と一覧ページだけ読み込む。
     theme-additions.css は別作業と並行して編集されているため、ファイルを分けた。

   ■ 見た目の方針
     CTA（ネイビー地・立体）は「行動」、導線（白地・細罫・矢印）は「読み進める」。
     色はブランドカラーのみ：navy #002266 / 淡青 #ebf2ff / 罫線 #d3deed /
     文字 #222222 / 差し色 orange #fa7d00
   ========================================================================== */


/* =====================================================================
   目次
   ===================================================================== */

/* 固定ヘッダー（PC 80px / SP 60px）に見出しが隠れないようにする */
.single-content h2[id] {
    scroll-margin-top: 100px;
}

@media screen and (max-width: 850px) {
    .single-content h2[id] {
        scroll-margin-top: 76px;
    }
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.ksd-toc {
    margin: 2.2em 0 2.6em;
    border: 1px solid #d3deed;
    border-radius: 8px;
    background: #fff;
}

.ksd-toc details {
    padding: 0;
}

.ksd-toc__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    font-size: 17px;
    font-weight: 700;
    color: #002266;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid transparent;
}

.ksd-toc__title::-webkit-details-marker {
    display: none;
}

/* 開閉の目印（右端） */
.ksd-toc__title::after {
    content: "閉じる";
    font-size: 13px;
    font-weight: 500;
    color: #526987;
}

.ksd-toc details:not([open]) .ksd-toc__title::after {
    content: "開く";
}

.ksd-toc details[open] .ksd-toc__title {
    border-bottom-color: #d3deed;
}

.ksd-toc__title:focus-visible {
    outline: 3px solid #3174c7;
    outline-offset: 2px;
}

/* 本文の ol の丸番号スタイルを打ち消し、目次専用の番号にする */
.single-content .ksd-toc__list,
.ksd-toc__list {
    counter-reset: ksd-toc;
    list-style: none;
    margin: 0;
    padding: 14px 20px 16px;
}

.single-content .ksd-toc__list > li,
.ksd-toc__list > li {
    counter-increment: ksd-toc;
    position: relative;
    margin: 0;
    padding: 0 0 0 2.2em;
    line-height: 1.6;
}

.single-content .ksd-toc__list > li::before,
.ksd-toc__list > li::before {
    content: counter(ksd-toc);
    position: absolute;
    left: 0;
    top: .55em;
    width: 1.6em;
    height: auto;
    background: none;
    border-radius: 0;
    color: #fa7d00;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    text-align: right;
}

.ksd-toc__list a {
    display: block;
    padding: 7px 0;
    color: #002266;
    font-size: 16px;
    text-decoration: none;
}

.ksd-toc__list a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media screen and (max-width: 450px) {
    .ksd-toc__title {
        padding: 12px 16px;
    }
    .single-content .ksd-toc__list,
    .ksd-toc__list {
        padding: 10px 16px 12px;
    }
    .ksd-toc__list a {
        font-size: 15px;
    }
}


/* =====================================================================
   ハブへの戻り帯（各記事の本文直後）
   見た目は記事内リンクカード（patterns.css の .link-card）をそのまま使う。
   ここでは本文（出典など）と離すための余白だけを指定する。
   ===================================================================== */

.hub-back.link-card {
    margin: 3.5em 0 0;
}

/* .single-blog__post a（style.css）の青色に負けないよう、詳細度を上げる */
.single-blog__post .link-card__title a {
    color: #002266;
}

/* =====================================================================
   一覧ページ上部の固定表示（「すべて」の1ページ目のみ）
   ===================================================================== */

.hub-pickup {
    margin: 80px 0 0;
}

/* 直後の記事タイプボタンの上余白（100px）を詰める */
.hub-pickup + .works-category-buttons {
    margin-top: 48px;
}

.hub-pickup__link {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 22px 64px 22px 28px;
    background: #ebf2ff;
    border-left: 8px solid #002266;
    border-radius: 0 10px 10px 0;
    color: #222;
    text-decoration: none;
    box-shadow: 0 3px 6px 0 rgb(0 0 0 / .08);
    transition: box-shadow .2s ease, transform .2s ease;
}

.hub-pickup__link::after {
    content: "→";
    position: absolute;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 700;
    color: #fa7d00;
}

.hub-pickup__link:hover {
    box-shadow: 0 6px 14px 0 rgb(0 0 0 / .12);
    transform: translateY(-1px);
}

.hub-pickup__link:hover .hub-pickup__title {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hub-pickup__link:focus-visible {
    outline: 3px solid #3174c7;
    outline-offset: 3px;
}

.hub-pickup__label {
    justify-self: start;
    padding: 2px 10px;
    background: #002266;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.hub-pickup__title {
    margin-top: 4px;
    font-size: 22px;
    font-weight: 700;
    color: #002266;
    line-height: 1.5;
}

.hub-pickup__desc {
    font-size: 15px;
    line-height: 1.7;
}

@media screen and (max-width: 850px) {
    .hub-pickup {
        margin-top: 48px;
    }
    .hub-pickup + .works-category-buttons {
        margin-top: 32px;
    }
    .hub-pickup__link {
        padding: 18px 48px 18px 20px;
        border-left-width: 6px;
    }
    .hub-pickup__link::after {
        right: 18px;
        font-size: 20px;
    }
    .hub-pickup__title {
        font-size: 18px;
    }
    .hub-pickup__desc {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hub-pickup__link {
        transition: none;
    }
    .hub-pickup__link:hover {
        transform: none;
    }
}
