/* ==========================================================================
   service_plan.css
   Service Plan 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; }

/* ==========================================================================
   Service Plan Main
   ========================================================================== */
.sp_main {

    /* ---------- Section heading (with under-bar) ---------- */
    & .sp_section_heading {
        margin-bottom: 24px;
        text-align: center;

        & h2 {
            position: relative;
            display: inline-block;
            margin: 0;
            padding-bottom: 16px;
            font-size: 2rem;
            font-weight: 700;
            line-height: 1.5;
            color: #333333;

            &::after {
                content: '';
                position: absolute;
                left: 50%;
                bottom: 0;
                transform: translateX(-50%);
                width: 60px;
                height: 4px;
                background-color: #ff9800;
                border-radius: 2px;
            }

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

    /* ==========================================================================
       Hero
       ========================================================================== */
    & .sp_hero_section {
        position: relative;
        padding: 80px 20px;
        background: linear-gradient(135deg, #02536e 0%, #0486b1 60%, #4ab1d6 100%);
        color: #ffffff;
        text-align: center;
        overflow: hidden;

        &::before {
            content: '';
            position: absolute;
            top: -100px;
            right: -100px;
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
            pointer-events: none;
        }

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

        & .sp_hero_inner {
            position: relative;
            max-width: 1200px;
            margin: 0 auto;
        }

        & .sp_hero_label {
            display: inline-block;
            padding: 8px 20px;
            margin-bottom: 28px;
            font-size: 0.95rem;
            font-weight: 500;
            border: 1px solid rgba(255, 255, 255, 0.7);
            border-radius: 24px;

            @media screen and (max-width: 768px) {
                font-size: 0.75rem;
                padding: 5px 14px;
                margin-bottom: 20px;
            }
        }

        & .sp_hero_title {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            margin: 0 0 24px;
            font-weight: 700;
            line-height: 1.4;

            & .sp_hero_title_sub {
                font-size: 1.6rem;

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

            & .sp_hero_title_main {
                font-size: 2.4rem;
                letter-spacing: 0.02em;

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

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

        & .sp_hero_caption {
            margin: 0;
            font-size: 1rem;
            opacity: 0.9;

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

    /* ==========================================================================
       Plans Section
       ========================================================================== */
    & .sp_plans_section {
        padding: 80px 20px;
        background-color: #ffffff;

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

        & .sp_plans_inner {
            max-width: 1200px;
            margin: 0 auto;
        }

        & .sp_plans_lead {
            margin: 0 0 48px;
            font-size: 1rem;
            text-align: center;
            color: #555555;

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

        /* ---------- Plan cards ---------- */
        & .sp_plan_cards {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 32px;
            margin: 0 0 80px;
            padding: 0;
            list-style: none;

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

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

        & .sp_plan_card {
            position: relative;
            padding: 42px 34px 32px;
            background-color: #ffffff;
            border: 1px solid #e0e6ec;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            transition: transform 0.25s ease, box-shadow 0.25s ease;

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

            &.sp_plan_card_featured {
                border: 2px solid #0486b1;
                box-shadow: 0 8px 24px rgba(4, 134, 177, 0.15);
            }
        }

        & .sp_plan_badge {
            position: absolute;
            top: -14px;
            left: 50%;
            transform: translateX(-50%);
            padding: 4px 18px;
            font-size: 0.85rem;
            font-weight: 700;
            color: #ffffff;
            background-color: #ff9800;
            border-radius: 14px;
        }

        & .sp_plan_head {
            padding-bottom: 26px;
            margin-bottom: 26px;
            text-align: center;
            border-bottom: 1px solid #e0e6ec;

            & .sp_plan_name {
                margin: 0 0 16px;
                font-family: 'Inter', sans-serif;
                font-size: 1.6rem;
                font-weight: 700;
                color: #0486b1;
                letter-spacing: 0.02em;
            }

            & .sp_plan_price {
                margin: 0;
                display: flex;
                align-items: baseline;
                justify-content: center;
                gap: 6px;
                color: #333333;

                & .sp_plan_price_num {
                    font-family: 'Inter', sans-serif;
                    font-size: 2.6rem;
                    font-weight: 700;
                    line-height: 1;

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

                & .sp_plan_price_unit {
                    font-size: 1rem;
                    font-weight: 500;
                    color: #555555;
                }

                &.sp_plan_price_quote {
                    font-size: 1.4rem;
                    font-weight: 700;
                    padding: 10px 0;

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

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

            & li {
                display: flex;
                align-items: center;
                gap: 10px;
                padding: 8px 0;
                font-size: 0.95rem;
                color: #333333;

                & .material-icons {
                    font-size: 18px;
                    color: #0486b1;
                    flex-shrink: 0;
                }

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

        /* ---------- Comparison Table ---------- */
        & .sp_table_heading {
            margin: 0 0 32px;
            font-size: 1.5rem;
            font-weight: 700;
            text-align: center;
            color: #333333;

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

        & .sp_table_wrapper {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            border: 1px solid #e0e6ec;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

            @media screen and (max-width: 768px) {
                border-radius: 4px;
            }
        }

        & .sp_table {
            width: 100%;
            min-width: 800px;
            border-collapse: collapse;
            background-color: #ffffff;

            & thead th {
                padding: 18px 16px;
                font-size: 0.95rem;
                font-weight: 700;
                color: #ffffff;
                background-color: #0486b1;
                border-right: 1px solid rgba(255, 255, 255, 0.2);
                text-align: center;

                &.sp_table_col_label {
                    width: 40%;
                    text-align: left;
                }

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

            & tbody td {
                padding: 18px 16px;
                font-size: 0.9rem;
                color: #333333;
                background-color: #ffffff;
                border-bottom: 1px solid #e0e6ec;
                border-right: 1px solid #e0e6ec;
                text-align: center;
                vertical-align: middle;

                &.sp_table_col_label {
                    text-align: left;
                    font-weight: 500;
                    background-color: #fafbfc;
                }

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

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

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

            & .sp_table_group_row td {
                padding: 12px 16px;
                font-size: 0.95rem;
                font-weight: 700;
                color: #333333;
                background-color: #e8f1f6;
                text-align: left;
                border-right: none;
            }

            & .sp_table_term {
                display: block;
                font-weight: 700;
                color: #333333;
                font-size: 0.95rem;
            }

            & .sp_table_desc {
                display: block;
                margin-top: 4px;
                font-size: 0.8rem;
                font-weight: 400;
                color: #777777;
                line-height: 1.5;
            }

            & .sp_icon_yes {
                font-size: 22px;
                color: #0486b1;
            }

            & .sp_icon_no {
                font-size: 18px;
                color: #c0c8d0;
            }
        }
    }

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

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

        & .sp_problems_inner {
            max-width: 1200px;
            margin: 0 auto;
        }

        & .sp_problem_list {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
            margin: 48px 0 0;
            padding: 0;
            list-style: none;

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

        & .sp_problem_card {
            display: flex;
            align-items: flex-start;
            gap: 20px;
            padding: 28px 32px;
            background-color: #ffffff;
            border-left: 4px solid #d97757;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);

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

        & .sp_problem_icon {
            font-size: 32px;
            color: #d97757;
            flex-shrink: 0;
        }

        & .sp_problem_text {
            & h4 {
                margin: 0 0 8px;
                font-size: 1.1rem;
                font-weight: 700;
                color: #333333;

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

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

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

    /* ==========================================================================
       Solutions Section
       ========================================================================== */
    & .sp_solutions_section {
        padding: 80px 20px;
        background-color: #ffffff;

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

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

        & .sp_solution_list {
            margin: 48px 0 0;
            padding: 0;
            list-style: none;

            & li {
                display: flex;
                align-items: center;
                gap: 30px;
                padding: 24px 30px;
                background-color: #f4f7fa;
                border: 1px solid #e0e6ec;
                border-radius: 8px;
                margin-bottom: 16px;

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

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

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

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

        & .sp_solution_text {
            & h4 {
                margin: 0 0 8px;
                font-size: 1.15rem;
                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;
                }
            }
        }
    }

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

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

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

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

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

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

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

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

        & .sp_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; }

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

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