/* 
    Created on : 06-Dec-2016, 10:16:17
    Author     : silas

    I'll re-arrange this in more logical order and comment fully as we go.
*/

/* custom font */
@font-face {
    font-family: "alegreya_sansregular";
    src: url("../fonts/alegreyasans-regular-webfont.woff2") format('woff2'),
         url("../fonts/alegreyasans-regular-webfont.woff") format('woff');
    font-weight: normal;
    font-style: normal;
}

body{
    font-family: alegreya_sansregular;
    font-size:1.4em;
}

/* over-ride Pure IO base font */
.pure-g [class *= "pure-u"] {
    font-family: alegreya_sansregular;
}

/*
Header styles
*/

/* spacing */
.header-wrapper{
    margin-bottom:32px;
}

/* logo - scale png */
.header-left img{
    width: 72px;
    margin-left:20px;
}

/*nav TODO: Add pure responsive nav here*/
.header-right{
    text-align:right;
    font-size:11pt;
    /*padding-top:40px;*/
    padding-top:20px;
}

/*adaptive menu*/
#menu-wrapper{
    margin-right:20px;
}
#menu-wrapper li{
    list-style-type: none;
    float:right;
}
#menu-wrapper>ul>li{
    padding-left:15px;;
}


#menu-wrapper>ul>li>a{
    color: #007EFF;
    text-decoration: none;
}

#menu-wrapper>ul>li.active{
    color: #999;
}
#menu-wrapper>ul>li.active>a{
    color: #999;
}


/* static menu */
.header-right>span{
    margin-right:20px;
}


.header-right>span>a{
    color: #000;
    text-decoration: none;
}
.header-right>span.active{
    color: #999;
}
.header-right>span.active>a{
    color: #999;
}

/* basic page layout */
#body-content{
   padding-left: 50px; 
   padding-right: 50px;
}
#body-content h1{
   /*font-size*/
}
/* image spacing */
div.content-image > img{
   padding-bottom:30px;
   padding-top:30px;
}

#home-content{
   padding-left: 50px; 
   padding-right: 50px;
}

#body-content img{
    width:100%;
}
#home-content img{
    width:100%;
}

/* homepage image cycler - see http://www.simonbattersby.com/blog/simple-jquery-image-crossfade/ */
#cycler{position:relative;}
#cycler img{position:absolute;z-index:1}
#cycler img.active{z-index:3}

/* bigger margin for paragraph text:  */
.content-text{
   padding-left: 70px; 
   padding-right: 70px;
   text-align: left;
}
.content-text h1{
    font-size:1em;
    font-weight:normal;
}

.content-text p{
   line-height:1.3em;
   margin:0px;
}

/* Portfolio landing page */
/* 
the onhover overlay.
See http://stackoverflow.com/questions/9249359/is-it-possible-to-vertically-align-text-within-a-div
for how the alignment is done:
*/
.menu-overlay{
    /* use rgba() to ensure that text is not translucent as well. See e.g. http://stackoverflow.com/questions/10835500/how-to-change-text-transparency-in-html-css */
    background-color: rgba(0,0,0,0.5);
    color:#fff;
    height:100%;
    width:100%;
    font-size:0.7em;
    display:none;  /* because we don't want the overlay showing on page load. The switch is controller by the jquery mouseover handler */
}
.menu-overlay>span{
    display:inline-block;
    vertical-align: middle;
    line-height: 18px;
    text-align:center;
    /*padding-left:15px;*/
    width:100%;
}

/* to over-ride the default display of link text as blue and underlined */
.menu-overlay>span>a{
    color:#fff;
    text-decoration: none;
}

.linkblock{
    margin-left:2px; 
    margin-right:2px;
    padding:5px;
    height:100%;
    background-size: contain;
    position:relative; /* This is key to absolutely positioning the hover overlay actually over the image. Otherwise, it will wrap below */
}
.linkblock>a>img{
    width:100%;
}



/* footer */
div.footer{
    padding-top:15px;
    text-align: center;
    
    /*
    see https://developer.mozilla.org/en/docs/Web/CSS/clear
    For the simple content pages, not needed, but for the footer on the portfolio
    page (3 columns) this is needed to prevent the menu from floating right.
    edit: Removed floating DIVs, so redundant now.
    */
    clear:both;
}
div.footer .email{
    font-size:28pt;
    color:#999;
}

div.footer .social img{
    width:26px;
    padding-top: 10px;
    padding-left: 10px;
}

/*
'Media Queries' allow different CSS styles to be applied at different screen widths.
Here, I indicate that the left/right margins and the central column width should be 
re-calculated at 567px and smaller. This complements the corresponding media queries
provided by the Pure framework.

Essentially, these re-define a given CSS class but only at the specified screen size
*/
@media screen and (max-width: 567px) {
    
    /* basic page layout - narrower width on mobile */
    #body-content{
       padding-left: 10px; 
       padding-right: 10px;
    }
    #home-content{
       padding-left: 10px; 
       padding-right: 10px;
    }
    
    /* smaller margin for paragraph text on mobile:  */
    .content-text{
       padding-left: 10px; 
       padding-right: 10px;
    }

    /* footer */
    div.footer .email{
        font-size:22pt;
    }
    
    .header-wrapper{
        margin-bottom:0px;
    }
    /* top nav */
    #menu-wrapper li{

       /*display:block;*/
       float:none;
       text-align:left;
   }   

   .header-right>#menu-wrapper>ul>li>a{
       font-size:18pt;
   }
   .header-right>#menu-wrapper>ul>li{
       font-size:18pt;
   }
    
}

/*pureio over-ride for portfolio spacer*/
@media screen and (min-width: 35.5em) {
    #menuspacer.pure-u-sm-1-2{
        width:25%;
    }
}
@media screen and (min-width: 48em) {
    #menuspacer.pure-u-sm-1-2{
        width:33.33333333%;
    }
}