/* （任意）タイトル行 */
.list-section {
    width: auto;
    background-color: #3F7A04;
    border: 1px solid #3F7A04;
    border-radius: 3px;
    margin: 10px 0 5px 0px;
}

.list-section_title {
    font-weight: bold;
    color: #ffffff;
    line-height: 1.4;
    padding: .5em;
}

.list-section_title>span {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url(../../img/search.png) no-repeat 50% 50% / 18px 18px;
    vertical-align: middle;
    margin-right: 6px;
}

.map-card {
    min-height: 180px;
    box-sizing: border-box;
    margin: 20px 0px;
    width: 100%;
    background-color: #fff;
    border: 3px solid #3F7A04;
    border-radius: 5px;
}

.map-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
    opacity: 0.7;
}

.map-card a {
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
    color: #000;
}

.map-card_inner {
    display: flex;
}

/* 画像ベース：サイズと背景表示を定義 */
.map-card_image {
    flex: 0 0 350px;
    /* ← 横幅を固定して収縮させない */
    width: 350px;
    /* height: 100%; */
    min-height: 174px;
    /* カード高180pxに合わせて少し余裕 */
    background: #f3f4f6 center/cover no-repeat;
    border-right: 1px solid #3F7A04;
    box-sizing: border-box;
}

/* カード内レイアウトを高さにフィットさせる */
.map-card_inner {
    display: flex;
    height: 100%;
    /* ← 親の .map-card(height:180px) に合わせる */
    align-items: stretch;
}

/* 画像差し替えは修飾クラスで（既存通り） */
.map-card_image--shisetu_zyouhou_map {
    background-image: url(../../img/shisetu_zyouhou_map.png);
}

.map-card_image--toshi_keikaku_zyouhou {
    background-image: url(../../img/toshi_keikaku_zyouhou.png);
}

.map-card_image--gesuidaichozu {
    background-image: url(../../img/gesuidaichozu.png);
}

.map-card_image--bunkazai_map {
    background-image: url(../../img/bunkazai_map.png);
}

.map-card_image--koukyoukijuntenhaitenzu {
    background-image: url(../../img/koukyoukijuntenhaitenzu.png);
}

.map-card_image--nintei_rosen_mouzu {
    background-image: url(../../img/nintei_rosen_mouzu.png);
}

.map-card_image--kenchikukijunhoushiteidourojouhou {
    background-image: url(../../img/kenchikukijunhoushiteidourojouhou.png);
}

.map-card_content {
    width: -webkit-fill-available;
}

.map-card_content h2 {
    border-bottom: 1px solid #ccc;
    padding: 10px 0 3px 0;
    font-size: 25px;
}

.map-card_content p {
    padding: 10px 0 3px 0;
}



/* スマホでは縦積み（必要なら） */
/* @media (max-width: 640px) { */
.map-card {
    height: auto;
    display: inline-flex;
    width: 24%;
}

/* テキスト量に応じて伸びる */
.map-card_inner {
    flex-direction: column;
    gap: 0px;
}

.map-card_image {
    flex: 0 0 auto;
    width: 100%;
    /* height: 180px; */
    border-right: none;
    border-bottom: 3px solid #3F7A04;
}

.map-card_content h2 {
    border-bottom: none;
    padding: 0 5px;
    font-size: 16px;
}

.map-card_content p {
    padding: 10px 0 3px 5px;
    font-size: 14px;
}

/* } */

/* ▼ カード全体を並べるラッパー（PC=4列・タブレット=2列・スマホ=1列） */
.map-card-wrapper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    /* PC: 4列 */
    gap: 20px;
    /* カード間の余白 */
}

/* カード自体はグリッドの幅いっぱいに広がる */
.map-card {
    /* min-height: 226px; */
    box-sizing: border-box;
    width: 100%;
    background-color: #fff;
    border: 3px solid #3F7A04;
    border-radius: 5px;
    margin: 10px 0;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

/* 既存のホバーはそのまま活かす */
.map-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .06);
    opacity: 0.7;
}

/* 中身のレイアウト（PCでは横並び） */
.map-card_inner {
    display: flex;
    height: 100%;
    align-items: stretch;
}

/* 画像部分（PCでは左に固定幅） */
.map-card_image {
    min-height: 94px;
    box-sizing: border-box;
}

/* 枠線色＆背景色を少し変える */
.map-card--external {
    border-color: #005bac;
    background: #f0f6ff;
}

/* 中身レイアウト：中央寄せ・縦方向にゆったり配置 */
.map-card_inner--external {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 外部カード内のテキストは幅いっぱい使う */
.map-card--external .map-card_content {
    width: 100%;
}

/* タイトルを少しだけ小さく＆中央に */
.map-card_title--external {
    font-size: 22px;
    border-bottom: none;
    /* 通常カードのボーダーを消す */
    padding: 0 0 8px;
}

/* 「外部サイトへ移動する」ラベルをボタン風に */
.map-card_external-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #005bac;
    font-size: 14px;
    font-weight: bold;
    color: #005bac;
    background-color: #ffffff;
}

.map-card_external-icon {
    font-size: 12px;
}

/* タブレット：2列 */
@media (max-width: 1024px) {
    .map-card-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-card {
        min-height: 170px;
    }
}

/* スマホ：1列 & 中身を縦並びに調整 */
@media (max-width: 640px) {
    .map-card-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    .map-card_inner {
        flex-direction: column;
    }

    .map-card_image {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
        border-right: none;
        border-bottom: 3px solid #3F7A04;
    }

    .map-card_content h2 {
        border-bottom: none;
        padding: 8px 8px 0;
    }

    .map-card_content p {
        padding: 8px;
    }

    .map-card_inner--external {
        padding: 0;
    }
}