/* ==========================================================================
   caseStudy.css
   Case Study detail page styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a { color: inherit; }

/* ==========================================================================
   Case Study Main
   ========================================================================== */
.cs_main {

    /* ---------- Section heading ---------- */
    & .cs_section_heading {
        margin-bottom: 32px;
        text-align: center;

        & h2 {
            margin: 0;
            font-size: 1.8rem;
            font-weight: 700;
            color: #333333;

            @media screen and (max-width: 768px) {
                font-size: 1.3rem;
            }
        }
    }

    /* ---------- Buttons (Mid CTA) ---------- */
    & .cs_btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 56px;
        padding: 0 28px;
        font-size: 1rem;
        font-weight: 700;
        text-decoration: none;
        border-radius: 28px;
        transition: opacity 0.2s ease;

        & .material-icons {
            font-size: 20px;
        }

        &:hover { opacity: 0.9; }

        &.cs_btn_primary {
            background-color: #ff9800;
            color: #ffffff;
            border: 1px solid #ff9800;
        }

        &.cs_btn_outline_white {
            background-color: transparent;
            color: #ffffff;
            border: 1px solid #ffffff;
        }

        @media screen and (max-width: 480px) {
            width: 100%;
        }
    }

    /* ==========================================================================
       Hero
       ========================================================================== */
    & .cs_hero_section {
        padding: 60px 20px 0;
        background-color: #f4f7fa;

        @media screen and (max-width: 768px) {
            padding: 40px 16px 0;
        }

        & .cs_hero_inner {
            max-width: 1000px;
            margin: 0 auto;
        }

        & .cs_hero_label {
            display: inline-block;
            padding: 5px 14px;
            margin-bottom: 16px;
            font-size: 0.8rem;
            font-weight: 700;
            color: #ffffff;
            background-color: #0486b1;
            border-radius: 4px;
        }

        & .cs_hero_title {
            margin: 0 0 16px;
            font-size: 2rem;
            font-weight: 700;
            line-height: 1.5;
            color: #333333;

            @media screen and (max-width: 1024px) {
                font-size: 1.6rem;
            }

            @media screen and (max-width: 768px) {
                font-size: 1.25rem;
                line-height: 1.55;
            }
        }

        & .cs_hero_company {
            margin: 0 0 32px;
            font-size: 1rem;
            color: #555555;

            @media screen and (max-width: 768px) {
                font-size: 0.9rem;
                margin-bottom: 24px;
            }
        }

        & .cs_hero_image {
            & .cs_hero_image_placeholder {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 12px;
                aspect-ratio: 800 / 400;
                overflow: hidden;
                background: linear-gradient(135deg, #e8f1f6 0%, #d3e2eb 100%);
                border-radius: 8px;
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

                & .material-icons {
                    font-size: 56px;
                    color: #a0b6c5;
                }

                & .cs_hero_image_caption {
                    font-size: 0.9rem;
                    color: #6b8094;

                    @media screen and (max-width: 768px) {
                        font-size: 0.8rem;
                    }
                }

                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    object-position: center;
                    display: block;
                }
            }
        }
    }

    /* ==========================================================================
       Summary Section
       ========================================================================== */
    & .cs_summary_section {
        padding: 60px 20px;
        background-color: #f4f7fa;

        @media screen and (max-width: 768px) {
            padding: 40px 16px;
        }

        & .cs_summary_inner {
            max-width: 1000px;
            margin: 0 auto;
        }

        & .cs_summary_list {
            margin: 0;
            background-color: #ffffff;
            border: 1px solid #e0e6ec;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            overflow: hidden;
        }

        & .cs_summary_row {
            display: grid;
            grid-template-columns: 249px 1fr;
            border-bottom: 1px solid #e0e6ec;

            &:last-child {
                border-bottom: none;
            }

            @media screen and (max-width: 768px) {
                grid-template-columns: 1fr;
            }

            & dt {
                padding: 20px;
                font-size: 0.95rem;
                font-weight: 700;
                color: #333333;
                background-color: #f4f7fa;
                border-right: 1px solid #e0e6ec;

                @media screen and (max-width: 768px) {
                    padding: 12px 16px;
                    font-size: 0.85rem;
                    border-right: none;
                    border-bottom: 1px solid #e0e6ec;
                }
            }

            & dd {
                margin: 0;
                padding: 20px;
                font-size: 0.95rem;
                line-height: 1.85;
                color: #555555;

                & strong {
                    display: inline-block;
                    margin-top: 8px;
                    color: #0486b1;
                    font-weight: 700;
                }

                @media screen and (max-width: 768px) {
                    padding: 16px;
                    font-size: 0.9rem;
                }
            }
        }
    }

    /* ==========================================================================
       Article Section
       ========================================================================== */
    & .cs_article_section {
        padding: 20px 20px 60px;

        @media screen and (max-width: 768px) {
            padding: 8px 16px 40px;
        }

        & .cs_article_inner {
            max-width: 800px;
            margin: 0 auto;
        }

        & .cs_article_heading {
            position: relative;
            margin: 60px 0 24px;
            padding-left: 16px;
            font-size: 1.5rem;
            font-weight: 700;
            color: #333333;
            line-height: 1.5;
            border-left: 4px solid #0486b1;

            @media screen and (max-width: 768px) {
                font-size: 1.15rem;
                margin: 40px 0 16px;
                padding-left: 12px;
            }
        }

        & .cs_article_box {
            padding: 30px;
            background-color: #f4f7fa;
            border-radius: 8px;

            & p {
                margin: 0 0 16px;
                font-size: 0.95rem;
                line-height: 1.9;
                color: #333333;

                &:last-child { margin-bottom: 0; }

                @media screen and (max-width: 768px) {
                    font-size: 0.9rem;
                }
            }

            @media screen and (max-width: 768px) {
                padding: 20px;
            }
        }

        & .cs_article_lead {
            margin: 0 0 28px;
            font-size: 0.95rem;
            line-height: 1.9;

            @media screen and (max-width: 768px) {
                font-size: 0.9rem;
            }
        }

        /* ---------- Before / After ---------- */
        & .cs_ba_box {
            display: grid;
            grid-template-columns: 1fr 48px 1fr;
            gap: 16px;
            align-items: center;
            padding: 40px;
            background-color: #f4f7fa;
            border-radius: 8px;

            @media screen and (max-width: 768px) {
                grid-template-columns: 1fr;
                gap: 24px;
                padding: 24px 20px;
            }
        }

        & .cs_ba_arrow {
            display: flex;
            align-items: center;
            justify-content: center;

            & .material-icons {
                font-size: 40px;
                color: #0486b1;
            }

            @media screen and (max-width: 768px) {
                & .material-icons {
                    transform: rotate(90deg);
                }
            }
        }

        & .cs_ba_col {
            position: relative;
            padding: 24px 20px;
            background-color: #ffffff;
            border: 1px solid #e0e6ec;
            border-radius: 8px;

            &.cs_ba_col_before {
                border-top: 4px solid #d97757;
            }

            &.cs_ba_col_after {
                border-top: 4px solid #0486b1;
            }
        }

        & .cs_ba_badge {
            display: inline-block;
            position: absolute;
            top: -16px;
            left: 20px;
            padding: 4px 14px;
            font-size: 0.85rem;
            font-weight: 700;
            color: #ffffff;
            border-radius: 4px;

            &.cs_ba_badge_before {
                background-color: #d97757;
            }

            &.cs_ba_badge_after {
                background-color: #0486b1;
            }
        }

        & .cs_ba_title {
            margin: 8px 0 16px;
            font-size: 1.15rem;
            font-weight: 700;
            text-align: center;
            color: #333333;

            @media screen and (max-width: 768px) {
                font-size: 1rem;
            }
        }

        & .cs_ba_steps {
            margin: 0;
            padding: 0;
            list-style: none;
            counter-reset: ba_step;

            & li {
                counter-increment: ba_step;
                position: relative;
                padding: 14px 16px 14px 44px;
                margin-bottom: 28px;
                background-color: #fafbfc;
                border: 1px solid #e0e6ec;
                border-radius: 6px;
                font-size: 0.85rem;
                line-height: 1.6;

                &::before {
                    content: counter(ba_step);
                    position: absolute;
                    left: 14px;
                    top: 50%;
                    transform: translateY(-50%);
                    width: 22px;
                    height: 22px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-family: 'Inter', sans-serif;
                    font-size: 0.75rem;
                    font-weight: 700;
                    color: #ffffff;
                    background-color: #0486b1;
                    border-radius: 50%;
                }

                &:not(:last-child)::after {
                    content: '';
                    position: absolute;
                    bottom: -22px;
                    left: 50%;
                    width: 0;
                    height: 0;
                    margin-left: -8px;
                    border-left: 8px solid transparent;
                    border-right: 8px solid transparent;
                    border-top: 10px solid #0486b1;
                }

                &:last-child {
                    margin-bottom: 0;
                }
            }
        }

        /* ---------- Interview ---------- */
        & .cs_interview {
            display: grid;
            gap: 30px;
            margin-top: 32px;
            align-items: center;

            &.cs_interview_left {
                grid-template-columns: 253px 1fr;
            }

            &.cs_interview_right {
                grid-template-columns: 1fr 253px;
            }

            @media screen and (max-width: 768px) {
                grid-template-columns: 1fr !important;
                gap: 20px;

                & .cs_interview_image {
                    order: -1;
                }
            }
        }

        & .cs_interview_image {
            & .cs_interview_image_placeholder {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 8px;
                aspect-ratio: 1 / 1;
                background: linear-gradient(135deg, #e8f1f6 0%, #d3e2eb 100%);
                border-radius: 8px;
                color: #6b8094;
                font-size: 0.85rem;
                text-align: center;
                padding: 12px;

                & .material-icons {
                    font-size: 48px;
                    color: #a0b6c5;
                }
            }
        }

        & .cs_interview_text {
            & .cs_interview_title {
                margin: 0 0 18px;
                font-size: 1.2rem;
                font-weight: 700;
                line-height: 1.55;
                color: #0486b1;

                @media screen and (max-width: 768px) {
                    font-size: 1.05rem;
                }
            }

            & .cs_interview_q {
                margin: 0 0 16px;
                padding: 10px 16px;
                font-size: 0.9rem;
                font-weight: 700;
                color: #333333;
                background-color: #f4f7fa;
                border-left: 3px solid #0486b1;
                border-radius: 0 4px 4px 0;
            }

            & p:not(.cs_interview_q) {
                margin: 0 0 14px;
                font-size: 0.9rem;
                line-height: 1.9;
                color: #555555;

                &:last-child { margin-bottom: 0; }

                @media screen and (max-width: 768px) {
                    font-size: 0.85rem;
                }
            }
        }
    }

    /* ==========================================================================
       Solution Section
       ========================================================================== */
    & .cs_solution_section {
        padding: 80px 20px;
        background-color: #f4f7fa;

        @media screen and (max-width: 768px) {
            padding: 56px 16px;
        }

        & .cs_solution_inner {
            max-width: 1000px;
            margin: 0 auto;
        }

        & .cs_solution_lead {
            margin: 0 0 40px;
            font-size: 0.95rem;
            text-align: center;
            color: #555555;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
                margin-bottom: 28px;
            }
        }

        & .cs_solution_list {
            margin: 0;
            padding: 0;
            list-style: none;

            & li {
                display: flex;
                align-items: center;
                gap: 30px;
                padding: 24px 30px;
                background-color: #ffffff;
                border: 1px solid #e0e6ec;
                border-radius: 8px;
                margin-bottom: 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);

                &:last-child { margin-bottom: 0; }

                @media screen and (max-width: 768px) {
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 16px;
                    padding: 20px;
                }
            }
        }

        & .cs_solution_icon {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0486b1 0%, #02536e 100%);

            & .material-icons {
                font-size: 30px;
                color: #ffffff;
            }
        }

        & .cs_solution_text {
            & h3 {
                margin: 0 0 8px;
                font-size: 1.1rem;
                font-weight: 700;
                color: #0486b1;

                @media screen and (max-width: 768px) {
                    font-size: 1rem;
                }
            }

            & p {
                margin: 0;
                font-size: 0.9rem;
                line-height: 1.85;
                color: #555555;

                @media screen and (max-width: 768px) {
                    font-size: 0.85rem;
                }
            }
        }
    }

    /* ==========================================================================
       Middle CTA
       ========================================================================== */
    & .cs_mid_cta_section {
        padding: 60px 20px;
        background: linear-gradient(135deg, #02536e 0%, #0486b1 100%);
        color: #ffffff;
        text-align: center;

        @media screen and (max-width: 768px) {
            padding: 48px 16px;
        }

        & .cs_mid_cta_inner {
            max-width: 1000px;
            margin: 0 auto;
        }

        & .cs_mid_cta_title {
            margin: 0 0 16px;
            font-size: 1.6rem;
            font-weight: 700;
            line-height: 1.5;

            @media screen and (max-width: 768px) {
                font-size: 1.15rem;
            }
        }

        & .cs_mid_cta_lead {
            margin: 0 0 32px;
            font-size: 0.95rem;
            opacity: 0.95;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
            }
        }

        & .cs_mid_cta_actions {
            display: flex;
            justify-content: center;
            gap: 20px;
            flex-wrap: wrap;
        }
    }

    /* ==========================================================================
       Other Cases
       ========================================================================== */
    & .cs_others_section {
        padding: 80px 20px;
        background-color: #ffffff;

        @media screen and (max-width: 768px) {
            padding: 56px 16px;
        }

        & .cs_others_inner {
            max-width: 1000px;
            margin: 0 auto;
        }

        & .cs_others_list {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            margin: 0;
            padding: 0;
            list-style: none;

            @media screen and (max-width: 1024px) {
                grid-template-columns: repeat(2, 1fr);
                gap: 24px;
            }

            @media screen and (max-width: 600px) {
                grid-template-columns: 1fr;
                gap: 20px;
            }
        }

        & .cs_other_card {
            display: flex;
            flex-direction: column;
            background-color: #ffffff;
            border: 1px solid #e0e6ec;
            border-radius: 8px;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            transition: transform 0.25s ease, box-shadow 0.25s ease;
            height: 100%;

            &:hover {
                transform: translateY(-4px);
                box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
            }
        }

        & .cs_other_thumb {
            display: flex;
            align-items: center;
            justify-content: center;
            aspect-ratio: 313 / 176;
            overflow: hidden;
            background: linear-gradient(135deg, #e8f1f6 0%, #d3e2eb 100%);
            border-bottom: 1px solid #e0e6ec;

            & .material-icons {
                font-size: 56px;
                color: #a0b6c5;
            }

            & img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: center;
                display: block;
            }
        }

        & .cs_other_body {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            padding: 20px;
        }

        & .cs_other_tags {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }

        & .cs_other_tag {
            display: inline-block;
            padding: 4px 10px;
            font-size: 0.75rem;
            font-weight: 500;
            color: #0486b1;
            background-color: #e8f1f6;
            border-radius: 4px;
        }

        & .cs_other_title {
            margin: 0 0 16px;
            font-size: 1rem;
            font-weight: 700;
            line-height: 1.55;
            color: #333333;
            flex-grow: 1;
        }

        & .cs_other_meta {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.85rem;
            color: #666666;

            & .material-icons {
                font-size: 16px;
                color: #888888;
            }
        }
    }

    /* ==========================================================================
       Features Section
       ========================================================================== */
    & .cs_features_section {
        padding: 80px 20px;
        background-color: #0486b1;

        @media screen and (max-width: 768px) {
            padding: 56px 16px;
        }

        & .cs_features_inner {
            max-width: 1000px;
            margin: 0 auto;
        }

        & .cs_section_heading h2 {
            color: #ffffff;
        }

        & .cs_feature_list {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
            margin: 0;
            padding: 0;
            list-style: none;

            @media screen and (max-width: 1024px) {
                gap: 20px;
            }

            @media screen and (max-width: 768px) {
                grid-template-columns: 1fr;
                gap: 16px;
            }
        }

        & .cs_feature_card {
            padding: 36px 24px;
            background-color: #ffffff;
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        }

        & .cs_feature_icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 64px;
            height: 64px;
            margin: 0 auto 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #0486b1 0%, #02536e 100%);

            & .material-icons {
                font-size: 32px;
                color: #ffffff;
            }
        }

        & .cs_feature_title {
            margin: 0 0 14px;
            font-size: 1.15rem;
            font-weight: 700;
            color: #333333;

            @media screen and (max-width: 768px) {
                font-size: 1.05rem;
            }
        }

        & .cs_feature_desc {
            margin: 0;
            font-size: 0.9rem;
            line-height: 1.85;
            color: #555555;
            text-align: left;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
            }
        }
    }

    /* ==========================================================================
       Bottom CTA
       ========================================================================== */
    & .cs_cta_section {
        padding: 64px 20px;
        background-color: #02536e;
        color: #ffffff;
        text-align: center;

        @media screen and (max-width: 768px) {
            padding: 48px 16px;
        }

        & .cs_cta_inner {
            max-width: 1100px;
            margin: 0 auto;
        }

        & .cs_cta_title {
            margin: 0 0 16px;
            font-size: 1.6rem;
            font-weight: 700;
            line-height: 1.5;

            @media screen and (max-width: 768px) {
                font-size: 1.2rem;
            }
        }

        & .cs_cta_lead {
            margin: 0 0 32px;
            font-size: 0.95rem;
            opacity: 0.95;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
            }
        }

        & .cs_cta_actions {
            display: flex;
            justify-content: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        & .cs_cta_btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 240px;
            height: 60px;
            padding: 0 32px;
            border-radius: 30px;
            font-size: 1rem;
            font-weight: 700;
            text-decoration: none;
            transition: opacity 0.2s ease;

            @media screen and (max-width: 480px) {
                min-width: 100%;
            }

            &:hover { opacity: 0.9; }

            &.cs_cta_btn_primary {
                background-color: #ff9800;
                color: #ffffff;
            }

            &.cs_cta_btn_outline {
                background-color: #ffffff;
                color: #0486b1;
                border: 1px solid #ffffff;
            }
        }
    }
}
