/* Styles for my travel website*/

*{
    margin: 0;
    padding: 0;
    box-sizing:border-box; /*the inside of the box is getting smaller*/
}

body {
    background-color: aliceblue;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}
/*my header is placed OUTSIDE of my wrapper , where
orginally all of ourr containers were placed INSIDE the 
wrapper*/
#wrapper{
    width: 940px;
    margin: 232px auto 20px auto;
}

header{
    background: pink;
    padding-top: 20px;
    position: fixed;
    width: 100%; /*do not forget to declare a width for your header if you are positioning your header "fixed"*/
    top: 0;
    left: 0;
}
.inner-header{
    background-color: orange;
    width: 940px;
    margin: 0 auto;
}

#primary{
    height: 50px;
    line-height: 50px;
    background-color: rgb(155, 155, 217);
}

#primary ul{
    width: 1000px;
    margin: 0 auto;
}

#primary a{
    text-decoration: none;
    display: block;
}
#primary li{
    list-style-type: none;
    float: left;
    width: 20%;
    text-align: center;
}

#primary a:hover{
    background: blue;
    color: white;
}

.home #primary li:nth-child(1) a,
.about #primary li:nth-child(2) a,
.tours #primary li:nth-child(3) a,
.promos #primary li:nth-child(4) a,
.contact #primary li:nth-child(5) {
    background: gray;
    color:white;
}

#secondary{
    
}

#hero{
    background-color: rgb(253, 3, 3);
}



#logo{
    display: inline;
    margin-bottom: 16px;
}

/*The bad way is resize the picture
#hero img{
    width: 940px;
}*/

main{
    width:580px;
    /*background-color: green;*/
    float: left;
    margin-top:24px;
}

aside{
    width:340px; /*orginal: 340px, after adding padding, we must reduct the width size from 340px to 310px*/
    padding: 15px; /*if padding by 15px, the width of the box is bigger by adding 30px (15px each side)*/
    background: rgb(117, 83, 89);
    float: right;
    margin-top:20px;
}

footer{
    height: 50px;
    line-height: 50px;
    border-top: 1px dotted #666;
    clear: both;
    font-size: 0.9em;
    color: #666;
}

footer li{
    list-style-type: none;
    float: left;
    margin-right: 30px;
}

footer img{
    margin-top: 6px;

}

footer a{
    color:#666;
}

figure{
    margin-bottom: 15px;
}

figure img{
    margin: 0 auto;
}
.about figcaption{ /*When I am on the about page that had figure*/
    text-align: center;
    background: none;
    padding: 8px 0; /*8px from top and bottom 
    and 0 left and right */
}
figcaption{
    background-color: black;
    color: white;
    font-size: .875em;
    padding: 8px;
}

/*About*/
img + p{ /*Paragraph that is closed to the image*/
    margin: 15px 0 20px 0;
}


h1{
    font-weight: 200;
    font-size:2.44em;
}

img{
    max-width: 100%;
    display: block;
}

/*Typography*/
h1,h2,h3{
    margin-bottom: 8px;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.2;
    color: rgb(189, 125, 30);
    
}

h2{
    color: rgb(110, 71, 11);
}

h3{
    color: white;
    font-size: 1.78em;
    font-weight: 200;
    text-transform: uppercase;
}

p{
    margin-bottom: 20px; /*Adding space between paragraphh*/
    line-height: 1.5;
}

aside p{
    font-size: .9em;
}

.social{
    position: fixed;
    bottom: 300px;
    right: 5px;
    list-style-type: none;;
}

.social li{
    margin-bottom: 10px;
}


/*row*/
.row{
    clear: both;
    margin-bottom: 20px;
    overflow: hidden;
}
.third{
    /*After adding picture, remove height*/
    width: 300px;
    /*height: 300px;*/
    background:pink;
    float: left;
    margin-right: 20px;
}
/*all the box margin to the right except last box*/
.third:last-of-type{
    margin-right: 0;

}

.third h3, .col-8 h3{
    color:rgb(35, 78, 63);
    font-size: 1.5em;
    text-align: center;
}

.third img + h3, 
.col-8 img +h3 { /*style inside third we have img tag following with h3 tag*/
    margin: 10px 0 8px 0; /*top - right - bottom - left*/

}

.third p, .col-8 p{
    font-size:.9em;
}

/*Colo-8 row*/

.col-8{
    width: 460px;
    /*height: 400px;*/
    background: rgb(212, 212, 159);
    float: left;
}

.col-8:last-of-type{
    float: right;
}

/*Span for both row*/
span { 
    display: block;
    text-align: center;
    font-style: italic;
}

span a {
    color: rgb(48, 30, 33);
    font-weight: bold;
    font-size: 1.2em;
}