/*----------------------------------------------------------------------------*/
/*                                                                            */
/* Copyright (c) 2018 by Learning Patterns. All Rights Reserved.    	      */
/*                                                                            */
/* CSS        : layout.css    (mobile-first/responsive)                       */
/*                                                                            */
/* Description: Layout rules for learningpatterns.com                         */
/*                                                                            */
/*----------------------------------------------------------------------------*/

/* Resets
---------------------------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* General settings
---------------------------------*/
html, body { /* for sticky footer */
	height: 100%;
}
body { /* for sticky footer */
	display: flex;
	flex-direction: column;
}
body, td, th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 100%;
}
a {
    color: #324d54;
    text-decoration: none;
    -webkit-transition: color 0.35s;
    transition: color 0.35s;
}
a:hover {
    color: #9a0000;
    text-decoration: none;
}
p, h1, h2, h3, h4, h5, h6 {
	margin-bottom: 0.75em;
}
h1, h2, h3, h4, h5, h6 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    line-height: 1.0em;
}
h1 {
    font-size: 1.6em;
}
h2 {
    font-size: 1.4em;
}
h3 {
    font-size: 1.2em;
}
h4 {
    font-size: 1.0em;
}
h5 {
    font-size: 0.9em;
}
h6 {
    font-size: 0.8em;
}
strong, b {
    font-weight: bold;
}
em, i {
    font-style: italic;
}

/* Wrappers
---------------------------------*/
div#content_wrapper {
    width: 100%;
    max-width: 1120px;
    margin: 12px 0 0 0;
    flex: 1 0 auto; /* for sticky footer */
}
div#content_wrapper_home, div#content_wrapper_courseware {
    width: 100%;
    max-width: 1340px;
    margin: 12px 0 0 0;
    flex: 1 0 auto; /* for sticky footer */
}
div#content_wrapper_error {
    width: 100%;
    margin: 0 0 0 0;
}
section {
	position: relative;
	width: 96%;
    padding: 0 2%;
    margin-bottom: 32px;
    font-size: 0.9em;
    line-height: 1.1em;
}
div.clearing {
    clear: both;
}

/* Header
---------------------------------*/
header {
    position: relative;
    margin: 0 0 6px 0;
}
header img {
    width: 98%;
    max-width: 475px;
    height: auto;
}
header span { /* top and transform rules perform vertical centering */
    position: absolute;
  	top: 55%;
    -webkit-transform: translateY(-45%);
  	-ms-transform: translateY(-45%);
  	transform: translateY(-45%);
    left: 520px;
    display: none;
    margin-right: 6px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #324d54;
    font-style: italic;
    line-height: 1.4em;
    letter-spacing: -1px
}

/* Main nav
---------------------------------*/
nav#main_nav {
    background-image: url("../images/site/nav-lines.jpg");
    width: 96%;
    padding: 6px 2%;
    margin-bottom: 12px;
    font-weight: bold;
    line-height: 1.5em;
}

/* Page content
---------------------------------*/
section h1 {
    color: #9a0000;
}
section.home {
    float: none;
    width: 96%;
    padding: 0 2%;
}
section div.contact h3 {
	margin-bottom: 6px;
}
section div.contact p {
	background-color: #eee;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
}
section p a {
	font-weight: bold;
}

/* Expander
---------------------------------*/
ul.expander {
	position: relative;
}
ul.expander li.ex-coll {
	position: absolute;
    top: -28px;
    right: 0;
    padding: 4px 8px 4px 7px;
    background-color: #eee;
    border-radius: 4px;
	text-align: center;
    font-size: 0.8em;
    font-style: italic;
    font-weight: bold;
}
ul.expander li.ex-coll span {
	display: none;
}
ul.expander, ul.expander ul {
	list-style: none;
    padding: 0;
}
section.home ul.expander {
    margin-top: 38px;
}
section ul.expander li.l1 {
    margin-bottom: 0.75em;
}
section ul.expander li.l1 div.open, section ul.expander li.l1 div.close {
    border-bottom: 1px solid #324d54;
    padding-bottom: 3px;
    font-size: 1.2em;
    font-weight: bold;
}
section ul.expander li.l1 div.close {
    display: none;
}
section ul.expander li.l1 ul {
	display: none;
    padding-left: 40px;
    margin-top: 4px;
    line-height: 1.2em;
}
section.courseware ul.expander li.l1 ul {
    list-style: square;
}
section.courseware ul.expander li.l1 ul ul {
    display: block !important;
    margin-top: 0;
}

/* News-Courseware info
---------------------------------*/
aside {
    float: none;
    width: 96%;
    padding: 12px 2%;
    font-size: 0.9em;
    line-height: 1.1em;
    background-image: url("../images/site/news-lines.jpg");
}
aside h2 {
    color: #9a0000;
}
aside.news a.newsmore {
	color: #1989a6;
}
aside.news p {
	margin-bottom: 21px;
}
aside.c-info ul {
	margin-top: 0;
    padding-left: 24px;
    list-style: square;
}
aside.c-info span {
	font-size: 0.8em;
}

/* Courses page
---------------------------------*/
section table {
    border-collapse: collapse;
    width: 100%;
}
section table, th, td {
    border: 1px solid black;
    vertical-align: middle;
    padding: 4px;
}
section table th {
    text-align: left;
    font-weight: bold;
    white-space: nowrap;
}
section table tr.c-cat {
    font-size: 1.2em;
    background-image: url("../images/site/news-lines.jpg");
}
section table tr.c-cat th {
	padding: 8px 4px;
}
section table tr.h-cats {
    font-size: 0.7em;
    background-color: #ddd;
}
section table tr.h-cats th {
	padding: 2px 4px;
}
section table td span {
    font-size: 0.7em;
}
section table th.c-blurb, section table td.c-blurb {
    display: none;
}
section table a {
	font-weight: bold;
}

/* Courseware pages
---------------------------------*/
section.courseware {
    float: none;
    width: 96%;
    padding: 0 2%;
}
section div.print-link {
	position: absolute;
    top: -24px;
    right: 24px;
    padding: 4px 12px;
    background-color: #eee;
    border-radius: 4px;
	text-align: center;
    font-size: 0.8em;
    font-style: italic;
}
section.courseware h2 {
	color: #9a0000;
    margin-top: 32px;
}

/* Footer
---------------------------------*/
footer {
    width: 96%;
    padding: 8px 2%;
    font-size: 0.8em;
    line-height: 1.3em;
    background-image: url("../images/site/nav-lines.jpg");
    flex-shrink: 0; /* for sticky footer */
}
footer address span {
    font-weight: bold;
    font-size: 1.2em;
}
footer address a {
    font-weight: bold;
}

/* Responsive
---------------------------------*/
@media (min-width: 428px) {
    ul.expander li.ex-coll {
    	font-weight: normal;
	}
    ul.expander li.ex-coll span {
		display: inline;
	}
}
@media (min-width: 600px) {
    nav#main_nav {
    	width: 98%;
    	padding: 6px 1%;
	}
	section {
		width: 98%;
    	padding: 0 1%;
	}
	section.home, section.courseware {
        float: left;
        width: 64%;
        padding: 0 3% 0 1%;
    }
    aside {
        float: left;
        width: 30%;
        padding: 12px 1%;
    }
    footer {
    	width: 98%;
    	padding: 8px 1%;
	}
}
@media (min-width: 640px) {
    header span {
        display: block;
    }
    section table th.c-blurb, section table td.c-blurb {
    	display: table-cell;
	}
}