section {
    margin-bottom: 4rem;
}

#services h3 {
    /* margin-top: 30px; */
    margin-bottom: 30px;
    border-bottom: solid 1px;
}

#services h3.about-title {
    font-size: 28px;
    border-bottom: none;
}

#services p {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 10px;
    margin-top: 0;
}

#services li {
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 10px;
    margin-top: 0;
}

/* タイトル画像 */
.title-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* ← ここを追加 */
}

.title-image img {
    width: 100%;
    height: auto;
}

.title-image .title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-image .title h2 {
    color: #FFFFFF;
    margin: 0;
    font-size: 36px;
}

/* ───────────────────────────
   スマホ(～768px)で左右をクロップ
   ─────────────────────────── */
@media (max-width: 768px) {
    .title-image img {
        /* 中央 50% を表示させるイメージで
       幅を 150% にして左右をはみ出させる */
        width: 150%;
        max-width: none;
        margin-left: -25%;
        margin-right: -25%;
    }

    .title-image .title h2 {
        /* フォントサイズも若干縮小 */
        font-size: 24px;
        /* テキスト自体に左右の余白を入れるなら */
        padding: 0 10%;
        box-sizing: border-box;
    }
}


/* 貯水槽メンテナンス一覧 */
.chosui-menu {
    display: flex;
    gap: 10px;
    width: fit-content;
}

.chosui-menu div {
    width: 25%;
}

.chosui-menu img {
    width: auto;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .chosui-menu {
        display: flex;
        flex-wrap: wrap;
        /* 折り返しを許可 */
        width: 100%;
        /* fit-content を打ち消して全幅に */
        gap: 10px;
    }

    /* 直接の子要素を50%幅のフレックスアイテムに */
    .chosui-menu>div {
        flex: 1 1 50%;
        /* basis=50% で２列 */
        max-width: calc(50% - 10px);
        /* 念のため最大幅も50% */
        box-sizing: border-box;
    }

    /* 画像を親幅いっぱいに */
    .chosui-menu img {
        display: block;
        width: 100%;
        height: auto;
    }
}

/*カラム*/

.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
    box-sizing: border-box;
}

/* 最大4カラムにする設定 */
.flex-item {
    /* 4カラム時の幅 = (100% − (gap×3)) ÷ 4 */
    flex: 0 0 calc((100% - 15px * 3) / 4);
    box-sizing: border-box;
    flex-direction: column;
    box-sizing: border-box;
}



/*2カラム*/
.flex-half {
    flex: 1 0 calc(50% - 15px);
    min-width: 300px;
}

/* タブレット：2カラム */
@media screen and (max-width: 768px) {
    .flex-item {
        flex: 0 0 calc((100% - 15px) / 2);
    }
}

/* スマホ：1カラム */
/* @media screen and (max-width: 480px) {
            .flex-item {
              flex: 0 0 100%;
            }
          } */

.flex-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}



#services .flex-item p {

    font-size: 14px;
    /* margin: 0; */
    margin-top: auto;
}

/*画像に白枠*/
.image-frame {
    position: relative;
    display: inline-block;
}

.image-frame img {
    display: block;
}

.image-frame::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    border: 5px solid rgba(255, 255, 255, 0.5);
    /* 半透明白色の内側枠 */
    pointer-events: none;
    /* 枠がクリックの邪魔をしないように */
}


/* -----------------------------
   汎用ボックススタイル: boxed-section
   ----------------------------- */
.boxed-section {
    /* border-top: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc; */
    background-color: #fafafa;
    padding: 15px;
    margin: 30px 0;
    border-radius: 6px;
    box-shadow: 0px 0px 10px #0000001f;
}

/* スマホなど狭い画面向けに調整したい場合 */
@media screen and (max-width: 572px) {
    .boxed-section {
        padding: 15px;
        margin: 20px 0;
    }
}

/* ボタン */
.btn {
    background-color: #0033CC;
    color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
    text-decoration: none;
    width: 300px;
    display: block;
    text-align: center;
}

#footer .title {
    margin: 0 0 20px 0;
}

/*フッターボタン*/
#cta .btn {
    width: 100%;
    border-radius: 6px;
}

.row6 a {
    color: #0033cc;
}

.footer-companylink {
    display: flex;
    gap: 60px;
    padding-left: 20px;
}

.footer-companylink a {
    color: #666;
}

/* フッターアイコン幅統一 */
footer i {
    width: 100%;
    height: auto;
    max-width: 24px;
    display: block;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
    /* margin-bottom: 20px; */
}

/*ロゴの大きさ調整*/
footer address img {
    max-width: 400px;
    width: 100%;
}

.row4 {
    color: #333;
}

/* copyright */
#copyright {
    padding: 20px 0;
    margin-bottom: 0;
}

#copyright p {
    font-size: 12px;
    color: #fff;
    margin-bottom: 0;
}

.row5 {
    background-color: #333;
}