/*--
	Theme Name: kidslink
	Theme URI: http://foobar.net.nz
	Description: A theme for Wordpress 3.8.x, 4.x
	Author: Nick Breen @ Foo//bar
	Author URI: http://foobar.net.nz
	Template: CherryFramework
	Version: 1.4
	MotoPress Version: 1.0
--*/


/* Fixes for Cherry Theme */

body {
    background-image: none !important;
}

p {
	margin: 0;
	padding: 0 0 1.5em;
}

/* Undo the ridiculous hyphenation settings of bootstrap in Cherry */
.title-header,
.breadcrumb__t,
.post-title,
.post_content,
.label {
	word-wrap: initial !important;
	-webkit-hyphens: initial !important;
    -moz-hyphens: initial !important;
    -ms-hyphens: initial !important;
    -o-hyphens: initial !important;
	hyphens: initial !important;
}

#sidebar .widget-title h3,
.post__holder .post-header h3.post-title {
    margin-bottom: 0;
}

#sidebar .widget-title,
.post__holder .post-header {
    margin: 2em auto 1em;
}

footer.footer .logo {
    display: none;
}

/* Fixes for base theme */
/* Rather than peppering !important, just make the selectors more specific by adding body */

body .title-section {
	position: initial;
	width: initial;
	top: initial;
}

body .title-header {
	overflow: hidden;
}

body .content-holder {
	margin-top: initial;
}

body .post__holder .post_content p {
    margin: 0;
}

/* Fixes for GeoDirectory */

#geodir-wrapper {
    overflow: hidden; /* clearfix */
}

/* Fixes for GeoDirectory - Cherry conflicts */

h3.widget-title:before {
    content: none;
    display: none;
}

/* Modifications for Cherry archive page layout */

/* 770, 620, 476 */
#content .post_columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-right: -10px;
}

#content .post_columns .post_wrapper {
	width: 100%;
    flex: 1 1 main-size; /* Use auto to have the odd last item expand to full width */
    margin-right: 10px;
    margin-bottom: initial;
}

#content header.post-header {
    margin-top: 2em;
    margin-bottom: 1em;
}

/* 61.5em * 16px = 984px */
@media (min-width: 61.25em) {
    #content .post_columns .post_wrapper {
        width: 305px; /* half of 630px */
    }
}

/* 75em * 16px = 1200px */
@media (min-width: 75em) {
    #content .post_columns .post_wrapper {
        width: 380px; /* half of 780px */
    }
}

/* archive tiles */

#content .post_content .taxonomies {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-right: -10px;
    font-size: 0.75em;
}

#content .post_content .taxonomies .taxonomy {
    flex: auto 1 1;
    margin-right: 10px;
    min-width: min-content;
}

#content .post_wrapper figure {
	margin-bottom: 1.5em;
}

#content .post_content .excerpt {
	margin-bottom: initial;
}


/* Kidslink stuff */

.featured-thumbnail.large img {
    max-width: 100%;
    width: auto !important;
}

.facets {
	margin-top: 9px;
}

.facets .facet-container label {
	display: initial;
}

.facets .facet-taxonomy {
	display: none;
}

nav.banner.nav ul {
	display: flex;
	flex-wrap: wrap;
    justify-content: flex-end;
}

nav.banner.nav ul li {
	list-style: none;
	margin: 0 1em;
	min-width: min-content;
	white-space: nowrap;
}

body,
li {
	font-size: 1em;
	line-height: 1.5em;
}

header,
#sidebar {
	font-size: 0.875em;
}

@media (max-width: 48em) {
    .header .search-form {
       float: none !important;
       margin: 0.5em auto 0 !important;
    }
}

.header .search-form {
	display: table;
}

.header .search-form form {
	display: table-row;
}

.header .search-form_it,
.header .search-form_is {
	display: table-cell;
	font-size: initial !important;
}

.header .search-form_is {
	width: 1em;
	text-align: center;
}

/* slider menu */

.slider .menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: stretch;
    margin: 0;
}

.slider .menu li {
    /*flex: 1 1 auto;*/
    width: 100%;
    box-sizing: border-box;
	font-size: 1em;
    padding: 0 0.6em;
    margin: 0.5em 0;
    text-align: center;
}

.slider .menu li a {
    display: block;
}

/* 48em * 16px = 768px */
@media (max-width: 48em) {
    .slider .menu li {
       font-size: 1.6em;
       line-height: 2em;
    }
}

/* 48em * 16px = 768px */
@media (min-width: 48em) {
    .slider .menu {
        height: 281px;
        flex-direction: column;
    }
    .slider .menu li {
        font-size: 1.25em;
        line-height: 2.1545em;
        margin: 0 0 0.5em;
    }
    .slider .menu li:last-of-type {
        margin-bottom: 0;
    }

    #sidebar {
        border-left: 1px solid #ccc;
        padding-left: 15px;
        box-sizing: content-box;
    }
    #sidebar {
        /*width: 244px; /* 228 + 16 */
        margin-left: 4px; /* was 20px less padding and border */
    }
}

/* 61.25em * 16px = 980px */
@media (min-width: 61.25em) {
    .slider .menu {
        height: 363px;
    }
    .slider .menu li {
        font-size: 1.5em;
        line-height: 2.5em;
    }

    #sidebar {
        /* Same as 48em */
    }

}

/* 75em * 16px = 1200px */
@media (min-width: 75em) {
    .slider .menu {
        height: 448px;
    }
    .slider .menu li {
        font-size: 2em;
        line-height: 2.4em;
    }

    #sidebar {
        margin-left: 14px; /* was 30px less padding and border */
    }

}

.slider .menu li a {
    color: white;
}

.custom-box.extra {
	background-color: #A6AEB5 !important;
}

.slider .menu li {
    background-color: #A6AEB5;
}

body.header-color-BLUE section.title-section,
body.header-color-BLUE h2.related-header,
body.header-color-root-learning section.title-section,
body.header-color-root-learning h2.related-header,
#sidebar .widget:nth-of-type(5n+1) .widget-title:before,
.slider .menu li:nth-of-type(5n+1) {
    background-color: #0094b9;
}

body.header-color-GREEN section.title-section,
body.header-color-GREEN h2.related-header,
body.header-color-root-behaviour section.title-section,
body.header-color-root-behaviour h2.related-header,
#sidebar .widget:nth-of-type(5n+2) .widget-title:before,
.slider .menu li:nth-of-type(5n+2) {
    background-color: #73BF43;
}

body section.title-section,
body h2.related-header,
body.header-color-GREY section.title-section,
body.header-color-GREY h2.related-header,
body.header-color-root-physical-needs section.title-section,
body.header-color-root-physical-needs h2.related-header,
#sidebar .widget:nth-of-type(5n+3) .widget-title:before,
.slider .menu li:nth-of-type(5n+3) {
    background-color: #A6AEB5;
}

body.header-color-ORANGE section.title-section,
body.header-color-ORANGE h2.related-header,
body.header-color-root-extracurricular section.title-section,
body.header-color-root-extracurricular h2.related-header,
#sidebar .widget:nth-of-type(5n+4) .widget-title:before,
.slider .menu li:nth-of-type(5n+4) {
    background-color: #F69250;
}

body.header-color-PINK section.title-section,
body.header-color-PINK h2.related-header,
body.header-color-root-childcare section.title-section,
body.header-color-root-childcare h2.related-header,
#sidebar .widget:nth-of-type(5n+5) .widget-title:before,
.slider .menu li:nth-of-type(5n+5) {
    background-color: #EF5E97;
}

h1.title-header {
	text-transform: none;
	font-weight: bold;
}

h1.title-header small {
	color: #eee;
}

h1.title-header small:before {
	content: "\a0&\a0";
	text-transform: none;
	font-size: smaller;
}

h1.title-header small:first-of-type:before {
	content: "\a0in\a0";
}

.related-header {
	margin-left: -50px;
	padding: 1em 0 0.5em 0;
	background-color: #f3f3f3;
	color: white;
	text-align: center;
	font-weight: bold;
}
.related-header:after {
    content: "";
    display: block;
    height: 2px;
    background-color: #FFF;
    width: 60%;
    margin: 15px auto 12px;
}

.widget.map iframe {
	max-height: 350px;
}

.tagDescription {
	position: relative;
	border: solid #D3D3D3;
	border-width: 0 0 0.125em 0;
	margin-bottom: 0;
	overflow: hidden;
}

.tagDescription.some {
	max-height: 8em;
}

.tagDescription.all {
	height: auto;
}

.grabby {
	text-align: center;
	background: #D3D3D3;
	width: 12em; /* IE doesn't support min-content! */
	width: min-content;
	white-space: nowrap;
	cursor: pointer;
	margin: 0 auto 0.75em;
	/*font-variant: small-caps;*/
	text-transform: uppercase;
	padding: 0.3em 0.75em 0.45em;
	color: #333;
}

.tagDescription.some + .grabby:before {
	content: "\21e9 read more";
}

.tagDescription.all + .grabby:before {
	content: "\21e7 read less";
}

.widget.supporter {
	text-align: center;

}

.ssba {
	font-family: inherit !important;
}

a[rel=external]:after {
	content: "\a0\f08e";
	font-family: FontAwesome;
}

@media (max-width: 30em) {
    p img {
        float: none !important;
        margin: 1em auto !important;
        display: block;
    }
}
