@charset "UTF-8";

/* =========================================
   style_case_detail.css - 取扱事例の詳細ページ専用
   見出し・戻るリンク・写真＋概要の表は style_news_detail.css を流用し、
   番号つきの対応リスト・工程の一覧・結びの文のみ追加定義
   ========================================= */

/* ===== 見出しの上の小さな見出し ===== */
.case-detail-label {
    font-size: var(--font-x-small);
    letter-spacing: 0.08em;
    color: rgba(var(--color-key-1), 1);
    margin-bottom: 1.5rem;
}

.case-detail-route {
    margin-top: 1.25rem;
    font-size: var(--font-x-middle);
    color: rgba(var(--color-black), 0.7);
}

/* ===== 写真（左）＋案件概要の表（右） ===== */
.news-article-office.case-detail-overview {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: stretch;
    margin-top: 0;
}

.case-detail-overview .case-detail-visual {
    display: flex;
}

.case-detail-overview .case-detail-visual img {
    height: 100%;
    object-fit: cover;
}

/* ===== 本文の見出しブロック ===== */
.case-detail-block {
    margin-top: 6rem;
}

.case-detail-block h2,
.case-detail-closing h2 {
    font-size: var(--font-large);
    line-height: var(--lh-heading);
}

/* 章ごとに間隔を変える（概要の表に近い章は詰め、主役の章の前は広く） */
.case-detail-block--tight {
    margin-top: 4rem;
}

.case-detail-block--wide {
    margin-top: 8rem;
}

.case-detail-block .key-line,
.case-detail-closing .key-line {
    margin: 1.25rem 0 0;
}

.case-detail-block .sub-prose {
    max-width: 52rem;
    margin-top: 2rem;
}

/* ===== 対応のリスト（番号・見出し・本文を罫線で区切る） ===== */
.case-steps {
    margin-top: 2.5rem;
    border-top: 1px solid var(--color-border);
    counter-reset: case-step;
}

.case-step {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.7fr);
    gap: 2.5rem;
    align-items: start;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--color-border);
    counter-increment: case-step;
}

.case-step::before {
    content: counter(case-step, decimal-leading-zero);
    font-family: Roboto, serif;
    font-size: var(--font-xx-large);
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(var(--color-key-1), 0.3);
}

.case-step h3 {
    font-size: var(--font-large);
    line-height: var(--lh-heading);
    color: rgba(var(--color-black), 0.9);
}

.case-step-body {
    font-size: var(--font-x-middle);
    line-height: var(--lh-body);
    color: rgba(var(--color-black), 0.8);
    padding-top: 0.25rem;
}

.case-step-body p + p {
    margin-top: 1rem;
}

/* ===== 対応工程の一覧（番号つき・上に罫線） ===== */
.case-flow {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0 1.5rem;
    counter-reset: case-flow;
}

.case-flow li {
    list-style: none;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-x-middle);
    line-height: var(--lh-heading);
    text-wrap: balance;
    counter-increment: case-flow;
}

.case-flow li::before {
    content: counter(case-flow, decimal-leading-zero);
    display: block;
    margin-bottom: 0.5rem;
    font-family: Roboto, serif;
    font-size: var(--font-x-small);
    letter-spacing: 0.08em;
    color: rgba(var(--color-key-1), 1);
}

/* ===== 結びの文 ===== */
.case-detail-closing {
    margin-top: 8rem;
}

.case-detail-closing::before {
    content: "";
    display: block;
    width: 6rem;
    height: 2px;
    margin-bottom: 2rem;
    background: rgba(var(--color-key-1), 1);
}

.case-detail-statement {
    max-width: 56rem;
    font-size: var(--font-x-large);
    line-height: var(--lh-heading);
    color: rgba(var(--color-black), 0.9);
}

.case-detail-closing--titled::before {
    display: none;
}

.case-detail-closing .sub-prose {
    max-width: 52rem;
    margin-top: 2rem;
}

.case-detail-statement + .sub-prose {
    margin-top: 3rem;
}

.sub-prose + .case-detail-statement {
    margin-top: 4rem;
}

/* ===== SP対応 ===== */
@media (max-width: 1080px) {

    .news-article-office.case-detail-overview {
        grid-template-columns: 1fr;
    }

    .case-detail-overview .case-detail-visual img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .case-detail-block,
    .case-detail-block--wide {
        margin-top: 4rem;
    }

    .case-detail-block--tight {
        margin-top: 3rem;
    }

    .case-step {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2rem 0;
    }

    .case-step::before {
        font-size: var(--font-x-large);
    }

    .case-flow {
        grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    }

    .case-detail-closing {
        margin-top: 5rem;
    }

    .case-detail-statement {
        font-size: var(--font-large);
    }
}

/* ===== 見出しの折り返し（1行目の末尾に1〜2文字だけ残らないようにする） ===== */
.case-detail-title {
    text-wrap: balance;
}
