/**
 * BLOG - osobny arkusz (NIE z gulpa). Ładowany w inc/blog.php tylko na wpisach i stronie "Blog".
 * Wszystkie klasy mają prefiks .bl- - nie kolidują ze stylami z build-style.css.
 */

:root {
	--bl-dark: #1A1C2E;
	--bl-yellow: #FFC255;
	--bl-yellow-soft: #FFF3DC;
	--bl-blue: #789EC2;
	--bl-blue-soft: #E8EEF5;
	--bl-gray: #F1F1F1;
	--bl-offwhite: #EBE7E4;
	--bl-line: #E3E3E6;
	--bl-muted: #6B6D7B;
	--bl-radius: 20px;
	--bl-radius-sm: 14px;
	--bl-text: 720px;
	--bl-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Kontenery ---------- */

.bl-wrap {
	width: 100%;
	margin: 0 auto;
	padding: 0 24px;
}
.bl-wrap--text { max-width: calc(var(--bl-text) + 48px); }
.bl-wrap--head { max-width: calc(860px + 48px); }
.bl-wrap--wide { max-width: calc(1240px + 48px); }

@media (max-width: 576px) {
	.bl-wrap { padding: 0 16px; }
}

/* ---------- Drobne elementy ---------- */

.bl-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--bl-muted);
}
.bl-eyebrow::before {
	content: '';
	width: 22px;
	height: 2px;
	background: var(--bl-yellow);
	border-radius: 2px;
}

.bl-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--bl-muted);
}
.bl-meta__dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--bl-yellow);
}

.bl-tag {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid var(--bl-blue);
	border-radius: 100px;
	color: var(--bl-dark);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	transition: background-color .3s, border-color .3s;
}
a.bl-tag:hover { background: var(--bl-yellow); border-color: var(--bl-yellow); }

/* ---------- LISTA WPISÓW ---------- */

.bl-list {
	padding: 72px 0 112px;
}
.bl-list__head {
	max-width: 760px;
	margin-bottom: 56px;
}
.bl-list__title {
	margin: 0 0 16px;
	font-size: 56px;
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -.02em;
}
.bl-list__lead {
	font-size: 18px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--bl-muted);
	max-width: 620px;
}
.bl-list__empty {
	font-size: 16px;
	color: var(--bl-muted);
}

@media (max-width: 992px) {
	.bl-list { padding: 48px 0 80px; }
	.bl-list__head { margin-bottom: 40px; }
	.bl-list__title { font-size: 40px; }
	.bl-list__lead { font-size: 16px; }
}

.bl-featured {
	margin-bottom: 56px;
	padding-bottom: 56px;
	border-bottom: 1px solid var(--bl-line);
}

.bl-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 32px;
}
@media (max-width: 992px) {
	.bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
	.bl-featured { margin-bottom: 40px; padding-bottom: 40px; }
}
@media (max-width: 576px) {
	.bl-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- KARTA WPISU ---------- */

.bl-card {
	position: relative;
	display: flex;
	flex-direction: column;
}
.bl-card__image {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2;
	border-radius: var(--bl-radius-sm);
	overflow: hidden;
	background: var(--bl-gray);
	margin-bottom: 20px;
}
.bl-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s var(--bl-ease);
}
.bl-card:hover .bl-card__image img { transform: scale(1.04); }

.bl-card__badge {
	position: absolute;
	z-index: 2;
	top: 16px;
	right: 16px;
	padding: 6px 12px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 16px rgba(26, 28, 46, .08);
}
.bl-card__badge img {
	display: block;
	max-width: 110px;
	height: auto;
	transform: none !important;
}

.bl-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
}
.bl-card__title {
	margin: 14px 0 10px;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -.01em;
}
.bl-card__title a {
	color: inherit;
	background-image: linear-gradient(var(--bl-yellow), var(--bl-yellow));
	background-size: 0 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size .5s var(--bl-ease);
}
/* cała karta klikalna */
.bl-card__title a::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}
.bl-card:hover .bl-card__title a { background-size: 100% 2px; }

.bl-card__excerpt {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--bl-muted);
	margin-bottom: 18px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bl-card__more {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
}
.bl-card__more svg { transition: transform .4s var(--bl-ease); }
.bl-card:hover .bl-card__more svg { transform: translateX(4px); }

/* wyróżniony */
.bl-card--featured {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
}
.bl-card--featured .bl-card__image {
	aspect-ratio: 16 / 11;
	border-radius: var(--bl-radius);
	margin-bottom: 0;
}
.bl-card--featured .bl-card__title {
	font-size: 34px;
	line-height: 1.15;
	letter-spacing: -.02em;
	margin: 18px 0 16px;
}
.bl-card--featured .bl-card__excerpt {
	font-size: 16px;
	-webkit-line-clamp: 4;
	margin-bottom: 28px;
}
@media (max-width: 992px) {
	.bl-card--featured { grid-template-columns: 1fr; gap: 24px; }
	.bl-card--featured .bl-card__title { font-size: 26px; }
}

/* paginacja (markup z functions.php -> pagination()) */
.bl-pagination { margin-top: 64px; }
.bl-pagination .pagination { justify-content: center; }

/* ---------- ARTYKUŁ ---------- */

.bl-article {
	padding: 56px 0 96px;
}
@media (max-width: 992px) {
	.bl-article { padding: 32px 0 72px; }
}

.bl-back {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 40px;
	font-size: 14px;
	font-weight: 400;
	color: var(--bl-muted);
	transition: color .3s;
}
.bl-back svg {
	transform: rotate(180deg);
	transition: transform .4s var(--bl-ease);
}
.bl-back svg path { fill: currentColor; }
.bl-back:hover { color: var(--bl-dark); }
.bl-back:hover svg { transform: rotate(180deg) translateX(4px); }

.bl-article__head {
	margin-bottom: 48px;
}
.bl-article__title {
	margin: 20px 0 0;
	font-size: 48px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -.02em;
	text-wrap: balance;
}
.bl-article__lead {
	margin-top: 24px;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.55;
	color: var(--bl-muted);
}
@media (max-width: 992px) {
	.bl-article__title { font-size: 34px; }
	.bl-article__lead { font-size: 18px; }
	.bl-back { margin-bottom: 28px; }
	.bl-article__head { margin-bottom: 32px; }
}
@media (max-width: 476px) {
	.bl-article__title { font-size: 28px; line-height: 1.15; }
}

/* podpis autora pod tytułem */
.bl-byline {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 32px;
}
.bl-byline__photo {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(to bottom, #efefef 0%, rgba(120, 158, 194, .45) 100%);
	font-size: 15px;
	font-weight: 500;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bl-yellow);
}
.bl-byline__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}
.bl-byline__txt {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--bl-muted);
}
.bl-byline__txt strong {
	font-size: 15px;
	font-weight: 500;
	color: var(--bl-dark);
}

/* zdjęcie główne */
.bl-hero {
	margin-bottom: 64px;
}
.bl-hero__frame {
	position: relative;
	border-radius: var(--bl-radius);
	overflow: hidden;
	background: var(--bl-gray);
	aspect-ratio: 16 / 9;
}
.bl-hero__frame > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.bl-hero figcaption,
.bl-figure figcaption,
.bl-content .wp-caption-text {
	margin-top: 14px;
	font-size: 14px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.5;
	color: var(--bl-muted);
	text-align: center;
}
@media (max-width: 992px) {
	.bl-hero { margin-bottom: 40px; }
	.bl-hero__frame { aspect-ratio: 4 / 3; border-radius: var(--bl-radius-sm); }
}
@media (max-width: 576px) {
	.bl-hero.bl-wrap { padding: 0; }
	.bl-hero__frame { border-radius: 0; }
	.bl-hero figcaption { margin-left: 16px; margin-right: 16px; }
}

/* ---------- TREŚĆ ARTYKUŁU (WYSIWYG) ---------- */

.bl-content {
	font-size: 18px;
	font-weight: 400;
	line-height: 1.75;
	color: #2B2D3D;
}
@media (max-width: 576px) {
	.bl-content { font-size: 17px; line-height: 1.7; }
}

.bl-content > *:first-child { margin-top: 0 !important; }

.bl-content p {
	margin: 0 0 1.4em;
}
/* pierwszy akapit - lekko większy (lead) */
.bl-content > p:first-child {
	font-size: 1.12em;
	line-height: 1.65;
	color: var(--bl-dark);
}

.bl-content h2,
.bl-content h3,
.bl-content h4 {
	color: var(--bl-dark);
	font-weight: 500;
	letter-spacing: -.01em;
	text-wrap: pretty;
}
.bl-content h2 {
	position: relative;
	margin: 2.4em 0 .8em;
	padding-top: 22px;
	font-size: 30px;
	line-height: 1.2;
}
.bl-content h2::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 40px;
	height: 3px;
	border-radius: 3px;
	background: var(--bl-yellow);
}
.bl-content h3 {
	margin: 2em 0 .6em;
	font-size: 23px;
	line-height: 1.3;
}
.bl-content h4,
.bl-content h5,
.bl-content h6 {
	margin: 1.8em 0 .5em;
	font-size: 19px;
	line-height: 1.35;
}
@media (max-width: 576px) {
	.bl-content h2 { font-size: 25px; }
	.bl-content h3 { font-size: 21px; }
}

.bl-content strong,
.bl-content b {
	font-weight: 500;
	color: var(--bl-dark);
}

.bl-content a:not(.btn) {
	color: var(--bl-dark);
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: var(--bl-yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
	transition: text-decoration-color .3s, color .3s;
}
.bl-content a:not(.btn):hover {
	color: var(--bl-blue);
	text-decoration-color: var(--bl-blue);
}

/* punktory w kolorze Sowy */
.bl-content ul,
.bl-content ol {
	list-style: none;
	margin: 0 0 1.6em;
	padding: 0;
}
.bl-content li {
	position: relative;
	margin-bottom: .7em;
	padding-left: 34px;
}
.bl-content li,
.bl-content li > p { line-height: 1.7; font-size: inherit; }
.bl-content li > p { margin: 0; }
.bl-content ul > li::before {
	content: '';
	position: absolute;
	left: 6px;
	top: .62em;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	background: var(--bl-yellow);
	transform: rotate(45deg);
}
.bl-content ul ul > li::before {
	background: transparent;
	border: 2px solid var(--bl-blue);
	width: 8px;
	height: 8px;
}
.bl-content ol { counter-reset: bl-ol; }
.bl-content ol > li {
	counter-increment: bl-ol;
	margin-bottom: 0;
	padding: 14px 0 14px 52px;
	border-bottom: 1px solid var(--bl-line);
}
.bl-content ol > li:first-child { border-top: 1px solid var(--bl-line); }
.bl-content ol > li::before {
	content: counter(bl-ol);
	position: absolute;
	left: 4px;
	top: 10px;
	color: var(--bl-dark);
	font-size: 28px;
	font-weight: 500;
	line-height: 1.2;
}
.bl-content li ul,
.bl-content li ol { margin: .6em 0 0; }

/* cytat / wyróżnienie */
.bl-content blockquote {
	position: relative;
	margin: 2em 0;
	padding: 28px 32px 28px 36px;
	border-radius: var(--bl-radius-sm);
	background: var(--bl-offwhite);
	font-size: 1.1em;
	line-height: 1.6;
	color: var(--bl-dark);
}
.bl-content blockquote::before {
	content: '';
	position: absolute;
	left: 0;
	top: 24px;
	bottom: 24px;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--bl-yellow);
}
.bl-content blockquote p:last-child { margin-bottom: 0; }

.bl-content hr {
	border: 0;
	height: 1px;
	background: var(--bl-line);
	margin: 3em 0;
}

/* zdjęcia w treści (WYSIWYG + [caption]) - szersze niż kolumna tekstu */
.bl-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--bl-radius-sm);
}
.bl-content .wp-caption,
.bl-figure {
	width: auto !important;
	max-width: none;
	margin: 2.4em -120px;
}
.bl-content .wp-caption img,
.bl-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--bl-radius-sm);
}
.bl-figure figcaption,
.bl-content .wp-caption-text { margin-left: 0; margin-right: 0; }
.bl-content p > img.aligncenter,
.bl-content img.aligncenter { display: block; margin: 2em auto; }
.bl-content .alignleft { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.bl-content .alignright { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
@media (max-width: 1040px) {
	.bl-content .wp-caption,
	.bl-figure { margin: 2em 0; }
}
@media (max-width: 576px) {
	.bl-content .alignleft,
	.bl-content .alignright { float: none; max-width: 100%; margin: 1.6em 0; }
}

/* tabele */
.bl-content table {
	width: 100%;
	margin: 2em 0;
	border-collapse: collapse;
	font-size: .9em;
}
.bl-content th,
.bl-content td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--bl-line);
	text-align: left;
}
.bl-content th { background: var(--bl-gray); font-weight: 500; }

/* ---------- AUTOR + CTA ---------- */

/* szerokość jak zdjęcia w treści (960px): zdjęcie | o autorze | kontakt */
.bl-author {
	position: relative;
	display: grid;
	grid-template-columns: 170px minmax(0, 1fr) 290px;
	gap: 32px;
	margin: 80px -120px 0;
	padding: 44px;
	border-radius: var(--bl-radius);
	background: var(--bl-dark);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
}
/* pattern z identyfikacji - tylko za kolumną kontaktu, wygaszony w lewo */
.bl-author::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 420px;
	z-index: -1;
	background: url(../img/blog-pattern.webp) right center / 560px auto repeat-y;
	opacity: .22;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%);
	mask-image: linear-gradient(to right, transparent 0%, #000 55%);
	pointer-events: none;
}
.bl-author__photo {
	align-self: start;
	aspect-ratio: 4 / 5;
	border-radius: var(--bl-radius-sm);
	overflow: hidden;
	background: linear-gradient(to bottom, #efefef 0%, rgba(120, 158, 194, .6) 100%);
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.bl-author__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}
.bl-author__initials {
	align-self: center;
	font-size: 48px;
	font-weight: 500;
	color: var(--bl-dark);
}
.bl-author__content {
	display: flex;
	flex-direction: column;
}
.bl-author .bl-eyebrow { color: var(--bl-yellow); }
.bl-author__name {
	margin-top: 14px;
	font-size: 28px;
	font-weight: 500;
	line-height: 1.15;
}
.bl-author__position {
	margin-top: 6px;
	font-size: 14px;
	font-weight: 400;
	color: var(--bl-blue);
}
.bl-author__bio {
	margin-top: 18px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
	color: rgba(255, 255, 255, .78);
}
.bl-author__bio p { margin: 0 0 .8em; }
.bl-author__bio p:last-child { margin-bottom: 0; }

.bl-author__cta {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 14px;
	padding-left: 32px;
	border-left: 1px solid rgba(255, 255, 255, .14);
}
.bl-author__cta-title {
	margin-bottom: 6px;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.35;
}
.bl-author__cta .btn {
	width: 100%;
	text-align: center;
	color: var(--bl-dark);
	margin-bottom: 6px;
}
.bl-author__contact {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: 100%;
	font-size: 13px;
	font-weight: 400;
	color: #fff;
	transition: color .3s;
}
.bl-author__contact span { white-space: nowrap; }
@media (max-width: 420px) { .bl-author__contact span { white-space: normal; overflow-wrap: anywhere; } }
.bl-author__contact svg { flex: 0 0 16px; width: 16px; height: 16px; }
.bl-author__contact svg path { fill: var(--bl-yellow); }
.bl-author__contact:hover { color: var(--bl-yellow); }

/* węższy ekran: kontakt przechodzi pod spód, w poziomie */
@media (max-width: 1040px) {
	.bl-author {
		grid-template-columns: 180px minmax(0, 1fr);
		margin: 64px 0 0;
		padding: 40px;
	}
	.bl-author::before { top: auto; height: 260px; }
	.bl-author__cta {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		gap: 14px 28px;
		padding: 28px 0 0;
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, .14);
	}
	.bl-author__cta-title { flex: 1 1 100%; margin: 0; }
	.bl-author__cta .btn { width: auto; margin: 0; }
}
@media (max-width: 768px) {
	.bl-author {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 28px 24px 32px;
		margin-top: 56px;
	}
	.bl-author__photo {
		width: 120px;
		aspect-ratio: 1;
		border-radius: 50%;
	}
	.bl-author__cta { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; }
	.bl-author__cta-title { flex: none; }
	.bl-author__cta .btn { width: 100%; }
	.bl-author::before { width: 100%; height: 220px; }
}

/* ---------- CZYTAJ DALEJ ---------- */

.bl-more {
	padding: 88px 0 104px;
	background: var(--bl-offwhite);
}
.bl-more__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 40px;
}
.bl-more__title {
	font-size: 36px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -.02em;
}
.bl-more__head .link { white-space: nowrap; }
.bl-more .bl-card__image { background: #dcd7d3; }
@media (max-width: 992px) {
	.bl-more { padding: 64px 0 72px; }
	.bl-more__title { font-size: 28px; }
	.bl-more .bl-grid > .bl-card:nth-child(3) { display: none; }
}
@media (max-width: 576px) {
	.bl-more .bl-grid > .bl-card:nth-child(3) { display: flex; }
}
