/* ==========================================================================
   導入事例（クラス接頭辞 case-）
   Figma「2611_LP_導入事例追加」の 導入事例詳細。1440 幅で、記事は 1144px。
   本文 760px と企業情報 320px を 64px 空けて並べる。
   事例を足すときは、このファイルを共通で使い、HTML だけを増やす
   ========================================================================== */

/* TOP ではヘッダーをヒーローに重ねるため absolute にしているが、
   このページは Figma でもヘッダーが通常フロー（y=88 から記事が始まる） */
header {
    position: static;
}

.case-page {
    /* styles.css の main { overflow: hidden } が残ると、
       企業情報の追従（position: sticky）が効かなくなる */
    overflow: visible;
    width: 100%;
    max-width: 1192px;
    margin: 0 auto;
    padding: 0 24px 56px;
    box-sizing: border-box;
    color: #475467;
}

/* --- パンくず --- */
.case-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    font-size: 13px;
    line-height: 24px;
    color: #475467;
}

.case-breadcrumb li + li::before {
    content: "〉";
    margin: 0 1em;
}

.case-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.case-breadcrumb a:hover {
    text-decoration: underline;
}

/* --- メイン写真と見出し ---
   写真には文字や色を重ねない（お客様のロゴが写っているため） */
/* picture は既定でインライン扱いになり、上の余白が効かないのでブロックにする */
.case-hero {
    display: block;
    margin-top: 32px;
}

.case-hero img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1144 / 440;
    object-fit: cover;
    border-radius: 8px;
}

.case-heading {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 920px;
    margin-top: 40px;
}

/* 1 行目（状態）はオレンジ、2 行目（誰が何をしたか）はネイビー */
.case-title {
    font-size: 36px;
    line-height: 56px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: #3A5D7F;
    /* 対応ブラウザでは文節の途中で折り返さない */
    word-break: auto-phrase;
}

.case-title-lead {
    display: block;
    color: #F79009;
}

.case-company {
    font-size: 15px;
    line-height: 24px;
    font-weight: bold;
    letter-spacing: 0.04em;
}

/* --- 本文と企業情報 --- */
.case-layout {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    margin-top: 40px;
}

.case-article {
    flex: 1 1 760px;
    min-width: 0;
    max-width: 760px;
}

/* --- この事例のポイント（課題・決め手・手応え） --- */
.case-points {
    padding: 40px;
    background-color: #F8F9FA;
    border-radius: 8px;
}

.case-points-row {
    display: flex;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid #D0D5DD;
}

.case-points-row:first-child {
    padding-top: 0;
    border-top: none;
}

.case-points-row:last-child {
    padding-bottom: 0;
}

.case-points-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 160px;
    font-size: 28px;
    line-height: 40px;
    font-weight: bold;
    letter-spacing: 0.08em;
    color: #475467;
}

.case-points-label svg {
    flex-shrink: 0;
}

/* 結果の段だけオレンジにして、読み終わりの着地点にする */
.case-points-label--result {
    color: #F79009;
}

.case-points-body {
    flex: 1;
    min-width: 0;
}

.case-points-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
}

/* 印は 1 行目の中央に置く（行の高さ 28px の真ん中） */
.case-points-list li {
    position: relative;
    padding-left: 28px;
    font-size: 16px;
    line-height: 28px;
    font-weight: bold;
    letter-spacing: 0.06em;
    color: #475467;
}

.case-points-list li::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 0;
    width: 12px;
    height: 4px;
    border-radius: 1px;
    background-color: #F79009;
}

.case-points-note {
    margin-top: 16px;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.06em;
    color: #475467;
}

/* --- リード文 --- */
.case-lead {
    margin: 48px 0 56px;
    font-size: 16px;
    line-height: 32px;
    font-weight: bold;
    letter-spacing: 0.04em;
}

/* --- 章 --- */
.case-chapter {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.case-chapter + .case-chapter {
    padding-top: 96px;
}

/* 棒は 1 行目の中央に置く。見出しが 2 行になっても上に揃える */
.case-h2 {
    position: relative;
    padding-left: 28px;
    font-size: 32px;
    line-height: 40px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: #3A5D7F;
}

.case-h2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 40px;
    border-radius: 1px;
    background-color: #F79009;
}

.case-qa {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.case-question {
    display: flex;
    gap: 8px;
    font-size: 17px;
    line-height: 30px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: #3A5D7F;
}

.case-question::before {
    content: "──";
    flex-shrink: 0;
}

.case-answer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-answer p {
    font-size: 16px;
    line-height: 32px;
    letter-spacing: 0.08em;
    color: #475467;
}

.case-speaker {
    margin-right: 1em;
    font-weight: bold;
    color: #1D2939;
}

/* マーカー：文字を覆うように、上 20% から 88% までを塗る。
   （下半分だけだと字面の下にはみ出し、下に寄って見える）
   Figma は太い下線で描いているが、ブラウザでは下線を上にずらす指定が
   効かず上に寄るため、背景のグラデーションで描く。
   mark 要素にブラウザが付ける黄色の背景も、ここで上書きされる */
.case-marker {
    background: linear-gradient(transparent 20%, rgba(247, 144, 9, 0.2) 20%, rgba(247, 144, 9, 0.2) 88%, transparent 88%);
    /* 改行をまたいでも、各行に同じように掛ける */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    font-weight: bold;
    color: #1D2939;
}

/* --- 引用 --- */
.case-quote {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 32px 40px;
    background-color: #F8F9FA;
    border-radius: 8px;
}

.case-quote-mark {
    display: block;
    color: #F79009;
}

.case-quote-text {
    font-size: 28px;
    line-height: 44px;
    font-weight: bold;
    letter-spacing: 0.06em;
    color: #3A5D7F;
}

.case-quote-cite {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    font-size: 15px;
    line-height: 24px;
    font-style: normal;
    font-weight: bold;
    letter-spacing: 0.04em;
}

.case-quote-cite::before {
    content: "";
    flex-shrink: 0;
    width: 64px;
    height: 1px;
    background-color: #475467;
}

/* --- 写真 --- */
.case-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- 編集部より --- */
.case-note {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 24px;
    background-color: #FFFAEB;
    border: 1px solid #DEE4EB;
    border-radius: 8px;
}

.case-note-label {
    font-size: 15px;
    line-height: 24px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: #3A5D7F;
}

.case-note-text {
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.06em;
    color: #475467;
}

/* --- conkan で変わったこと --- */
.case-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.case-benefits-title {
    font-size: 15px;
    line-height: 24px;
    font-weight: bold;
    letter-spacing: 0.04em;
    color: #F79009;
}

.case-benefits-list {
    padding: 28px;
    list-style: none;
    background-color: #FFFFFF;
    border: 2px solid #F79009;
    border-radius: 8px;
}

.case-benefits-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #DEE4EB;
    font-size: 28px;
    line-height: 42px;
    font-weight: bold;
    color: #3A5D7F;
}

.case-benefits-list li:first-child {
    padding-top: 0;
    border-top: none;
}

.case-benefits-list li:last-child {
    padding-bottom: 0;
}

.case-benefits-num {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 3px solid #F79009;
    border-radius: 50%;
    box-sizing: border-box;
    font-size: 24px;
    line-height: 1;
    /* 数字はフォントの下寄りに描かれ、丸の中で下がって見える。下に余白を入れて 2px 持ち上げる */
    padding-bottom: 4px;
    color: #F79009;
}

/* 語の途中で折り返さないまとまり */
.case-phrase {
    display: inline-block;
}

.case-closing {
    font-size: 16px;
    line-height: 32px;
    letter-spacing: 0.08em;
}

/* --- 一覧へ戻る --- */
.case-back {
    margin-top: 48px;
}

.case-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: bold;
    color: #3A5D7F;
    text-decoration: none;
}

.case-back a:hover {
    opacity: 0.8;
}

/* --- 企業情報（スクロールに追従） ---
   資料請求まで含めて画面に収まるよう、高さを 700px 前後に詰めている。
   Figma より項目の間隔・文字・ロゴを小さくし、市場区分と業種は横に並べる */
.case-aside {
    position: sticky;
    top: 24px;
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 画面が低くて収まらないときは追従させない。
   追従したまま資料請求が画面の外に出続けるのを防ぐ */
@media (max-height: 740px) {
    .case-aside {
        position: static;
    }
}

.case-profile {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 24px 20px;
    background-color: #FFFFFF;
    border: 1px solid #DEE4EB;
    border-radius: 8px;
}

.case-profile-logo {
    display: flex;
    justify-content: center;
}

.case-profile-logo img {
    width: 160px;
    height: auto;
}

.case-profile dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}

.case-profile-item {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
    border-top: 1px solid #DEE4EB;
    font-size: 14px;
    line-height: 22px;
    font-weight: bold;
    letter-spacing: 0.04em;
}

/* 値の短い項目は 2 つを横に並べる */
.case-profile-item--half {
    grid-column: auto;
}

.case-profile-item:last-child {
    padding-bottom: 0;
}

.case-profile-item dt {
    font-size: 13px;
    line-height: 20px;
    color: #95824B;
}

.case-profile-item dd {
    color: #475467;
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 4px;
    list-style: none;
}

.case-tags li {
    padding: 2px 10px;
    background-color: #E3F5FF;
    border-radius: 999px;
    font-size: 13px;
    line-height: 22px;
    font-weight: normal;
    letter-spacing: 0;
    color: #3A5D7F;
}

/* お問い合わせは、フォームが整ってから資料請求の下に足す */
.case-side-cta {
    padding: 16px;
    background-color: #F5FBFF;
    border-radius: 8px;
}

.case-side-cta .primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
    line-height: 24px;
}

/* --- タブレット：企業情報を細くする --- */
@media (max-width: 1240px) {
    .case-layout {
        gap: 40px;
    }

    .case-aside {
        flex-basis: 280px;
    }

    .case-profile {
        padding: 20px 20px 16px;
    }
}

/* --- 1 列：企業情報は本文のあとに置く --- */
@media (max-width: 1023px) {
    .case-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 56px;
    }

    .case-article {
        flex-basis: auto;
        max-width: none;
    }

    .case-aside {
        position: static;
        flex-basis: auto;
    }

    /* 1 列では、すぐ下にページ末尾の資料請求が続くので、サイドのボタンは出さない */
    .case-side-cta {
        display: none;
    }

    .case-title {
        font-size: 30px;
        line-height: 46px;
    }
}

/* --- スマホ --- */
@media (max-width: 767px) {
    .case-page {
        padding: 16px 16px 48px;
    }

    .case-breadcrumb ol {
        font-size: 11px;
        line-height: 18px;
    }

    .case-breadcrumb li + li::before {
        margin: 0 0.5em;
    }

    /* スマホは 16:9 の写真に差し替える（picture 側） */
    .case-hero {
        margin-top: 20px;
    }

    .case-hero img {
        aspect-ratio: 16 / 9;
    }

    .case-heading {
        gap: 20px;
        margin-top: 20px;
    }

    .case-title {
        font-size: 20px;
        line-height: 32px;
    }

    .case-company {
        font-size: 13px;
        line-height: 20px;
    }

    .case-layout {
        margin-top: 32px;
        gap: 48px;
    }

    /* 見出しと項目を縦に積む */
    .case-points {
        padding: 24px 20px;
    }

    .case-points-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 24px 0;
    }

    .case-points-label {
        flex-basis: auto;
        font-size: 20px;
        line-height: 32px;
    }

    .case-points-label svg {
        width: 24px;
        height: 24px;
    }

    .case-points-list {
        gap: 12px;
    }

    .case-points-list li {
        padding-left: 24px;
        font-size: 15px;
        line-height: 26px;
    }

    .case-points-list li::before {
        top: 11px;
    }

    .case-points-note {
        margin-top: 12px;
        font-size: 12px;
        line-height: 20px;
    }

    .case-lead {
        margin: 32px 0 40px;
        font-size: 15px;
        line-height: 30px;
    }

    .case-chapter {
        gap: 32px;
    }

    .case-chapter + .case-chapter {
        padding-top: 64px;
    }

    .case-h2 {
        padding-left: 20px;
        font-size: 22px;
        line-height: 34px;
    }

    .case-h2::before {
        top: 3px;
        width: 6px;
        height: 28px;
    }

    .case-question {
        font-size: 16px;
        line-height: 28px;
    }

    .case-answer p,
    .case-closing {
        font-size: 15px;
        line-height: 30px;
        letter-spacing: 0.04em;
    }

    .case-quote {
        padding: 24px 20px;
    }

    .case-quote-text {
        font-size: 20px;
        line-height: 32px;
    }

    /* PC 用の改行は、幅の狭いスマホでは変な位置の折り返しになるので外す */
    .case-br-pc {
        display: none;
    }

    /* 所属と名前を右寄せのまま折り返させる */
    .case-quote-cite {
        align-items: flex-start;
        font-size: 13px;
        line-height: 20px;
        text-align: right;
    }

    .case-quote-cite::before {
        width: 32px;
        margin-top: 10px;
    }

    .case-note {
        padding: 16px;
    }

    .case-benefits-list {
        padding: 20px;
    }

    .case-benefits-list li {
        gap: 12px;
        font-size: 18px;
        line-height: 28px;
    }

    .case-benefits-num {
        width: 32px;
        height: 32px;
        border-width: 2px;
        font-size: 16px;
        padding-bottom: 3px;
    }

    .case-back {
        margin-top: 40px;
    }
}

/* ==========================================================================
   導入事例一覧（case.html）
   Figma「導入事例一覧」。背景は #F8F9FA で、ヘッダーの下まで同じ色。
   カードは 1200px に 3 列、間隔 24px
   ========================================================================== */
.case-list-body {
    background-color: #F8F9FA;
}

/* パンくずの位置は詳細ページと揃える（幅 1144px、ヘッダーのすぐ下） */
.case-list {
    width: 100%;
    max-width: 1192px;
    margin: 0 auto;
    padding: 0 24px 96px;
    box-sizing: border-box;
}

.case-list-heading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* パンくずから見出しまでは、詳細ページのパンくず〜写真と同じ 32px */
.case-list-title {
    margin-top: 16px;
}

.case-list-title {
    font-size: 40px;
    line-height: 60px;
    font-weight: bold;
    color: #3A5D7F;
}

.case-list-lead {
    font-size: 16px;
    line-height: 28px;
    color: #475467;
}

.case-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
    list-style: none;
}

/* カード全体を 1 つのリンクにする */
.case-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #FFFFFF;
    border: 1px solid #DEE4EB;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.3s ease;
}

.case-card-link:hover {
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.case-card-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 382 / 216;
    object-fit: cover;
}

.case-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
    padding: 24px;
}

/* 会社名はタイトルより控えめに。色は詳細ページの会社名と同じ黒 */
.case-card-company {
    font-size: 13px;
    line-height: 20px;
    font-weight: bold;
    color: #475467;
}

.case-card-title {
    font-size: 20px;
    line-height: 32px;
    font-weight: bold;
    color: #3A5D7F;
    /* 対応ブラウザでは文節の途中で折り返さない */
    word-break: auto-phrase;
}

/* 1 文目（状態）のあとで必ず改行する */
.case-card-title-lead {
    display: block;
}

/* 「事例を読む」はカードの下端に揃える */
.case-card-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding: 8px 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: bold;
    color: #3A5D7F;
}

.case-card-link:hover .case-card-more {
    text-decoration: underline;
}

@media (max-width: 1023px) {
    .case-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .case-list {
        padding: 16px 16px 64px;
    }

    .case-list-heading {
        gap: 12px;
    }

    /* スマホも詳細ページ（パンくず〜写真 20px）と揃える */
    .case-list-title {
        margin-top: 8px;
        font-size: 28px;
        line-height: 40px;
    }

    .case-list-lead {
        font-size: 14px;
        line-height: 24px;
    }

    .case-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin-top: 32px;
    }

    .case-card-body {
        padding: 20px;
    }

    .case-card-title {
        font-size: 18px;
        line-height: 28px;
    }
}
