/*******************************************
 *** Раздел «Статьи»: /articles/ и /articles/<статья>/
 *** Подключается только на этих страницах (index.php).
 *** Работает поверх section.page из style.css —
 *** оттуда светлая подложка и хлебные крошки.
 *******************************************/

/* Заголовок в шапке на этих страницах не h1 (h1 — у самой статьи),
   поэтому его вид повторяем отдельным классом. Копия «header .logo h1». */
header .logo .logo-h1 {
	text-align: left;
	display: block;
	height: 40px;
	line-height: 40px;
	font-size: 1.2em;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 2px;
	color: #fff;
}

.articles {
	padding: 0 20px;
	box-sizing: border-box;
	color: #222;
}

.articles .breadcrumbs {
	margin-bottom: 25px;
	font-size: 0.8em;
	font-weight: 500;
	color: #111;
}

.articles .breadcrumbs a {
	text-decoration: underline;
	color: #777;
}

.articles .breadcrumbs a:hover {
	text-decoration: none;
}

.articles h1 {
	font-size: 2.2em;
	line-height: 1.2;
	font-weight: 700;
	color: #111;
	margin: 0 0 14px 0;
}

.articles .blog-lead {
	font-size: 1.05em;
	line-height: 1.6;
	color: #555;
	max-width: 760px;
	margin: 0 0 30px 0;
}


/* ---------- Карточки ---------- */

.blog-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.articles a.blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	color: #222;
	box-shadow: 0 6px 16px rgba(0,0,0,.10);
	transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s cubic-bezier(.2,.7,.3,1);
}

.articles a.blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 28px rgba(0,0,0,.16);
}

.blog-card__media {
	display: block;
	/* Место под обложку резервируем заранее, иначе карточки прыгают при загрузке. */
	aspect-ratio: 16 / 9;
	background: #e9e4de;
	overflow: hidden;
}

.blog-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blog-card__ph {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f17231, #f6a678);
	opacity: .35;
}

.blog-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 20px 20px;
	flex: 1 1 auto;
}

.blog-card__body strong {
	font-size: 1.02em;
	line-height: 1.35;
	font-weight: 700;
	color: #111;
}

.articles a.blog-card:hover .blog-card__body strong {
	color: #c4561b;
}

.blog-card__text {
	font-size: .85em;
	line-height: 1.55;
	color: #666;
}

.blog-card__date {
	margin-top: auto;
	padding-top: 8px;
	font-size: .78em;
	color: #8a8a8a;
}

.blog-empty {
	background: #fff;
	border-radius: 12px;
	padding: 50px 30px;
	text-align: center;
	color: #666;
	box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.blog-empty h2 {
	margin: 0 0 8px 0;
}


/* ---------- Страница статьи ---------- */

.articles .post {
	background: #fff;
	border-radius: 12px;
	padding: 36px 44px 40px 44px;
	box-shadow: 0 6px 16px rgba(0,0,0,.10);
	max-width: 860px;
	margin: 0 auto;
	box-sizing: border-box;
	line-height: 1.7;
}

.articles .post h2 {
	font-size: 1.5em;
	line-height: 1.3;
	color: #111;
	margin: 34px 0 12px 0;
}

.articles .post h3 {
	font-size: 1.1em;
	color: #111;
	margin: 22px 0 6px 0;
}

.articles .post p {
	line-height: 1.7;
	margin: 0 0 14px 0;
}

.articles .post ul {
	margin: 0 0 16px 0;
	padding-left: 22px;
	list-style: disc;
}

.articles .post li {
	line-height: 1.6;
	margin-bottom: 6px;
}

.post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	font-size: .8em;
	color: #8a8a8a;
	margin: 0 0 24px 0 !important;
	padding-bottom: 18px;
	border-bottom: 1px solid #eee;
}

.post__cover {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 10px;
	margin: 0 0 26px 0;
}

.articles .post__intro {
	font-size: 1.05em;
	line-height: 1.7;
	color: #444;
	border-left: 4px solid #f17231;
	padding-left: 18px;
	margin: 0 0 26px 0;
}

.post .table-wrap {
	overflow-x: auto;
	margin: 0 0 20px 0;
}

.post table {
	width: 100%;
	border-collapse: collapse;
	font-size: .85em;
}

.post th,
.post td {
	border: 1px solid #e5e5e5;
	padding: 9px 12px;
	text-align: left;
	vertical-align: top;
}

.post th {
	background: #faf3ee;
	font-weight: 700;
}


/* ---------- Призыв и кнопка ---------- */

.articles .post__cta {
	margin: 40px 0 0 0;
	padding: 26px 30px;
	background: #faf3ee;
	border-radius: 10px;
	border-left: 4px solid #f17231;
}

.articles .post__cta h2 {
	margin-top: 0;
}

.articles .post__cta p:last-child {
	margin-bottom: 0;
}

.articles a.blog-btn {
	display: inline-block;
	background: #f17231;
	color: #fff;
	padding: 13px 28px;
	border-radius: 50px;
	font-size: .85em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	transition: background-color .18s ease;
}

.articles a.blog-btn:hover {
	background: #d65d1d;
}

.articles .post__back {
	margin: 34px 0 0 0;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.articles .post__back a {
	font-weight: 700;
	color: #c4561b;
}

@media (prefers-reduced-motion: reduce) {
	.articles a.blog-card { transition: none; }
	.articles a.blog-card:hover { transform: none; }
}


/* ---------- Планшеты и телефоны ---------- */

@media screen and (max-width: 1000px) {
	.blog-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 640px) {
	.articles {
		padding: 0 12px;
	}
	.articles h1 {
		font-size: 1.6em;
	}
	.blog-cards {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	.articles .post {
		padding: 22px 18px 26px 18px;
	}
	.articles .post__cta {
		padding: 20px 18px;
	}
}
