body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    max-width: 100%;
    box-sizing: border-box;
}

header {
    background-color: #16e674;
    color: #fff;
    text-align: center;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

header img {
    max-width: 100px;
    height: auto;
    margin-right: 20px;
}

main {
    padding: 20px;
    background-color: #ffffff;
}

h1, h2, h3, h4, h5 {
    color: #007BFF;
}

/* セクション内の画像とテキストを横並び → スマホでは縦並び */
section > div {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 20px;
}


section img {
    max-width: 50%;
    height: auto;
    display: block;
}



/*

section img {
    max-width: 100%;
    height: auto;
}

*/

/* テキスト側に余白 */
section > div > div {
    margin: 20px;
    flex: 1;
}

footer {
    background-color: green;
    color: #fff;
    text-align: center;
    padding: 10px;
    position: relative; /* fixedはスマホで不安定なことがあるため変更 */
    bottom: 0;
    width: 100%;
}

/* スマホ表示向けスタイル */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    header img {
        margin: 0 0 10px 0;
    }

    section > div {
        flex-direction: column;
        align-items: center;
    }

    section > div > div {
        margin: 10px 0;
    }

    footer {
        position: relative;
    }
}
