.tm-purple-bg .tm-section-title { color: white; }
.tm-gray-bg { background-color: #F4F4F4; }
.tm-blue-text { color: #3C89D6; }
.tm-red-text { color: #D66363; }
.tm-box-pad { padding: 45px 40px; }
.tm-bordered-box { border: 1px solid #993366; }
.tm-no-border-top { border-top: none; }
.tm-flex { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
/*http://stackoverflow.com/questions/20626685/better-way-to-set-distance-between-flexbox-items*/
.tm-gallery {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-flex-wrap: wrap;
	    -ms-flex-wrap: wrap;
	        flex-wrap: wrap;
	margin: 0 -15px -30px;
}

.tm-gallery a {
	cursor: -webkit-zoom-in;
	cursor: zoom-in;
}
/* Firefox hack 
   https://css-tricks.com/snippets/css/css-hacks-targeting-firefox/
*/
@-moz-document url-prefix() { 
  	.grid figure {
		margin: 10px 1.1666%;	/* padding-bottom in % not working in FF, so use em instead. */
	}
}

.contact-form {	overflow: hidden; }

.form-control {
	border-radius: 0;
	font-size: 1em;	
}
.form-control:focus {
	border-color: #993366;
    box-shadow: inset 0 1px 1px rgba(153, 51, 102, .075),0 0 8px rgba(153, 51, 102, 0.45);
}
.form-group { margin-bottom: 20px; }
/*---------------*/
/*http://tympanus.net/codrops/2014/06/19/ideas-for-subtle-hover-effects/*/
/***** Bubba *****/
/*---------------*/
.grid {
	position: relative;
	margin: -1.5rem auto;
	list-style: none;
	text-align: center;	
}

/* Common style */
.grid figure {
	position: relative;
	float: left;
	overflow: hidden;
	width: 49%;
	margin: 0 2px 2px 0;
	/* background: #0B173B; */
	text-align: center;
	cursor: pointer;
}

.grid figure img {
	position: relative;
	display: block;
	max-width: 100%;
}

.grid figure figcaption {
	padding: 1.5em;
	color: #fff;
	text-transform: uppercase;
	font-size: 1.25em;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

.grid figure figcaption::before,
.grid figure figcaption::after {
	pointer-events: none;
}

.grid figure figcaption,
.grid figure figcaption > a {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Anchor will cover the whole item by default */
/* For some effects it will show as a button */
.grid figure figcaption > a {
	z-index: 1000;
	text-indent: 200%;
	white-space: nowrap;
	font-size: 0;
	opacity: 0;
}

.grid figure h2 {
	word-spacing: -0.15em;
	font-weight: 300;
}

.grid figure h2 span { font-weight: 800; }

.grid figure h2,
.grid figure p {
	margin: 0;
}

.grid figure p {
	font-size: 90%;
	font-weight: bolder;
	color: #333;
	text-indent: 0;
}

figure.effect-bubba::after { background: #9e5406; }
figure.effect-bubba img {opacity:1;-webkit-transition: all 0.7s;transition: all 0.7s;}
figure.effect-bubba:hover img {	opacity: 0.2;transform: scale(1.1);  }
figure.effect-bubba figcaption::before,
figure.effect-bubba figcaption::after {
	position: absolute;
	top: 6%;
	right: 4%;
	bottom: 6%;
	left: 4%;
	content: '';
	opacity: 0;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
}

figure.effect-bubba figcaption::before {
	border-top: 1px solid #666;
	border-bottom: 1px solid #666;
	-webkit-transform: scale(0,1);
	transform: scale(0,1);
}

figure.effect-bubba figcaption::after {
	border-right: 1px solid #666;
	border-left: 1px solid #666;
	-webkit-transform: scale(1,0);
	transform: scale(1,0);
}

figure.effect-bubba h2 {
	padding-top: 30%;
	-webkit-transition: -webkit-transform 0.35s;
	transition: transform 0.35s;
	-webkit-transform: translate3d(0,-20px,0);
	transform: translate3d(0,-20px,0);
}

figure.effect-bubba p {
	opacity: 0;
	margin-top: 55%;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
	-webkit-transform: translate3d(0,20px,0);
	transform: translate3d(0,20px,0);
}

figure.effect-bubba:hover figcaption::before,
figure.effect-bubba:hover figcaption::after {
	opacity: 1;
	-webkit-transform: scale(1);
	transform: scale(1);
}

figure.effect-bubba:hover h2,
figure.effect-bubba:hover p {
	opacity: 1;
	-webkit-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
}

#gallery, .grid { overflow: hidden; }
.grid { margin: -15px; }

@media (min-width: 524px) {
	.grid figure {
		width: 48%;
		margin: 1%;
	}

	/* Firefox hack 
   		https://css-tricks.com/snippets/css/css-hacks-targeting-firefox/
	*/
	@-moz-document url-prefix() { 
	  	.grid figure {
			margin: 8px 1%;	/* padding-bottom in % not working in FF, so use em instead. */
		}
	}
}

@media (max-width: 562px) and (min-width: 524px), (max-width: 870px) and (min-width: 800px) {
	figure.effect-bubba h2 { padding-top: 5%; }
}

@media (min-width: 800px) {
	.tm-welcome-boxes-container {
		flex-direction: row;
		-webkit-box-align: stretch;
		-webkit-align-items: stretch;
	    	-ms-flex-align: stretch;
	        	align-items: stretch;
		position: absolute;
	    bottom: -63px;
	    left: 0;
	    right: 0;
	}

	.tm-welcome-box { 
		max-width: 400px;
		width: 49%;
	}

	.tm-section-title { margin-bottom: 30px; }

	.tm-welcome-text { 
		background-color: rgba(255,255,255,0.8);
		padding: 40px;
	}

	.tm-content-box-home { margin-bottom: 126px; }

	.tm-flex {
		-webkit-flex-flow: row;
		    -ms-flex-flow: row;
		        flex-flow: row;
	}

	.tm-box-pad { padding: 45px 40px; }
	.tm-services-img { width: 300px; }	
	.tm-services { overflow: auto; }
	.tm-services-img-container { float: left; }
	.tm-services-description-container { margin-left: 300px; }

	.grid figure {
		width: 31.5%;
		height: auto;
		margin: 1.1666%;
	}

	/* Firefox hack 
   	https://css-tricks.com/snippets/css/css-hacks-targeting-firefox/
	*/
	@-moz-document url-prefix() { 
	  	.grid figure {
			margin: 10px 1.1666%;	/* padding-bottom in % not working in FF, so use em instead. */
		}
	}
}

@media (min-width: 992px) {
	.container-fluid { max-width: 992px; }
	.tm-sidebar {
		float: left;
		width: 280px;
		height: 511px;
	}

	.tm-sidebar.sticky {
		position: fixed;
		top: 20px;
	}

	.tm-main-content { margin-left: 290px; }
	.tm-welcome-box { max-width: 340px; }
	.tm-welcome-text { 
		height: 245px;
		padding: 30px 20px; 
	}

	.tm-box-pad { padding: 30px; }
	.tm-welcome-boxes-container { width: 688px; } /* Need to hard code width for IE */

	.grid figure {
		width: 23%;
		height: auto;
		margin: 6px;
	}

	.grid figure figcaption { padding: 2em;	}
}

@media (min-width: 1200px) {
	.container-fluid { max-width: 1200px; }
	.tm-sidebar {		
		height: 533px;
		width: 350px;
	}

	.tm-nav-item-link { padding: 30px 60px; }
	.tm-main-content { margin-left: 370px; }
	.tm-welcome-box { max-width: 390px; }
	.tm-welcome-text { padding: 30px; }
	.tm-section-title { margin-bottom: 20px; }
	.tm-box-pad { padding: 45px; }
	.tm-welcome-boxes-container { width: 780px; } /* Need to hard code width for IE */

	.grid figure {
		width: 23.2%;
		height: auto;
		margin: 6px;
	}

	.grid { margin: -10px; }
	.grid figure figcaption { padding: 1.5em; }
	figure.effect-bubba h2 { padding-top: 5%; }
}

@media (min-width: 1400px) {
	.container-fluid { max-width: 1400px; }
	.tm-sidebar {		
		height: 600px;
		width: 450px;
	}

	.tm-main-content { margin-left: 470px; }	
	.tm-welcome-box { max-width: 400px; }
	.tm-section-title { margin-bottom: 30px; }
	.tm-welcome-text { padding: 40px; }
	.tm-welcome-boxes-container { width: 820px; } /* Need to hard code width for IE */

	.grid figure {
		width: 31.5%;
		height: auto;
		/* margin: 15px; */
	}

	.grid {margin: -15px;}

	figure.effect-bubba h2 { padding-top: 5%; }
	.grid figure figcaption { padding: 2em;	}
}

.tm-main-nav { 
	display: -webkit-box; 
	display: -webkit-flex; 
	display: -ms-flexbox; 
	display: flex;
	height: 100%; 
}

@media screen and (max-width: 564px) {
	.tm-banner-title { font-size: 2.8em; }
}
