/* Cocreate Page Layout Refinement */

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

.cocreate-page {
    position: relative;
    overflow: hidden;
    background-color: #F8FAFC; /* User requested background color */
}

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

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

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

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

.cocreate-page .service-lead {
    font-size: var(--cocreate-lead-size); /* Tunable on Line 6 */
    line-height: 1.8;
    color: #1f2a3c;
    font-weight: 500;
}

/* Service Grid & Cards (Restructured as Vertical Blocks) */
.service-services-inner {
    width: min(1200px, 94vw); /* Restored to standard project width */
    margin: 0 auto;
    padding-bottom: 50px; /* Reduced */
}

.service-block {
    margin-bottom: var(--cocreate-card-gap); /* Tunable on Line 8 */
    background: #E3EFFF; /* Finalized light blue background */
    overflow: visible; /* Changed to visible to allow floating header */
    position: relative;
    padding-bottom: var(--cocreate-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 from 30px */
    padding: 0 40px var(--cocreate-card-padding-v); /* Tunable on Line 9 */
    align-items: center; 
}

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

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

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

.service-block-text {
    font-size: var(--cocreate-card-text-size); /* Tunable on Line 10 */
    line-height: 1.9;
    color: #1f2a3c;
    font-weight: 500;
}

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

/* Service Voices Section Styles */
.cocreate-page .service-voices {
    padding: 60px 0 100px; /* Reduced top gap */
    position: relative;
    background-color: transparent; /* Background color moved to pseudo-element */
    overflow: visible; /* CRITICAL: Allow background circles to overflow */
}

/* Background layer to sit behind everything (z-index -2) */
.cocreate-page .service-voices::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #F8FAFC;
    z-index: -2;
}

/* Hide only any specifically inherited global watermark circles if they belong to before/after 
   without breaking our own background layer. */
.cocreate-page .service-voices::before {
    display: none !important;
}

.service-voices-inner {
    width: min(1200px, 94vw);
    margin: 0 auto;
    position: relative;
    /* No z-index here to avoid creating a new stacking context */
}

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

.service-features-block .service-section-title {
    text-align: center;
}

.cocreate-page .service-voice-grid {
    /* --- CONFIGURATION PANEL (Sweet Spot Tuning) --- */
    --voice-person-width: 200px;      /* Line 199: Decrease this to make the person smaller */
    --voice-h3-size: 24px;            /* Item Title Font Size */
    --voice-p-size: 20px;             /* Quote Text Font Size */
    --voice-number-size: 48px;        /* Number Circle Size */
    --voice-number-font-size: 26px;   /* Number Digit Size */
    --voice-content-gap: 40px;        /* Space between person and text unit */
    --voice-person-translateX: 0px;   /* Combined centering offset */
    --voice-list-max-width: 960px;    /* 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);    /* Line 215: Applied gap */
    justify-content: center; /* Centering the combined man + text unit */
    position: relative;
    z-index: 5; /* Keep content ABOVE the background circle */
}

/* Tunable Background Blob Shape */
.cocreate-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; /* CRITICAL: Must be negative to sit behind the list items */
    opacity: var(--voice-bg-opacity);
    pointer-events: none;
}

.cocreate-page .service-person {
    display: block !important;
    flex: 0 0 var(--voice-person-width); /* Line 233: Smaller width */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    transform: translateX(var(--voice-person-translateX)); /* Line 239: Shift left/right */
}

.cocreate-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); /* Line 266: Circular icon size */
    height: var(--voice-number-size);
    background: #68A0FF !important; /* Line 268: Number background color */
    color: #2D3A3A !important;      /* Line 269: Digit color (Blackish) */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--voice-number-font-size); /* Line 273: Digit size */
    font-weight: 400;                /* Line 274: Light weight consistent with screenshots */
    box-shadow: 0 4px 10px rgba(104, 160, 255, 0.3);
}

.service-voice-copy h3 {
    font-size: var(--voice-h3-size); /* Line 277: Item Title Font Size */
    font-weight: 700;
    color: #2D3A3A !important;      /* Line 279: Item Title Text Color */
    margin-bottom: 8px;
    line-height: 1.4;
}

.service-voice-copy p {
    font-size: var(--voice-p-size);  /* Line 283: Quote Text Font Size */
    line-height: 1.7;
    color: #2D3A3A !important;      /* Line 285: Quote Text Color */
    font-weight: 500;
}


.service-features-block {
    /* --- FEATURES CONFIGURATION PANEL (Desktop) --- */
    --feature-title-size: clamp(28px, 100vw, 48px); /* Section title size */
    --feature-lead-size: 18px;                      /* Section lead text size */
    --feature-container-width: 1400px;
    --features-grid-gap: 60px;         /* Line 354: Gap between cards */
    --feature-card-padding: 40px 30px; /* Line 355: Internal card padding */
    --feature-bg-width: 500px;         /* Line 356: Background circle size */
    --feature-bg-height: 500px;
    --feature-bg-top: 60%;
    --feature-bg-left: -100px;
    --feature-bg-color: #E3EFFF99;

    padding: 100px 0;
    background-color: transparent; /* Set to transparent to see background bleed from previous section */
    position: relative;
    overflow: visible; /* Allow overflow from above to show through */
}

/* Background circle for Features section */
.service-features-block::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;
}

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

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

.service-features-block .service-section-lead {
    text-align: left;
    max-width: 800px;
    margin: -30px auto 60px;
    font-size: var(--feature-lead-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;
}

@media (max-width: 1024px) {
    .service-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Case Studies Section (導入事例) - Integrated Sweet Spot Tuning */
.service-cases {
    /* --- CONFIGURATION PANEL (Sweet Spot Tuning synchronized from Venous BX) --- */
    --cases-max-width: 1600px;
    --cases-title-size: clamp(28px, 3.5vw, 40px);
    --cases-client-size: 20px;
    --cases-highlight-size: clamp(18px, 2vw, 22px);
    --cases-detail-label-size: 20px;
    --cases-detail-text-size: 20px;
    --cases-detail-indent: 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-color: transparent;
    position: relative;
    z-index: 2;
}

/* Background color for cases block moved to pseudo-element */
.service-cases::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #F8FAFC;
    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: 50px 40px;
    display: flex;
    flex-direction: column;
}

/* Vertical Dividers */
.case-divider {
    width: 2px;
    background: var(--cases-divider-color);
    margin: 50px 0;
    flex-shrink: 0;
}

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

.case-highlight {
    font-size: var(--cases-highlight-size);
    font-weight: 700;
    color: #1f2a3c;
    line-height: 1.5;
    margin-bottom: 35px;
    height: 3.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.case-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 35px;
    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: 25px;
}

.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.7;
    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;
    }
}
@media (max-width: 900px) {
    /* --- MOBILE (SP) CONFIGURATION PANEL --- */
    .service-services-inner {
        --cocreate-sp-container-width: 88vw;        /* Width of the card container on mobile */
        --cocreate-sp-card-padding: 30px 15px 25px; /* Internal card padding */
        --cocreate-sp-header-width: 92%;           /* Title bar width on mobile */
        --cocreate-sp-header-font: 18px;            /* Title bar font size */
        --cocreate-sp-image-max-width: 400px;       /* Max width for images */
        --cocreate-sp-pill-width: 130px;            /* Width of the left column with pills */
        --cocreate-sp-pill-font: 12px;              /* Font size for pills on mobile */
        --cocreate-sp-text-font: 14px;              /* Font size for description text */
        --cocreate-sp-content-gap: 15px;            /* Gap between elements */
        --cocreate-sp-pills-gap: 8px;               /* Space between individual pills */
        --cocreate-sp-image-aspect: 16 / 10;        /* Keep image ratio tight */

        width: var(--cocreate-sp-container-width);
    }

    /* --- MOBILE (SP) INTRO CONFIGURATION PANEL --- */
    .cocreate-page .service-intro {
        --cocreate-sp-title-size: clamp(22px, 8vw, 28px); /* Adjustment for mobile font size */
        --cocreate-sp-lead-size: 16px;                     /* Added lead size for consistency */
        
        padding: 60px 0 80px;
    }

    .cocreate-page .service-title {
        font-size: var(--cocreate-sp-title-size);
    }

    .cocreate-page .service-lead {
        font-size: var(--cocreate-sp-lead-size);
    }

    .cocreate-page .service-lead br {
        display: none;
    }

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

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

    .service-block-header h3 {
        font-size: var(--cocreate-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(--cocreate-sp-image-max-width);
        aspect-ratio: var(--cocreate-sp-image-aspect);
        margin: 0 auto;
    }

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

    .service-block-text {
        font-size: var(--cocreate-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(--cocreate-sp-pills-gap);
        justify-content: flex-start;
    }

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

    /* --- MOBILE (SP) VOICES CONFIGURATION PANEL --- */
    .cocreate-page .service-voices {
        --voice-sp-padding-v: 40px 0 60px;          /* Section vertical padding (top, bottom) */
        --voice-sp-person-width: 240px;            /* Width of the person image on mobile */
        --voice-sp-person-translateX: 0px;          /* Shift left/right */
        --voice-sp-person-translateY: 0px;          /* Shift up/down */
        --voice-sp-number-size: 44px;               /* Size of circular icon */
        --voice-sp-number-font: 20px;               /* Digit size */
        --voice-sp-h3-size: 20px;                   /* Item Header Font Size */
        --voice-sp-p-size: 16px;                    /* Quote/Description Font Size */
        --voice-sp-list-gap: 32px;                 /* Vertical gap between rows */
        --voice-sp-item-gap: 20px;                 /* Horizontal gap between circle and text */
        --voice-sp-list-padding: 0 16px;           /* Padding for the entire list container */

        /* Blue Circle (Voice) Configuration */
        --voice-sp-bg-radius: 100%;                 /* Radius (Size) */
        --voice-sp-bg-x: -40%;                      /* X-coordinate (relative to right) */
        --voice-sp-bg-y: 85%;                       /* Y-coordinate (relative to top) */
        --voice-sp-bg-opacity: 1;                   /* Background circle opacity */
        --voice-sp-bg-color: #E3EFFF99;             /* Background circle color */

        padding: var(--voice-sp-padding-v);
    }

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

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

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

    /* Apply Typography Overrides */
    .service-voice-number {
        flex: 0 0 var(--voice-sp-number-size);
        height: var(--voice-sp-number-size);
        font-size: var(--voice-sp-number-font);
    }

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

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

    /* Apply Spacing Overrides */
    .service-voice-list {
        gap: var(--voice-sp-list-gap);
        padding: var(--voice-sp-list-padding);
    }

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

    /* --- MOBILE (SP) FEATURES CONFIGURATION PANEL --- */
    .service-features-block {
        --feature-sp-container-width: 88vw;         /* Width of the feature section on mobile */
        --feature-sp-title-size: 26px;              /* Section title size on mobile */
        --feature-sp-lead-size: 14px;               /* Section lead text size on mobile */
        --feature-sp-padding-v: 60px 0;             /* Section vertical padding */
        --feature-sp-bg-radius: 400px;              /* Radius (Size) of circle */
        --feature-sp-bg-x: -50px;                   /* X-coordinate (relative to left) */
        --feature-sp-bg-y: 60%;                     /* Y-coordinate (relative to top) */
        --feature-sp-bg-color: #E3EFFF99;           /* Background circle color */
        
        padding: var(--feature-sp-padding-v);
    }

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

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

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

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

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

    /* --- MOBILE (SP) CASES CONFIGURATION PANEL --- */
    .service-cases {
        --cases-sp-container-width: 85vw;           /* Width of the case studies section on mobile */
        --cases-sp-padding-v: 60px 0 80px;         /* Section vertical padding on mobile */
        --cases-sp-title-size: 24px;              /* Section title size on mobile */
        
        padding: var(--cases-sp-padding-v);
    }

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

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

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