/* Страница объекта (work.php). В layout.css страница не прокручивается — здесь это отменяем. */

html, body.work-page {
	height: auto;
	min-height: 100%;
	overflow: visible;
	overflow-x: hidden;
}

body.work-page #_pattern {
	position: fixed;
}

.work-header {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 20px 0;
}
.work-back,
.work-nav a {
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	color: #533e23;
	border-bottom: 1px solid transparent;
	text-decoration: none;
}
.work-back {
	white-space: nowrap;
	margin-right: 12px;
}
.work-back:hover,
.work-nav a:hover {
	border-bottom-color: #533e23;
}

.work {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 20px 10px;
	text-align: left;
}
.work-title {
	font-size: 34px;
	line-height: 1.25;
	text-align: center;
	margin-bottom: 15px;
}
.work-about {
	max-width: 900px;
	margin: 0 auto 30px;
	text-align: center;
	font-size: 16px;
	line-height: 1.6;
	color: #4d4d4d;
}

/* сетка превью: сама подстраивается под ширину экрана */
.work-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}
.work-grid a {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: rgba(0, 0, 0, .05);
	cursor: zoom-in;
	border: none;
}
.work-grid img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease, opacity .3s ease;
}
.work-grid a:hover img {
	transform: scale(1.04);
	opacity: .9;
}

.work-text {
	max-width: 900px;
	margin: 40px auto 0;
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}

.work-nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin: 40px 0 10px;
}
.work-nav .work-next {
	margin-left: auto;
	text-align: right;
}

.work-footer {
	position: relative;
	z-index: 1;
	text-align: center;
}

@media only screen and (max-width: 767px) {
	.work-header {
		padding: 12px 16px 0;
	}
	.work {
		padding: 20px 16px 10px;
	}
	.work-title {
		font-size: 24px;
	}
	.work-about {
		font-size: 14px;
		margin-bottom: 20px;
	}
	.work-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
	}
	.work-nav {
		flex-direction: column;
	}
	.work-nav .work-next {
		margin-left: 0;
		text-align: left;
	}
}
