/* Venous BX Service Page - Specific Styles */

:root {
    /* --- Sweet Spot Tuning (Lines 4-10) --- */
    --venous-title-size: clamp(32px, 4vw, 42px); 
    --venous-lead-size: 19px; 
    --venous-intro-bottom: 40px; /* Squeezed: Gap between lead text and first card */
    --venous-card-gap: 15px;     /* Squeezed: Gap between each card */
    --venous-card-padding-v: 12px; /* Squeezed: Vertical padding inside card */
    --venous-card-text-size: 16px;  /* Squeezed: Font size for the service description text */
}

/* Venous Page Specific Background Mask (Responsive Figma Coordinate System) */
.venous-page {
    position: relative;
    overflow: hidden;
    background-color: #F8FAFC; /* Consistent premium background */
}

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

.venous-page-content {
    position: relative;
    z-index: 1;
    background: transparent; /* Reveal mask behind */
}

.venous-page .service-intro {
    position: relative;
    z-index: 10;
    background: transparent !important;
    padding: 80px 0 var(--venous-intro-bottom); /* Tunable on Line 7 */
    width: var(--container-w);
    margin: 0 auto;
    box-sizing: border-box;
    text-align: left;
}

.venous-page .service-title {
    font-size: var(--venous-title-size); /* Tunable on Line 5 */
    font-weight: 800;
    color: #1f2a3c;
    margin-bottom: 24px;
}

.venous-page .service-lead {
    font-size: var(--venous-lead-size);
    line-height: 1.8;
    color: #1f2a3c;
    font-weight: 500;
    max-width: 900px;
    margin-left: 0;
    margin-right: 0;
}

/* Service Grid & Blocks (Exact Co-create Mechanism) */
.service-services {
    overflow: visible; /* Allow background bleed from below */
}

.service-services-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    padding-bottom: 50px; /* Reduced */
}

.service-block {
    margin-bottom: var(--venous-card-gap); /* Tunable on Line 8 */
    background: #E3EFFF; 
    overflow: visible; /* Required for floating header */
    position: relative;
    padding-bottom: var(--venous-card-padding-v); /* Tunable on Line 9 */
    border-radius: 4px;
}

.service-block:last-child {
    margin-bottom: 0; /* Remove gap after last card */
}

.service-block-header {
    background: #00358F;
    padding: 8px 60px;
    text-align: center;
    width: fit-content;
    min-width: 430px;
    margin: -20px auto 12px;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 53, 143, 0.25);
}

.service-block-header h3 {
    color: #FFFFFF;
    font-size: 22px; 
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0;
}

.service-block-main {
    display: flex;
    gap: 20px; /* Super-Squeezed */
    padding: 0 30px var(--venous-card-padding-v); /* Tunable on Line 9 */
    align-items: center; 
}

.service-block-image {
    flex: 0 0 160px; /* Super-Squeezed */
    aspect-ratio: 16 / 9; /* Super-Squeezed */
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    background-size: cover;
    background-position: center;
}

/* Image Placeholders - User will save these names */
.venous-image-1 { background-image: url('../images/venous-card-01.jpg'); }
.venous-image-2 { background-image: url('../images/venous-card-02.jpg'); }
.venous-image-3 { background-image: url('../images/venous-card-03.jpg'); }

.service-block-content {
    flex: 1;
}

.service-block-text {
    font-size: var(--venous-card-text-size); /* Tunable on Line 10 */
    line-height: 1.9;
    color: #1f2a3c;
    font-weight: 500;
    letter-spacing: -0.01em; /* Prevent orphan punctuation */
}

.service-block-footer {
    padding: 0 60px;
}

.service-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.service-pill {
    background: #E3EFFF;
    color: #003692;
    padding: 5px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    border-left: 3px solid #003692;
    cursor: default;
}

/* Features Section - Premium Layout (Synced with Co-create) */
.service-features {
    --feature-container-width: 1400px; /* Sweeter Spot */
    --features-grid-gap: 60px;         /* Sweeter Spot */
    --feature-card-padding: 40px 30px; 
    --feature-bg-width: 500px;         
    --feature-bg-height: 500px;
    --feature-bg-top: 60%;
    --feature-bg-left: -100px;
    --feature-bg-color: #E3EFFF99;

    padding: 100px 0;
    background-color: transparent;
    position: relative;
    overflow: visible; /* Allow background bleed from above */
}

/* Background color for features block moved to pseudo-element to stay BEHIND the bleed */
.service-features::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #F8FAFC;
    z-index: -2; /* Behind everything */
}

/* Background blob for Features section */
.service-features::after {
    content: "";
    position: absolute;
    width: var(--feature-bg-width);
    height: var(--feature-bg-height);
    left: var(--feature-bg-left);
    top: var(--feature-bg-top);
    transform: translateY(-50%);
    background: var(--feature-bg-color);
    border-radius: 50%;
    z-index: -1; /* Above background but below cards */
    pointer-events: none;
}

.service-features-inner {
    width: min(var(--feature-container-width), 94vw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.service-features .service-section-title {
    text-align: center;
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 800;
    color: #1f2a3c;
    margin-bottom: 24px;
}

.service-features .service-section-lead {
    text-align: left;
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 18px;
    line-height: 1.8;
    color: #1f2a3c;
    font-weight: 500;
}

.service-features-grid {
    --feature-card-bg: #FFFFFF;
    --feature-card-border: rgba(45, 58, 58, 0.8); /* #2D3A3A at 80% */
    --feature-card-shadow-color: #E3EFFF;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--features-grid-gap);
}

.service-feature-card {
    background: var(--feature-card-bg);
    border: 1px solid var(--feature-card-border);
    border-radius: 8px;
    padding: var(--feature-card-padding);
    box-shadow: 10px 6px 21.4px 0px var(--feature-card-shadow-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 10; /* Ensure cards stay ABOVE the background circle bleed */
}

.service-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 53, 143, 0.08);
}

.feature-card-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.feature-number {
    font-size: 20px;
    font-weight: 500;
    color: #64748b;
    font-family: 'Noto Sans JP', sans-serif;
}

.feature-card-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2a3c;
    margin: 0;
    letter-spacing: 0.05em;
}

.feature-icon {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

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

.feature-text {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    font-weight: 400;
    text-align: justify;
    margin: 0;
}

/* Mobile Adjustments (Synced with Co-create) */
@media (max-width: 900px) {
    .service-block-main {
        flex-direction: column;
        padding: 0 20px 24px;
        gap: 24px;
    }
    
    .service-block-image {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .service-pill-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .service-pill {
        min-width: 0;
    }

    .service-features-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}


/* Service Voices Section Styles (Synced with Co-create) */
.venous-page .service-voices {
    padding: 60px 0 100px; /* Reduced top gap */
    position: relative;
    background-color: transparent;
    overflow: visible; /* CRITICAL: Allow background circles to overflow */
}

.venous-page .service-voices::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #F8FAFC;
    z-index: -2;
}

/* Service Cases Section (導入事例) - Ported from BPO */
.service-cases {
    /* --- CONFIGURATION PANEL (Sweet Spot Tuning) --- */
    --cases-max-width: 1600px;
    --cases-title-size: clamp(28px, 3.5vw, 40px);
    --cases-client-size: 17px; /* Squeezed: reduced from 20px */
    --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: 100px 0;
    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: 60px;
}

.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 */
    display: flex;
    flex-direction: column;
}

/* Vertical Dividers */
.case-divider {
    width: 2px;
    background: var(--cases-divider-color);
    margin: 24px 0; /* Squeezed */
    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; /* Squeezed */
    margin-bottom: 15px; /* Squeezed */
    height: 3em; /* Squeezed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.case-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* Squeezed */
    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 */
}

.case-detail-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.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 */
    color: #1f2a3c;
    font-weight: 400;
    padding-left: var(--cases-detail-indent); /* Indentation from label */
}

/* Mobile Adjustments for Case Studies */
@media (max-width: 1000px) {
    .cases-container {
        flex-direction: column;
    }

    .case-divider {
        width: 100%;
        height: 1.5px;
        margin: 0;
    }

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

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

.venous-page .service-voices::before {
    display: none !important;
}

.service-voices-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    position: relative;
}

.venous-page .service-section-title {
    text-align: center;
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 800;
    color: #1f2a3c;
    margin-bottom: 60px;
}

.venous-page .service-voice-grid {
    /* --- CONFIGURATION PANEL (Sweet Spot Tuning) --- */
    --voice-person-width: 200px;
    --voice-h3-size: 24px;
    --voice-p-size: 20px;
    --voice-number-size: 48px;
    --voice-number-font-size: 26px;
    --voice-content-gap: 40px;
    --voice-person-translateX: 0px; /* Adjusted to 0 for combined centering */
    --voice-list-max-width: 830px; /* FIXED WIDTH to synchronize combined center and gap */
    
    --voice-bg-width: 1000px;
    --voice-bg-height: 1000px;
    --voice-bg-top: 110%;
    --voice-bg-right: -800px;
    --voice-bg-opacity: 1; 
    --voice-bg-color: #E3EFFF99;

    display: flex;
    align-items: center;
    gap: var(--voice-content-gap);
    justify-content: center; /* Centering the combined man + text unit */
    position: relative;
    z-index: 5;
}

.venous-page .service-voice-grid::before {
    content: "";
    position: absolute;
    width: var(--voice-bg-width);
    height: var(--voice-bg-height);
    right: var(--voice-bg-right);
    top: var(--voice-bg-top);
    transform: translateY(-50%);
    background: var(--voice-bg-color);
    border-radius: 50%;
    z-index: -1;
    opacity: var(--voice-bg-opacity);
    pointer-events: none;
}

.venous-page .service-person {
    display: block !important;
    flex: 0 0 var(--voice-person-width);
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    transform: translateX(var(--voice-person-translateX));
}

.venous-page .service-person img {
    width: 100%;
    height: auto;
    display: block;
}

.service-voice-list {
    flex: 0 1 auto; /* Prevents stretching to allow combined centering */
    max-width: var(--voice-list-max-width); /* Synchronizes the visual "unit" across pages */
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: voice-count;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.service-voice-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.service-voice-number {
    flex: 0 0 var(--voice-number-size);
    height: var(--voice-number-size);
    background: #68A0FF !important;
    color: #2D3A3A !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--voice-number-font-size);
    font-weight: 400;
    box-shadow: 0 4px 10px rgba(104, 160, 255, 0.3);
}

.service-voice-copy h3 {
    font-size: var(--voice-h3-size);
    font-weight: 700;
    color: #2D3A3A !important;
    margin-bottom: 8px;
    line-height: 1.4;
}

.service-voice-copy p {
    font-size: var(--voice-p-size);
    line-height: 1.7;
    color: #2D3A3A !important;
    font-weight: 500;
}

@media (max-width: 900px) {
    :root {
        --venous-title-size: 28px;
        --venous-lead-size: 16px;
        --venous-intro-bottom: 60px;
        --venous-card-text-size: 16px;

        /* --- MOBILE (SP) CARD CONFIGURATION PANEL --- */
        --venous-sp-container-width: 88vw;
        --venous-sp-card-padding: 30px 15px 25px;
        --venous-sp-header-width: 92%;
        --venous-sp-header-font: 18px;
        --venous-sp-image-max-width: 400px;
        --venous-sp-pill-width: 130px;
        --venous-sp-pill-font: 12px;
        --venous-sp-text-font: 14px;
        --venous-sp-content-gap: 15px;
        --venous-sp-pills-gap: 8px;
        --venous-sp-image-aspect: 16 / 10;

        /* --- MOBILE (SP) VOICES CONFIGURATION PANEL --- */
        --venous-voice-sp-padding-v: 40px 0 60px;
        --venous-voice-sp-person-width: 240px;
        --venous-voice-sp-person-translateX: 0px;
        --venous-voice-sp-person-translateY: 0px;
        --venous-voice-sp-number-size: 44px;
        --venous-voice-sp-number-font: 20px;
        --venous-voice-sp-h3-size: 20px;
        --venous-voice-sp-p-size: 16px;
        --venous-voice-sp-list-gap: 32px;
        --venous-voice-sp-item-gap: 20px;
        --venous-voice-sp-list-padding: 0 16px;
        --venous-voice-sp-bg-radius: 100%;
        --venous-voice-sp-bg-x: -40%;
        --venous-voice-sp-bg-y: 85%;
        --venous-voice-sp-bg-opacity: 1;
        --venous-voice-sp-bg-color: #E3EFFF99;

        /* --- MOBILE (SP) FEATURES CONFIGURATION PANEL --- */
        --venous-feature-sp-container-width: 88vw;
        --venous-feature-sp-title-size: 26px;
        --venous-feature-sp-lead-size: 14px;
        --venous-feature-sp-padding-v: 60px 0;
        --venous-feature-sp-bg-radius: 400px;
        --venous-feature-sp-bg-x: -50px;
        --venous-feature-sp-bg-y: 60%;
        --venous-feature-sp-bg-color: #E3EFFF99;

        /* --- MOBILE (SP) CASES CONFIGURATION PANEL --- */
        --venous-cases-sp-container-width: 85vw;
        --venous-cases-sp-padding-v: 60px 0 80px;
        --venous-cases-sp-title-size: 24px;
    }

    /* Mask mobile overrides are now in global.css — tune --sp-mask-bg-* in :root */

    .venous-page .service-intro {
        padding: 40px 0 var(--venous-intro-bottom); /* Tunable mobile gap */
    }

    .service-services-inner {
        width: var(--venous-sp-container-width);
    }

    .service-block {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "image"
            "pills"
            "text";
        gap: var(--venous-sp-content-gap);
        padding: var(--venous-sp-card-padding);
        margin-bottom: 40px;
        align-items: stretch;
    }

    .service-block-header {
        grid-area: header;
        min-width: 0;
        width: var(--venous-sp-header-width);
        margin: -45px auto 10px; /* Float top over border */
        padding: 10px 15px;
    }

    .service-block-header h3 {
        font-size: var(--venous-sp-header-font);
        letter-spacing: 0.05em;
    }

    /* Sub-div contents allow children to participate in the outer grid */
    .service-block-main {
        display: contents; 
    }

    .service-block-image {
        grid-area: image;
        flex: none;
        width: 100%;
        max-width: var(--venous-sp-image-max-width);
        aspect-ratio: var(--venous-sp-image-aspect);
        margin: 0 auto;
    }

    .service-block-content {
        grid-area: text;
    }

    .service-block-text {
        font-size: var(--venous-sp-text-font);
        line-height: 1.6;
        text-align: left;
    }

    .service-block-footer {
        grid-area: pills;
        padding: 0;
    }

    .service-pill-group {
        flex-direction: column;
        align-items: stretch;
        gap: var(--venous-sp-pills-gap);
        justify-content: flex-start;
    }

    .service-pill {
        min-width: 0;
        padding: 5px 10px;
        font-size: var(--venous-sp-pill-font);
        border-radius: 3px;
        text-align: left;
        line-height: 1.3;
    }

    .venous-page .service-voices {
        padding: var(--venous-voice-sp-padding-v);
    }

    .venous-page .service-voice-grid {
        flex-direction: column;
        gap: 40px;
        position: relative;
    }

    /* Apply Background Circle (Voice) */
    .venous-page .service-voice-grid::before {
        width: var(--venous-voice-sp-bg-radius);
        aspect-ratio: 1 / 1;
        height: auto;
        right: var(--venous-voice-sp-bg-x);
        top: var(--venous-voice-sp-bg-y);
        opacity: var(--venous-voice-sp-bg-opacity);
        background: var(--venous-voice-sp-bg-color);
        display: block !important;
    }

    .venous-page .service-person {
        flex: 0 0 auto;
        width: var(--venous-voice-sp-person-width);
        max-width: 100%;
        margin: 0 auto;
        transform: translate(var(--venous-voice-sp-person-translateX), var(--venous-voice-sp-person-translateY));
        display: block !important;
    }

    .service-voice-number {
        flex: 0 0 var(--venous-voice-sp-number-size);
        height: var(--venous-voice-sp-number-size);
        font-size: var(--venous-voice-sp-number-font);
    }

    .service-voice-copy h3 {
        font-size: var(--venous-voice-sp-h3-size);
    }

    .service-voice-copy p {
        font-size: var(--venous-voice-sp-p-size);
        line-height: 1.6;
    }

    .service-voice-list {
        gap: var(--venous-voice-sp-list-gap);
        padding: var(--venous-voice-sp-list-padding);
    }

    .service-voice-item {
        gap: var(--venous-voice-sp-item-gap);
    }

    /* Features Section Mobile Tuning */
    .service-features {
        padding: var(--venous-feature-sp-padding-v);
    }

    .service-features-inner {
        width: var(--venous-feature-sp-container-width);
        margin: 0 auto;
    }

    .service-features .service-section-title {
        font-size: var(--venous-feature-sp-title-size);
        margin-bottom: 40px;
        text-align: left;
    }

    .service-features .service-section-lead {
        font-size: var(--venous-feature-sp-lead-size);
        margin-bottom: 40px;
        padding: 0;
    }

    /* Apply Background Circle (Features) */
    .service-features::after {
        width: var(--venous-feature-sp-bg-radius);
        aspect-ratio: 1 / 1;
        height: auto;
        left: var(--venous-feature-sp-bg-x);
        top: var(--venous-feature-sp-bg-y);
        background: var(--venous-feature-sp-bg-color);
        display: block !important;
    }

    .service-features-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Case Studies Section Mobile Tuning */
    .service-cases {
        padding: var(--venous-cases-sp-padding-v);
    }

    .service-cases-inner {
        width: var(--venous-cases-sp-container-width);
        margin: 0 auto;
    }

    .service-cases-inner .service-section-title {
        font-size: var(--venous-cases-sp-title-size);
        margin-bottom: 40px;
        text-align: left;
    }

    .venous-page .service-voices .service-section-title {
        text-align: left;
    }

    .venous-page .service-person {
        display: none !important;
    }
}