@charset "utf-8";

@import url(https://fonts.googleapis.com/css?family=Oswald:400,700,300);

*{
    box-sizing: border-box;
}

header, main, aside, footer {
    margin: 0.5em;
    padding: 1em;   
}

header {
        background-color:lavender;
        font-family:Oswald;
        padding: 0;
        }
h1 {
    font-size:2em;
    padding-top: 1em;
}

h2 {
    font-size:1em;
    color:gray;
    text-align: center;
    }


main {  
      background-color: gray;
      font-family: Oswald;
      line-height: 1.6em;
      height: auto;
      
}

aside {
    background-color: lightblue;
    font-family: Oswald;
    line-height: 1.2em;
    height: auto;
    overflow: auto;
    
}

footer {
        clear: both;
        background-color: lightsalmon;
        color: black;
        font-family: Oswald;
        text-align: center;
        font-style: italic;
        overflow: auto;
}

nav {
    clear: both;
    background-color: #444e4e;
    margin: 0;
}

nav ul {
    margin: 0 auto;
    margin-right: 30px;
/*    position: relative;*/
    text-align: center;
}

nav ul li {
    list-style: none;
    padding: 0.5em 0.5em 0.5em 0.5em;
    margin-right: 0.5em;
}

nav ul li:hover {
    background-color: #11c7c0;
}

nav ul li:active {
    background-color: #ea1740;
}

nav ul li a {
    text-decoration: none;
    color: #eaf0f0;
}

nav ul li a:hover {
    color: #444e4e;
    font-weight: 400;
}

.contenedor { 
            width: 100%;
            max-width: 960px;
            margin: 0 auto;
}

img {
    width: 10%;
    margin: 1em;
    float: left;
}

figure {
    width: 100%;
    height: auto;
    padding: 1em;
    margin: 0 auto;
}

figure img {
    width: 50%;
    height: auto;
    float: none;
    }


@media screen and (min-width: 40em) {
    h2 {
        text-align: left;
    }
    
    nav ul li {
        display: inline-block;
    }
    
    main {
        width: calc(60% - 2em); 
        line-height: 2em;
        
        }
    
    aside {
        width: 40%;
        margin-bottom: 1em;
       }
    
    main, aside {
    float: left;   
}
    
}