/* CSS Document for Screens */

/* Part One - import the Google Font and add the font, margin and padding to the body tag*/
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,300i,700,700i&display=swap');


/* Part Two - text styles */

body{
    font-family: 'Open Sans', sans-serif; 
    font-size: 18px; 
    font-weight: 700;
    color: #333;
    margin: 0;
    padding: 0; 
    background-color: #dfd8c4;
}

/* Part Four - page ID */
#page {
    
    max-width: 1200px; /* set max to same width as image */
    margin: 0 auto; /* 0 top and bottom, auto right and left  - this effectively centres content on the page */
    position: relative; /* any items in the page element are positioned relative to it. This has a knock on effect on the navigation later. */
}

h1 {
    margin: 0 0 1em 0; /* top, right, bottom, left */
    font-size: 2.8em; /* 2.8 times the base font size. Users can change their base font size in browser settings (good for poor eyesight) */
    font-weight: 700;
}

h2 {
    margin: 0 0 0.5em 0; 
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1.1em; /* size of the line break between elements */
}

h3 {
    margin: 0 0 0.5em 0; 
    font-size: 1.3em;
    font-weight: 700;
}

h3 {
    margin: 0 0 1.5em 0; 
    font-size: 1.em;
    font-weight: 700;
}

p {margin: 0 0 1em 0;}

a {color:#856017;}

a:visited {color: #9c6215;} /* pseudo class */

/* Part Eight  */
a.btn {
    
    font-size: 1.2em;
    text-decoration: none;
    color: #fff;
    border: 1px solid #fff;
    padding: 4px 15px;
    transition: background-color 0.5s;
}

a.btn:hover {
    background-color: rgba(0,0,0,0.3); /* use RGBA to support transparency */
    
}



/* Part Three Header */
header {
    height: 430px;  /* matches image height */
    background: #86aecb url(banner_1200.jpg) no-repeat center bottom; /* try to match the bg color to the image, dont repeat, center on X axis, bottom on Y axis */
    position: relative; /* ensures elements within the header are place in relation to the header itself */   
}




/* Part Five  */
header a.logo { /* target the anchor tag inside the header with class=logo */
    /* Part Nineteen  */
    z-index: 1;
    /* Part Nineteen  */
    
    position: absolute; /* positioned absslutley, but realtive to the parent (header) */
    display: block; /* make the link block object - they have an inline style by default */
    width: 160px; /* set the size of the logo */
    height: 66px;
    background: url(gflogosvg.svg) no-repeat 0 0;
    background-size: contain; /* scale the image to fit the element */
    top: 15px; /* place the logo 15px from top */
    left: 20px;
}

/* Part Six - In the HTML, add a SPAN tag around the text of the link */
header a.logo span {display: none;} /* hides the text */


/* Part Nine - All  */
section {
    padding: 0 30px; /* stop content touching the sides */
}

        /*  Part Twelve pseudo element to fix the margin-bottom on the floated elements */
        section::after{
            content:'';
            display: block; 
            clear:both;
        }
        /*  Part Twelve pseudo element to fix the margin-bottom on the floated elements */



section.main {
    margin-top: 20px;
    margin-bottom: 30px;
    padding: 0; 
    /*background-color: #cccccc; temporary for showing height on main section*/
}
section.main aside {
    width: 33%;
    float: left;
    text-align: center;  
}

section.main .content{
    margin: 15px;
    background: no-repeat center top; /* not setting image - as each section is different */
    background-size: 75px 75px;
    padding-top: 85px; /* space to accommodate image */
    /* this will avoid the effect the width and must be fixed */
    /* there is a problem with the bottom margin not being honoured due to the float - try setting to 100px in section.main to see it makes no difference*/
}

/* Part Ten links in the three columns  */
section.main aside h3 a { 
    color: #000;
    text-decoration: none; /* is this good design? */
}
section.main aside h3 a:hover {
    text-decoration: underline;
}

/* Part Eleven - styling each seperate asides content */

section.main aside .content.trending{
    /* inherits  background propeties from parent */
    background-image: url(../graphics/icon_star.svg);
}
section.main aside .content.find-it{
    /* inherits  background propeties from parent */
    background-image: url(../graphics/icon_marker.svg);
}

section.main aside .content.tools{
    /* inherits  background propeties from parent */
    background-image: url(../graphics/icon_gear.svg);
}

section.main aside .content.event{
    /* inherits  background propeties from parent */
    background-image: url(calendar.svg);
}



/* Part Thirteen atmosphere */

section.atmosphere {
    background-color: #4493a2;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #fff;  
}
section.atmosphere.intro{
    background-color: #9c6215;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #ffffa9;  
}
section.atmosphere.hoth {
    background-color: #4493a2;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #fff;  
}

section.atmosphere.jabba {
    background-color: #856017;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #fff;  
}

section.atmosphere.emperor {
    background-color: #856017;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #fff;  
}

section.atmosphere.wampa {
    background-color: #4493a2;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #fff;  
}
section.atmosphere.coming {
    background-color: #eb37f3;
    padding-top: 30px;
    padding-bottom: 30px;
    color: #fff;  
}
section.atmosphere.media img {
    width: 100%;
}

section.jabba article {
    padding: 0 20px 0 515px; /* room for BG graphic */
    background: url(jabba.jpg) no-repeat 0 5px; 
    min-height: 220px; /* ensures the height is large enough to show the whole photo - we don't know how much content there will be in the section */
}

section.hoth article{
    padding: 0 20px 0 515px; /* room for BG graphic */
    background: url(hoth.jpg) no-repeat 0 5px; 
    min-height: 220px; /* ensures the height is large enough to show the whole photo - we don't know how much content there will be in the section */
}

section.wampa article{
    padding: 0 20px 0 515px; /* room for BG graphic */
    background: url(wampa.jpg) no-repeat 0 5px; 
    min-height: 220px; /* ensures the height is large enough to show the whole photo - we don't know how much content there will be in the section */
}

section.emperor article{
    padding: 0 20px 0 515px; /* room for BG graphic */
    background: url(emperor.jpg) no-repeat 0 5px; 
    min-height: 220px; /* ensures the height is large enough to show the whole photo - we don't know how much content there will be in the section */
}



/* Part Fifteen the blockquote */

section.how-to blockquote {
    margin: 0;
    width: 32%;
    color: #444;
    background-color: #fff;
    position: absolute;
    bottom: 0; /* Push the blockquote to the bottom and right side */
    right: 4%;
}
section.how-to blockquote p{
    margin: 30px 30px 20px 50px;
}

section.how-to blockquote p.quote{
    font-style: italic;
    font-size: 1.2em;  
}

section.how-to blockquote p.credit{
    color: #777;
    font-size: 0.9em;  
    margin-top: 0;
    padding-left: 20px; /* indent a littlle */
    line-height: 1.3em;
    position: relative; /* for a pseudo element we will add later */
}

section.how-to blockquote::before {
    content: '\201c'; /* unicode character for left double quote */
    color: #d2bd65;
    position: absolute;
    top: 10px;
    left: 8px;
    font-size: 5em;
    font-family: serif;
    
}
section.how-to blockquote p.quote::after {
    content: '\201d'; /* unicode character for right double quote */
    font-family: serif;    
}

section.how-to blockquote p.credit::before {
    content: '\2014'; /* unicode character for em dash */
    position: absolute;
    top: -1px;
    left: 0;
}


/* Part Seventeen   */
nav {
    background-color: rgba(0,0,0,0.65);
    position: absolute;
    top: 0;
    left: 0; /* position relative to page, which is parent */
    padding: 50px 0 0 0;
    width: 100%; /* needs a width as absolute positioning makes this only the width of the content - we force it to 100% of parent */
    
    /* ******** after doing this - set the z index of the logo, so it floats on top */
    
}

/* Part Twenty Two */
nav::after {
    content:'';
    display: block;
    clear: both;
}

/* Part Twenty */

nav ul {
    list-style: none;
    margin: 0;
    padding:0; 
    /* the above rules remove all the default styling */
}

nav ul li a {
    display: inline-block; /* Note - check the difference with and without this */
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    width: 125px; /* sets width of sub menu */
    position: relative; /* used later in positioning arrow icons */
    
}

nav ul li a:visited {
    color: #fff;   
}

nav ul li a:hover {
    background-color: #937207;   
}

nav ul li:hover {
    background-color: #937207;   
}

/* Part Twenty Two */
nav ul li:hover > ul { /* Target ul's that are in li's in a hover state */
    display: block; /* override display: none set in nav ul ul (below) */
    
}

/*  end Part Twenty Two */
    

nav ul ul {
    position: absolute; /* ensures this appears under the list item, and also stops the parent nav from covering the entire height of the menu. Items inside an element that are absolute are ignored. */
    top: 100%;
    background-color: #2b0306;
    display: none;
}

nav ul ul li {
    position: relative; /* position relative to its parent li */  
}
nav ul ul ul {
    left: 100%;
    top: 0;
}

/* Part Twenty One */
/* top level */
nav > ul { /*targets only the immediate child ul */
    padding-left: 200px; /* move the top level to avoid the logo */ 
}
nav > ul > li{ /* target only the top level list item */
    float: left; /* causes a problem like we saw earlier. Parent element wont fit the entire nav area. Fixed with a pseudo element. Add a pseudo element to the NAV (above) */
}

/* Part Twenty Three */

nav > ul > li > a { /*  Optional - makes top level links  */
    width: auto;
    padding: 10px 20px 15px 20px;
}
/* end Part Twenty Three */


/* Part Twenty Four */

/* add an arrow to links that have the aria-haspopup property*/

nav a[aria-haspopup="true"]::after{
    
    content: '';
    display: block;
    width: 0;
    height: 0;
    position: absolute;
    top: 16px;
    right: 10px;
    
    /* make an arrow with a border cheat */
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid #fff;
}

/* down arrow on top level - Overrides the previous rule*/
nav> ul > li > a[aria-haspopup="true"]::after{
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff;
    left: 20px;
    right: auto;
    bottom: 6px;
    top: auto;
    
}
    




/*  Part Sixteen footer */

footer{
    font-size: 0.8em;
    margin: 40px;
    color: #999;
}

footer .content{
    display: inline; /* ensure element flows alongside and not on a seperate line */   
}

footer a {
    margin-left: 30px;
    color: #777;
}
footer a:visited {
    color: #777;
}
footer a:hover {
    color: #000;
}


/* Media Queries */

@media screen and (max-width: 1000px){
    /* these rules apply up to 1000px */
    h1 {font-size: 2.4em;} /* reduce the heading size */
    
    /* Header */
    header div.hero{ left: 65%; } /* move across slightly */
    header div.hero h1 { margin-bottom: 20px; } /* reduce the margin slightly, pushing the h1 and button closer */
    
    /* Section Atmosphere */
    section.atmosphere article {
        padding-left: 45px; /* gives the article more space */
        background-size: 375px auto; /* auto width makes the background responsive */
    }
}

@media screen and (max-width: 825px){
    /* properties set above will cascade down */
    h1 {font-size: 2.2em;}
    
    /* Header */
    header{
        height: 300px; /* match image height */
        background-image: url(banner_825.jpg);  /* change to smaller image */
    }
    
    header div.hero{
        /* resize the hero area to fit */
        top: 120px;
        left: 60%;
    }
    
    section.atmosphere article{
        /* adjust the atmospghere section to fit */
        padding-left:50px;
        background-size: 300px auto;
    }
    /* resive the blockquote to fit */
    section.how-to blockquote p.quote {
        /* adjust the blockquote - stop it breaking into the atmosphere section */
        font-size: 1.1em;
        line-height: 1.2em; 
    }
    section.how-to blockquote p.credit {
        font-size: 0.85em;
    }

}

@media screen and (max-width: 760px){
    /* reduce heading tags */
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.4em; }
    h3 { font-size: 1.1em; }
    a.btn { font-size:1em } /* reduce button text */
    
    
    header a.logo {
        /* resize logo in proportion */
        width: 145px;
        height: 60px;
    }
    
    header div.hero{
        top: 140px;
        left: 60%;
    }
    
    section.main {
        margin-top: 10px;
        margin-bottom: 10px;
    } /* reduce the margins of this area */
    
    section.main aside div.content {
        background-size: 55px 55px; /* resize all images inside the 3 sections */
        padding-top: 60px; /* close up the space as the images are smaller */
        
    }
    
    section.how-to aside div.content img {
        width: 85%;
    }
    
    nav { padding-top: 80px; } /* Move navigation below the logo */
    
    nav > ul {padding-left: 10px; } /* move the navigation in line with the left side content */
    
}


@media screen and (max-width: 625px){
    h1 { font-size: 1em;}
    h3 { margin-bottom: 0;}
    a.btn{ font-size: 0.9em;}
    
    header {height: 160px; background-image: url(banner_625.jpg); background-position: #4b0a; }  
    /* adjust a logo color */
    header a.logo{
        width: 100%; height: 66px;
        left: 0; top: 0;
        background: rgba (0,0,0,0.65) url(../graphics/logo_small.svg) no-repeat center center;
        background-size: 112px 46px;
        background-position: 20px center; /* position logo on left */
    }
    /* reposition the hero */
    header div.hero {width: 300px; top: 85px; left: 30%;} /* adjust left if you wnat to move the hero further right */
    header div.hero h1{margin-bottom: 10px;}
    
    section.main aside {
        width: 100%;
        float: none; /* stack the columns instead of side by side */
        text-align: left;  
    }
    
    section.main aside div.content {
        /* rearrange the content of each of the columns to fit better */
        margin: 8px 20px 8px 0;
        padding: 5px 0 10px 85px;
        background-size: 50px 50px;
        background-position: 20px 5px;
    }
    
    section.atmosphere article {
        /* shift the atmosphere text below the image */
        padding: 160px 20px 0 0;
        background-size: 300px auto;
        min-height: initial;
    }
    
    section.how-to aside {
        width: 100%;
        float: none;
        margin: 0;
        position:relative;  /* so we can position div.content inside */   
    }
    section.how-to aside div.content{
        padding: 20px 20px 20px 150px;    
    }
    section.how-to aside div.content p{
        font-size: 0.9em;  
    }
    section.how-to aside div.content img{
        display: inline-block;
        width: 125px;
        position: absolute;
        top: 30px;
        left: 0;
    }
    
    section.how-to blockquote{
        margin: 0 20px 0 40px;
        width: 90%;
        padding: 1px 0 20px 0;
        position: relative;
    }
    section.how-to blockquote p.credit{
        margin-bottom: 0;   
    }
    
    nav {position: static; width: auto; padding: 20px 15px; background-color: #4b0a0c}
    /* shifts navigation to the bottom of the page on small screens */
    /* later we restyle to stop using drop down menus */
    
    /* apply properties to a range of elements */
    nav ul,
    nav ul ul,
    nav ul ul ul{
        display: block; position: static; /* each navigation item takes up full width of screen */
    }
    
    /* target top level ul */
    nav > ul {padding: 0;}
    nav > ul > li {float: none; margin-top: 25px;}
    
    nav ul li hover {background: none;} /* remove hover effect */
    nav ul li a{
        width: auto;
        display: block; /* make whole link width of available space and clickable */
        margin: 8px 10px; /* restyle links */
        padding: 8px 15px;
        border: 1px solid rgba(255, 55,255,0.25);
    } 
    nav ul li a:hover{ /* restyle link hover effect */
        background-color: rgba(255, 55,255,0.2);
    } 
    
    nav ul ul { /* restyle uls inside uls */
        background: none;
    }
    nav ul ul li a{ /* restyle uls inside uls (sublinks) */
        margin-left: 30px; /* indent first level submenu 30 px */
    }
    nav ul ul ul li a{ /* restyle uls inside uls (sub-sublinks) */
        margin-left: 60px;/* indent second level submenu 60 px */
    }
    
    /* target top level navigation */
    /* remove arrows */
    nav a[aria-haspopup="true"]::after{display: none;} 
        
    /* restyle the footer */
    footer div.content {
        display: block; /* hyperlinks take up full width */
        margin-top: 15px; /* space the hyperlink away from copyright */
    }
    
    footer div.content a {
        margin: 0 20px 0 0; /* line up links on left hand side */
    }  
    
}

@media screen and (max-width: 425px){
    /* target very small screens */
    
    header{
        height: 110px; /* match smallest banner */
        background-image: url(banner_425.jpg);
    }
    
    header a.logo{
        
        background: rgba (0,0,0,0.65) url(../graphics/logo_small.svg) no-repeat center center;
        
    }
    
    header div.hero {
        width: 100%;
        left: 0;
        top: 46px;
        text-align: center;
    }
    header div.hero h1 {
        font-size: 1em;
        margin-bottom: 10px;
    }
    header div.hero a.btn {
        padding: 2px 30px;
        font-size: 0.8em;
    }
    
    header div.hero a.btn span{
        display: none; /* hides the second part of the sentence 'Get advice from coders' */
    }
    /* make the how to images appear above th text on very small screens */
    section.how-to aside div.content { padding: 140px 20px 20px 0;}
    section.how-to aside div.content img{ width:auto; height: 100px; top: 30px;}
    section.how-to blockquote {margin: 10px 40px 0 20px;}
    
    /* restyle footer for very small screens */
    
    footer::after{content:''; display:block; clear: both;}
    /* display links vertically */
    footer div.content a {
        display: inline-block;
        margin: 0 0 10px 0;
        
        clear: both; /* stack the links */
    }
    
}

.team{
    padding: 20px;
    clear:both;
}

.team img{
    float: right;
    width: 50%;
    padding: 20px 20px;
}

