@charset "UTF-8";

body{
    font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", sans-serif, Verdana, "メイリオ", "Meiryo", "ＭＳ Ｐゴシック", "MS PGothic", Sans-Serif;
}

div{
    padding: 15px;
}

header{
    background-image: url(img/main_bg.jpg);
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 30px; 
    
}

@media (max-width: 767px) {
header{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
}
}

header a {
    text-decoration: none;
    color: #ffffff;
    background-color: #4a9567;;
    padding: 15px;
    border-radius: 30px;
    transition: all .5s;
}

@media (max-width: 767px) {
header a{
    margin: 5px;
}
}


a:hover {
    background-color: #2e412f;
}

h1{
    color: #7e7979;
    font-size: 30px;
    padding: 150px;
}

h2{
    text-align: center;
    font-size: 30px;
    padding: 15px;
    margin-top: 50px;

}

.side {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%; /* 基本はフル幅 */
    max-width: 1000px; /* PCでの最大幅 */
    margin: 0 auto;
}

@media (max-width: 1023px) {
    .side {
        width: 95%; /* 画面幅に合わせて可変にする */
        padding: 15px;
    }
}


@media (max-width: 767px) {
    .side {
        width: 100%; /* スマホでは横幅を最大限使う */
        padding: 10px;
    }
}

.side img {
    border-radius: 35px;
    max-width: 100%; /* 画像が画面を突き抜けないように */
    height: auto;
}

.side_1 {
    font-size: 20px;
    padding-left: 50px; /* 150pxは広すぎるので調整 */
    text-align: left;
    line-height: 1.8;
}

@media (max-width: 1023px) {
    .side_1 {
        font-size: 18px;
        padding-left: 0; /* ←重要！左の巨大な余白を消す */
        margin: 20px auto 0; 
        text-align: center; /* 中央寄せで見やすく */
        width: 95%;
    }
}

@media (max-width: 767px) {
    .side_1 {
        font-size: 16px;   /* 文字が大きすぎたら少し下げる */
        width: 90%;
    }
}





.boxs {
        display: flex;
        flex-wrap: wrap;
        gap: 40px 0;  
    justify-content: space-between;
}


.box_banner {
    width: 48%; /* 2カラム（横に2つ並ぶ）設定。お好みで調整 */
    margin-bottom: 20px;
    box-sizing: border-box;
}


.box_banner img {
    width: 100%;
    height: 350px;      /* ここで高さを固定！ */
    object-fit: contain; /* 画像を歪ませずに枠内に収める */
    background-color: #f9f9f9; /* 背景色をつけるとサイズ違いが気にならなくなります */
    border-radius: 8px;
}

.box_banner h5 {
    min-height: 3.5em; /* タイトルが1行でも2行でも位置がズレないように固定 */
    display: flex;
    align-items: center; /* 短いタイトルでも中央に寄る */
    font-size: 1.1rem;
    margin-bottom: 10px;
}


.contents_1{
    display: flex;
    flex-wrap: wrap;
    max-width: 900px;
    width: 100%;

    box-sizing: border-box;
    border: 3px dotted #4a9567;
    width: 900px;   /*幅*/
    margin: 0 auto; /*中央寄せ*/
    padding: 15px;  /*内側余白*/
}


@media (max-width: 1023px) {
.contents_1{
width: calc((100% - 40px) / 2);
}
}

@media (max-width: 767px) {
.contents_1 {
    width: 80%;
}
}

.contents_a div{
    padding: 20px;  /*内側余白*/
}

h3{
    color: #41583b;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 11px;
}

h4{
    letter-spacing: 0.2em;
    line-height: 2;
}


/* バナーエリア全体の調整 */
.contents_2 {
    width: 900px; /* PCでの幅 */
    margin: 0 auto 58px;
    border: 3px dotted #4a9567;
    padding: 20px;
    box-sizing: border-box; /* これが重要！ */
}

@media (max-width: 1023px) {
    .contents_2 {
        width: 95%;      /* 900px固定をやめて、画面幅に合わせる */
    }

    .boxs {
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* 中央寄せ */
        gap: 20px;              /* バナー同士の間隔 */
    }

    .box_banner {
        width: 100% !important; /* スマホでは1列（横幅いっぱい）にする */
    }

    .box_banner img {
        height: auto;       /* スマホでは画像の高さ制限を解除して見やすくする */
    }
}


.contents_2 img{
    width: 100%;
    height: auto;
}

h5{
    font-size: large;
    line-height: 2;
    font-weight: bold;
}

h6{
    line-height: 2;
    color: #2a3927;
}


footer{
    color: #7e7979;
    font-size: 14px;
    padding: 25px;
    text-align: center;

    background-image: url(img/main_bg.jpg);
    background-size: cover;
    background-position: center;
    height: 100px;
    margin: 0 auto; 
}
