
/* Box image */

.theme-boximg {

	position: relative;
	padding: 0;
	overflow: hidden;

	.theme-boximg-imgel {
		display: none;
	}

	.boxes-small & {
		padding: 38px 10px;
	}

	.box-image {
		text-align: center;
	}

	.rounded1 & {
		@include mb2_border_radius(5px);

		/* This will fix problem in safari web browser */
	    -webkit-backface-visibility: hidden;
	    -moz-backface-visibility: hidden;
	    -webkit-transform: translate3d(0, 0, 0);
	    -moz-transform: translate3d(0, 0, 0);
	    z-index: 1;
	}

	.box-title {
		margin: 0
	}

	.box-desc {
		margin-top: 15px;
	}

	.box-title,
	.box-desc,
	.box-readmore {
		z-index: 3;
		position: relative;
	}

	.linkbtn1 & {
		.box-readmore {
			font-weight: var(--mb2-pb-fwmedium);

			a {

				&:after {
					@include mb2_font_fa();
					content: '\f105';
					margin-left: 8px;
				}
			}
		}
	}

	.box-readmore {
		margin-top: 17px;

		.btn {
			display: none;
		}
	}

	.arrowlink {
		color: var(--mb2-pb-headingscolor);
	}

	&.dark {

		.arrowlink {
			color: #fff;
		}
	}


	.box-content {
		margin: 0;
		padding: 20px;
		position: relative;

		h2,h3,h4,h5,h6 {

			a {
				color: inherit;
			}
		}

		.theme-boximg-color {
			display: none;
		}
	}

	.desc0 & {
		.box-desc {
			display: none;
		}
	}

	.linkbtn0 & {
		.box-readmore {
			display: none;
		}
	}


	.type-0 & {

		.theme-boximg-color {
			display: none;
		}

		.box-content {
			padding: 30px;
		}

		.box-desc,
		.box-readmore {
			margin-top: 20px;
		}
	}



	.type-1 & {
		h4 {
			position:relative;

			&:after {
				content: '';
				display: block;
				position: absolute;
				bottom: -10px;
				left: 50%;
				margin-left: -30px;
				width: 60px;
				height: 1px;
				border-bottom: solid 1px #fff;
				@include mb2_transition1(all, .25s);
			}
		}
	}

	.type-1 &,
	.type-2 &,
	.type-3 & {
		text-align: center;
	}



	.theme-boximg-img {
		@include mb2_transition1(all, .25s);
		width: 100%;
	}

	.theme-boximg-color {
		position: absolute;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		z-index: 1;
	}


	.theme-boximg-color {
		background-color: rgba(var(--mb2-pb-accent1), .6);
		z-index: 2;
	}

	&.opcolor {
		.theme-boximg-color {
			opacity: .6;
		}
	}

	.type-2 & {

		.theme-boximg-color {
			display: none;
		}

		.box-content {
			.theme-boximg-color {
				display: block;
			}
		}

	}

	&.opcolor {
		.box-content {
			.theme-boximg-color {
				opacity: .75;
			}
		}
	}


	.type-1 &,
	.type-2 &,
	.type-3 & {

		&:hover {

			.theme-boximg-img {
				 @include mb2_transform_scale(1.1);
			}

			h4 {

				&:after {
					width: 100%;
					left: 0;
					margin-left: 0;
				}
			}
		}
	}


	.type-1 &,
	.type-2 &,
	.type-3 & {
		.vtable-wrapp {
			position: absolute;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			z-index: 3;

			.vtable {
				display: table;
				height: 100%;
				width: 100%;

				.vtable-cell {
					display: table-cell;
					vertical-align: middle;
				}
			}
		}
	}



	.type-3 & {
		text-align: inherit;

		.vtable-wrapp {
			bottom: -1px;

			.vtable {
				.vtable-cell {
					vertical-align: bottom;
				}
			}
		}

		.box-content {
			padding: 30px;
		}

		.box-desc,
		.box-readmore {
			margin-top: 20px;
		}
	}


	/*  Box type 4 */

	.type-4 & {

		top: 0;
		@include mb2_transition1(all, .25s);
		@include mb2_box_shadow(0 15px 24px, rgba(0,0,0,.06) );

		.box-content {
			padding: 30px;
		}

		.theme-boximg-img {
			position: relative;
			z-index: 3;
		}

		.box-desc,
		.box-readmore {
			margin-top: 20px;
		}

		&:hover {
			top: -15px;
		}

	}

	.dir-rtl .type-4 & {

		.box-readmore {

			a {
				&:after {
					content: '\f104';
				}
			}
		}

	}



	/* Type 5 */

	.type-5 & {

		@include mb2_transition1(all, .15s);

		.theme-boximg-img,
		.theme-boximg-img-link {
		  	display: none;
		}

		.box-content {
			padding: 30px;
			width: 65%;
			@media only screen and (max-width: $wmediumdevice){
				width: 85%;
			}

			@media only screen and (max-width: $wxsmalldevice){
				width: 90%;
			}
		}

		.box-desc,
		.box-readmore {
			margin-top: 20px;
		}

		.theme-boximg-imgel {
			display: block;
		  	position: absolute;
		  	top: 0;
		  	right: 0;
		  	width: 42%;
		  	height: 100%;
		  	background-repeat: no-repeat;
		  	background-position: 50% 50%;
		  	background-size: cover;
		  	z-index: 2;

			.gradient-el {}

			.gradient-left {
				position: absolute;
		  	  	width: 45%;
		  	  	height: 100%;
		  	  	left: 0;
		  	  	top: 0;
				@include gradient-x( $accent1, rgba(255,255,255,0) );

				@media only screen and (max-width: $wmediumdevice){
					width: 100%;
				}
			}
		}

		.theme-boximg-color {
			background-color: var(--mb2-pb-accent1);
		}

	}


	.theme-col-2.type-5 & {
		.box-content {
			width: 85%;
		}

		.gradient-left {
			width: 100%;
		}
	}

	.theme-col-3.type-5 &,
	.theme-col-4.type-5 &,
	.theme-col-5.type-5 & {
		.box-content {
			width: 90% !important;
		}

		.gradient-left {
			width: 100%;
		}
	}


	/* ======================= BOX STYLE 6 */

	.type-6 & {

		.box-allcontent {
		    position: relative;
		    z-index: 3;
		    padding: 1.6rem;

			@media only screen and (min-width: $wmediumdevice){
				display: flex;
			    flex-flow: row;
			    flex-direction: row-reverse;
			    justify-content: space-between;
			    align-items: center;
			}
		}

		&:after {
			content: '';
			display: block;
			width: 300px;
			height: 300px;
			border: 30px solid var(--mb2-pb-accent3);
			position: absolute;
			border-radius: 50%;
			top: -89px;
			left: 60%;
			z-index: 2;
		}

		.box-content {
		    padding: 0;
		}

		@media only screen and (min-width: $wmediumdevice){

			.vtable-wrapp {
				flex: 0 0 calc(60% - 20px);
			}

			.box-image {
				flex: 0 0 40%;
			}

		}

		@media only screen and (max-width: $wmediumdevice){
			.box-image {
				margin-bottom: 23px;
			}
		}

	}


}
