/**
 * Blog (standard posts): single article + archive listing.
 *
 * Shared "case" layout (hero-body grid + TOC sidebar) and the media gallery come
 * from assets/css/components/*. This file only adds blog-specific styling:
 * article typography, underlined headings and the archive card grid.
 */

.blog-single,
.blog-archive {
	color: #e6e6e6;
	background: #1e1e1e;
}

.blog-single .case-body.max-width {
	max-width: 1440px;
	padding-right: 40px;
	padding-left: 40px;
}

/* ---------------------------------------------------------------------------
 * Single article content
 * ------------------------------------------------------------------------- */

.blog-post__content {
	border-radius: 5px;
	padding: 30px 40px 40px;
	background: rgba(0, 0, 0, 0.3);
	color: #e6e6e6;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.7;
}

.blog-post__content > :first-child {
	margin-top: 0;
}

.blog-post__content > :last-child {
	margin-bottom: 0;
}

.blog-post__content p {
	margin: 0 0 18px;
}

/* Underlined section headings (also the scroll-spy anchors). */
.blog-post__content h2 {
	scroll-margin-top: 100px;
	margin: 40px 0 20px;
	padding-bottom: 12px;
	color: #f2ceb5;
    font-size: 36px;
    font-weight: 300;
    line-height: normal;
    text-transform: uppercase;
}

.blog-post__content h3 {
	scroll-margin-top: 100px;
	margin: 32px 0 16px;
	color: #e7e7e7;
	font-size: 22px;
	font-weight: 300;
	line-height: 1.3;
}

.blog-post__content h4 {
	margin: 26px 0 14px;
	color: #e7e7e7;
	font-size: 18px;
	font-weight: 400;
}

.blog-post__content a {
	color: #f2ceb5;
	text-decoration: none;
	border-bottom: 1px solid rgba(242, 206, 181, 0.4);
	transition: border-color .2s ease;
}

.blog-post__content a:hover {
	border-color: #f2ceb5;
}

.blog-post__content ul,
.blog-post__content ol {
	margin: 0 0 18px;
	padding-left: 22px;
}

.blog-post__content li {
	margin-bottom: 8px;
}

.blog-post__content img {
	max-width: 100%;
	height: auto;
	border-radius: 5px;
}

.blog-post__content figure {
	margin: 24px 0;
}

.blog-post__content figcaption {
	margin-top: 8px;
	color: rgba(231, 231, 231, 0.6);
	font-size: 13px;
	text-align: center;
}

.blog-post__content blockquote {
	margin: 24px 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid #f2ceb5;
	color: #cfcfcf;
	font-style: italic;
}

/* Pretitle eyebrow ([pretitle text="…"]). */
.blog-pretitle-wrapper {
	margin: 6px 0 0;
}

.blog-post__content .blog-pretitle-wrapper:first-child {
	margin-top: 0;
}

.blog-pretitle {
	position: relative;
	display: inline-block;
	margin: 0 0 14px;
	padding-bottom: 2px;
	color: #f2ceb5;
	font-size: 14px;
	font-weight: 400;
	line-height: normal;
	text-transform: uppercase;
}

.blog-pretitle::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 1px;
	background: #f2ceb5;
	transform: scaleY(0.3);
	transform-origin: bottom;
}

/* Inline galleries inside the article. */
.blog-post__content .media-gallery {
	position: relative;
	margin: 30px 0;
}

.blog-post__content .media-gallery__nav--prev {
	left: -16px;
}

.blog-post__content .media-gallery__nav--next {
	right: -16px;
}

/* ---------------------------------------------------------------------------
 * Archive listing (Figma "Новости")
 * ------------------------------------------------------------------------- */

.blog-archive__header {
	margin-bottom: 40px;
}

.blog-archive__title {
	margin: 0;
	color: #e7e7e7;
	font-size: 36px;
	font-weight: 300;
	line-height: normal;
	text-transform: uppercase;
}

.blog-archive__description {
	max-width: 760px;
	margin: 16px 0 0;
	color: rgba(231, 231, 231, 0.8);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.6;
}

.blog-archive__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

.post-card {
	display: flex;
	flex-direction: column;
	align-self: start;
	background: #1e1e1e;
	box-shadow: 0 0 2.5px rgba(242, 206, 181, 0.2);
	transition: box-shadow .25s ease;
}

.post-card:hover {
	box-shadow: 0 0 5px rgba(242, 206, 181, 0.33);
}

.post-card__image {
	display: block;
	aspect-ratio: 910 / 643;
	overflow: hidden;
	background: #000;
}

.post-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.post-card:hover .post-card__image img {
	transform: scale(1.03);
}

.post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 20px;
	padding: 20px 30px 24px;
}

.post-card__text {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.post-card__title {
	margin: 0;
	color: #f2ceb5;
	font-size: 20px;
	font-weight: 300;
	line-height: normal;
	text-transform: uppercase;
}

.post-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.post-card__title a:hover {
	color: #ffffff;
}

.post-card__excerpt {
	color: #e7e7e7;
	font-size: 14px;
	font-weight: 300;
	line-height: normal;
}

.post-card__excerpt p {
	margin: 0;
}

.post-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #e7e7e7;
	font-size: 12px;
	font-weight: 300;
	text-decoration: none;
	transition: gap .2s ease, color .2s ease;
}

.post-card__more:hover {
	color: #f2ceb5;
	gap: 12px;
}

.post-card__more-arrow {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: rotate(45deg);
}

.blog-archive__empty {
	padding: 20px 0 40px;
	color: rgba(231, 231, 231, 0.7);
}

/* Pagination */
.blog-archive .navigation.pagination {
	margin-top: 40px;
}

.blog-archive .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.blog-archive .page-numbers {
	display: inline-flex;
	min-width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border-radius: 4px;
	color: rgba(231, 231, 231, 0.8);
	font-size: 14px;
	text-decoration: none;
	background: rgba(242, 206, 181, 0.05);
	transition: color .2s ease, background .2s ease;
}

.blog-archive .page-numbers:hover,
.blog-archive .page-numbers.current {
	color: #1e1e1e;
	background: #f2ceb5;
}

/* ---------------------------------------------------------------------------
 * Responsive — single article
 * ------------------------------------------------------------------------- */

@media (max-width: 1023px) {
	.blog-single .case-body.max-width {
		padding-right: 20px;
		padding-left: 20px;
	}

	.blog-post__content {
		padding: 24px 20px;
	}

	.blog-post__content h2 {
		font-size: 24px;
	}

	.blog-post__content .media-gallery__nav {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * Responsive — archive
 * ------------------------------------------------------------------------- */

@media (max-width: 1199px) {
	.blog-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.blog-archive__title {
		font-size: 32px;
	}
}

@media (max-width: 767px) {

	.blog-archive__header {
		margin-bottom: 30px;
	}

	.blog-archive__title {
		font-size: 20px;
	}

	.blog-archive__grid {
		grid-template-columns: 1fr;
	}

	.post-card__body {
		padding: 16px 20px 20px;
	}

	.post-card__title {
		font-size: 16px;
	}
}
