/* ================================
   セクション全体
================================ */
.map,
.editor-styles-wrapper .wp-block-acf-isa-campus-map .map{
    position: relative;
    background: transparent;
    padding: 3.75rem 0;
}

/* 背景画像レイヤー：常に同じ大きさで表示（画面が小さくても縮まない） */
.map::before,
.editor-styles-wrapper .wp-block-acf-isa-campus-map .map::before {
    content: "";
    position: absolute;

    /* セクション中央に固定配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* ★画像と同じくらいの固定サイズにする（数値はデザインに合わせて調整） */
    width: 100vw;
    height: 900px;
    overflow: hidden; /* ★これを追加 */

    background-image: url('map-bg.png'); /* パス差し替え */
    background-repeat: no-repeat;
    background-position: center center;

    /* 背景画像の拡大・縮小はしない */
    background-size: auto;

    z-index: 0;
    pointer-events: none;
}

/* ================================
   見出し
================================ */
.map__title{ position:relative; display:flex; align-items:center; justify-content:center; gap:16px;
    text-align:center; font-weight:bold; margin-bottom:30px; line-height:1.4; letter-spacing:.05em; color:#0f172a; }
.map__title-text{ position:relative; color:#fff; font-weight:700; font-size:clamp(22px,3.8vw,42px); letter-spacing:.08em; line-height:1.25; }
.map__title-num{ color:#0597c9; font-weight:800; font-size:clamp(35px,6.8vw,70px); }

.map__title-num{
    font-family: "League Spartan", "Noto Sans JP", sans-serif;
    font-weight: 700; /* DINと同じく太め */
    display: inline-block;        /* transform を効かせるため必須 */
    transform-origin: center bottom;
    transform: scaleX(0.82) scaleY(1);

    letter-spacing: 0;              /* 自分の中の字間リセット */
    margin-left: -0.2em;           /* 左をグッと寄せる */
    margin-right: -0.2em;          /* 右も少し寄せる */
    position: relative;
    top: 0.03em;  
}

/* 中央3ドット */
.map__title-text::before{
    content:""; position:absolute; left: 49%;
    bottom: 69%;
    margin-bottom:clamp(6px,.24em,12px); width:clamp(8px,.24em,12px); height:clamp(8px,.24em,12px);
    background:#0597c9; border-radius:50%; transform:translateX(-50%);
    box-shadow: clamp(18px,1.1em,44px) 0 0 #0597c9, calc(-1 * clamp(18px,1.1em,44px)) 0 0 #0597c9;
}
.map__dots{ display:none; }

/* スラッシュマーク */
.map__mark{ --thick:3.5px; --len-main:59px; --len-sub:38px; --gap-x:12px; --gap-y:18px; --angle:-28deg;
    position:absolute; top:50%; width:0; height:0; pointer-events:none; transform:translateY(-50%) rotate(var(--angle)); }
.map__mark::before, .map__mark::after{ content:""; position:absolute; left:0; top:0; width:var(--thick); background:#111; border-radius:var(--thick); }
.map__mark::before{ height:var(--len-main); }
.map__mark::after{ height:var(--len-sub); left:var(--gap-x); top:var(--gap-y); }
.map__mark--left{ left:clamp(8px,4vw,40px); --angle:-28deg; --gap-x:-12px; }
.map__mark--right{ right:clamp(8px,4vw,40px); --angle:28deg;  --gap-x:12px; }
.map__title--tight{ --mark-gap:clamp(22px,5vw,45px); gap:var(--mark-gap); }
.map__title--tight .map__mark{ position:relative; top:auto; left:auto; right:auto; transform: translateY(-33px) rotate(var(--angle)); flex:0 0 auto; }

/* ================================
   マップエリア
================================ */
.map__area{
    position:relative;
    /* 背景画像は使わない（地図は要素で前面） */
    background:none;
    min-height:659px;
    display:flex;
    justify-content:flex-end;
    align-items:flex-start;
    padding:2.5rem;   /* 40px */
    overflow:visible;
}

/* 航空写真の前面に敷くパネル（水色→白） */
.map__panel {
    position: absolute;
    inset: 0;
    margin: 0px 40px;
    /* border-radius: 14px; */
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    --split: 76%;
    background: linear-gradient(
            to bottom,
            #d6eefb 0,
            #d6eefb var(--split),
            rgba(255,255,255,0.92) var(--split), /* ← 白ベースの透過（強め） */
            rgba(255,255,255,0.92) 100%
    );
}

/* 地図ベース（要素として配置） */
.map__base {
    position: absolute;
    left: 40px;
    top: 35%;
    transform: translateY(-50%);
    height: 70%;
    z-index: 2;
    pointer-events: none;
    display: block;
}
.map__base img{ height:100%; width:auto; display:block; }

/* 前景：吹き出し＋女性 */
.map__fg {
    position: absolute;
    right: 15%;
    bottom: 9%;
    width: 480px;
    max-width: 45%;
    height: auto;
    pointer-events: none;
    z-index: 4;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .22));
}


/* 校舎リスト */
.school-grid{ position:relative; z-index:3; display:grid; grid-template-columns:repeat(3,1fr); max-width:695px; row-gap:10px; align-items:start; }
.school-col{ padding:17px; }
.school-col--full{ grid-column:3; margin-top:-165px; }

/* 県バッジ */
.pref__badge{ background:#fff; display:inline-block; width:100%; padding:9px 2px; font-weight:bold; font-size:20px; border-radius:4px; text-align:center; position:relative; margin-bottom:20px; }
.pref__badge::after{ content:""; position:absolute; bottom:-1rem; left:50%; transform:translateX(-50%); border-width:18px 11px 0 11px; border-style:solid; border-color:#fff transparent transparent transparent; }

/* リンク＆TEL */
.school-link{ display:inline-flex; align-items:center; gap:6px; font-weight:500; color:#0f80c6; text-decoration:underline; margin-top:6px; margin-left:13px; font-size: 16px;}
.school-icon{ width:18px; height:18px; }
.school-tel{ display:block; margin:2px 0 10px; font-size:18px; font-weight:500; color:#111; margin-left:37px; }

/* オンライン */
.online-school{ position:absolute; bottom:40px; left:50%; transform:translateX(-50%); text-align:center; z-index:3; }
.online-school .school-link{ font-size:17px; }
.online-school .school-icon{ width:22px; height:22px; }
.online-school .school-tel{ font-size:17px; color:#111; }

/* ================================
   レスポンシブ
================================ */
@media (max-width:1024px){

    /* ▼ 背景（SP用画像＋セクション全面にフィット） */
    section#map.map::before,
    .wp-block-acf-isa-campus-map > section#map.map::before,
    .editor-styles-wrapper .wp-block-acf-isa-campus-map > section#map.map::before {
        background-image: url("map-bg-sp.png") !important;

        /* セクション全体をほぼ覆う */
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        transform: none !important;

        width: auto !important;
        height: auto !important;

        /* 画面幅に合わせてリサイズ */
        background-size: cover !important;
        background-position: center top !important;
    }

    /* ▼ マップエリア */
    section#map.map .map__area,
    .wp-block-acf-isa-campus-map > section#map.map .map__area {
        position: relative;
        background: none;

        /* ★ ここを画面幅連動の高さにする */
        min-height: 0;                /* 固定の 659px はやめる */
        width: 100%;
        /* 高さ ≒ 幅の 1.3倍ぐらい（好みで調整OK） */
        min-height: 166vw;

        padding: 4vw;                 /* パディングもvwベースに */
        overflow: visible;
    }

    /* パネル */
    section#map.map .map__panel,
    .wp-block-acf-isa-campus-map > section#map.map .map__panel {
        --split: 87%;
        margin: 0;
        border-radius: unset;
    }

    /* 吹き出し＋女性 */
    section#map.map .map__fg,
    .wp-block-acf-isa-campus-map > section#map.map .map__fg {
        right: 8vw;
        bottom: 6vw;
        width: 76vw;       /* ここがSP時のメインサイズ */
        max-width: none;    /* PC時の max-width:45% を無効化 */
        height: auto;
    }

    section#map.map .map__base,
    .wp-block-acf-isa-campus-map > section#map.map .map__base {
        position: absolute;
        top: 0;   
        left: 5vw;       /* 背景の中での縦位置（vwで可変） */
        transform: none;
        width: 78vw;      /* 地図の「横幅」をvw指定にする */
        height: auto;
        z-index: 2;
        pointer-events: none;
        display: block;
    }


    section#map.map .map__base img,
    .wp-block-acf-isa-campus-map > section#map.map .map__base img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* 見出しスラッシュ */
    section#map.map .map__mark,
    .wp-block-acf-isa-campus-map > section#map.map .map__mark {
        --thick: 1.89px;
        --len-main: 39px;
        --len-sub: 22px;
        --gap-x: 12px;
        --gap-y: 15px;
        --angle: -28deg;
        position: absolute;
        top: 50%;
        width: 0;
        height: 0;
        pointer-events: none;
        transform: translateY(-50%) rotate(var(--angle));
    }
    section#map.map .map__mark--left,
    .wp-block-acf-isa-campus-map > section#map.map .map__mark--left {
        left: clamp(8px, 4vw, 40px);
        --angle: -27deg;
        --gap-x: -7px;
    }
    section#map.map .map__mark--right,
    .wp-block-acf-isa-campus-map > section#map.map .map__mark--right {
        right: clamp(8px, 4vw, 40px);
        --angle: 28deg;
        --gap-x: 7px;
    }

    /* 校舎数の数字（色を白に） */
    section#map.map .map__title-num,
    .wp-block-acf-isa-campus-map > section#map.map .map__title-num {
        color: #fff;
        font-weight: 800;
        font-size: clamp(35px, 8.8vw, 70px);
    }

    /* 校舎リスト：基本パディング */
    section#map.map .school-col,
    .wp-block-acf-isa-campus-map > section#map.map .school-col {
        padding: clamp(3px, 1vw, 38px);
    }

    /* ▼ 校舎グリッド — ここを位置指定（top:55%）に変更 */
    section#map.map .school-grid,
    .wp-block-acf-isa-campus-map > section#map.map .school-grid {
        position: absolute;
        top: 54vw;      /* ここも vw にすると安定しやすい。35% から置き換え */
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(5px, 1vw, 15px);
        row-gap: clamp(5px, 1vw, 15px);
        z-index: 3;
    }

    /* 3列目フル幅用だったやつを、SPでは 2列ぶち抜きに */
    section#map.map .school-col--full,
    .wp-block-acf-isa-campus-map > section#map.map .school-col--full {
        grid-column: auto;
        margin-top: 0;
    }

    /* オンラインスクール */
    section#map.map .online-school,
    .wp-block-acf-isa-campus-map > section#map.map .online-school {
        position: absolute;
        bottom: 4vw;
        left: 19vw;
        transform: translateX(-50%);
        text-align: left;
        z-index: 3;
        width: 100%;
        max-width: 36vw;
    }
    section#map.map .online-school .school-tel,
    .wp-block-acf-isa-campus-map > section#map.map .online-school .school-tel {
        text-align: left;
    }

    /* 県バッジ・TELサイズ */
    section#map.map .pref__badge,
    .wp-block-acf-isa-campus-map > section#map.map .pref__badge {
        font-size: clamp(12px, 2.8vw, 26px);
        margin-bottom: 6%;
        padding: 3% 3%;
    }
    section#map.map .school-tel,
    .wp-block-acf-isa-campus-map > section#map.map .school-tel {
        font-size: clamp(10px, 2.8vw, 22px) !important;
        margin: 1% 0 1% 9%;
        display: block;
    }

    .school-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
        color: #0f80c6;
        text-decoration: underline;
        margin-top: clamp(4px, 1vw, 10px);
        margin-left: 13px;
        font-size: clamp(11px, 2.8vw, 40px);
    }
    .school-icon {
        width: clamp(14px, 3.5vw, 22px);
        height: auto;
    }
    .online-school .school-icon {
        width: clamp(14px, 3.5vw, 22px);
        height: auto;
    }
    .online-school .school-link {
        font-size: clamp(11px, 2.8vw, 40px);
    }
    .map__title-text::before {
        left: 49%;
        bottom: 6vw;
    }
    section#map.map .map__title--tight,
    .wp-block-acf-isa-campus-map > section#map.map .map__title--tight {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(29px, 2.4vw, 48px);
    }

    section#map.map .map__title--tight .map__mark,
    .wp-block-acf-isa-campus-map > section#map.map .map__title--tight .map__mark {
        position: static;                 /* 左右端固定をやめる */
        left: auto;
        right: auto;
        transform: translateY(calc(-0.32 * 1em)) rotate(var(--angle));
        flex: 0 0 auto;                   /* 文字幅にくっつける */
    }
    .map__title {
        margin-bottom: clamp(7px, 2vw, 45px);
    }
}
@media (max-width: 624px) {
    section#map.map .map__title--tight .map__mark, .wp-block-acf-isa-campus-map > section#map.map .map__title--tight .map__mark {
        position: static;
        left: auto;
        right: auto;
        transform: translateY(calc(-0.62 * 1em)) rotate(var(--angle));
        flex: 0 0 auto;
    }
    .map__title-text::before {
        left: 49%;
        bottom: 8vw;
    }
}