@media screen and (max-width: 500px) {

    body {
        background-attachment: fixed;
    }

    /*header*/

    #logo {
        margin-left: auto;
        margin-right: auto;
        width: 20%;
        display: block;
    }

    #header_nav {
        display: flex;
        flex: 1 1 auto;
        flex-flow: column nowrap;
        justify-content: center;

    }

    .header_nav_link {
        flex: auto;
        text-align: center;
        border: 1px solid black;
    }

    /*main*/

    .main_section {}

    .form {
        margin: auto;
        display: block;
    }

    /*section*/


    .main_section {
        padding-top: 5%;
    }

    /*cupcakes*/

    #cupcakes_container {

        display: flex;
        flex: 1 1 auto;
        flex-flow: column nowrap;
        justify-content: center;
    }

    #cupcakes_container>article {
        max-width: 75%;
        justify-self: center;
        align-self: center;
    }

    /*wedding cakes*/

    #wedding_cakes_container {

        display: flex;
        flex: 1 1 auto;
        flex-flow: column nowrap;
        justify-content: center;
    }

    #wedding_cakes_container>article {
        max-width: 75%;
        justify-self: center;
        align-self: center;
    }

    /*footer*/

    #footer_nav {
        display: flex;
        flex: 1 1 auto;
        flex-flow: column nowrap;
        justify-content: center;

    }

    .footer_nav_link {
        flex: auto;
        text-align: center;
    }

    footer {
        margin-bottom: 1px;

    }
}