/* Grids */
.grid {
	display: grid;
	grid-gap: 15px;
}

.col2 {
	grid-template-columns: repeat(2, 1fr);
}

.col3 {
	grid-template-columns: repeat(3, 1fr);
}

.col4 {
	grid-template-columns: repeat(4, 1fr);
}

.span2 {
	grid-column-start: span 2;
}

.span3 {
	grid-column-start: span 3;
}

.span4 {
	grid-column-start: span 4;
}

/* Grid With Rule */
.grid.rule{
	grid-column-gap:0px;
	grid-row-gap: 30px;
}

.grid.rule > *{
	border-right: 1px solid #ccc;
	padding: 0 30px 0 30px;
	text-align: center;
}

.grid.rule > *:last-child{
	border-right: none;
}

.grid.rule.R4{
	grid-template-columns: repeat(4, 1fr);
}

.grid.rule.R4 > *:nth-child(4n){
	border-right: none;
}

.grid.rule.R3{
	grid-template-columns: repeat(3, 1fr);
}

.grid.rule.R3 > *:nth-child(3n){
	border-right: none;
}


/*Grid With Rule (3 columns) */
.grid.rule.alt{
	grid-template-columns: repeat(3, 1fr);
}

.grid.rule.alt > *:nth-child(3n){
	border-right: none;
}


/* Columns */
.customColumns {
	columns: 3 300px;
	column-gap: 4em;
	column-rule: 1px solid #ccc;
}

.customColumns .span {
	column-span: all;
	margin-top: 16px;
	margin-bottom: 16px;
}

/* RAM Grid*/
.RAMGrid{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr) );
	grid-gap: 15px;
}


/* Flex Grid */
.flexGrid,
.flexGridW{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.flexGrid > * {
	flex: 1 1 300px; /*  Stretching: */
	/*flex: 0 1 150px;*/ /*  No stretching: */
	margin: 7.5px;
}

.flexGridW > * {
	flex: 1 1 400px; /*  Stretching: */
	/*flex: 0 1 150px;*/ /*  No stretching: */
	margin: 7.5px;
}

.flexGrid.alt > * {
	margin:0;
}

/* Masonry */
.masonry.col4,
.masonry {
	column-count: 4;
	/*columns: 4;*/
	column-gap: 15px;
}

.masonry.col3 {
	column-count: 3;
}

.masonry.col2 {
	column-count: 2;
}

.masonry .mItem {
	display: inline-block;
	margin-bottom: 15px;
	width: 100%;
}

/* Service Grid */
.serviceGrid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	grid-gap: 10px;
	margin: 10px;
}

.serviceGrid.flex{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.serviceGrid.flex .serviceGridItem {
	flex: 1 1 400px; /*  Stretching: */
	/*flex: 0 1 150px;*/ /*  No stretching: */
}


.serviceGrid .serviceGridItem {
	background-size: cover;
	background-position: center center;
	grid-column: span 5;

	position: relative;

	min-height: 300px;
}

.serviceGrid .serviceGridItem:first-child,
.serviceGrid .serviceGridItem:nth-child(4) {
	grid-column: span 6;
}

.serviceGrid .serviceGridItem:nth-child(2),
.serviceGrid .serviceGridItem:nth-child(3) {
	grid-column: span 4;
}

.serviceGrid .serviceGridItem .bgOverlay {
	height: 100%;
	width: 100%;
	padding: 15px;
	background-color: rgba(0, 0, 0, .6);
	color: #fff;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;

	position: absolute;
	
	transition: all .5s;
}

.serviceGrid a.serviceGridItem:hover .bgOverlay {
	background-color: rgba(0, 0, 0, .8);
}

.serviceGrid .serviceGridItem .bgOverlay .caption {
	width: 60%;
}

.serviceGrid .serviceGridItem .bgOverlay .caption h2 {
	/*color: var(--secondaryColor);*/
}


/* Service Blocks */
.serviceBlocks{
	display: grid;
	grid-template-columns: repeat(4,1fr);
}

a.SBItem{
	position: relative;
	background: no-repeat center center;
	background-size: cover;
	padding: 3rem;
	text-align: center;
	z-index: 0;
}

a.SBItem::before{
	content: "";
	position: absolute;
	z-index: -1;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: var(--mainColor);
	transition: all .3s;
	opacity: .7
}

a.SBItem.alt::before{
	background-color: var(--secondaryColor);
}

a.SBItem:hover::before,
a.SBItem:focus::before,
a.SBItem:active::before{
	background-color: #000;
}

a.SBItem::after {
	content: "";
	position: absolute;
	z-index: -1;
	/*top: 0;*/
	right: 0;
	/*bottom: 0;*/
	bottom: 35px;
	left: 0;

	height: 2px;
	width: 0;

	background-color: #fff;


	margin: 0 auto;
	transition: all .5s;
}

a.SBItem:hover::after,
a.SBItem:focus::after,
a.SBItem:active::after {
	/*border-width: 0 100px 50px 100px;*/
	width: 50%;
}

a.SBItem h2 {
	margin: 25px 0;
	/*color: var(--secondaryColor);*/
	color: #fff;
	transition: all .5s; 
}

a.SBItem:hover h2,
a.SBItem:focus h2,
a.SBItem:active h2 {
	color: var(--mainColor);
}

/* Tiles */
.tiles{
	display: grid;
	grid-template-columns: repeat(4,1fr);
	grid-gap: 10px;
	/*height: 80vh;*/
}

.tiles .tile{
	padding: 4rem;
	position: relative;
	z-index: 0;
	text-align: center;
}

.tiles .tile:hover{
	transform: scale(.95);
}

.tiles .tile h3{
	font-size: 4rem;
}

@-moz-document url-prefix() { 
	.tiles .tile:hover {
		transform: none;
	}
}

.tiles .tile h3 span {
	font-size: .7em;
	opacity: .8;
}

.tiles .tile.dark {
	background: url(https://source.unsplash.com/1024x800/?nature,dark) center center /cover no-repeat;
	background-attachment: fixed;
	color: #fff;
}

.tiles .tile.dark h3 {
	color: #fff;
}

.tiles .tile.light {
	background: url(https://source.unsplash.com/1024x800/?nature,light) center center /cover no-repeat;
	background-attachment: fixed;
	color: #333;
}

.tiles .tile.light h3 {
	color: #333;
}

.tiles .tile.dark:before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: #000;
	opacity: .5;
	z-index: -1;
}

.tiles .tile.light:before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: #fff;
	opacity: .5;
	z-index: -1;
}

.tiles .tile::before {
	transition: all .4s;
}

.tiles .tile:hover::before {
	opacity: .8 !important;
}

.tiles .tile:nth-child(1) {
	grid-column: 1 / 4;
}

.tiles .tile:nth-child(3) {
	grid-column: 1 / 3;
}

.tiles .tile:nth-child(8) {
	grid-column: span 2;
}

.tiles .tile:nth-child(10) {
	grid-column: span 3;
}

.tiles .tile:last-child {
	grid-column: span 3;
}


/* Grid Items Styles */

/* Logo Grid */
.logoWrapper {
	text-align: center;
	position: relative;
	background-color: #fff;
}

.logoWrapper .logo {
	padding-bottom: 75%;
	background: center center no-repeat;
	background-size: contain;
	/*filter: grayscale() opacity(.5);*/
}

.logoWrapper a::after {
	content: "";
	position: absolute;
	background-color: transparent;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	transition: all .4s;
}

.logoWrapper a:focus::after,
.logoWrapper a:active::after,
.logoWrapper a:hover::after {
	background-color: rgba(0, 0, 0, .05);
}

/* Gallery */

.galleryItem .image {
	background: center center / cover;
	padding-top: 75%;
	position: relative;
}

.galleryItem .image::before {
	content: "";
	height: 100%;
	transition: all .3s;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.galleryItem .image h3 {
	position: absolute;
	bottom: 0;
	width: 100%;
	text-align: center;
	background-color: rgba(0, 0, 0, .7);
	margin: 0;
	padding: 15px;
	/*color: var(--secondaryColor);*/
	transition: all .5s;
}

.galleryItem a:hover h3,
.galleryItem a:focus h3,
.galleryItem a:active h3{
	color: #fff;
}


.galleryItem a:hover .image::before,
.galleryItem a:focus .image::before,
.galleryItem a:active .image::before {
	background-color: rgba(255, 255, 255, .5);
}


.gridItem {
	padding: 2rem;
	border: 1px solid #999;
}

/* Box */
.box {
	border: 1px solid #999;
	position: relative;
	display: block;
	background-color: #fff;
}

.nobd,
.block .box {
	border: none;
}

.box .boxImg {
	background: center center / cover;
	padding-top: 75%;
	border-bottom: 8px solid var(--mainColor);
}

.box .caption {
	padding: 2rem;
	color: #666;
}

a.box::before {
	content: "";
	position: absolute;
	background-color: transparent;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	transition: all .3s;
}

a.box:active::before,
a.box:focus::before,
a.box:hover::before {
	background-color: rgba(255, 255, 255, .3);
}

.box.fBox{
	display: flex;
	flex-wrap: wrap;
}

.box.fBox img {
	flex-grow: 1;
	width: 200px;
	flex-basis: 200px;
	object-fit: cover;
	object-position: center center;
	border: 1px solid #999;
	margin: 5px
}

.box.fBox .caption {
	flex-grow: 1;
	width: 50%;
}

/* Card */
.card {
	padding: 2rem;
	background-color: #eee;
	border: 1px solid #ccc;
}

/* Team Item Styles */
.teamItem  img {
	/*padding: 3rem;*/
	border-radius: 150%;
	width: 250px;
	height: 250px;
	object-fit: cover;
	object-position:  center center;
}

.teamItem .caption {
	padding: 3rem;
}

.teamItem .caption h3 {
	text-align: center;
}


/* Video Item */
.videoItem {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}

.videoItem iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}

.videoItem ~ h3 {
	margin: 5px 5px 0;
}


/* Responsive Styles */
@media (max-width: 1199px) {/* md and down */
	
	
	/* Grid */
	.col4{
		grid-template-columns: repeat(3,1fr)
	}

	.span3 {
		grid-column-start: span 2;
	}

	.span4 {
		grid-column-start: span 3;
	}
	
	/* Masonry */
	.masonry.col4,
	.masonry {
		column-count: 3;
	}

	.masonry.col3 {
		column-count: 2;
	}

	.masonry.col2 {
		column-count: 1;
	}
	
	/* Services Blocks */
	.serviceBlocks{
		grid-template-columns: repeat(2,1fr);
	}
	
}

@media (max-width: 991px) {/* sm and down */
		
	/*Grid*/
	.col3, .col4{
	grid-template-columns: repeat(2,1fr)
	}
	
	.span3,.span4 {
		grid-column-start: span 2;
	}

	/* Grid With Rule */
	.grid.rule.R3,
	.grid.rule.R4{
		grid-template-columns: repeat(2, 1fr);
	}
	
	.grid.rule.R3 > *:nth-child(3n){
		border-right: 1px solid #ccc;
	}
	
	.grid.rule.R3 > *:nth-child(2n),
	.grid.rule.R4 > *:nth-child(2n){
		border-right: none;
	}
	
	/* Masonry */
	.masonry.col4,
	.masonry {
		column-count: 2;
	}

	.masonry.col3 {
		column-count: 1;
	}
	
	/* Service Grid */
	.serviceGrid {
		grid-template-columns: 1fr;
	}

	.serviceGrid .serviceGridItem {
		grid-column: span 1 !important;
	}
	
	/* Service Blocks */
	.serviceBlocks{
		grid-template-columns: repeat(1,1fr);
	}

	/* Tiles */
	.tiles {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.tiles .tile {
		grid-column: span 1 !important;
	}
	
}

@media (max-width: 767px) {/* xs and down */
	
	/* Grid */
	.col2, .col3, .col4{
		grid-template-columns: repeat(1,1fr)
	}
	
	.span2, .span3, .span4 {
		grid-column-start: span 1;
	}
	
	/* Grid With Rule */
		
	.grid.rule > * {
		border-right: none;
		border-bottom: 1px solid #ccc;
		padding: 0px 30px 30px 30px;
	}
	
	.grid.rule > *:last-child{
		border-bottom: none;
		padding: 0px 30px 0px 30px;
	}
	
	.grid.rule.R3,
	.grid.rule.R4 {
		grid-template-columns: repeat(1, 1fr);
	}
	
	.grid.rule.R3 > *:nth-child(3n) {
		border-right: none;
	}
	
	
	/* Masonry */
	.masonry.col4,
	.masonry {
		column-count: 1;
	}

	/* Service Grid */
	.serviceGrid .serviceGridItem .bgOverlay .caption {
		width: 100%;
	}
	
	/* Services Blocks */
	.servicesBlocks{
		grid-template-columns: repeat(1,1fr);
	}
	
	/* Tiles */
	.tiles {
		grid-template-columns: 1fr;
	}
	
}

