@import url(reset.css);

body {
    font-size: 1.6rem;
    background-color: hsla(200,80%,40%,.7);
    color: hsla(200, 80%, 10%, .9);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* consistent for all articles */
article {
    border: 4px solid hsla(200, 100%, 90%, .9);
    margin: 24px 8px;
    padding: 8px;
}

article h2 {
    text-align: center;
    color: hsla(10, 100%, 30%, 1);
}

article section {
    border: 4px solid hsla(200, 80%, 10%, .9);
    margin: 24px;
    min-height: 200px;
}

article section div {
    width: 180px; height: 180px;
    background-color: burlywood;
    border: 2px solid #222;
}


/* Styles for article1 */
.article1 section div {
    margin: 24px auto;
}

/*  */

.article2 section {
    position: relative;
    min-height: 238px;
}

.article2 section div {
    position: absolute;
}

.article2 section div:first-child {
    top: 24px; left: 24px;
}

.article2 section div:last-child {
    top: 24px; right: 24px;
}

/*  */

.article3 section {
    overflow: hidden;
}

.article3 section div {
    margin: 24px;
}

.article3 section div:first-child {
    float: left;
}

.article3 section div:first-child {
    float: right;
}


/* using flexbox */
.article4 section {
    display: flex;
    justify-content: center;
}

.article4 div {
    margin: 24px;
}

/*  */
.article5 section {
    text-align: center;
    padding: 24px 0;
}
.article5 div {
    display: inline-block;
}

/*  */

.article6 section {
    display: flex;
    justify-content: space-evenly;
    padding: 24px 0;
}

.article6 div:nth-child(3) {
    background-image: url(../images/wizard.gif);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.article6 div:nth-child(3) h3 {
    background-color: orange;
    text-align: center;
    width: 90%;
    margin: 2px auto;
    transform: translate(30%, 40%)
               rotate(30deg);
}