figure { margin: 0; }

.cd-full-width{
	max-width: 1366px;
    width: 100%;
    margin: 0 auto;
}

.cd-full-width { padding-top: 0; }

.cd-full-width .container-fluid.tm-page-width { 
	max-width: none;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

/* Gallery */
/*.grid-item {
	float: left;
	width: 100%;
}*/

.grid-item:last-child { margin-bottom: 0; }

.tm-img-gallery {
	margin: 0 auto 40px;
	/*display: inline-block;*/
}

/*.effect-sadie>img{*/
	/*height: 315px;*/
/*}*/

@media (min-width: 480px) {
	.tm-img-gallery { margin: 0 auto; }
}

.tm-img {
	max-width: 320px;
  	width: 100%;
  	height: auto;
  	border: none;
  	margin: 0 auto;
}

figure.effect-sadie figcaption::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%);
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 75%);
	content: '';
	opacity: 0;
	-webkit-transform: translate3d(0,50%,0);
	transform: translate3d(0,50%,0);
}

figure.effect-sadie h2 {
	font-weight: 400;
	font-size: 3rem;
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	color: #484c61;
	-webkit-transition: -webkit-transform 0.35s, color 0.35s;
	transition: transform 0.35s, color 0.35s;
	-webkit-transform: translate3d(0,-50%,0);
	transform: translate3d(0,-50%,0);
}

figure.effect-sadie figcaption::before,
figure.effect-sadie p {
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
}

figure.effect-sadie p {
	position: absolute;
	bottom: 10px;
	left: 0;
	padding: 2em;
	width: 100%;
	opacity: 0;
	-webkit-transform: translate3d(0,10px,0);
	transform: translate3d(0,10px,0);
}

figure.effect-sadie:hover h2 {
	color: #fff;
	-webkit-transform: translate3d(0,-50%,0) translate3d(0,-40px,0);
	transform: translate3d(0,-50%,0) translate3d(0,-40px,0);
}

figure.effect-sadie:hover figcaption::before,
figure.effect-sadie:hover p {
	opacity: 1;
	-webkit-transform: translate3d(0,0,0);
	transform: translate3d(0,0,0);
}

.grid-item figure figcaption, .grid-item figure figcaption > a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.grid-item figure figcaption {
	display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1em;
    color: #fff;
    text-transform: uppercase;
    font-size: 1.25em;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.grid-item figure {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.grid-item figure img {
    position: relative;
    display: block;
    max-width: 100%;
    opacity: 0.8;
}

.grid-item figure figcaption > a {
    z-index: 1000;
    text-indent: 200%;
    white-space: nowrap;
    font-size: 0;
    opacity: 0;
}

.cd-full-width .container-fluid.tm-page-width {
	padding-left: 10px;
	padding-right: 10px;
}

/* Media Queries */

@media only screen and (max-width: 768px) {
	.grid-item{
		width: calc(33.33333% - 10px);
		padding: 5px;
	}
}

@media only screen and (min-width: 400px) {
	.grid-item figure figcaption { padding: 2em; }
}

@media only screen and (min-width: 480px) {
	.grid-item { width: calc(33.33333% - 10px); }
	.grid-item figure figcaption { padding: 1.5em; }	
}

@media only screen and (min-width: 992px) {

	.tm-social-icons-container { margin-bottom: 20px; }

	.cd-full-width .container-fluid {
		padding-left: 0;
		padding-right: 0;
	}

	.cd-full-width .container-fluid.tm-page-pad,
	.cd-full-width .container-fluid.tm-page-pad {
		padding-left: 10px;
		padding-right: 10px;
	}

	.cd-full-width .container-fluid.tm-page-width {
		max-width: 1200px;
	}

	.grid-item { 
		width: calc(33.3333% - 10px); 
		padding: 5px;
	}	
	.grid-item figure figcaption { padding: 1em; }	
}

@media only screen and (min-width: 1063px) {
	.cd-full-width .container-fluid.tm-page-width {
		padding-left: 30px;
		padding-right: 30px;
	}
	.tm-page-width {
		padding-left: 30px;
		padding-right: 30px;
	}
}

@media only screen and (min-width: 1170px) {	
	.grid-item figure figcaption { padding: 2em; }
}

@media only screen and (min-width: 1333px) {

	.cd-full-width .container-fluid {
		padding-left: 0;
		padding-right: 0;
	}
}

@media only screen and (min-width: 1340px) {
	.cd-full-width .container-fluid.tm-page-width { 
		padding-left: 0; 
		padding-right: 0;
	}	
}

/*
@media only screen and (max-width: 1024px) {
	.effect-sadie>img{
		height: 250px;
	}
}

@media only screen and (max-width: 768px) {
	.effect-sadie>img{
		height: 200px;
	}
}

@media only screen and (max-width: 414px) {
	.effect-sadie>img{
		height: 100px;
	}
}

@media only screen and (max-width: 375px) {
	.effect-sadie>img{
		height: 90px;
	}
}

@media only screen and (max-width: 320px) {
	.effect-sadie>img{
		height: 80px;
	}
}*/
