body {
    background-color:#ccc;
    font-family: Verdana;
    
    align-content:flex-end;
    align-content:-webkit-flex-end;
    
    display:flex;
    display:-webkit-flex;
    flex-direction:column;
    -webkit-flex-direction:column;
    
    margin:0;
}

main {
    margin-top: 40px;
    margin-bottom: 60px;
    width: 800px;
    
    margin-left: 0;
    margin-left: calc(50% - 400px);
    
    background-color:#eee;
    
    box-shadow: 0 0 8px gray;
    
    padding:0 0;
}
main > * {
    width: 100%;
}

header {
    text-align:center;
    background-color:#111;
    padding-top: 30px;
    padding-bottom: 30px;
    
    color:white;
}
h1 {
    font-size: 50px;
    margin:0 0;
}
h1 > span {
    font-size:10px;
}

#slides {
    height: 300px;
    
    background-image: url("slider-house.png");
    background-size:100% 100%;
    background-repeat: no-repeat;
    background-origin: content-box;
    background-color:#555;
    
    animation: change-slider-bg 20s linear infinite;
    -webkit-animation: change-slider-bg 20s linear infinite;
    
    padding-left:0;
    
    text-align:center;
    width:100%;
}
#slides > p {
    text-shadow:0 0 1px black;
    width:100%;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 0 0;
    font-weight:bold;
    font-size:20px;
    line-height:60px;
    
    margin: 0 0;
    opacity: 0;
    
    -webkit-animation: move-slider-p 20s linear infinite;
}
#slides > p:nth-child(1) {-webkit-animation-delay: 0s}
#slides > p:nth-child(2) {-webkit-animation-delay: 4s}
#slides > p:nth-child(3) {-webkit-animation-delay: 8s}
#slides > p:nth-child(4) {-webkit-animation-delay: 12s}
#slides > p:nth-child(5) {-webkit-animation-delay: 16s}

nav {
    display: flex;
    display: -webkit-flex;
    
    height:50px;
    
    background-color:white;
}
nav > a {
    text-align:center;
    line-height:50px;
    
    flex: 1;
    -webkit-flex: 1;
    
    text-decoration:none;
    color:#222;
    background-color:#777;
    text-shadow: 0 0 2px #444;
    
    transition: .2s;
}
nav > a:hover {
    
    background-color:#ddd;
    transition: .5s;
    
    text-shadow: none;
}

article {
    width: 75%;
    padding:.025% 12.5%;
    
    background-color:#eee;
    
    text-align:justify;
    line-height: 24px;
}
article:nth-of-type(2n) {
    background-color:white;
}
article > p {
    margin-left:.25%;
    margin-right:.25%;
}
article > ul {
    list-style-type: none;
}
article > ul > li > b:first-of-type {
    font-size: 22px;
}
article > ul > li > b {
    font-size: 19px;
}
article img {
    box-shadow: 0 0 3px gray;
}

footer {
    margin-left:-4px;
    width:100%;
    line-height:30px;
    background-color:#222;
    
    text-align:center;
    
    color:white;
}
footer a {
    color:white;
    font-weight:bold;
}


@-webkit-keyframes change-slider-bg {
    100%, 0%, 18%{
        background-image: url('slider-house.png');
    }
    20%, 38% {
        background-image: url('slider-garden.png');
    }
    40%, 58% {
        background-image: url('slider-mosquito.png');
    }
    60%, 78% {
        background-image: url('slider-dust.png');
    }
    80%, 98% {
        background-image: url('slider-study.png');
    }
}

@-webkit-keyframes move-slider-p {
    100%, 0%, 18% {
        opacity: 1;
    }
    20%, 98% {
        opacity: 0;
    }
}


@media all and (max-width:800px) {
    main {
        width:100%;
        margin: 0 0;
    }
}
@media all and (max-width:770px) {
    article {
        font-size: 14px;
    }
    article > ul > li > b:first-of-type {
        font-size: 18px;
    }
    article > ul > li > b {
        font-size: 16px;
    }
    .left {margin-right:.25%}
    .right {margin-left:.25%}
}
@media all and (max-width:700px) {
    img {
        transform: scale(.8, .8);
        -webkit-transform: scale(.8, .8);
    }
}
@media all and (max-width:650px) {
    img {
        transform: scale(.6, .6);
        -webkit-transform: scale(.6, .6);
    }
    nav {
        font-size: 13px;
    }
    
    #slides {
        height:150px;
    }
    #slides > p {
        line-height:30px;
    }
}
@media all and (max-width:550px) {
    article {
        font-size: 12px;
    }
    article > ul > li > b:first-of-type {
        font-size: 14px;
    }
    article > ul > li > b {
        font-size: 13px;
    }
    nav {
        font-size: 12px;
    }
}
@media all and (max-width:500px) {

}


.left  {float:left; margin-right:2.5%}
.right {float:right;margin-left: 2.5%} .tright {text-align:right}
.center {text-align:center}

.separator {
    display:flex;
    display:-webkit-flex;
}
.separator > * {
    flex:1;
    -webkit-flex:1;
}

.doublef {
    flex:2;
    -webkit-flex:2;
}