/*  
Theme Name: Dave McCourt theme (v2)
Theme URI: http://www.davemccourt.com/
Description: Wordpress theme for Dave McCourt. Uses HTML5 Boilerplate
Version: 2.0
Author: Dave McCourt, Bananadesign Ltd
Author URI: http://www.bananadesign.co.uk/
*/


/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Chrome Frame prompt
   ========================================================================== */

.chromeframe {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */


body {
	/* background: url(img/grey.png) repeat; */
	color: #555;
	background: #efefe8 url(img/body_bg.png) repeat-x left -3px;
	padding-top: 3px;
	font-family: "adelle", serif;
	font-style: normal;
	font-weight: 300;
    line-height: 1.8;
}

/*
* Fixed sidebar
*/


#sidebar {
	width: 22%;
	max-width: 17em;
	margin: 2em 0 0 1.5%;
	float: left;
}

section {
}

div[role="banner"] {
	background: #e9e9e1;
	padding: 1em 4%;
	border-bottom: solid 1px #d3d3cd;
	display: block;
}


div[role="banner"] h1 {
	margin: 1em 0 1.5em 0;
	padding: 0.5em 0 0.5em 70px;
	background: url(img/dave_dots_no_monkey.png) no-repeat left center;	
}

div[role="banner"] h1 span.alt {
	color: 999;
}

article.post {
	background-color: #fcfcfa;
	width: 63%;
	max-width: 50em;
	padding: 2em 4%;
	margin: -1em 0 0 1.5%;
	background-color: #fff;
	float: left;
	backface-visibility: visible;
	-webkit-backface-visibility: visible;
	-moz-backface-visibility: visible;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	border-radius: 4px;
	border: solid 1px #e4e1da;
	font-size: 0.875em;
	display: block;
}

/* 
* Typekit fonts
*/
h1, h2, h3, h4 {
	margin: 0;
	padding: 0;
	font-weight: normal;
}
h1 {
	font-size: 1.5em;
}
h1 a {
	color: #555;
	text-decoration: none;
}
span.alt {
	color: #999;
}
h2 a {
	text-decoration: none;
	color: #fc5126;
	font-size: 1.5em;
	line-height: 1.2;
	margin: 0 0 0.5em 0;
	display: block;
}
h3 {
	margin: 1em 0 0.2em 0;
	color: #fc5126;
	font-size: 1.25em;
	line-height: 1.2;
}
h4 a {
	text-decoration: none;
	color: #333;
	margin: 0;
	display: block;
	font-size: 1.125em;
}
article.post .archives-entrymeta a {
	text-decoration: none;
	color: #178b99;
	font-weight: normal;
}

article.post .archives-entrymeta {
	color: #888;
	margin-bottom: 1em;
	border-bottom: solid 1px #EEE;
}

article.post .archives-entrymeta a:hover {
	color: #fc5126;
}

footer {
	color: #797c7d;
	padding: 1em 4%;
	color: #797c7d;
	font-size: 0.8125em;
	margin-bottom: 4em;
}

/*
pre, code {
	color: #ff5410;	
	background-color: #efefe8;
	padding: 0.2em 1%;
}
*/

code {
    font-size: 0.75em;   
}

.conny {
    font-size: 1.125em;
}

article .conny a {
	color: #178b99;
	/* background-color: #fefee8;
	padding: 0 1%; */
	text-decoration: none;
	font-weight: normal;
}

article .conny a:hover {
	color: #ff5410;
	text-decoration: none;
	font-weight: normal;
}

article p, article pre {
	margin: 0 0 1em 0;
}

ul#menu-primary, ul#recent {
	margin: 0;
	padding: 0;
	list-style: none;
}

ul#menu-primary li a, ul#recent li a {
	color: #555;
	text-decoration: none;
	padding: 0.5em;
	display: block;
	border-bottom: solid 1px #d3d3cd;
}

ul#recent li a {
	color: #999;
}

ul#menu-primary li a:hover, ul#recent li a:hover {
	color: #000;
	/* background-color: #e9e9e1; */
	padding-left: 1em;
	border-bottom: solid 1px #888;
}

h4.sidebar {
	font-size: 0.875;
	color: #d3d3cd;
	margin: 2em 0 0.2em 0;
	padding: 0 00.5em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

div.gallery {
	background-color: #efefe8;
	padding: 0;
}

div.gallery img  {
	border: solid 1px #FFF;
}

dl.gallery-item {
	margin: 0; 
}

p.wp-caption-text {
	font-style: italic;
}

.scrollup{
    width: 40px;
    height: 40px;
    opacity: 0.3;
    position: fixed;
    bottom: 2em;
    right: 2em;
    display: none;
    text-indent:-9999em;
    background: url(img/icon_top.png) no-repeat;
}

/* urrggh. Hate this. Can't find a non-pixel based jQuery way to do it though */
#mobmenu a.menu {
	display: none;
}

ul#menu-primary {
	display: block;
}

/* Responsive images: 
http://wordpress.stackexchange.com/questions/32931/removing-image-and-caption-dimension-attributes/37768#37768 */

/* Images */
.entry-content img,
.comment-content img,
.widget img,
article.post img,
div#main-map {
    max-width: 100%; /* Fluid images for posts, comments, and widgets */
    height: auto;
}
img[class*="align"],
img[class*="wp-image-"] {
    height: auto; /* Make sure images with WordPress-added height and width >attributes are scaled correctly */
}
img.size-full {
    max-width: 100%;
    width: auto; /* Prevent stretching of full-size images with height and >>width attributes in IE8 */
}

.wp-caption { max-width: 100%; }

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 100%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (max-width: 35em) {
    /* Style adjustments for viewports that meet the condition */

	body {
	    font-size: 1.25em;
	    line-height: 1.5;
	}
   
	article.post {
		background-color: #fcfcfa;
		width: 92%;
		float: left;
		padding: 2em 4%;
		margin: -1em 0 0 0;
	}

	div[role="banner"] h1 {
		margin: 0.75em 0 0.75em 0;
		padding: 0.5em 0 0.5em 70px;
		line-height: 1.2;
		font-size: 1.125em;
	}
	
	h2 a {
		font-size: 1.25em;
		line-height: 1.2;
	}

	#sidebar {
		margin: 0;
		background-color: #333;
		padding: 0;
		display: block;
	}
	#mobmenu {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		margin: 0;
		background-color: #333;
		padding: 0;
		display: block;
	}
	#mobmenu a.menu {
		color: #FFF;
		text-decoration: none;
		padding-left: 1em;
		text-align: left;
		display: block;
	}
	span.alt {
		display: inline-block;
	}
	
	ul#menu-primary {
		display: none;
	}
	ul#menu-primary li {
		padding: 0;
	}
	ul#menu-primary li a {
		display: block;
		color: #FFF;
		padding: 0.5em 0.5em 0.5em 1em;
		font-size: 1em;
		border-bottom: solid 1px #999;
	}
		
	ul#recent li a, h4.sidebar {
	    display: none !important;
	    visibility: hidden;
	}
	
	ul#menu-primary li a:hover, ul#recent li a:hover {
		color: #FFF;
		padding: 0.5em 0.5em 0.5em 1em;
		background-color: #fc5126;
		border-bottom: solid 1px #FFF;
	}

}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    div[role=banner],
    #sidebar {
        display: none;
    }
    
    article.post {
        width: 90%;
        margin: 0 4%;
        border: none;
    }
    
    .conny {
        font-size: 1.25em;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
