/*==============================================================================
CSS reset

http://meyerweb.com/eric/tools/css/reset/
==============================================================================*/

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, ol, ul, li,
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;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}




/*==============================================================================
Clearfix

http://nicolasgallagher.com/micro-clearfix-hack/
==============================================================================*/

/**
 * 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 are clearfixed.
 * 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;
}




/*==============================================================================
Box sizing
==============================================================================*/

*,
*:before,
*:after {
    box-sizing: border-box;
}




/*==============================================================================
General
==============================================================================*/

html {
    background-color: rgb(85, 85, 85); /* To match footer */
}

body {
    font-family: "lora", serif;
    font-size: 16px;
    line-height: 24px;
    color: rgb(34, 34, 34);
}




/*==============================================================================
Components (alphabetical order)
==============================================================================*/

/*
AdSense

Need to implement responsive ads. Google's standard approach isn't very good as
it just serves whatever ad it thinks is best. Another option is to use a custom
ad size and change the size dynamically:
http://www.labnol.org/internet/adsense-custom-size-ads/28352/
*/

.adsense {
    margin-right: auto;
    margin-left: auto;
    margin-top: 32px;
    margin-bottom: 32px;
}

@media screen and (min-width: 640px) {
    .adsense {
        margin-top: 48px;
        margin-bottom: 48px;
    }
}




/*
Card
*/

.card {
    display: block;
    text-decoration: none;
    background-color: rgb(255, 255, 255);
    color: inherit;
}

.card__image {
    display: table;
    table-layout: fixed; /* For proper word wrapping - http://stackoverflow.com/questions/5889508/using-word-wrap-break-word-within-a-table */
    position: relative;
    z-index: 0; /* Creates a new context */
    width: 100%;
    height: 176px; /* Matches content height once columns kick in */
    background-position: 50% 50%;
    background-size: cover;
}

.card__image:after {
    content: "";
    display: block;
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.4s;
}

.card__heading {
    display: table-cell;
    width: 100%;
    position: relative;
    z-index: 2;
    padding-right: 8px;
    padding-left: 8px;
    vertical-align: middle;
    font-family: "montserrat", sans-serif;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    word-wrap: break-word;
    color: rgb(255, 255, 255);
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.card__content {
    padding: 16px 8px;
}

.card:hover .card__image:after {
    background-color: rgba(0, 0, 0, 0.4);
}

@media screen and (min-width: 332px) {
    .card__heading {
        padding-right: 16px;
        padding-left: 16px;
        font-size: 18px;
        line-height: 28px;
    }

    .card__content {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media screen and (min-width: 640px) {
    .card__heading {
        font-size: 21px;
        line-height: 32px;
    }

    .card__summary {
        height: 144px; /* 6 lines */
        overflow: hidden;
    }
}




/*
Footer
*/

.footer {
    text-align: center;
    color: rgb(153, 153, 153);
}

.footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgb(153, 153, 153);
    border-color: rgba(153, 153, 153, 0.4);
}

.footer a:hover {
    border-color: rgb(153, 153, 153);
}

@media screen and (min-width: 640px) {
    .footer__item {
        display: inline;
    }

    .footer__item:after {
        content: " � ";
    }

    .footer__item:last-child:after {
        content: "";
    }
}




/*
Grid
*/

.grid {
    overflow: hidden;
}

.grid__items {
    margin-bottom: -32px;
}

.grid__item {
    margin-bottom: 32px;
}

@media screen and (min-width: 640px) {
    .grid__items {
        margin-right: -16px;
        margin-bottom: -48px;
        margin-left: -16px;
    }

    .grid__item {
        width: 50%;
        margin-bottom: 48px;
        padding-right: 16px;
        padding-left: 16px;
        float: left;
    }

    .grid__item:nth-child(2n+1) {
        clear: left;
    }
}

@media screen and (min-width: 960px) {
    .grid__item {
        width: 33.33333333%;
    }

    .grid__item:nth-child(2n+1) {
        clear: none;
    }

    .grid__item:nth-child(3n+1) {
        clear: left;
    }
}




/*
Header
*/

.header {
    height: 48px;
    position: relative;
    z-index: 1;
    background-color: rgb(153, 204, 0);
}

.header__logo {
    display: block;
    width: 56px;
    height: 56px;
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -28px;
    line-height: 56px;
    background-color: rgb(159, 213, 0);
    border-radius: 50%;
    font-family: "montserrat", sans-serif;
    font-weight: 700;
    font-size: 24px;
    text-align: center;
    text-decoration: none;
    color: rgb(255, 255, 255);
    transition: background-color 0.4s;
}

.header__logo:hover {
    background-color: rgb(166, 221, 0);
}

.header__social-profiles {
    position: absolute;
    top: 8px;
    right: 8px;
}

@media screen and (min-width: 332px) {
    .header__social-profiles {
        top: 0;
        right: 0;
    }
}

@media screen and (min-width: 640px) {
    .header {
        height: 72px;
    }

    .header__logo {
        width: 80px;
        height: 80px;
        margin-left: -40px;
        line-height: 80px;
        font-size: 36px;
    }
}




/*
Hero
*/

.hero__content {
    text-align: center;
}

.hero__heading,
.hero__sub-heading {
    font-family: "montserrat", sans-serif;
    text-transform: uppercase;
}

.hero__heading {
    font-size: 21px;
    line-height: 28px;
    color: rgb(255, 255, 255);
}

.hero__sub-heading {
    line-height: 20px;
    color: rgb(204, 204, 204);
    color: rgba(255, 255, 255, 0.8);
}

.hero--image {
    position: relative;
    z-index: 0; /* Creates a new context */
    background-position: 50% 50%;
    background-size: cover;
}

.hero--image:after {
    content: "";
    display: block;
    position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.2);
}

.hero--image .hero__inner {
    display: table;
    table-layout: fixed; /* For proper word wrapping - http://stackoverflow.com/questions/5889508/using-word-wrap-break-word-within-a-table */
    width: 100%;
    height: 240px;
    position: relative;
    z-index: 2;
}

.hero--image .hero__content {
    display: table-cell;
    width: 100%;
    vertical-align: middle;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 332px) {
    .hero__heading {
        font-size: 24px;
        line-height: 32px;
    }
}

@media screen and (min-width: 480px) {
    .hero__heading {
        font-size: 36px;
        line-height: 48px;
    }

    .hero__sub-heading {
        font-size: 18px;
        line-height: 24px;
    }

    .hero--image .hero__inner {
        height: 320px;
    }
}

@media screen and (min-width: 640px) {
    .hero__heading {
        font-size: 48px;
        line-height: 64px;
    }

    .hero__sub-heading {
        font-size: 21px;
        line-height: 28px;
    }

    .hero--image .hero__inner {
        height: 400px;
    }
}




/*
Pagination
*/

.pagination {
    margin-top: 32px;
}

.pagination__item {
    width: 50%;
}

.pagination__item--prev {
    float: left;
}

.pagination__item--next {
    float: right;
    text-align: right;
}

.pagination__link {
    font-family: "montserrat", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: rgb(85, 85, 85);
    transition: color 0.4s;
}

.pagination__link:hover {
    color: inherit;
}

@media screen and (min-width: 640px) {
    .pagination {
        margin-top: 48px;
    }
}




/*
Section
*/

.section__heading {
    margin-bottom: 32px;
    font-family: "montserrat", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.section__content {
    max-width: 1040px; /* 976 + (2 * 32) */
    margin-right: auto;
    margin-left: auto;
    padding: 32px 8px;
}

.section__content > :first-child {
    margin-top: 0;
}

.section__content > :last-child {
    margin-bottom: 0;
}

.section--light {
    background-color: rgb(255, 255, 255);
}

.section--mid {
    background-color: rgb(238, 238, 238);
}

.section--dark {
    background-color: rgb(85, 85, 85);
}

.section--blue {
    background-color: rgb(51, 153, 204);
}

.section--narrow .section__content {
    max-width: 704px; /* 640 + (2 * 32) */
}

@media screen and (min-width: 332px) {
    .section__heading {
        font-size: 18px;
        line-height: 28px;
    }

    .section__content {
        padding-right: 16px;
        padding-left: 16px;
    }
}

@media screen and (min-width: 640px) {
    .section__heading {
        margin-bottom: 48px;
        font-size: 21px;
        line-height: 32px;
    }

    .section__content {
        padding-top: 48px;
        padding-bottom: 48px;
        padding-right: 32px;
        padding-left: 32px;
    }
}




/* ShareThis */

.sharethis-inline-share-buttons {
    height: 32px; /* To avoid FOUC */
    margin-top: 32px;
    margin-bottom: 32px;
}




/* Social profiles */

.social-profiles__item {
    float: left;
}

.social-profiles__link {
    display: block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    font-size: 18px;
    color: #ffffff;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.4s;
}

.social-profiles__link:hover {
    color: rgba(255, 255, 255, 1);
}

.social-profiles__link-label {
    display: none;
}

@media screen and (min-width: 332px) {
    .social-profiles__link {
        width: 48px;
        height: 48px;
        line-height: 48px;
        font-size: 21px;
    }
}

@media screen and (min-width: 640px) {
    .social-profiles__link {
        width: 72px;
        height: 72px;
        line-height: 72px;
        font-size: 28px;
    }
}




/*
Typeset

@TODO TO BE REVIEWED
*/

.typeset h1,
.typeset h2,
.typeset h3,
.typeset h4,
.typeset h5,
.typeset h6,
.typeset p,
.typeset ul,
.typeset ol,
.typeset table {
    margin-top: 24px;
    margin-bottom: 24px;
}

.typeset :first-child {
    margin-top: 0;
}

.typeset :last-child {
    margin-bottom: 0;
}

.typeset strong {
    font-weight: 700;
}

.typeset em {
    font-style: italic;
}

.typeset .summary {
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
}

.typeset h1,
.typeset h2,
.typeset h3,
.typeset h4,
.typeset h5,
.typeset h6 {
    font-family: "montserrat", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

.typeset h2 {
    margin-top: 48px;
    font-size: 18px;
    line-height: 28px;
}

.typeset h3 {
    color: #555555;
}

.typeset h4 {
    color: #888888;
}

.typeset a {
    color: rgb(0, 108, 216);
    text-decoration: none;
    border-bottom: 1px solid rgb(0, 108, 216);
    border-color: rgba(0, 108, 216, 0.4);
    transition: border-color 0.4s;
}

.typeset a:hover {
    border-color: rgb(0, 108, 216);
}

.typeset img {
    width: 100%;
    height: auto;
    vertical-align: top;
}

.typeset .caption {
    margin-top: -12px;
    color: rgb(153, 153, 153);
    font-style: italic;
}

.typeset .caption a {
    color: rgb(153, 153, 153);
    border-color: rgb(153, 153, 153);
    border-color: rgba(153, 153, 153, 0.4);
}

.typeset .caption a:hover {
    border-color: rgb(153, 153, 153);
}

.typeset ul,
.typeset ol {
    padding-left: 24px;
}

.typeset ul li,
.typeset ol li {
    padding-left: 12px;
}

.typeset ul li {
    list-style-type: disc;
}

.typeset ol li {
    list-style-type: decimal;
}

.typeset table {
    width: 100%;
    border: 1px solid #222222;
}

.typeset table th,
.typeset table td {
    padding: 5px;
    border: 1px solid #222222;
}

.typeset table th {
    text-align: left;
    background-color: rgb(153, 204, 0);
    color: #ffffff;
}

.typeset table tr:nth-child(even) {
    background-color: rgb(238, 238, 238);
}

@media screen and (min-width: 332px) {
    .typeset table th,
    .typeset table td {
        padding: 10px;
    }
}

@media screen and (min-width: 640px) {
    .typeset ul,
    .typeset ol {
        padding-left: 36px;
    }
}
