/* Full-bleed sections even inside Astra container */
body {
    overflow-x: hidden;
}

.ast-plain-container.ast-no-sidebar #primary {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.site-content .ast-container {
    margin: 0 !important;
    width: 100%;
    max-width: 100% !important;
}

.hs-front-page>.hs-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Astra header overlay on this template */
body.hs-front-page .site-header,
body.hs-front-page #masthead,
body.hs-front-page .main-header-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: transparent !important;
}

body.hs-front-page .site-content {
    padding-top: 0;
}

:root {
    --hs-blue: #8fc0e6;
    --hs-ink: #111;
    --hs-border: rgba(20, 20, 20, .65);
    --hs-shadow: 0 18px 40px rgba(0, 0, 0, .28);
    --hs-card-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.hs-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 18px;
}

/* HERO (MetaSlider) */
.hs-hero {
    position: relative;
}

.hs-hero-slider {
    width: 100%;
}

.hs-hero .metaslider,
.hs-hero .metaslider * {
    max-width: none !important;
}

.hs-hero .metaslider img {
    width: 100% !important;
    height: min(78vh);
    object-fit: cover;
    display: block;
}

/* MetaSlider(id=1010) を 70vh 固定（JSが入れる px 高さを殴り返す） */
.hs-front-page #metaslider_container_1010,
.hs-front-page #metaslider_1010,
.hs-front-page #metaslider_1010 .flex-viewport,
.hs-front-page #metaslider_1010 .slides,
.hs-front-page #metaslider_1010 .slides>li {
    height: 70vh !important;
    max-height: 820px;
    /* 任意：上限 */
    min-height: 420px;
    /* 任意：下限 */
}

.hs-front-page #metaslider_1010 .slides img {
    width: 100% !important;
    height: 70vh !important;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hs-hero {
    position: relative;
}

.hs-hero-slider {
    position: relative;
    z-index: 1;
}

/* ナビを画像の上に重ねる */
.hs-hero-nav {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;

    padding: 28px 32px;
}

/* リンク（ボタンっぽくしたいならここを調整） */
.hs-hero-link {
    color: #fff !important;
    font-size: 1.8rem !important;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: .02em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

/* ロゴだけ中央に来る */
.hs-hero-logo img {
    height: 130px;
    width: auto;
    display: block;
}

/* 背景が明るい写真でも読めるように上部を薄く暗くする（任意） */
.hs-hero-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
    z-index: -1;
}

/* INTRO bubble over background image */
.hs-intro {
    position: absolute;
    padding: 70px 0 60px;
}

.hs-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hs-intro-bg);
    background-size: cover;
    background-position: center;
    opacity: .40;
}

.hs-intro .hs-container {
    position: absolute;
    z-index: 2;
    top: -2rem;
}

.hs-bubble {
    position: relative;
    background: rgba(255, 255, 255, .84);
    border: 4px solid var(--hs-border);
    border-radius: 72px;
    box-shadow: var(--hs-shadow);
    padding: 4rem 12rem;
    backdrop-filter: blur(2px);
}

.hs-bubble::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 68px;
    background-image: var(--hs-watermark);
    background-size: cover;
    background-position: center;
    opacity: .20;
    pointer-events: none;
}

.hs-bubble>* {
    position: relative;
    z-index: 2;
}

.hs-bubble-title {
    margin: 0 0 18px;
    font-size: clamp(26px, 3.2vw, 46px);
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--hs-ink);
}

.hs-bubble-lead {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--hs-ink);
}

.hs-bubble-text {
    font-size: 16px;
    line-height: 1.95;
    margin: 0 0 14px;
    color: var(--hs-ink);
}

/* BUSINESS OVERVIEW */
.hs-business {
    position: relative;
    background: var(--hs-blue);
    overflow: hidden;
}

.hs-business::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hs-business-bg);
    background-size: cover;
    background-position: right center;
    opacity: .18;
    transform: translateX(10%);
}

.hs-business .hs-container {
    position: relative;
    z-index: 2;
}

.hs-business-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
    margin-bottom: 30px;
    padding: 0 3rem;
}

@media (max-width: 860px) {
    .hs-business-head {
        grid-template-columns: 1fr;
    }
}

.hs-business-en {
    font-size: clamp(34px, 4.2vw, 64px);
    font-weight: 900;
    line-height: .92;
    letter-spacing: .2rem;
    color: #0b0b0b;
}

.hs-business-ja {
    text-align: right;
}

@media (max-width: 860px) {
    .hs-business-ja {
        text-align: left;
    }
}

.hs-business-ja-title {
    font-size: 2rem;
    font-weight: 900;
    color: #0b0b0b;
    margin-bottom: 2rem;
}

.hs-business-ja-sub {
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
    color: #0b0b0b;
}

/* 4 cards */
.hs-services-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem 5rem;
    padding: 5rem 10rem;
}

@media (max-width: 860px) {
    .hs-services-grid {
        grid-template-columns: 1fr;
    }
}

.hs-service-card {
    position: relative;
    display: block;
    min-height: 150px;
    padding: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--hs-card-shadow);
    overflow: hidden;
    text-decoration: none !important;
    color: #111;
}

.hs-service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hs-card-bg);
    background-size: cover;
    background-position: center;
    opacity: .22;
}

.hs-service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .86) 100%);
}

.hs-service-card>* {
    position: relative;
    z-index: 2;
}

.hs-service-title {
    margin: 0 0 18px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .06em;
    text-align: center;
}

.hs-service-text {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.9;
}

.hs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .90);
    border: 1px solid rgba(0, 0, 0, .18);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .10);
    font-weight: 800;
}

.hs-btn::after {
    content: "›";
    display: inline-block;
    margin-left: 8px;
    font-size: 18px;
    line-height: 1;
}

/* RESULTS panel */
.hs-results {
    background: var(--hs-blue);
    padding: 30px 0 80px;
}

.hs-results-panel {
    background: #fff;
    box-shadow: var(--hs-card-shadow);
    padding: 42px 40px 36px;
    margin: 0 8rem;
}

@media (max-width: 860px) {
    .hs-results-panel {
        padding: 30px 18px;
    }
}

.hs-results-title {
    margin: 0;
    text-align: center;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: .06em;
}

.hs-results-sub {
    margin: 14px 0 26px;
    text-align: center;
    color: rgba(0, 0, 0, .75);
}

/* 3 tiles */
.hs-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

@media (max-width: 980px) {
    .hs-results-grid {
        grid-template-columns: 1fr;
    }
}

.hs-result-card {
    position: relative;
    display: block;
    min-height: 220px;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: var(--hs-card-shadow);
    background: #e9eef7;
}

.hs-result-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hs-result-bg);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.hs-result-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .12) 100%),
        var(--hs-results-logo);
    background-repeat: no-repeat;
    background-size: auto, 140px;
    background-position: center, 58% 58%;
    opacity: .18;
    pointer-events: none;
}

.hs-result-label {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    background: rgba(255, 255, 255, .95);
    border-radius: 4px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.hs-result-text {
    font-weight: 800;
    color: #2b5ea6;
    line-height: 1.3;
}

.hs-result-arrow {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 40, 40, .65);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

/* 1) ヘッダーをスライダー上に重ねる（現行トップと同じ挙動） */
body.hs-front-page #masthead,
body.hs-front-page .site-header,
body.hs-front-page .main-header-bar {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    background: transparent !important;
    z-index: 999;
}

body.hs-front-page .site-content {
    padding-top: 0 !important;
}

/* 2) MetaSliderの見た目を固定（高さ + cover） */
body.hs-front-page .metaslider img {
    width: 100% !important;
    height: min(78vh, 760px) !important;
    object-fit: cover;
    display: block;
}

/* 3) 画面幅いっぱい（Astraのコンテナ制限を回避） */
body.hs-front-page .hs-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* 4) 楕円ブロックを“次セクションにまたがって重ねる” */
body.hs-front-page .hs-intro {
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
    z-index: 2;
}

body.hs-front-page .hs-bubble {
    margin-bottom: -90px;
    /* ここが“重なり”の肝。数字は微調整 */
}

body.hs-front-page .hs-business {
    padding-top: 450px;
    /* ↑で食い込んだ分の帳尻 */
}



/* SP用コード */

/* =========================================================
   Mobile / Tablet overrides (append at the very bottom)
   ========================================================= */

/* iOSセーフエリア考慮（任意だが有効） */
@supports (padding: max(0px)) {
    .hs-container {
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }
}

/* WP管理バーがある時のヘッダー位置ズレ対策 */
body.admin-bar.hs-front-page #masthead,
body.admin-bar.hs-front-page .site-header,
body.admin-bar.hs-front-page .main-header-bar {
    top: 32px;
}

@media (max-width: 782px) {

    body.admin-bar.hs-front-page #masthead,
    body.admin-bar.hs-front-page .site-header,
    body.admin-bar.hs-front-page .main-header-bar {
        top: 46px;
    }
}

/* -------------------------
     <= 860px (tablet〜スマホ)
     ------------------------- */
@media (max-width: 860px) {

    /* 1) HERO（MetaSlider）高さをスマホ向けに */
    .hs-front-page #metaslider_container_1010,
    .hs-front-page #metaslider_1010,
    .hs-front-page #metaslider_1010 .flex-viewport,
    .hs-front-page #metaslider_1010 .slides,
    .hs-front-page #metaslider_1010 .slides>li {
        height: 56vh !important;
        max-height: 640px;
        min-height: 320px;
    }

    .hs-front-page #metaslider_1010 .slides img {
        height: 56vh !important;
    }

    /* 2) スライダー上のナビ（中央ロゴ）をスマホで整列 */
    .hs-hero-nav {
        bottom: 16px;
        padding: 14px 12px;
        gap: 10px;

        /* スマホはGridで「左 / ロゴ / 右」を安定させる */
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    /* 「最初の要素＝左」「最後の要素＝右」「ロゴ＝中央」想定 */
    .hs-hero-nav> :first-child {
        justify-self: start;
    }

    .hs-hero-nav> :last-child {
        justify-self: end;
    }

    .hs-hero-logo {
        justify-self: center;
    }

    .hs-hero-link {
        font-size: 1.05rem !important;
        letter-spacing: .01em;
        white-space: nowrap;
    }

    .hs-hero-logo img {
        height: 72px;
    }

    /* 写真が明るい時に読めない対策（スマホは濃いめ） */
    .hs-hero-nav::before {
        background: linear-gradient(to bottom, rgba(0, 0, 0, .50), rgba(0, 0, 0, 0));
    }

    /* 3) 吹き出し（bubble）と次セクションの重なり量をスマホ向けに縮小 */
    body.hs-front-page .hs-intro {
        position: relative;
        padding: 0;
    }

    body.hs-front-page .hs-intro .hs-container {
        position: relative;
        /* absolute だと崩れやすいので解除 */
        top: 0;
    }

    body.hs-front-page .hs-bubble {
        border-width: 3px;
        border-radius: 34px;
        padding: 22px 18px;

        /* PCの -90px は強すぎるので弱める */
        margin-bottom: -36px;
    }

    body.hs-front-page .hs-business {
        /* 食い込み分の帳尻（PCの 450px はスマホでは過剰） */
        padding-top: 210px;
    }

    .hs-bubble-title {
        margin-bottom: 12px;
    }

    .hs-bubble-lead {
        font-size: 16px;
    }

    .hs-bubble-text {
        font-size: 14.5px;
        line-height: 1.9;
    }

    /* 4) BUSINESS 見出しの余白を詰める */
    .hs-business-head {
        padding: 0 1rem;
        gap: 16px;
        margin-bottom: 18px;
    }

    .hs-business-en {
        letter-spacing: .08rem;
        line-height: 1.0;
    }

    .hs-business-ja-title {
        margin-bottom: 1rem;
    }

    /* 5) 4カード：スマホで横はみ出しの主因（10rem）を潰す */
    .hs-services-grid {
        padding: 2.2rem 1rem;
        gap: 1.2rem;
        grid-template-columns: 1fr;
        /* 860px以下は1カラムに固定 */
    }

    .hs-service-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .hs-service-text {
        font-size: 14.5px;
    }

    /* 6) RESULTS：パネルの左右 8rem がスマホではアウト */
    .hs-results-panel {
        margin: 0 1rem;
        padding: 28px 18px 24px;
    }

    .hs-results-title {
        font-size: 26px;
    }

    .hs-results-sub {
        margin: 10px 0 18px;
    }

    /* 3タイルは1列化（既に980pxで1列だが、早めに安全側へ） */
    .hs-results-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hs-result-card {
        min-height: 180px;
    }

    .hs-result-label {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 12px;
    }

    .hs-result-arrow {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}

/* -------------------------
     <= 480px (小さいスマホ)
     ------------------------- */
@media (max-width: 480px) {

    /* ナビが窮屈なら2段レイアウトへ（ロゴ上、リンク下） */
    .hs-hero-nav {
        grid-template-columns: 1fr;
        justify-items: center;
        row-gap: 8px;
        padding: 12px 10px;
    }

    .hs-hero-logo img {
        height: 64px;
    }

    /* リンクは横並びにしたい場合（2つ以上あっても折り返し） */
    .hs-hero-nav> :not(.hs-hero-logo) {
        display: inline-flex;
        gap: 14px;
    }

    /* ただし現状マークアップが「a, logo, a」の3要素直置きなら、
       上の指定は効きにくいので、最低限フォントだけ詰めます */
    .hs-hero-link {
        font-size: 1.0rem !important;
    }

    body.hs-front-page .hs-bubble {
        border-radius: 28px;
        padding: 20px 16px;
        margin-bottom: -26px;
    }

    body.hs-front-page .hs-business {
        padding-top: 190px;
    }
}

/* =========================================================
   SP / Tablet overrides (<= 860px)  ※このブロック1つに統一
   ========================================================= */
@media (max-width: 860px) {

    /* --- HERO（MetaSlider）高さをSP向けに --- */
    .hs-front-page #metaslider_container_1010,
    .hs-front-page #metaslider_1010,
    .hs-front-page #metaslider_1010 .flex-viewport,
    .hs-front-page #metaslider_1010 .slides,
    .hs-front-page #metaslider_1010 .slides>li {
        height: 56vh !important;
        max-height: 640px;
        min-height: 320px;
    }

    .hs-front-page #metaslider_1010 .slides img {
        height: 56vh !important;
    }

    /* ロゴをナビからはみ出させるので「クリップ禁止」 */
    .hs-hero,
    .hs-hero-slider,
    .hs-hero-nav {
        overflow: visible !important;
    }

    /* --- HERO NAV：横一列固定（改行なし） + nav padding は 10px --- */
    .hs-hero-nav {
        position: absolute;
        left: 0;
        width: 100%;
        bottom: 16px;
        z-index: 30;

        display: flex !important;
        flex-wrap: nowrap !important;
        /* 改行させない */
        justify-content: center;
        align-items: flex-end;
        /* メニューは下寄せ */

        gap: clamp(8px, 2vw, 14px);
        padding: 10px;
        /* ★要件：10px */

        /* ロゴが被らないように“高さ”で逃がす（paddingは変えない） */
        min-height: 84px;

        /* 余白はクリック透過（矢印/スワイプを邪魔しない） */
        pointer-events: none;
    }

    /* 背景（可読性確保） */
    .hs-hero-nav::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
        z-index: -1;
    }

    /* メニューリンク：押しやすい＆1行固定 */
    .hs-hero-link {
        pointer-events: auto;
        flex: 0 0 auto;
        white-space: nowrap;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-height: 44px;
        padding: 10px 10px;
        border-radius: 999px;

        font-size: clamp(12px, 3.2vw, 14px) !important;
        letter-spacing: .01em;

        color: #fff !important;
        text-decoration: none;
        font-weight: 600;
        text-shadow: 0 1px 8px rgba(0, 0, 0, .35);

        background: rgba(0, 0, 0, .28);
        border: 1px solid rgba(255, 255, 255, .18);

        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* --- ロゴ：中央上（aタグ width100%禁止 / クリック範囲は実寸） --- */
    .hs-hero-logo {
        position: absolute;
        left: 50%;
        top: -120px;
        /* ★要件：-120px */
        transform: translateX(-50%);
        z-index: 40;

        display: inline-flex !important;
        width: auto !important;
        max-width: none !important;
        pointer-events: auto;
        /* ロゴは押せる */
    }

    .hs-hero-logo a,
    a.hs-hero-logo {
        display: inline-flex !important;
        width: auto !important;
        /* width:100% を殺す */
        max-width: none !important;
    }

    .hs-hero-logo img,
    a.hs-hero-logo img {
        display: block;
        width: auto !important;
        height: 100px;
        /* ★要件：100px */
    }

    /* --- INTRO：SPでも“浮かせる”（absolute overlay） --- */
    body.hs-front-page .hs-intro {
        position: absolute !important;
        left: 0;
        right: 0;
        top: calc(56vh - 15px);
        z-index: 20;

        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    body.hs-front-page .hs-intro::before {
        content: none !important;
    }

    body.hs-front-page .hs-intro .hs-container {
        position: relative !important;
        top: 0 !important;
    }

    body.hs-front-page .hs-bubble {
        margin: 0 auto;
        width: min(92vw, 720px);
        border-width: 3px;
        border-radius: 34px;
        padding: 22px 18px;

        background: rgba(255, 255, 255, .22);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    body.hs-front-page .hs-bubble::before {
        opacity: .14;
    }

    /* absoluteで重ねた分、後続を押し下げ */
    body.hs-front-page .hs-business {
        padding-top: 480px;
    }

    /* --- BUSINESS / CARDS / RESULTS：SP最適化（既存内容を統合） --- */
    .hs-business-head {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 16px;
        margin-bottom: 18px;
    }

    .hs-business-ja {
        text-align: left;
    }

    .hs-business-en {
        letter-spacing: .08rem;
        line-height: 1.0;
    }

    .hs-services-grid {
        padding: 2.2rem 1rem;
        gap: 1.2rem;
        grid-template-columns: 1fr;
    }

    .hs-results-panel {
        margin: 0 1rem;
        padding: 28px 18px 24px;
    }

    .hs-results-title {
        font-size: 26px;
    }

    .hs-results-sub {
        margin: 10px 0 18px;
    }

    .hs-results-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hs-result-card {
        min-height: 180px;
    }

    .hs-result-label {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 12px;
    }

    .hs-result-arrow {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}