/* Стили блоков, которые выводятся из базы (index.php, work.php). Подключается после layout.css. */

/* ---------- разделы главной: начинаются под меню и прокручиваются только ниже него ---------- */
:root {
	--menu-h: 160px; /* высота закреплённого меню; уточняется скриптом в template.js */
}
#content > article:not(#home) {
	position: fixed;
	top: var(--menu-h);
	bottom: 0;
	left: 0;
	height: auto;
	-webkit-overflow-scrolling: touch;
	outline: none; /* без рамки фокуса вокруг прокручиваемого раздела */
}
/* одинаковый отступ заголовка во всех разделах */
#content > article:not(#home) h1 {
	padding-top: 30px;
	padding-bottom: 20px;
}
@media only screen and (max-width: 800px) {
	#content > article:not(#home) h1 {
		font-size: 34px;
		line-height: 1.15;
		padding-top: 20px;
		padding-bottom: 10px;
	}
}

/* ---------- текст из админки ---------- */
.news-body p,
.work-text p {
	text-indent: 2.5em;
	text-align: left;
}
.news-body p.link-only,
.work-text p.link-only {
	text-indent: 0;
}
#news .news-body a,
#news .news-body a:hover {
	font-size: inherit;
	line-height: inherit;
	vertical-align: baseline;
}
#news .news-body p.link-only a {
	font-size: 13px;
	font-weight: bold;
}

/* ---------- события ---------- */
.news-item {
	margin-bottom: 40px;
}
.news-item .news-date {
	margin-bottom: 25px;
	text-align: left;
}
.news-photos {
	max-width: 600px;
	margin: 20px auto 0;
}
.news-photos a.news-photo,
.news-photos a.news-photo:hover {
	display: block;
	margin: 0 0 30px;
	border-bottom: none;
	line-height: 0;
}
.news-photos img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}

/* ---------- издательство ---------- */
.blog-wrap .book-carousel a {
	display: block;
	cursor: zoom-in;
}
.blog-wrap li p a.buy-link {
	color: rgba(60, 60, 160, .9);
	font-weight: bold;
}

/* ---------- наши работы ---------- */
#portfolio {
	text-align: center;
}

/* ---------- PhotoSwipe: подпись ---------- */
.pswp__custom-caption {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	width: calc(100% - 32px);
	max-width: 900px;
	padding: 8px 14px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}
.pswp__custom-caption:empty {
	display: none;
}

/* ---------- телефоны ---------- */
@media only screen and (max-width: 767px) {
	.container_n,
	.container_n .sixteen.columns {
		width: auto;
	}
	.news-photos {
		margin-top: 15px;
	}
	.news-photos a.news-photo {
		margin-bottom: 15px;
	}
	.news-body p,
	.work-text p {
		text-indent: 1.5em;
	}
}
