*,
*::before,
*::after {
    box-sizing: border-box;
}

header {

    display: flex;
    flex-direction: row;
    background-color: DodgerBlue;
    justify-content: space-around;

}

body {

    max-width: 1200px;
    margin: 0 auto;

}


footer {
    /* makes the element span from the first grid line to the last */
    grid-column: 1 / -1;
    /* turns the element itself into a grid container, allowing you to place its children in a grid layout */
    display: flex;
    justify-content: space-around;
    /* creats three equal-width columns (1fr means “one fraction of the available space) */
    /* grid-template-columns: 1fr 1fr 1fr; */
    /* grid-template-columns: repeat(3, 1fr); */

    /* Adds 20 pixels of space between grid items, both rows and columns */
    gap: 20px;
    /* Adds a 20-pixel interior buffer on all sides of the element, keeping the content from touching the edges */
    padding: 20px;
    background: #b8e0c0;

}


img {

    max-width: 93%;
    height: auto;
    display: block;
    margin: 50px 0 50px 0;
}


/* establish the MAIN grid container */
.gd_container {
    display: grid;
    grid-template-columns: repeat(12, [col-start] 1fr);
    gap: 20px;
}

/* small screens ================================ */
/* === Mobile first =====
Select every direct child of .gd_container,
no matter what tag it is. */

.gd_container>* {
    border: 1px solid green;
    background-color: beige;
    padding: 10px;
    grid-column-start: col-start;
    grid-column-end: span 12;
}

/* nav for small screens */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* medium screens =============================== */

@media (min-width: 576px) {

    .main,
    .footer {
        grid-column-start: col-start;
        grid-column-end: span 12;

    }

    /* nav medium screen */
    nav ul {
        display: flex;
        justify-content: flex-start;
    }
}

/* large screens =============================== */

@media (min-width: 768px) {
    .aside {
        grid-column-start: col-start;
        grid-column-end: span 3;
        grid-row-start: 2;
        grid-row-end: 4;
    }

    .main {
        grid-column-start: 4;
        grid-column-end: span 7;
        grid-row-start: 2;
        grid-row-end: 4;
    }

    .ads {
        grid-column-start: 11;
        grid-column-end: span 2;
        grid-row-start: 2;
        grid-row-end: 4;


    }

    .footer {
        grid-column-start: col-start;
        grid-column-end: span 12;
    }

    /* nav large screen */
    nav ul {
        display: flex;
        justify-content: flex-start;
    }


    /* menu buttons */
    nav a:hover {
        /* hover color */
        background: #33bb27;
    }

    nav a {
        height: 38px;
        /* padding TOP&BOTTOM RIGHT&LEFT */
        padding: 10px 20px;

        background-color: transparent;
        /* background-color: #007bff; */
        color: rgb(16, 19, 12);

        text-align: center;
        font-size: 11px;
        font-weight: 600;

        line-height: 38px;
        letter-spacing: .1rem;
        text-transform: uppercase;
        text-decoration: none;
        white-space: nowrap;

        border-radius: 4px;
        border: 1px solid;
        cursor: pointer;
        box-sizing: border-box;
    }
}

/* ========================================== */