/**
 * Blog: lista + pojedynczy wpis (EcoPress-style, Flycars tokens). Bez block-hero.
 *
 * @package weblance
 */

.blog-archive-active .site-main.blog-archive-page,
.weblance-blog-single-active .weblance-blog-single-main {
	padding-bottom: var(--verti-padding-big, 84px);
}

/* ── EcoPress-like container + nagłówek archiwum (bez pełnego „hero”) ── */

body.blog-archive-active .container {
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--calc-padding);
	padding-right: var(--calc-padding);
	width: 100%;
}

body.weblance-blog-single-active .container {
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--padding);
	padding-right: var(--padding);
	width: 100%;
}

body.weblance-blog-single-active .weblance-blog-single-main .container {
	max-width: 1500px;
}

body.blog-archive-active .container-narrow,
body.weblance-blog-single-active .container-narrow {
	max-width: none;
}

body.weblance-blog-single-active {
	scroll-behavior: auto;
}

.archive-container {
	padding-top: 40px;
	padding-bottom: 56px;
}

.archive-header {
	margin-bottom: 28px;
}

.breadcrumbs {
	margin-bottom: 16px;
}

.breadcrumbs-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
	list-style: none;
	padding: 0;
	margin: 0;
}

.breadcrumbs-item {
	display: inline-flex;
	align-items: center;
	font-size: 13px;
}

.breadcrumbs-item a {
	color: var(--text-on-dark);
	opacity: 0.85;
	transition: opacity 0.2s;
	text-decoration: none;
}

.breadcrumbs-item a:hover {
	opacity: 1;
}

.breadcrumbs-item > span[itemprop="name"] {
	opacity: 0.65;
	color: var(--text-on-dark);
	font-weight: 500;
}

.breadcrumbs-sep {
	color: var(--text-on-dark);
	margin: 0 6px;
	font-size: 14px;
	opacity: 0.65;
}

.archive-hero-title {
	font-family: var(--font-family-heading);
	font-size: clamp(28px, 5vw, 44px);
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 8px;
	color: var(--text-on-dark);
}

.archive-hero-desc {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.65);
	max-width: 640px;
	line-height: 1.6;
	margin: 0;
}

/* ── Single post (EcoPress single-header) ───────────────── */

.single-article {
	color: var(--text-on-dark);
}

.single-article--with-top-bg {
	position: relative;
	overflow: clip;
	isolation: isolate;
	margin-top: calc(var(--header-offset, 0px) * -1);
}

.single-top-bg {
	--single-top-bg-overlap: calc(var(--header-offset, 0px) + 56px);
	position: absolute;
	top: calc(var(--single-top-bg-overlap) * -1);
	left: 0;
	right: 0;
	height: calc(min(82vh, 860px) + var(--single-top-bg-overlap));
	z-index: 0;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 1) 0%,
		rgba(255, 255, 255, 1) 65%,
		rgba(255, 255, 255, 0) 100%
	);
	mask-image: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 1) 0%,
		rgba(255, 255, 255, 1) 65%,
		rgba(255, 255, 255, 0) 100%
	);
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-mode: alpha;
	mask-mode: alpha;
	opacity: 0.88;
}

.single-top-bg__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	mix-blend-mode: screen;
	filter: brightness(0.22) saturate(0.82) contrast(1.06);
}

.single-top-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(8, 42, 84, 0.22) 0%,
		rgba(8, 42, 84, 0.58) 100%
	),
	var(--page-bg);
	mix-blend-mode: color;
	opacity: 0.86;
}

.single-article--with-top-bg .single-header,
.single-article--with-top-bg .single-body {
	position: relative;
	z-index: 1;
}

.single-header {
	padding: 32px 0 0;
}

.single-article--with-top-bg .single-header {
	padding-top: calc(var(--header-offset, 0px) + 32px);
}

.single-header-content .category-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 10px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--text-on-dark);
	text-decoration: none;
	margin-bottom: 12px;
}

.single-title {
	font-family: var(--font-family-heading);
	font-size: clamp(26px, 4.5vw, 42px);
	font-weight: 800;
	line-height: 1.12;
	margin: 0 0 14px;
	color: var(--text-on-dark);
}

.single-excerpt {
	font-size: 17px;
	color: rgba(255, 255, 255, 0.72);
	line-height: 1.6;
	margin: 0 0 16px;
	max-width: 720px;
}

.single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65);
}

.single-meta__group {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
}

.single-meta__label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.5);
}

.single-meta__value,
.single-meta time,
.single-meta-reading {
	font-size: 12px;
	font-weight: 500;
	padding: 4px 12px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.88);
}

.single-meta-sep {
	opacity: 0.5;
}

.single-featured-image {
	margin: 28px auto 0;
	overflow: hidden;
}

.single-featured-image img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	display: block;
}

.featured-image-wrapper {
	position: relative;
	margin: 0;
}

.single-img-marquee {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 28px;
	background: rgba(255, 255, 255, 0.18);
	overflow: hidden;
	display: flex;
	align-items: center;
	z-index: 2;
}

.single-img-marquee-track {
	display: flex;
	animation: weblance-marquee-scroll 20s linear infinite;
	white-space: nowrap;
}

.single-img-marquee-track span {
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--text-on-dark);
	padding-right: 40px;
	flex-shrink: 0;
}

@keyframes weblance-marquee-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

.single-body {
	padding: 36px 0 48px;
}

.single-body__layout {
	display: grid;
	grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
}

.single-body__sidebar {
	position: sticky;
	top: 90px;
}

.single-body__main {
	min-width: 0;
}

/* Spis treści (kotwice H2/H3) */
.single-toc {
	margin: 0;
	padding: 18px 20px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 0;
	background: rgba(255, 255, 255, 0.04);
}

.single-toc__title {
	margin: 0 0 12px;
	font-family: var(--font-family-heading);
	font-size: 15px;
	font-weight: 800;
	color: var(--text-on-dark);
}

.single-toc__list {
	margin: 0;
	padding-left: 1.1em;
	list-style: decimal;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	line-height: 1.45;
}

.single-toc__item {
	margin: 0 0 6px;
	padding-left: 2px;
}

.single-toc__item--sub {
	margin-left: 1rem;
}

.single-toc__item a {
	color: var(--text-on-dark);
	opacity: 0.85;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s, opacity 0.2s;
}

.single-toc__item a:hover {
	opacity: 1;
	border-bottom-color: rgba(255, 255, 255, 0.4);
}

.weblance-single-prose {
	color: rgba(255, 255, 255, 0.92);
	font-size: var(--font-size-normal);
	line-height: 1.65;
}

.weblance-single-prose h2,
.weblance-single-prose h3 {
	font-family: var(--font-family-heading);
	color: var(--text-on-dark);
	margin-top: 1.5em;
}

.weblance-single-prose a {
	color: var(--text-on-dark);
	opacity: 0.9;
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.35);
	text-underline-offset: 0.15em;
	transition: opacity 0.2s, text-decoration-color 0.2s;
}

.weblance-single-prose a:hover {
	opacity: 1;
	text-decoration-color: rgba(255, 255, 255, 0.65);
}

.single-tags {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 14px;
}

.single-tags .tags-label {
	color: rgba(255, 255, 255, 0.55);
	margin-right: 8px;
}

.single-tags .tag-link {
	color: var(--text-on-dark);
	opacity: 0.85;
	text-decoration: none;
	margin-right: 10px;
	transition: opacity 0.2s;
}

.single-tags .tag-link:hover {
	opacity: 1;
}

.single-tags .tag-link:hover {
	text-decoration: underline;
}

.single-author {
	margin-top: 40px;
	padding: 24px 20px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 980px) {
	.single-body__layout {
		grid-template-columns: 1fr;
	}

	.single-body__sidebar {
		position: static;
	}
}

.single-author__inner {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.single-author__avatar-img {
	display: block;
	border-radius: 50%;
	width: 72px;
	height: 72px;
	object-fit: cover;
}

.single-author__label {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.5);
}

.single-author__name {
	margin: 0 0 8px;
	font-family: var(--font-family-heading);
	font-size: 18px;
	font-weight: 800;
}

.single-author__name a {
	color: var(--text-on-dark);
	text-decoration: none;
}

.single-author__name a:hover {
	opacity: 0.85;
}

.single-author__bio {
	font-size: 14px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.75);
}

.single-author__bio p {
	margin: 0 0 0.6em;
}

.single-author__bio p:last-child {
	margin-bottom: 0;
}

.weblance-blog-single-main .post-navigation {
	padding: 24px var(--padding) 0;
	margin-left: auto;
	margin-right: auto;
	max-width: 1500px;
}

/* ── Post grid / cards ─────────────────────────────────── */

.posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.post-card {
	background: var(--surface);
	border: 1px solid var(--border-on-light);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s, box-shadow 0.25s;
	color: var(--text-primary);
}

.post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.post-card-image-wrap {
	position: relative;
	overflow: hidden;
}

.post-card-image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.post-card:hover .post-card-image img {
	transform: scale(1.04);
}

.card-cat-strip {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 26px;
	background: rgba(255, 255, 255, 0.16);
	overflow: hidden;
	z-index: 2;
	display: flex;
	justify-content: center;
}

.card-cat-marquee {
	display: flex;
	flex-direction: column;
	animation: weblance-cat-strip-scroll 6s linear infinite;
}

.card-cat-marquee span {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.92);
	padding: 20px 0;
	white-space: nowrap;
	flex-shrink: 0;
}

@keyframes weblance-cat-strip-scroll {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(calc(-100% / 3));
	}
}

.post-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.post-card-title {
	font-family: var(--font-family-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

.post-card-title a {
	color: var(--text-primary);
	text-decoration: none;
	transition: color 0.2s;
}

.post-card-title a:hover {
	color: var(--text-primary);
	opacity: 1;
	font-weight: 800;
}

.post-card-excerpt {
	font-size: 13px;
	color: rgba(8, 42, 84, 0.72);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

.post-card-meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 8px;
	flex-wrap: wrap;
}

.post-card-meta time,
.post-card-meta > span:not(.meta-sep) {
	font-size: 11px;
	font-weight: 500;
	padding: 3px 10px;
	background: rgba(8, 42, 84, 0.06);
	border: 1px solid var(--border-on-light);
	border-radius: 999px;
	color: rgba(8, 42, 84, 0.65);
	white-space: nowrap;
	line-height: 1.4;
}

.post-card-meta .meta-sep {
	display: none;
}

@media (min-width: 600px) {
	.posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ── Pagination ───────────────────────────────────────── */

.blog-archive-pagination,
.navigation.blog-archive-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 32px 0 0;
}

.blog-archive-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	align-items: center;
}

.blog-archive-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid var(--border-on-light);
	border-radius: 8px;
	color: var(--text-on-dark);
	background: rgba(255, 255, 255, 0.06);
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.blog-archive-pagination a.page-numbers:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.45);
}

.blog-archive-pagination .page-numbers.current {
	background: rgba(255, 255, 255, 0.18);
	color: var(--text-on-dark);
	border-color: rgba(255, 255, 255, 0.45);
	font-weight: 700;
}

.blog-archive-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: auto;
}

@media (max-width: 767px) {
	.posts-grid {
		display: flex;
		gap: 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 8px;
	}

	.posts-grid::-webkit-scrollbar {
		display: none;
	}

	.posts-grid .post-card {
		flex: 0 0 82%;
		max-width: 82%;
		scroll-snap-align: start;
	}
}
