﻿.works {
	margin: 60px 0;
}
.works > .w {
	display: grid;
	grid-gap: 40px;
}
.works-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
	grid-gap: 40px;
}
.works-row:nth-child(odd) {
	grid-template-areas:
		"a	a	b"
		"a	a	c";
}
.works-row:nth-child(even) {
	grid-template-areas:
		"a	c	c"
		"b	c	c";
}

.works-i:nth-child(1) {
	grid-area: a;
}
.works-i:nth-child(2) {
	grid-area: b;
}
.works-i:nth-child(3) {
	grid-area: c;
}
.works-row:nth-child(odd) .works-i:nth-child(2) .works-i-image,
.works-row:nth-child(odd) .works-i:nth-child(3) .works-i-image,

.works-row:nth-child(even) .works-i:nth-child(1) .works-i-image,
.works-row:nth-child(even) .works-i:nth-child(2) .works-i-image {
	height: calc(((1240px - 80px) / 3 - 40px) / 1.357142857142857);
}

.works-i {
	position: relative;
}
.works-i-image {
	display: block;
	overflow: hidden;
	border-radius: 6px;
}
.works-i-image img {
	display: block;
	width: 100%;
}
.works-i-title {
	position: absolute;
	bottom: 20px;
	right: 20px;
	left: 20px;
	font-weight: 500;
	font-size: 18px;
	line-height: 24px;
	color: #fff;
}


.works-row:nth-child(odd) .works-i:nth-child(1) .works-i-title,
.works-row:nth-child(even) .works-i:nth-child(3) .works-i-title {
	font-weight: 500;
	font-size: 24px;
	line-height: 32px;
}

.works-tags {
	margin: 0 0 0 -20px;
}
.btn.works-tags-i {
	display: inline-flex;
	margin: 0 0 14px 14px;
	padding: 5px 10px;

	font-weight: 500;
	font-size: 14px;
	line-height: 20px;

	white-space: normal;
	text-align: left;
}
.btn.works-tags-i.current {
	color: #1E4DAA;
	border-color: #1E4DAA;
}



.works_short {
	margin: 0 0 60px 0;
}
.works_short-cnt {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-gap: 40px;
	margin: 0 0 40px 0;
}
.works_short-cnt-i {
	position: relative;
}
.works_short-cnt-i-image {
}
.works_short-cnt-i-image img {
	display: block;
	width: 100%;
	border-radius: 6px;
}
.works_short-cnt-i-title {
	position: absolute;
	right: 20px;
	bottom: 20px;
	lefT: 20px;
	font-weight: 500;
	font-size: 18px;
	line-height: 24px;
	color: #fff;
}
.works_short-more {
}
.works_short-more .btn {
	display: block;
}
@media screen and (max-width: 1240px) {
/*
	.works-row:nth-child(odd) .works-i:nth-child(2) .works-i-image,
	.works-row:nth-child(odd) .works-i:nth-child(3) .works-i-image,

	.works-row:nth-child(even) .works-i:nth-child(1) .works-i-image,
	.works-row:nth-child(even) .works-i:nth-child(2) .works-i-image {
		height: calc(((100vw - 80px) / 3 - 40px) / 1.357142857142857);
	}
}
@media screen and (max-width: 768px) {*/
	.works-row {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: repeat(2, auto);
	}
	.works-row:nth-child(odd) {
		grid-template-areas:
			"a	a"
			"b	c";
	}
	.works-row:nth-child(even) {
		grid-template-areas:
			"a	a"
			"b	c";
	}
	.works-row:first-child {
		grid-template-areas:
			"b	b"
			"a	c";
	}

	.works-row:nth-child(2n+1) .works-i:nth-child(2) .works-i-image, .works-row:nth-child(2n+1) .works-i:nth-child(3) .works-i-image, .works-row:nth-child(2n) .works-i:nth-child(1) .works-i-image, .works-row:nth-child(2n) .works-i:nth-child(2) .works-i-image {
		height: auto;
	}
	.works-row:nth-child(2n+1) .works-i:nth-child(1) .works-i-title, .works-row:nth-child(2n) .works-i:nth-child(3) .works-i-title {
		font-weight: 500;
		font-size: 18px;
		line-height: 24px;
	}
}
@media screen and (max-width: 640px) {
	.works-row {
		grid-template-columns: repeat(1, 1fr);
		grid-template-rows: repeat(3, auto);
	}
	.works-row:nth-child(odd) {
		grid-template-areas:
			"a"
			"b"
			"c";
	}
	.works-row:nth-child(even) {
		grid-template-areas:
			"a"
			"b"
			"c";
	}
	.works-row:first-child {
		grid-template-areas:
			"b"
			"a"
			"c";
	}

	.works_short-cnt {
		grid-template-columns: repeat(1, 1fr);
	}
}
