/*
Theme Name: Discover Worthing (Divi)
Template: Divi
Author: Swiss Toni
Template Version: 1.0
Text Domain: discoverworthing
*/

@import url(../Divi/style.css);



#main-content .container {
	padding-top:25px;
}

body.single #main-content section#section-parallax-header + .container,
body.page-template-page-wide-header #main-content section#section-parallax-header + .container {
	padding-top:0;
}

body { font-family:GloberRegular, sans-serif !important; }
h1, h2, h3, h4, h5, h6 { font-family:GloberBold, sans-serif !important; }

.entry-content h2:not(:first-child), #content-area h2:not(:first-child) {
	margin-top:4rem;
}

.post-type-archive-whats-on #main-content h2.subtitle {
	margin-top:6rem;
}

/* Homepage styles */

body.home div.dw-homepage-connected-objects { padding-top: 6px; }
body.home div#dw-top-slider .et_pb_slide { height:600px; }

/* Listing styles */

ul.listing-tags {
	display:-webkit-flex;
	display:flex;

	-webkit-flex-wrap:wrap;
	flex-wrap:wrap;

	margin:0 !important;
	padding:0 !important;
	list-style-type:none !important;
}

ul.listing-tags > li {
	-webkit-flex-basis:24%;
	flex-basis:24%;

	height: 260px;

	margin:20px calc(4% / 3) 0 0;
}

	ul.listing-tags-3col > li {
	-webkit-flex-basis:32%;
	flex-basis:32%;

	height: 340px;

	margin:20px calc(4% / 3) 0 0;
}

ul.listing-tags:not(.listing-tags-3col) > li:nth-child(4n){
	margin-right:0;
}

	ul.listing-tags-3col > li:nth-child(3n){
		margin-right:0;
	}

ul.listing-tags > li > a > div {
	padding:10px;

	background-color:rgba(255,255,255,0.8);
}

ul.listing-tags > li > a > div > h2{
	padding-bottom:0;
	margin-bottom:0;

	font-size: 20px;
    font-weight: bold;
    color: #000;
}

ul.listing-tags > li > a > div > p{
	display:none;

	margin-top:5px;

	font-size:12px;
	font-style:italic;
	line-height:1.4;

	text-align:center;
}

ul.listing-tags > li > a {
	display:-webkit-flex;
	display:flex;

	-webkit-align-items: flex-end;
	align-items: flex-end;

	width: 100%;
	height: 100%;

	background-size:cover;
	background-repeat:no-repeat;
	background-color:#ccc;
}

ul.listing-tags > li > a.hover{
	-webkit-align-items: center;
	align-items: center;
    -webkit-justify-content: center;
    justify-content: center;

	color:#000;
}

ul.listing-tags > li > a.hover > div {
	display:-webkit-flex;
    display: flex;

	-webkit-flex-direction:column;
	flex-direction:column;

	-webkit-align-items: center;
	align-items: center;
    -webkit-justify-content: center;
    justify-content: center;


	width:100%;
	height:100%;

	padding:20px;

	background-color:rgba(255,255,255,0.8);
}

ul.listing-tags > li > a.hover > div > h2{
	background:none;
}

ul.listing-tags > li > a.hover > div > p{
	display:block;
}

/* Category filter */

div.category-filter{
	display:-webkit-flex;
	display:flex;

	width:97%;
}

div.category-filter > div {
	position:relative;
	flex-grow:1;

	-webkit-flex-basis:32%;
	flex-basis:32%;

	width:31%;

	margin: 0 calc(4% / 2) 0 0;
}

div.category-filter > div:last-child{
	margin-right:0;
}

div.category-filter > div > button {
	position: absolute;

	top:0;
	width:100%;
	padding-left:10px;

	border:1px solid #DDD;

	background-color:#f8f8f8;

	line-height:36px;
	font-family:'Droid Sans', sans-serif;
	font-size:12px;

	text-align:center;
}

/* Objects */

div.dw-post-objects {
	display:-webkit-flex;
	display:flex;
	-webkit-flex-wrap:wrap;
	flex-wrap:wrap;
}

div.dw-post-objects > a.dw-object {
	display:-webkit-flex;
	display:flex;
	-webkit-flex-direction:column;
	flex-direction:column;

	-webkit-flex-basis:32%;
	flex-basis:32%;
	width:31%;

	margin:20px calc(4% / 2) 0 0;

	font-size:12px;
	color:#000;
}



div.dw-post-objects > a.dw-object:nth-child(3n){
	margin-right:0;
}

div.dw-post-objects > a.dw-object > div.dw-object-img{
	order:1;
	overflow:hidden;

	width:100%;
	height:auto;
}

div.dw-post-objects > a.dw-object > div.dw-object-meta{
	order:2;

	padding:20px;
	min-height:80px;

	background-color:#eee;
}

div.dw-post-objects > a.dw-object > div.dw-object-meta > h2{
	margin-top:0;

	font-size:20px;
}

div.dw-post-objects > a.dw-object > div.dw-object-meta > p {
	line-height:1.7;
}

/* Stylised select boxes */

.selectric-wrapper ul { padding: 0 !important; }

/* Parallax header */

.overlay {
	position:absolute;
	display:block;
	top:0;
	background-color: rgba(0,0,0,0.6);
	z-index:10;
	width:100%;
	height:100%;
	text-shadow: 1px 0 10px #000;
}

section.intro {
	position:relative;
	height: 100%;
    width: 100%;
    background-position: center center;
    /*
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    */
    display: block;
    background-repeat: no-repeat;
}

.single section.intro h1,
.page-template-page-wide-header section.intro h1 {

}


section#section-parallax-header {
	display:block;
	height:100%;
	width:100%;
}


section#section-parallax-header.intro {
	height:400px;
}

section#section-parallax-header.intro > div.overlay{
	background:none;
}

section#section-parallax-header.intro div#headline {
	position:relative;
	width: 100%;
    margin: -100px auto 0;
    height: 200px;
    top: 50%;
    display: table;
    z-index: 11;
}

section#section-parallax-header.intro div#headline > div.child {
	text-align: center;
    display: table-cell;
	vertical-align:middle;
    padding: 0 50px;
}



div#dw-single-map {
	margin-top:25px;

	width:100%;
	height: 300px;
}

/* Single page layouts */

div.dw-row {
	display:-webkit-flex;
	-webkit-flex-wrap:wrap;
	display:flex;
	flex-wrap: wrap;

	margin-top:25px;
}

div.dw-row > div.dw-col-1-1{
	-webkit-flex:1;
	flex:1;

	line-height:1.7;
}

div.dw-row > div.dw-col-1-3{
	-webkit-flex-grow:1;
	flex-grow: 1;

	width:33%;
}

div.dw-contact-attribute {
	margin:5px 0;
}

h2.dw-col-header-pink,
h2.dw-col-header-blue,
h2.dw-col-header-green{
	font-size:18px;
	font-weight:bold;
	display:inline-block;
	padding-bottom:10px;
	margin-bottom:25px;
	border-bottom-style:solid;
	border-bottom-width:3px;
}

h2.dw-col-header-pink{
	border-color:#e93cac;
}
h2.dw-col-header-blue{
	border-color:#0091da;
}
h2.dw-col-header-green{
	border-color:#00c19f;
}

div.dw-attribute-icon img { width:64px; margin-right:10px; }


/* Whats On Dates */
body.whatson-date #date-navigation {
	margin-top: 2rem;
}
body.whatson-date #date-navigation .date-nav-link {
	display: inline-block;
	vertical-align: middle;
	width: 50%;
	font-size: 0;	/* Allows 50% inline-block containers to sit alongside one another */
}
body.whatson-date #date-navigation .date-nav-link.next {
	text-align: right;
	width: 46%;		/* Required because the post list container does not span 100% width */
}
body.whatson-date #date-navigation .date-nav-link.next a:hover  {
	color: #039BDF;
}
body.whatson-date #date-navigation .date-nav-link.previous a:hover  {
	color: #EC44B5;
}
body.whatson-date #date-navigation .date-nav-link.previous span {
	padding-left: 0.6rem;
}
body.whatson-date #date-navigation .date-nav-link.next span {
	padding-right: 0.6rem;
}

body.whatson-date #date-navigation .date-nav-link a, body.whatson-date .scroll-to-top > span {
	color: black;
	transition: color 0.3s;
	-o-transition: color 0.3s;
	-ms-transition: color 0.3s;
	-webkit-transition: color 0.3s;
	font-size: 1rem;
}
body.whatson-date #date-navigation img, body.whatson-date #date-navigation .month {
	display: inline-block;
	vertical-align: middle;
}
body.whatson-date .scroll-container {
	text-align: center;
	margin-top: 1rem;
}
body.whatson-date .scroll-to-top {
	cursor: pointer;
	display: inline-block;
	padding: 10px;
}
body.whatson-date .scroll-to-top img {
	display: block;
	margin: 0 auto;
}
body.whatson-date .scroll-to-top > span {
	color: black;
}
body.whatson-date .scroll-to-top:hover > span {
	color: #FFCD63;
}


/* Media Queries */

@media screen and (max-width:1349px){

	ul.listing-tags > li {
		height: 200px;
	}

	ul.listing-tags > li > a > div > h2{
		font-size:16px;
	}
}

@media screen and (max-width:980px){

	ul.listing-tags > li {
		-webkit-flex-basis:32%;
		flex-basis:32%;
		margin:20px calc(4% / 2) 0 0;
	}

	ul.listing-tags > li:nth-child(3n){
		margin-right:0;
	}


	div.dw-post-objects > a.dw-object{
		-webkit-flex-basis:48%;
		flex-basis:48%;
		width:48%;
		justify-content:space-between;
	}
	/*
	div.dw-post-objects > a.dw-object:nth-child(1n+1){
		margin-right:2%;
		margin-left:0;
	}
	div.dw-post-objects > a.dw-object:nth-child(2n){
		margin-left:2%;
		margin-right:0%;
	}
	*/
}

@media screen and (max-width:767px){

	ul.listing-tags > li {
		-webkit-flex-basis:48%;
		flex-basis:48%;

		height: 240px;
	}

	ul.listing-tags > li:nth-child(1n+1){
		margin-right:2%;
		margin-left:0;
	}
	ul.listing-tags > li:nth-child(2n){
		margin-left:2%;
		margin-right:0%;
	}

	div.dw-post-objects > a.dw-object > div.dw-object-img{
		height:240px;
	}

	div.dw-row > div.dw-col-1-1,
	div.dw-row > div.dw-col-1-3{
		-webkit-flex: initial;
		flex: initial;
		-webkit-flex-direction:column;
		flex-direction:column;

		width:100%;
	}
}

@media screen and (max-width:599px){
	section.intro h1 { font-size:36px; }
	section#section-parallax-header.intro { height:270px; }

	div.category-filter{
		-webkit-flex-direction:column;
		flex-direction:column;
	}

	div.category-filter > div {
		position:relative;

		-webkit-flex-basis:100%;
		flex-basis:100%;

		margin: 0 0 5px 0;
	}

	ul.listing-tags > li,
	div.dw-post-objects > a.dw-object{
		-webkit-flex-basis:100%;
		flex-basis:100%;
		width:100%;

		margin-left:0 !important;
		margin-right:0 !important;
	}

	div.category-filter > div > button{
		text-align:left;
	}


	div#dw-single-map {
		width:100%;
		height: 240px;
	}
}

/* Print-ready styles for Events Date page */
@media print {
	/* Event date only */

	body.whatson-date #page-container.et-animated-content {
		margin-top: 0 !important;		/* !important required to override javascript */
	}

	/*** Header ***/
	body.whatson-date .et_fixed_nav #main-header {
		position: relative;
	}
	body.whatson-date #section-parallax-header {
		height: auto;
	}
	body.whatson-date #section-parallax-header div.overlay {
		height: auto;
		position: relative;
	}
	body.whatson-date #section-parallax-header div.overlay #headline {
		margin: 0;
		height: auto;
		top: 0;
	}
	/*** End Header ***/

	/*** Event listing ***/
	body.whatson-date #date-navigation, body.whatson-date .dw-object-img {
		display: none;
	}
	body.whatson-date div.dw-post-objects {
		display: block;
		flex-wrap: nowrap;
		zoom: 1; /* For IE 6/7 (trigger hasLayout) */
		height: auto !important;		/* !important required to override javascript */
	}
	body.whatson-date div.dw-post-objects:before,
	body.whatson-date div.dw-post-objects:after {
	  content: "";
	  display: table;
	}
	body.whatson-date div.dw-post-objects:after {
	  clear: both;
	}
	body.whatson-date div.dw-post-objects > .dw-object {
		width: 100%;
		display: block;
		position: relative !important;	/* !important required to override javascript */
		left: auto !important;			/* !important required to override javascript */
		top: auto !important;			/* !important required to override javascript */
		flex-basis: initial;
		margin: 0;
	}
	body.whatson-date div.dw-post-objects > .dw-object > .dw-object-meta {
		line-height: 1rem;
		min-height: 0;
		padding: 0;
		margin-bottom: 0.5rem;
	}
	body.whatson-date .dw-object-meta h2, body.whatson-date .dw-object-meta p {
		display: inline;
	}
	body.whatson-date div.dw-post-objects > .dw-object .dw-object-meta > h2 {
		font-size: 0.75rem;
		font-family: sans-serif !important;		/* !important required to override theme style */
		font-weight: 600;
	}
	body.whatson-date div.dw-post-objects > .dw-object .dw-object-meta > p {
		font-size: 0.75rem;
	}
	body.whatson-date .dw-object-meta h2 + p:before {
		content: "(";
	}
	body.whatson-date .dw-object-meta h2 + p:after {
		content: ")";
	}
	/*** End Event listing ***/

	/* Remove social media icons */
	body.whatson-date .et-social-icons {
		display: none;
	}

	/* Remove 'back to top' button */
	body.whatson-date .et_pb_scroll_top.et-pb-icon.et-visible {
		display: none !important;
	}
}

#tfw-logo {
	display: none;
}

@media (min-width: 768px) {
	#tfw-logo {
		display: inline-block;
		float: none;
		max-height: 100%;
		margin-bottom: 0;
		vertical-align: middle;
		-webkit-transition: all 0.4s ease-in-out;
		-moz-transition: all 0.4s ease-in-out;
		transition: all 0.4s ease-in-out;
		-webkit-transform: translate3d(0, 0, 0);
	}
}
