/*
 * Blog — single post styles
 * Wymagania: Font Awesome 6 Free
 * Paleta: Navy #1a3a5c · Red #c0392b · Light #f4f6f8
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.ka-post {
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 24px 64px;
}

.ka-post-layout {
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: 48px;
	align-items: start;
}

@media ( max-width: 900px ) {
	.ka-post-layout { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================================
   LEWA — obraz
   ========================================================================== */

.ka-post-col-left {
	position: sticky;
	top: 24px;
	min-width: 0;
}

.ka-post-img-wrap {
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: #eaedf0;
	box-shadow: 0 4px 20px rgba(0,0,0,.10);
}

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

.ka-post-img-wrap--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 56px;
}

/* ==========================================================================
   PRAWA — treść
   ========================================================================== */

.ka-post-col-right {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Kategorie */
.ka-post-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ka-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 20px;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .04em;
	transition: background .18s, color .18s;
}
.ka-badge--type       { background: #e8eef5; color: #1a3a5c; }
.ka-badge--type:hover { background: #1a3a5c; color: #fff; }

/* Tytuł */
.ka-post-title {
	margin: 0;
	font-size: clamp(22px, 3vw, 34px);
	font-weight: 700;
	line-height: 1.25;
	color: #1a3a5c;
}

/* ── Meta row — autor · data · czas czytania ── */
.ka-post-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: #777;
	padding-bottom: 4px;
}

.ka-post-meta__avatar {
	border-radius: 50%;
	display: block;
	width: 28px;
	height: 28px;
	object-fit: cover;
	border: 2px solid #e0e4ea;
	flex-shrink: 0;
}

.ka-post-meta__author {
	font-weight: 600;
	color: #2c3338;
	text-decoration: none;
}
.ka-post-meta__author:hover { color: #1a3a5c; }

.ka-post-meta__sep  { color: #ccc; }

.ka-post-meta__date { color: #555; }

.ka-post-meta__read {
	display: flex;
	align-items: center;
	gap: 4px;
	color: #555;
}
.ka-post-meta__read i { font-size: 11px; }

/* ── Treść ── */
.ka-post-content {
	font-size: 16px;
	line-height: 1.8;
	color: #2c3338;
	border-top: 1px solid #eaecee;
	padding-top: 24px;
}

.ka-post-content h2,
.ka-post-content h3,
.ka-post-content h4 { color: #1a3a5c; margin-top: 1.6em; margin-bottom: .5em; line-height: 1.3; }
.ka-post-content h2 { font-size: 1.5em; }
.ka-post-content h3 { font-size: 1.25em; }
.ka-post-content h4 { font-size: 1.1em; }

.ka-post-content p              { margin-bottom: 1.2em; }
.ka-post-content p:last-child   { margin-bottom: 0; }
.ka-post-content a              { color: #1a3a5c; text-decoration: underline; text-underline-offset: 3px; }
.ka-post-content a:hover        { color: #c0392b; }
.ka-post-content ul,
.ka-post-content ol             { padding-left: 1.5em; margin-bottom: 1.2em; }
.ka-post-content li             { margin-bottom: .4em; }

.ka-post-content blockquote {
	margin: 1.6em 0;
	padding: 16px 20px;
	border-left: 4px solid #1a3a5c;
	background: #f4f6f8;
	border-radius: 0 8px 8px 0;
	font-style: italic;
	color: #444;
}
.ka-post-content blockquote p:last-child { margin-bottom: 0; }

.ka-post-content img     { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 1.2em auto; }
.ka-post-content code    { background: #f0f3f6; padding: 2px 6px; border-radius: 4px; font-size: .9em; color: #c0392b; }
.ka-post-content pre     { background: #1d2327; color: #e0e4e8; padding: 20px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin-bottom: 1.2em; }
.ka-post-content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.ka-post-pages { margin-top: 24px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 14px; color: #777; }
.ka-post-pages a,
.ka-post-pages .post-page-numbers { padding: 4px 10px; background: #f4f6f8; border-radius: 6px; color: #1a3a5c; text-decoration: none; font-weight: 600; }
.ka-post-pages a:hover,
.ka-post-pages .post-page-numbers.current { background: #1a3a5c; color: #fff; }

/* ── Tagi ── */
.ka-post-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid #eaecee;
}
.ka-post-tags__icon { font-size: 13px; color: #aaa; }

.ka-post-tag {
	display: inline-block;
	padding: 3px 12px;
	font-size: 12px;
	font-weight: 500;
	border-radius: 20px;
	text-decoration: none;
	background: #eaecee;
	color: #555;
	transition: background .15s, color .15s;
}
.ka-post-tag:hover { background: #1a3a5c; color: #fff; }

/* ── Bio autora ── */
.ka-post-bio {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 18px 20px;
	background: #f4f6f8;
	border-radius: 10px;
	border-left: 3px solid #1a3a5c;
}
.ka-post-bio__avatar {
	border-radius: 50%;
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid #d0d8e2;
}
.ka-post-bio__body   { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ka-post-bio__label  { font-size: 10px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: .06em; }
.ka-post-bio__name   { font-size: 14px; font-weight: 700; color: #1a3a5c; text-decoration: none; }
.ka-post-bio__name:hover { color: #c0392b; }
.ka-post-bio__text   { margin: 0; font-size: 13px; line-height: 1.6; color: #555; }

/* ── Nawigacja prev/next ── */
.ka-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
@media ( max-width: 500px ) { .ka-post-nav { grid-template-columns: 1fr; } }

.ka-post-nav__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 18px;
	background: #f4f6f8;
	border-radius: 10px;
	text-decoration: none;
	border: 1.5px solid transparent;
	transition: background .18s, transform .15s, box-shadow .18s;
	overflow: hidden;
}
.ka-post-nav__item:hover      { background: #fff; border-color: #d0d8e2; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.ka-post-nav__item--next      { text-align: right; }

.ka-post-nav__dir {
	font-size: 11px;
	font-weight: 700;
	color: #1a3a5c;
	text-transform: uppercase;
	letter-spacing: .06em;
	display: flex;
	align-items: center;
	gap: 5px;
}
.ka-post-nav__item--next .ka-post-nav__dir { justify-content: flex-end; }

.ka-post-nav__title {
	font-size: 14px;
	font-weight: 600;
	color: #2c3338;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ka-post-nav__item:hover .ka-post-nav__title { color: #1a3a5c; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.ka-breadcrumb-wrap           { margin-bottom: 0; }
.ka-breadcrumb                { font-size: 13px; color: #888; }
.ka-breadcrumb__list          { list-style: none; margin: 0; padding: 0; line-height: 1.6; }
.ka-breadcrumb__item          { display: inline; color: #888; }
.ka-breadcrumb__item:not(.ka-breadcrumb__item--current)::after { content: " ›"; color: #bbb; margin: 0 5px 0 2px; font-size: 12px; }
.ka-breadcrumb__item a        { color: #555; text-decoration: none; transition: color .15s; }
.ka-breadcrumb__item a:hover  { color: #1a3a5c; }
.ka-breadcrumb__item--current { color: #1a3a5c; font-weight: 600; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rank-math-breadcrumb         { font-size: 13px; color: #888; }
.rank-math-breadcrumb p       { margin: 0; }
.rank-math-breadcrumb a       { color: #555; text-decoration: none; }
.rank-math-breadcrumb a:hover { color: #1a3a5c; }
.rank-math-breadcrumb .separator { color: #bbb; font-size: 10px; margin: 0 6px; }

.ka-breadcrumb-wrap .yoast-breadcrumb     { font-size: 13px; color: #888; }
.ka-breadcrumb-wrap .yoast-breadcrumb a   { color: #555; text-decoration: none; }
.ka-breadcrumb-wrap .yoast-breadcrumb a:hover { color: #1a3a5c; }
