a:focus {color: #666;outline: none;}
p:last-child { margin-bottom: 0; }
.tm-welcome-img { width: 100%; }
.tm-welcome-boxes-container {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	flex-direction: column;	align-items: center;	
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
     -ms-flex-pack: justify;
     justify-content: space-between;    
    position: static;margin-left: auto;margin-right: auto;max-width: 820px;
}
.tm-purple-bg { 	background-color: #993366; 	color: white;}
.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;}
.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: 0;	/* padding-bottom in % not working in FF, so use em instead. */	}
}
.tm-content-box-home { 	position: relative; margin-bottom: 63px;}
.tm-content-box {/* margin-top: 60px; */}
.tm-content-box:first-child { margin-top: 0; }
.tm-welcome-text { padding: 20px; }
.tm-welcome-boxes-container { width: 100%; }
.tm-flex {	-webkit-flex-flow: column;	-ms-flex-flow: column;	flex-flow: column;}
.tm-flex > div { flex: 1 1 auto; }
.tm-box-pad { padding: 35px 20px; }
.tm-services-img { margin: 0 auto; }
/*---------------*/
/*http://tympanus.net/codrops/2014/06/19/ideas-for-subtle-hover-effects/*/
/***** Bubba *****/
/*---------------*/
.grid {position: relative;	list-style: none;	text-align: center;}
/* Common style */
.grid figure {position: relative;float: left;overflow: hidden;width: 100%;background: #3085a3;text-align: center; cursor: pointer;}
.grid figure img {position: relative;display: block;max-width: 100%;opacity: 0.8;}
.grid figure figcaption {
	padding: .6em;
	color: #fff;
	/* text-transform: uppercase; */
	font-size: 1.25em;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.grid figure {   width: 50%;   height: auto;}
.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.1em; */}
.grid figure h2 span {font-weight: 600;font-size:20px;line-height: 26px;}
.grid figure h2,.grid figure p { margin: 0;}
.grid figure p { font-size: 100%;}
figure.effect-bubba { background: #f2aa00;}
figure.effect-bubba:hover { background: #805800; opacity:1}
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: 10px;
	right: 10px;
	bottom: 10px;
	left: 10px;
	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 #fff;	border-bottom: 1px solid #fff;
	-webkit-transform: scale(0,1);	transform: scale(0,1);
}
figure.effect-bubba figcaption::after {
	border-right: 1px solid #fff;	border-left: 1px solid #fff;
	-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 h3 {
	padding-top: 40%;
	font-size: 16px;
	line-height: 16px;
	-webkit-transition: -webkit-transform 0.35s;
	transition: transform 0.35s;
	-webkit-transform: translate3d(0,-20px,0);
	transform: translate3d(0,0,0);
	text-shadow: 1px 1px 1px #1a1200;
}
figure.effect-bubba p {
	padding: 5px;
	opacity: 0;
	font-size: 15px;
	line-height:  18px;
	-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);
	text-shadow: 1px 1px 1px #1a1200;
}
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 h3{
	opacity: 1;
	-webkit-transform: translate3d(0,-45%,0);
	transform: translate3d(0,-45%,0);
}
figure.effect-bubba:hover p {
	opacity: 1;
	-webkit-transform: translate3d(0,-45%,0);
	transform: translate3d(0,-100%,0);
}
#gallery, .grid {overflow: hidden;background: #f2aa00;}

@media (min-width: 524px) {
	.grid figure {	width: 49%;	}
	/* Firefox hack 
   		https://css-tricks.com/snippets/css/css-hacks-targeting-firefox/
	*/
	@-moz-document url-prefix() { 
	  	.grid figure {
			margin: 0;	/* 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: 25%; }
}

@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-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: 33.333%;	height: auto;	}
	@-moz-document url-prefix() { 
	  	.grid figure {
			margin: 0;	/* padding-bottom in % not working in FF, so use em instead. */
		}
	}
}

@media (min-width: 992px) {
	.container-fluid { max-width: 992px; }
	.tm-main-content { margin-left: 290px; }
	.tm-box-pad { padding: 30px; }
	.tm-welcome-boxes-container { width: 688px; } /* Need to hard code width for IE */
	.grid figure {	width: 33.333%;	height: auto;	}
	.grid figure figcaption {padding: 10%;}
	.grid figure h2 span { font-weight: 800; font-size:24px;}
	figure.effect-bubba h3 {padding-top: 48%;	font-size: 22px;line-height: 26px;}
	figure.effect-bubba p {	font-size: 16px;line-height:  20px;}
}
@media (min-width: 1200px) {
	.container-fluid { max-width: 1200px; }
	.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: 33.333%;height: auto;}
	.grid figure figcaption { padding: 1.5em; }
	figure.effect-bubba h2 {padding-top: 30%;}
	.grid figure h2 span { font-weight: 800; font-size:26px;}
	figure.effect-bubba h3 {padding-top: 48%;font-size: 23px;font-weight: bold;line-height: 27px;}
	figure.effect-bubba p {	font-size: 19px;line-height: 22px;}
}
@media (min-width: 1400px) {
	.container-fluid { max-width: 1400px; }
	.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: 33.333%;	height: auto;	}
	figure.effect-bubba h2 {padding-top: 25%;}
	.grid figure figcaption {padding: 5%;}
	.grid figure h2 span { font-weight: 800; font-size:28px;}
	figure.effect-bubba h3 {padding-top: 48%;	font-size: 24px;line-height: 28px;}
	figure.effect-bubba p {	font-size: 20px;line-height: 24px;}
}
@media screen and (max-width: 414px ) {
figure.effect-bubba h3 {
    padding-top: 37%;
    font-size: 17px;
    line-height: 15px;
    -webkit-transition: -webkit-transform 0.35s;
    transition: transform 0.35s;
    -webkit-transform: translate3d(0,-20px,0);
    transform: translate3d(0,0,0);
    text-shadow: 1px 1px 1px #1a1200;
}
}