/* =========== © 2024 Centroarts.com =========== */

/* Grid List */
@media (min-width: 576px) and (max-width: 1239px) {
	html { --grid-gap: 16px; }
}

.grid {
	display: grid;
	grid-template-rows: auto;
	grid-template-columns: repeat(var(--grid-cols), 1fr);
	gap: var(--grid-gap);
	--grid-cols: 2;
}
.g-c4 { --grid-cols: 4; }
.g-c3 { --grid-cols: 3; }
.g-c2 { --grid-cols: 2; }

.grid > *:not(.g-item) { grid-column: auto/span var(--grid-cols); }

@media (min-width: 576px) {
	.grid-sm {
		display: grid;
		grid-template-rows: auto;
		grid-template-columns: repeat(var(--grid-cols), 1fr);
		gap: var(--grid-gap);
		--grid-cols: 2;
	}
	.g-sm-c4 { --grid-cols: 4; }
	.g-sm-c3 { --grid-cols: 3; }
	.g-sm-c2 { --grid-cols: 2; }

	.grid-sm > *:not(.g-item) { grid-column: auto/span var(--grid-cols); }
}

@media (min-width: 768px) {
	.grid-md {
		display: grid;
		grid-template-rows: auto;
		grid-template-columns: repeat(var(--grid-cols), 1fr);
		gap: var(--grid-gap);
		--grid-cols: 2;
	}
	.g-md-c4 { --grid-cols: 4; }
	.g-md-c3 { --grid-cols: 3; }
	.g-md-c2 { --grid-cols: 2; }

	.grid-md > *:not(.g-item) { grid-column: auto/span var(--grid-cols); }
}

@media (min-width: 992px) {
	.grid-lg {
		display: grid;
		grid-template-rows: auto;
		grid-template-columns: repeat(var(--grid-cols), 1fr);
		gap: var(--grid-gap);
		--grid-cols: 2;
	}
	.g-lg-c4 { --grid-cols: 4; }
	.g-lg-c3 { --grid-cols: 3; }
	.g-lg-c2 { --grid-cols: 2; }

	.grid-lg > *:not(.g-item) { grid-column: auto/span var(--grid-cols); }
}

@media (min-width: 1200px) {
	.grid-xl {
		display: grid;
		grid-template-rows: auto;
		grid-template-columns: repeat(var(--grid-cols), 1fr);
		gap: var(--grid-gap);
		--grid-cols: 2;
	}
	.g-xl-c4 { --grid-cols: 4; }
	.g-xl-c3 { --grid-cols: 3; }
	.g-xl-c2 { --grid-cols: 2; }

	.grid-xl > *:not(.g-item) { grid-column: auto/span var(--grid-cols); }
}

/* Post */
.post { --post-padding: 16px; overflow: hidden; }
@media (min-width: 400px) {
	.post { --post-padding: 20px; }
}
@media (max-width: 575px) {
	.post + .post { margin-top: 4px; }
}
.post + div:empty { display: none; }

.post-img { padding-top: 55%; max-height: 0; margin: 0; }
.post-img::after {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; pointer-events: none;
	background-color: #000000; transition: opacity .2s ease; opacity: .07;
}

.post { display: flex; flex-direction: column; flex-grow: 1; flex-shrink: 1; }
.post .title, .post-text { padding: var(--post-padding); margin: 0; }
.post .title .item-link { color: inherit; text-decoration: none !important; }

.post .title + .post-text { padding-top: 8px; margin-top: calc(var(--post-padding) / -1); }
.post .title { font-size: var(--post-title-size); }

.post .post-meta { margin-top: -12px; padding: 12px var(--post-padding); }

@media (min-width: 576px) {
	.post .post-meta { margin-top: auto; padding-top: 0; }
}
@media (min-width: 992px) {
	.post:hover .post-img::after { opacity: .02; }
	.post .title .item-link { transition: color .2s ease; }
	.post:hover .title .item-link { color: var(--post-title-hover); }
}

/* Post Meta */
.post-meta { display: flex; align-items: center; user-select: none; font-size: var(--fs-sm); line-height: 20px; }
.meta { display: flex; align-items: center; pointer-events: none; margin-right: 8px; opacity: .5; white-space: nowrap; }
.meta:last-child { margin-right: 0; }
.meta-right { order: 13; margin-left: auto; margin-right: 0; }
.meta > .ic { width: 20px; height: 20px; margin-right: 4px; }

a.meta { color: inherit; text-decoration: none !important; pointer-events: all; transition: opacity .2s ease; position: relative; }
a.meta::after { content: ""; position: absolute; inset: -8px; }
a.meta:hover { opacity: .8; }

.source { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; margin-right: 8px; }
.source a { position: relative; z-index: 3; color: inherit; transition: opacity .2s ease; }
.source a:hover { opacity: .7; }
.source-site { min-width: 0; padding: 8px 0; margin: -8px 0; }
.source-logo {
	display: flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; padding: 8px; margin: -8px; margin-right: 0;
}
.source-logo img { min-width: 20px; max-width: 20px; height: 20px; object-fit: contain; }

.post-meta .meta-views { margin-left: auto; }

.off--time .post-meta .meta-time,
.off--views .post-meta .meta-views,
.off--coms .post-meta .meta-coms { display: none !important; }

/* - Большой пост - */
.post-story {
	position: relative; z-index: 1;
	background-color: var(--post-story-bg-color);
	color: var(--text-dark-color);
}
.post-story .title { font-size: var(--post-story-title-size); }
.post-story .title a { color: inherit !important; }
.post-story::after {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 100%; z-index: -1; position: absolute;
}
.post-story .post-img { position: absolute; z-index: -1; top: 0; right: 0; width: 100%; max-height: none; }

@media (max-width: 575px) {
	.post-story { padding-top: 202px; }
	.post-story .post-img { padding-top: 280px; }
	.post-story::after {
		background: linear-gradient(0deg, var(--post-story-bg-color) calc(100% - 240px), rgba(var(--post-story-bg-color-rgb), 0.00) 100%);
	}
}
@media (min-width: 576px) {
	.post-story {
		--post-padding: 28px;
		display: flex; justify-content: center;
		padding-right: 35%; min-height: 252px;
	}
	.post-story .post-img {
		bottom: 0; padding-top: 0; max-width: 594px;
	}
	.post-story::after {
		max-width: 784px;
		background: linear-gradient(90deg, var(--post-story-bg-color) 35.84%, rgba(var(--post-story-bg-color-rgb), 0.00) 90%);
	}
}

/* - Видео посты - */ 
.post-video .fit-cover::before {
	content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; border-radius: 50%;
	width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; transform: scale(1);
	transition: transform .15s ease;
	background-image: url("../images/play.svg");
	background-color: rgba(0, 0, 0, 0.5);
}
.post-video:hover .fit-cover::before { transform: scale(1.04); }

/* - PageNav - */
.navigation {
	background-color: var(--post-bg-color);
	display: flex; position: relative;
	font-weight: bold; text-align: center;
	padding: 12px 8px;
}

.navigation * { display: block; }
.navigation a { color: inherit; text-decoration: none !important; }
.pages-list { display: flex; margin: 0 auto; line-height: 24px; }
.pages-list::-webkit-scrollbar { display: none; }
.pages-list > * { padding: 12px 16px; }
.page_prev > *, .page_next > * { padding: 12px; }

.pages-list span:not(.nav_ext) { opacity: 1; color: var(--link-color); }
.page_prev > span, .page_next > span { opacity: .3; }

@media (min-width: 576px) {
	.navigation { padding: 8px; border-radius: var(--post-radius); }
}
@media (min-width: 768px) {
	.pages { margin: 0 auto; }
}
@media (min-width: 992px) {
	.pages-list > a:hover, .page_prev > a:hover, .page_next > a:hover { color: var(--link-color); opacity: 1; }
}
@media (max-width: 767px) {
	.navigation .pages { overflow: hidden; position: relative; }
	.navigation .pages-list > *::after { content: ""; }

	.pages { flex: 1 1 auto; }

	.pages::after, .pages::before {
		content: ""; position: absolute; top: 0; bottom: 0; width: 16px; z-index: 1; pointer-events: none;
	}
	.pages::after { left: 0; background-image: linear-gradient(90deg, var(--post-bg-color) 0%, rgba(var(--post-bg-color-rgb),0) 100%); }
	.pages::before { right: 0; background-image: linear-gradient(90deg, rgba(var(--post-bg-color-rgb),0) 0%, var(--post-bg-color) 100%); }
	.pages-list::after, .pages-list::before { content: ""; flex: 1 1 auto; min-width: 12px; height: 12px; }

	.pages-list { overflow: hidden; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

.ad-lenta {
    background-color: #f5f5f5; padding-top: 22px; padding-bottom: 22px;
}