/* BPO Service Page - New Feature Layout */

.bpo-page-content {
    position: relative;
    background: transparent; /* Reveal mask behind */
    overflow: hidden;
}

.service-services {
    position: relative;
    padding: 40px 0; /* Squeezed from 100px */
    /* background color removed, inherited from .bpo-page-content */
}

.service-services-inner {
    position: relative;
    z-index: 2;
    width: var(--container-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Squeezed from 80px */
}

.bpo-feature-item {
    /* 
     * clamp(MIN, PREFERRED, MAX) 
     * - MIN: Smallest size (mobile)
     * - PREFERRED: Scale with screen width (vw)
     * - MAX: Largest size (desktop)
     */
    --feature-title-size: clamp(24px, 2.5vw, 30px); 
    --feature-title-weight: 500; 
    
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 60px); /* Squeezed from clamp(30px, 6vw, 100px) */
}

.bpo-feature-item--reverse {
    flex-direction: row-reverse;
}

.bpo-feature-image {
    position: relative;
    flex: 1;
    max-width: 380px; /* Squeezed from 500px */
}

/* Image Blue Overlay */
.bpo-feature-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00358F26; /* User requested color at 15% opacity */
    border-radius: 12px;
    pointer-events: none;
    z-index: 1;
}

.bpo-feature-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 15px 45px #ADADAD; /* User requested shadow color */
    display: block;
    position: relative;
}

.bpo-feature-content {
    flex: 1;
}

.bpo-feature-number {
    font-size: clamp(32px, 3vw, 44px); /* Squeezed from clamp(40px, 4vw, 56px) */
    color: #0040a8;
    font-weight: 700;
    line-height: 1;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; /* Cleaner number font */
}

.bpo-feature-title {
    font-size: var(--feature-title-size);
    color: #1f2a3c;
    font-weight: var(--feature-title-weight);
    line-height: 1.4;
    margin-top: 12px;
    letter-spacing: -0.01em; /* Tighter letter spacing to help fit */
}

.service-intro,
.service-services,
.service-provision,
.gomikan-functions,
.service-details,
.service-process,
.service-cases {
    position: relative;
    z-index: 2; /* Content above watermarks */
}

/* Watermark Circles */
.bpo-bg-watermarks {
    /* 
     * Circle Sweet Spot Configuration (Figma 1440px baseline) 
     * Adjust these to move and resize the circles.
     */
    --c1-size: 54.5vw;  /* Circle 1 Size (Radius) */
    --c1-top: 7.2vw;   /* Circle 1 Y-coordinate (Top) */
    --c1-left: 59.4vw;  /* Circle 1 X-coordinate (Left) */

    --c2-size: 26vw;    /* Circle 2 Size (950px eq) */
    --c2-top: 60vw;     /* Circle 2 Y-coordinate (Near Feature 03) */
    --c2-left: -8vw;   /* Circle 2 X-coordinate (Left side) */

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* Background layer */
}

.watermark-circle {
    position: absolute;
    border-radius: 50%;
    background: #E3EFFF99; /* Figma exact color */
}

.circle-1 {
    width: var(--c1-size);
    height: var(--c1-size);
    top: var(--c1-top);
    left: var(--c1-left);
}

.circle-2 {
    width: var(--c2-size);
    height: var(--c2-size);
    top: var(--c2-top);
    left: var(--c2-left);
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    /* --- MOBILE SECTION SPACING CONFIGURATION (Sweet Spot Tuning) --- */
    :root {
        --sp-process-bottom-gap: 40px; /* Gap below 'Introduction Process' */
        --sp-cases-top-gap: 50px;       /* Gap above 'Case Studies' */
        --sp-case-divider-thickness: 2.5px; /* Stroke weight of the line */
        --sp-case-divider-width: 90%;    /* How much of the card width it spans */
        --sp-process-card-width: 84vw;   /* Width of process cards on mobile */
        --sp-cases-card-width: 84vw;     /* Width of case studies cards on mobile */

        /* SQUEEZED: Introduction Process Variables */
        --sp-process-padding: 16px; 
        --sp-process-gap: 15px;
        --sp-process-img-height: 160px;
        --sp-process-step-font: 20px;
        --sp-process-title-font: 20px;
        --sp-process-text-font: 15px;
        --sp-process-header-gap: 8px;
    }

    .service-services {
        padding: 60px 0;
    }

    .service-services-inner {
        gap: 50px;
    }

    .bpo-feature-item,
    .bpo-feature-item--reverse {
        flex-direction: column;
        text-align: left;
        gap: 24px;
    }

    .bpo-feature-image {
        max-width: 100%;
    }

    .bpo-feature-number {
        font-size: 48px;
    }

    .bpo-feature-title {
        font-size: 20px;
    }

    .bpo-page .service-lead {
        font-size: 14px;
        line-height: 1.7;
    }

    .bpo-bg-watermarks {
        /* --- MOBILE CIRCLE CONFIGURATION (Sweet Spot Tuning) --- */
        --c1-size-sp: 400px;   /* Circle 1 Size */
        --c1-top-sp: 100px;    /* Circle 1 Y-axis (Top) */
        --c1-left-sp: 60vw;    /* Circle 1 X-axis (Left) */

        --c2-size-sp: 400px;   /* Circle 2 Size */
        --c2-top-sp: 600px;    /* Circle 2 Y-axis (Top) */
        --c2-left-sp: -100px;  /* Circle 2 X-axis (Left) */
    }

    .circle-1 {
        width: var(--c1-size-sp);
        height: var(--c1-size-sp);
        top: var(--c1-top-sp);
        left: var(--c1-left-sp);
    }

    .circle-2 {
        width: var(--c2-size-sp);
        height: var(--c2-size-sp);
        top: var(--c2-top-sp);
        left: var(--c2-left-sp);
    }
}


/* BPO Page Specific Layout */
.bpo-page {
    position: relative;
    overflow: hidden;
    background-color: #F8FAFC; /* Consistent premium background */
}

/* Mask is now globally controlled from global.css — see :root variables */
/* .bpo-header-mask styles inherited from global .bpo-header-mask rule */

/* Local overrides to lift content above the mask */

.bpo-page .service-intro {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

.bpo-page .service-title,
.bpo-page .service-lead {
    position: relative;
    z-index: 10;
    color: #1f2a3c;
}

.bpo-page .service-title,
.bpo-page .service-lead {
    text-align: left;
}

/* Service Provision Diagram Section */
.service-provision {
    padding: 120px 0 100px; /* Increased top gap as requested, kept healthy bottom gap */
    background: transparent; /* Show parent background and watermarks */
    position: relative;
    z-index: 2;
}

.service-provision-inner {
    width: var(--container-w);
    margin: 0 auto;
    box-sizing: border-box;
    text-align: left;
}

.service-provision-inner .service-section-title {
    font-size: clamp(26px, 3.5vw, 42px);
    color: #1f2a3c;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: left;
}

.service-section-lead-wrap {
    margin-bottom: 35px; /* Squeezed from 60px */
}

.service-section-lead {
    font-size: clamp(16px, 1.8vw, 18px);
    line-height: 1.8;
    color: #1f2a3c;
    font-weight: 500;
}

/* Diagram Core Layout */
.provision-diagram {
    position: relative;
    width: 100%;
    max-width: var(--diagram-max-width, 1000px);
    height: 600px; /* Squeezed from 700px */
    margin: 0 auto;
    background: transparent;
    overflow: visible;

    /* Arrow Configuration - These can be adjusted as needed */
    --arrow-gray: #6c757d;
    --arrow-blue: #006BF9;
    --arrow-tip-size: 10px;       /* Size of the V */
    --arrow-tip-weight: 2px;   /* Thickness of the V lines */
    --arrow-line-weight: 2px;    /* Thickness of the connecting line */
    --h-arrow-offset: 40px;      /* Vertical gap between horizontal arrows (from center) */
    --arrow-label-gap: 20px;     /* Gap between arrow and text label */

    /* Gap Configuration - Adjust these for the horizontal spacing */
    --side-node-gap: 40px;      /* Gap between side panels and arrows */
    --gk-node-gap: 25px;        /* Gap between arrows and GK logo */
    
    /* Outward Shift Configuration - Use these to move the tables */
    --diagram-max-width: 1200px;    /* Increase this to spread the whole diagram wider */
    --table-outward-offset: 0px;    /* Use negative values like -20px to push tables outwards individually */
    --side-table-top: 220px;        /* Squeezed from 280px */
}


.diagram-node {
    position: absolute;
    z-index: 10;
}

/* Node Positions */
.node--hq {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.node--gk {
    top: 300px; /* Squeezed from 360px */
    left: 50%;
    transform: translateX(-50%);
}

.node--partners {
    top: var(--side-table-top, 360px);
    left: var(--table-outward-offset, 0);
}

.node--bases {
    top: var(--side-table-top, 360px);
    right: var(--table-outward-offset, 0);
}

/* Node Circles */
.node-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-align: left;
    transition: transform 0.3s ease;
}

.node-circle--blue {
    width: 200px;
    height: 200px;
    background: #00358F;
    color: white;
    border: 2.05px solid #006BF9;
}

.node-circle--white {
    width: 200px;
    height: 200px;
    background: white;
    border: 2.05px solid #006BF9;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.node-label {
    font-size: 25px; /* Increased by 125% */
    font-weight: 700;
    line-height: 1.4;
}

.node-logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.node-name {
    font-size: 30px; /* Increased by 125% */
    font-weight: 800;
    color: #1f2a3c;
    letter-spacing: 0.05em;
}

/* Box Nodes (Left/Right) */
.node-box-wrap {
    background: #E3EFFF;
    padding: 30px 12px;
    border-radius: 4px;
}

.node-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 23px;
    font-weight: 700;
    color: #1f2a3c;
    letter-spacing: 0.3em;
    background: #F8FAFC; /* User requested color */
    padding: 30px 8px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.node-icons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.node-icon-row {
    width: 70px;
    height: 70px;
    background: transparent; /* Removed white background */
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    /* Removed heavy shadows as per design */
}

.node-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Arrows and Labels Container */
.diagram-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.arrow {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-label {
    position: absolute;
    font-size: 18px;
    line-height: 1.4;
    color: #1f2a3c;
    font-weight: 500;
    white-space: normal;
    text-align: left;
    pointer-events: auto;
}

/* Arrow Lines */
.arrow::before {
    content: "";
    position: absolute;
    background: currentColor; /* Inherit color from arrow class if needed, but we use specific colors */
}

.arrow::after {
    content: "";
    position: absolute;
}

/* Specific Arrows */

/* HQ <-> GK (Vertical) */
.arrow--up, .arrow--down {
    width: 2px;
    left: 50%;
    margin-left: -1px;
}

.arrow--gk-hq {
    top: 205px;
    height: 54px;
    left: calc(50% - 60px);
}

.arrow--gk-hq::before {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--arrow-line-weight);
    background: var(--arrow-gray);
}

.arrow--gk-hq::after {
    top: 0px; /* Half of tip-size to reach the vertex */
    left: 50%;
    width: var(--arrow-tip-size);
    height: var(--arrow-tip-size);
    border-top: var(--arrow-tip-weight) solid var(--arrow-gray);
    border-left: var(--arrow-tip-weight) solid var(--arrow-gray);
    transform: translateX(-50%) rotate(45deg);
    background: none;
}

.arrow--hq-gk {
    top: 205px;
    height: 54px;
    left: calc(50% + 60px);
}

.arrow--hq-gk::before {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--arrow-line-weight);
    background: var(--arrow-blue);
}

.arrow--hq-gk::after {
    bottom: 0px; /* Half of tip-size to reach the vertex */
    left: 50%;
    width: var(--arrow-tip-size);
    height: var(--arrow-tip-size);
    border-bottom: var(--arrow-tip-weight) solid var(--arrow-blue);
    border-right: var(--arrow-tip-weight) solid var(--arrow-blue);
    transform: translateX(-50%) rotate(45deg);
    background: none;
}

.arrow--gk-hq .arrow-label { left: -40px; transform: translateX(-100%); top: 40%; text-align: left; width: 100px; }
.arrow--hq-gk .arrow-label { right: -40px; transform: translateX(100%); top: 40%; text-align: left; width: 200px; }

/* Horizontal Arrows (Partners-GK & Bases-GK) */
.arrow--left, .arrow--right {
    height: 2px;
    top: 400px; /* Adjusted to new GK center */
}

.arrow--right::before, .arrow--left::before {
    left: 0;
    right: 0;
    height: 2px;
}

/* Partners <-> GK Arrows (Left side) */
.arrow--partners-gk {
    left: calc(128px + var(--table-outward-offset, 0px) + var(--side-node-gap));
    width: calc(50% - 100px - var(--gk-node-gap) - (128px + var(--table-outward-offset, 0px) + var(--side-node-gap)));
    top: calc(400px - var(--h-arrow-offset)); /* Centered around 400px */
}

.arrow--partners-gk::before {
    left: 0;
    right: 0;
    height: var(--arrow-line-weight);
    background: var(--arrow-gray);
}
.arrow--partners-gk::after {
    right: 0px; /* Half of tip-size to reach the vertex */
    top: 50%;
    width: var(--arrow-tip-size);
    height: var(--arrow-tip-size);
    border-top: var(--arrow-tip-weight) solid var(--arrow-gray);
    border-right: var(--arrow-tip-weight) solid var(--arrow-gray);
    transform: translateY(-50%) rotate(45deg);
    background: none;
}

.arrow--gk-partners {
    left: calc(128px + var(--table-outward-offset, 0px) + var(--side-node-gap));
    width: calc(50% - 100px - var(--gk-node-gap) - (128px + var(--table-outward-offset, 0px) + var(--side-node-gap)));
    top: calc(400px + var(--h-arrow-offset)); /* Centered around 400px */
}

.arrow--gk-partners::before {
    left: 0;
    right: 0;
    height: var(--arrow-line-weight);
    background: var(--arrow-blue);
}
.arrow--gk-partners::after {
    left: 0px; /* Half of tip-size to reach the vertex */
    top: 50%;
    width: var(--arrow-tip-size);
    height: var(--arrow-tip-size);
    border-top: var(--arrow-tip-weight) solid var(--arrow-blue);
    border-left: var(--arrow-tip-weight) solid var(--arrow-blue);
    transform: translateY(-50%) rotate(-45deg);
    background: none;
}

.arrow--partners-gk .arrow-label { bottom: var(--arrow-label-gap); width: 100%; text-align: left; }
.arrow--gk-partners .arrow-label { top: var(--arrow-label-gap); width: 100%; text-align: left; }

/* Bases <-> GK Arrows (Right side) */
.arrow--bases-gk {
    right: calc(128px + var(--table-outward-offset, 0px) + var(--side-node-gap));
    width: calc(50% - 100px - var(--gk-node-gap) - (128px + var(--table-outward-offset, 0px) + var(--side-node-gap)));
    top: calc(400px + var(--h-arrow-offset)); /* Centered around 400px */
}

.arrow--bases-gk::before {
    left: 0;
    right: 0;
    height: var(--arrow-line-weight);
    background: var(--arrow-blue);
}
.arrow--bases-gk::after {
    left: 0px; /* Half of tip-size to reach the vertex */
    top: 50%;
    width: var(--arrow-tip-size);
    height: var(--arrow-tip-size);
    border-top: var(--arrow-tip-weight) solid var(--arrow-blue);
    border-left: var(--arrow-tip-weight) solid var(--arrow-blue);
    transform: translateY(-50%) rotate(-45deg);
    background: none;
}

.arrow--gk-bases {
    right: calc(128px + var(--table-outward-offset, 0px) + var(--side-node-gap));
    width: calc(50% - 100px - var(--gk-node-gap) - (128px + var(--table-outward-offset, 0px) + var(--side-node-gap)));
    top: calc(400px - var(--h-arrow-offset)); /* Centered around 400px */
}

.arrow--gk-bases::before {
    left: 0;
    right: 0;
    height: var(--arrow-line-weight);
    background: var(--arrow-gray);
}
.arrow--gk-bases::after {
    right: 0px; /* Half of tip-size to reach the vertex */
    top: 50%;
    width: var(--arrow-tip-size);
    height: var(--arrow-tip-size);
    border-top: var(--arrow-tip-weight) solid var(--arrow-gray);
    border-right: var(--arrow-tip-weight) solid var(--arrow-gray);
    transform: translateY(-50%) rotate(45deg);
    background: none;
}

.arrow--bases-gk .arrow-label { top: var(--arrow-label-gap); width: 100%; text-align: left; }
.arrow--gk-bases .arrow-label { bottom: var(--arrow-label-gap); width: 100%; text-align: left; }

.arrow--gk-bases .arrow-label { bottom: var(--arrow-label-gap); width: 100%; text-align: left; }

/* Responsive Diagram (Mobile) */
/* Responsive Diagram (Mobile / Horizontal Scaling) */
@media (max-width: 900px) {
    .provision-diagram {
        display: block; /* Back to absolute system */
        height: 480px; /* Scaled down from 700px */
        
        /* --- MOBILE DIAGRAM FONT CONFIGURATION (Sweet Spot Tuning) --- */
        --sp-hq-font: 13px;
        --sp-gk-font: 13px;
        --sp-box-text-font: 13px;
        --sp-arrow-label-font: 8px;

        /* --- MOBILE DIAGRAM SPACING CONFIGURATION --- */
        --h-arrow-offset: 20px;
        --arrow-label-gap: 10px;
        --side-node-gap: 10px;
        --gk-node-gap: 12px;
        --side-table-top: 180px;
        --arrow-tip-size: 6px;
        --arrow-tip-weight: 1.5px;
        --arrow-line-weight: 1.5px;
        margin-top: 30px; 
    }

    /* Target gap between flowchart and NEXT heading */
    .service-provision {
        padding-top: 60px;
        padding-bottom: 0px !important;
    }

    .gomikan-functions {
        margin-top: -50px !important; /* Pull up next section closer to flowchart */
    }

    .diagram-node {
        position: absolute !important; /* Keep desktop positioning */
    }

    /* Scale Circles to 40% (80px instead of 100px) for more room */
    .node-circle--blue,
    .node-circle--white {
        width: 85px;
        height: 85px;
    }

    .node-label { font-size: var(--sp-hq-font); }
    .node-name { font-size: var(--sp-gk-font); margin-top: 1px; }
    .node-logo { width: 32px; margin-bottom: 3px; }

    /* Scale Boxes Slightly More */
    .node-box-wrap {
        padding: 10px 4px;
    }

    .node-box {
        gap: 5px;
    }

    .vertical-text {
        font-size: var(--sp-box-text-font);
        padding: 12px 3px;
    }

    .node-icon-row {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    /* Target accurate mobile scaling for nodes */
    .node--hq { top: 0; }
    .node--gk { top: 220px; }
    .node--partners { top: var(--side-table-top, 180px); left: 0; }
    .node--bases { top: var(--side-table-top, 180px); right: 0; }

    /* Arrow Restoration */
    .diagram-elements {
        display: block;
    }

    .arrow-label {
        font-size: var(--sp-arrow-label-font);
        white-space: normal; /* Allow wrapping */
        width: 100px; /* Reduced width for wrapping */
        line-height: 1.2;
    }

    /* Vertical Arrows Scaling */
    .arrow--gk-hq, .arrow--hq-gk {
        top: 95px;
        height: 69px;
    }
    .arrow--gk-hq { left: calc(50% - 30px); }
    .arrow--hq-gk { left: calc(50% + 30px); }

    .arrow--gk-hq .arrow-label { left: -5px; transform: translateX(-100%); width: 60px; }
    .arrow--hq-gk .arrow-label { right: -5px; transform: translateX(100%); width: 60px; }

    /* Horizontal Arrows Scaling - FIX OVERLAP */
    .arrow--partners-gk, .arrow--gk-bases {
        top: calc(262px - var(--h-arrow-offset)); /* 262 is center of circle at 220 */
    }
    .arrow--gk-partners, .arrow--bases-gk {
        top: calc(262px + var(--h-arrow-offset));
    }

    /* Recalculate horizontal arrow lengths (Box width ~65px) */
    .arrow--partners-gk, .arrow--gk-partners {
        left: calc(65px + var(--side-node-gap));
        width: calc(50% - 42.5px - var(--gk-node-gap) - (65px + var(--side-node-gap)));
    }

    .arrow--bases-gk, .arrow--gk-bases {
        right: calc(65px + var(--side-node-gap));
        width: calc(50% - 42.5px - var(--gk-node-gap) - (65px + var(--side-node-gap)));
    }

    .arrow--partners-gk .arrow-label { bottom: 6px; }
    .arrow--gk-partners .arrow-label { top: 6px; }
    .arrow--bases-gk .arrow-label { top: 6px; }
    .arrow--gk-bases .arrow-label { bottom: 6px; }

    .provision-diagram {
        cursor: zoom-in;
    }
}

/* ==========================================================================
   DIAGRAM LIGHTBOX (MOBILE MODAL)
   ========================================================================== */
.diagram-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000; /* Over everything */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.diagram-lightbox.is-active {
    display: flex;
    opacity: 1;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 15, 25, 0.95); /* High contrast backdrop */
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    width: 95%;
    max-height: 65%; /* Reduced height */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: visible; /* FOR CLOSE BUTTON OUTSIDE */
    animation: lightboxPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes lightboxPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: -45px; /* OUTSIDE in the air */
    right: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-inner {
    padding: 20px; /* Reduced padding */
    overflow-x: auto;
    overflow-y: auto;
    max-height: 85vh;
}

/* Inherit MOBILE styles for the diagram in Lightbox (prevents overlap) */
.lightbox-inner .provision-diagram {
    transform: none;
    margin: 0px auto;
}



.gomikan-functions {
    margin-top: 0px; /* Strong negative margin to bring it CLOSER */
    padding: 40px 0;   /* Healthy positive padding for the internal spacing */
    background: transparent; /* Show parent background and watermarks */
    position: relative;
    z-index: 2;
}

.gomikan-functions-inner {
    width: var(--container-w);
    margin: 0 auto;
    box-sizing: border-box;
    text-align: left;
}

.gomikan-functions-title {
    font-size: clamp(26px, 3.5vw, 42px);
    color: #1f2a3c;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: left;
}

.gomikan-functions-subtitle {
    font-size: clamp(16px, 1.8vw, 20px);
    color: #1f2a3c;
    font-weight: 500;
    margin-bottom: 80px; /* Reduced gap to flowchart */
}

.functions-flow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    position: relative;
}

/* PC: ラベルを繋ぐ水平タイムライン線 / function-arrow非表示 */
@media (min-width: 901px) {
    .functions-flow::before {
        content: "";
        position: absolute;
        top: 19px; /* function-label center: border(1) + padding(6) + line-height(24)/2 */
        left: 0;
        right: 0;
        height: 2px;
        background: #AEAEAF;
        z-index: 0;
    }

    .function-arrow {
        display: none;
    }

    .function-arrow::after {
        content: none;
    }
}

.function-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 200px;
}

.function-label {
    background: #fff;
    color: #1f2a3c;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 2px;
    margin-bottom: 15px;
    white-space: nowrap;
    border: 1.03px solid #AEAEAF;
    position: relative;
    z-index: 1;
}

.function-circle {
    width: clamp(120px, 12vw, 180px);
    height: clamp(120px, 12vw, 180px);
    background: #BED6FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    border: 1.03px solid #AEAEAF;
    box-shadow: 4.13px 4.13px 4.13px 0px rgba(0, 0, 0, 0.25);
}

.function-icon {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

.function-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #1f2a3c;
    font-weight: 500;
    text-align: left;
}

.function-arrow {
    --arrow-w: 23.5px; /* Adjust width */
    --arrow-h: 85px; /* Adjust height */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Vertically center relative to circle center */
    margin-top: calc(clamp(120px, 12vw, 180px) / 2 + 47px); 
    width: var(--arrow-w);
    height: var(--arrow-h);
    /* Secret: This ensures it grows from the center, not the top */
    transform: translateY(-50%); 
    filter: drop-shadow(4.13px 4.13px 4.13px rgba(0, 0, 0, 0.25));
    position: relative;
    z-index: 1;
}

.function-arrow::after {
    content: "";
    width: 100%;
    height: 100%;
    /* Re-centered SVG path for better scaling */
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2240%22%20height%3D%2230%22%20viewBox%3D%220%200%2040%2030%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2%202L38%2015L2%2028V2Z%22%20fill%3D%22%2300358F%22%20stroke%3D%22%23AEAEAF%22%20stroke-width%3D%221.03%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
}

.function-arrow .arrow-img {
    display: none;
}

/* Mobile Adjustments for Gomikan Functions */
@media (max-width: 900px) {
    .functions-flow {
        flex-direction: column;
        align-items: center;
        gap: 30px;

        /* --- MOBILE GOMIKAN TUNING (Zig-Zag) --- */
        --sp-func-image-size: 140px;
        --sp-func-gap: 20px;
        --sp-func-label-bottom: 12px;
        --sp-func-label-font: 14px;
        --sp-func-label-width: auto;
        --sp-func-label-padding: 8px 30px; /* Increased from 4px 22px to make it more noticeable */
        --sp-func-desc-font: 15px;
        --sp-func-arrow-width: 55px;
        --sp-func-arrow-height: 20px;
    }

    .function-item {
        display: grid;
        grid-template-areas:
            "label label"
            "image desc";
        grid-template-columns: 20vw 1fr;
        align-items: center;
        gap: var(--sp-func-gap);
        max-width: 100%;
        text-align: left;
    }

    .function-label {
        grid-area: label;
        margin: 0 0 var(--sp-func-label-bottom);
        font-size: var(--sp-func-label-font);
        width: fit-content;
        min-width: var(--sp-func-label-width);
        padding: var(--sp-func-label-padding);
        display: block;
        text-align: left;
        white-space: nowrap;
        line-height: 1.2;
        border-left: 4px solid #0040a8;
        border-radius: 0 10px 10px 0;
        padding-left: 14px;
    }

    .function-circle {
        grid-area: image;
        width: 20vw;
        height: 20vw;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .function-icon {
        width: 50%;
        height: 50%;
        object-fit: contain;
    }

    .function-desc {
        grid-area: desc;
        text-align: left;
        max-width: none;
        font-size: var(--sp-func-desc-font);
        line-height: 1.5;
        padding: 0 10px;
    }

    /* 全アイテム: 画像左・文章右で統一 */


    .function-arrow {
        padding-top: 0;
        margin-top: 5px;
        transform: none;
        width: var(--sp-func-arrow-width);
        height: var(--sp-func-arrow-height);
        position: relative;
        z-index: 1;
    }

    .function-arrow::after {
        background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D%220%200%2030%2020%22%20preserveAspectRatio%3D%22none%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2%202L15%2018L28%202H2Z%22%20fill%3D%22%2300358F%22%20stroke%3D%22%23AEAEAF%22%20stroke-width%3D%221.03%22%2F%3E%3C%2Fsvg%3E');
    }

    .gomikan-functions-subtitle {
        margin-bottom: 30px;
    }
}
/* Service Details Section (提供サービス) */
.service-details {
    /* --- CONFIGURATION PANEL (Sweet Spot Tuning) --- */
    --details-header-size: 22px;
    --details-label-size: 20px;
    --details-sub-number-size: 20px;
    --details-sub-title-size: 18px;
    --details-sub-desc-size: 17px;
    --details-padding-bottom: 20px; /* Reduced gap from bottom */

    padding: 100px 0 var(--details-padding-bottom);
    background: #f8fafc;
    position: relative;
    z-index: 2;
}

.service-details-inner {
    width: var(--container-w);
    margin: 0 auto;
    box-sizing: border-box;
}

.service-details-main-title {
    font-size: clamp(26px, 3.5vw, 42px);
    color: #000;
    font-weight: 700;
    text-align: left;
    margin-bottom: 60px;
}

.service-table-wrap {
    margin-bottom: 60px;
}

.service-table-header {
    background: #E3EFFF;
    color: #000;
    font-size: var(--details-header-size);
    font-weight: 700;
    padding: 15px;
    text-align: center;
    border: none;
}

.service-table {
    border-left: 1px solid #D9D9D9;
    border-right: 1px solid #D9D9D9;
    background: white;
    position: relative;
    /* Tunable Row Lines */
    --row-line-color: #D9D9D9;    
    --line-weight-top: 1.03px;    /* Thinner top line */
    --line-weight-bottom: 1.03px; /* Thinner bottom line */
    --line-weight-mid: 2px;       /* Thicker middle lines */
    --line-width-top: 100%;       /* Full width */
    --line-width-bottom: 100%;
    --line-width-mid: 100%;
}

.service-table-row {
    position: relative;
    display: flex;
}

.service-table-row::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--line-width-mid);
    height: var(--line-weight-mid);
    background-color: var(--row-line-color);
    z-index: 5;
}

/* First row special top line */
.service-table-row:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--line-width-top);
    height: var(--line-weight-top);
    background-color: var(--row-line-color);
    z-index: 5;
}

/* Last row special bottom line */
.service-table-row:last-child::after {
    width: var(--line-width-bottom);
    height: var(--line-weight-bottom);
}

.service-table-label {
    width: 240px;
    background: #fcfdfe;
    justify-content: flex-start;
    padding: 40px 30px 40px 40px;
    display: flex;
    align-items: center;
    font-size: var(--details-label-size);
    font-weight: 500;
    color: #000;
    text-align: left;
    border-right: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.service-table-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.service-sub-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    line-height: 1.6;
}

.sub-number {
    width: 30px;
    font-weight: 700;
    color: #000;
    font-size: var(--details-sub-number-size);
    flex-shrink: 0;
}

.sub-title {
    font-weight: 400;
    color: #000;
    font-size: var(--details-sub-title-size);
    margin-right: 10px;
    flex-shrink: 0;
}

.sub-title:not(:last-child) {
    width: 150px;
}

.sub-desc {
    color: #000;
    font-size: var(--details-sub-desc-size);
    font-weight: 400;
    opacity: 1;
}

/* Option table overrides */
.service-table--option .service-table-content {
    text-align: left;
    padding: 20px 40px;
    font-size: var(--details-sub-title-size);
    font-weight: 400;
    color: #000;
}

/* Mobile Adjustments for Service Details */
@media (max-width: 768px) {
    .service-details {
        padding-top: 60px;
    }

    .service-table--option .service-table-content {
        text-align: left;
        padding: 15px 20px;
    }

    .service-table-row {
        flex-direction: column;
    }

    .service-table-label {
        width: 100%;
        padding: 15px;
        background: #f0f4f9;
        border-right: none;
        border-bottom: 1px solid #D9D9D9;
    }

    .service-table-content {
        padding: 20px;
    }

    .service-sub-item {
        flex-direction: column;
        gap: 5px;
    }

    .sub-title {
        margin-right: 0;
    }
}

/* Service Process Section (導入プロセス) */
.service-process {
    padding: 60px 0 100px; /* Reduced gap from top */
    background: #F8FAFC;
    position: relative;
    z-index: 2;
}

.service-process-inner {
    width: var(--container-w);
    margin: 0 auto;
    box-sizing: border-box;
}

.service-process-main-title {
    font-size: clamp(26px, 3.5vw, 42px);
    color: #000;
    font-weight: 700;
    text-align: left;
    margin-bottom: 40px;
}

.process-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.process-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-card {
    background: #BED6FD;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 24px 40px;  /* Squeezed vertical padding */
    gap: 30px;           /* Squeezed gap */
    box-shadow: 4px 8px 4px 0 rgba(0, 0, 0, 0.25); /* Figma spec */
    border: none;
    border-radius: 4px;
}

.step-image {
    flex: 0 0 160px;     /* Squeezed image width */
    height: 160px;       /* Squeezed image height */
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-content {
    flex: 1;
    color: #000;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 30px;           /* Line 1091: Gap between STEP 01 and Title */
    margin-bottom: 30px;  /* Line 1092: Gap between Header and Description */
}

.step-number {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.step-text {
    font-size: 19px; /* Line 1108: Adjust font size here */
    line-height: 1.8;
    color: #000;
    font-weight: 400;
}

/* Arrows between steps */
.process-arrow-wrap {
    /* Line 1355: Control the vertical gap (white space) between the cards! Increase this to make the gap larger */
    --arrow-gap: 50px; 
    height: var(--arrow-gap);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1; 
}

.process-arrow {
    /* Line 1364: Width of the arrow */
    --arrow-width: 100px;   
    /* Line 1366: Height (length) of the arrow pointing down */
    --arrow-height: 25px;   
    width: 0;
    height: 0;
    border-left: calc(var(--arrow-width) / 2) solid transparent;
    border-right: calc(var(--arrow-width) / 2) solid transparent;
    border-top: var(--arrow-height) solid #BED6FD; /* Matching card color */
    filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.15));
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .service-process-inner {
        width: var(--sp-process-card-width);
    }

    .step-card {
        flex-direction: column;
        padding: var(--sp-process-padding);
        gap: var(--sp-process-gap);
        text-align: left;
    }

    .step-image {
        flex: 0 0 var(--sp-process-img-height);
        width: 100%;
    }

    .step-header {
        flex-direction: column;
        gap: var(--sp-process-header-gap);
        margin-bottom: var(--sp-process-header-gap);
    }

    .step-number, .step-title {
        font-size: var(--sp-process-step-font);
    }

    .step-text {
        font-size: var(--sp-process-text-font);
        line-height: 1.6;
    }

    /* Mobile Spacing Override */
    .service-process {
        padding-bottom: var(--sp-process-bottom-gap) !important;
    }
}

/* Service Cases Section (導入事例) - Integrated Sweet Spot Tuning */
.service-cases {
    /* --- CONFIGURATION PANEL (Sweet Spot Tuning synchronized from Venous BX) --- */
    --cases-max-width: 1600px;
    --cases-title-size: clamp(26px, 3.5vw, 42px);
    --cases-client-size: 17px; /* Squeezed: reduced from 19px */
    --cases-highlight-size: 17px; /* Squeezed: reduced from clamp */
    --cases-detail-label-size: 16px; /* Squeezed: reduced from 20px */
    --cases-detail-text-size: 15px; /* Squeezed: reduced from 20px */
    --cases-detail-indent: 1em; /* Squeezed from 1.5em */

    /* Shadows & Dividers */
    --cases-container-shadow: 3px 6px 4.7px 0 rgba(0, 53, 143, 0.22);
    --cases-image-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    --cases-divider-color: #00358FCC;

    padding: 40px 0; /* Squeezed from 100px */
    background: #F8FAFC;
    position: relative;
    z-index: 2;
}

.service-cases-inner {
    width: min(var(--cases-max-width), 94vw);
    margin: 0 auto;
}

.service-cases-inner .service-section-title {
    font-size: var(--cases-title-size);
    color: #1f2a3c;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

.cases-container {
    background: #BED6FD;
    border-radius: 12px;
    display: flex;
    box-shadow: var(--cases-container-shadow);
    overflow: hidden;
    position: relative;
}

.case-item {
    flex: 1;
    padding: 24px 30px; /* Squeezed: reduced padding significantly */
    display: flex;
    flex-direction: column;
}

/* Vertical Dividers */
.case-divider {
    width: 2px;
    background: var(--cases-divider-color);
    margin: 24px 0; /* Squeezed: reduced margin to match padding */
    flex-shrink: 0;
}

.case-client {
    font-size: var(--cases-client-size);
    color: #1f2a3c;
    font-weight: 500;
    margin-bottom: 8px; /* Squeezed */
}

.case-highlight {
    font-size: var(--cases-highlight-size);
    font-weight: 700;
    color: #1f2a3c;
    line-height: 1.4;
    margin-bottom: 15px; /* Squeezed */
    height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.case-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* Flatter ratio to save vertical space */
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px; /* Squeezed */
    box-shadow: var(--cases-image-shadow);
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-details {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Squeezed: minimal gap between rows */
}

.case-detail-row {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Squeezed: label and text very close */
}

.detail-label {
    font-size: var(--cases-detail-label-size);
    font-weight: 700;
    color: #1f2a3c;
}

.detail-text {
    font-size: var(--cases-detail-text-size);
    line-height: 1.5; /* Squeezed: tighter line height */
    color: #1f2a3c;
    font-weight: 400;
    padding-left: var(--cases-detail-indent); /* Indentation from label */
}

/* Mobile Adjustments for Case Studies */
@media (max-width: 1000px) {
    .service-cases-inner {
        width: var(--sp-cases-card-width);
    }

    .cases-container {
        flex-direction: column;
    }

    .case-divider {
        width: var(--sp-case-divider-width);
        height: var(--sp-case-divider-thickness);
        margin: 0 auto;
    }

    .case-item {
        padding: 40px 30px;
    }

    .case-highlight {
        height: auto;
        margin-bottom: 25px;
    }

    /* Mobile Spacing Override */
    .service-cases {
        padding-top: var(--sp-cases-top-gap) !important;
    }
}