/*
 * @package MatrixAddons
 * @subpackage trainify
 * @since 1.0.0
 */

.team-block-item{
	float:left;
	display:block;
	padding:0 7.5px;
	margin:0 0 15px;

	.team-image-block{
		position:relative;

		.team-info-wrap{
			position: absolute;
		    bottom: 30px;
		    left: 0;
		    background-color:$primary_color;
		    padding: 15px;
		    color: #fff;
		    z-index: 9;

		    .team-name{
		    	margin: 0;
				color: #fff;
				font-weight: 400;
				margin-bottom: 2px;
		    }

		    .team-position {
			    border-radius: 2px;
			    display: inline-block;
			    float: left;
			    font-size: 12px;
			    font-weight: 400;
			    letter-spacing: 0;
			    margin: 0px 0px -60px 0px;
			    padding: 4px 9px;
			    text-transform: none;
			    background-color:$secondary_color;
			    color: #fff;
			}
		}
	}
	.team-message{
	    padding: 10px;
	    line-height: 1.5;
	    border:1px solid #f1f1f1;
	}

	a{
		display:block;
	}
	figure{
		overflow:hidden;
	}
	figure img{
		-webkit-transition: all linear 0.5s;
	    transition: all linear 0.5s;
	}

	&:hover figure img{
		transform: scale(1.1);
	}
}


.team-block-list{
	padding:0;
	margin:0 -7.5px;
	&:after{
		content:"";
		clear:both;
		display:block;
	}
}

.trainify-team-blocks{
	overflow:hidden;
	.no-team-image{
		padding-top: 60%;
		background-color: rgba(0,0,0, 0.6);
	}
	&.column1{
		.team-block-item{
			position: relative;
		    max-width: 400px;
		    margin-left: auto;
		    margin-right: auto;
		    float:none;
		    width:100%;

			&:last-child{
				margin-bottom:0;
			}
		}
	}
	&.column2{
		.team-block-item{
			width:50%;

			&:nth-of-type(2n+1){
				clear:left;
			}

			&:nth-last-of-type(1), &:nth-last-of-type(2){
				margin-bottom:0;
			}

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

			    max-width: 400px;
			    margin-left: auto;
			    margin-right: auto;
			    float:none;
			    width:100%;

				&:nth-last-of-type(2){
					margin-bottom:20px;
				}
			}

		}

	}
	&.column3{
		.team-block-item{
			width:33.33%;

			&:nth-of-type(3n+1){
				clear:left;
			}

			&:nth-last-of-type(1), &:nth-last-of-type(2), &:nth-last-of-type(3){
				margin-bottom:0;
			}

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

			    max-width: 400px;
			    margin-left: auto;
			    margin-right: auto;
			    float:none;
			    width:100%;

				&:nth-last-of-type(2), &:nth-last-of-type(3){
					margin-bottom:20px;
				}
			}
		}
	}
	&.column4{
		.team-block-item{
			width:25%;

			&:nth-of-type(4n+1){
				clear:left;
			}

			&:nth-last-of-type(1), &:nth-last-of-type(2), &:nth-last-of-type(3) , &:nth-last-of-type(4){
				margin-bottom:0;
			}

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

				width:50%;

				&:nth-last-of-type(3), &:nth-last-of-type(4){
					margin-bottom:20px;
				}
			}
			@media screen and (max-width:640px){
			    max-width: 400px;
			    margin-left: auto;
			    margin-right: auto;
			    float:none;
			    width:100%;

				&:nth-last-of-type(2){
					margin-bottom:20px;
				}
			}
		}
	}
}