:root {
	--kh-orange: #ff5a0a;
	--kh-ink: #111214;
	--kh-muted: #62666b;
	--kh-line: #e4e5e7;
	--kh-panel: #f7f7f7;
}

.kh-blog-archive,
.kh-single-stage {
	box-sizing: border-box;
	font-family: inherit;
}

.kh-blog-archive *,
.kh-blog-archive *::before,
.kh-blog-archive *::after,
.kh-single-stage *,
.kh-single-stage *::before,
.kh-single-stage *::after {
	box-sizing: inherit;
}

.kh-blog-archive .screen-reader-text,
.kh-single-stage .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Archiwum */
.kh-blog-archive {
	width: min(100%, 1690px);
	margin-inline: auto;
	color: var(--kh-ink);
}

.kh-blog-toolbar {
	position: relative;
	z-index: 20;
	display: grid;
	grid-template-columns: minmax(255px, 360px) minmax(0, 1fr) 178px;
	align-items: center;
	gap: 28px;
	margin: 0 0 54px;
}

.kh-blog-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 13px;
	height: 58px;
	padding: 0 18px;
	background: #fff;
	border: 1px solid #d9dadd;
	
}

.kh-blog-search:focus-within {
	border-color: var(--kh-orange);
	box-shadow: 0 0 0 3px rgba(255, 90, 10, .12);
}

.kh-blog-search svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: #282b2e;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.kh-blog-search input {
	width: 100%;
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	color: var(--kh-ink);
	font: inherit;
	font-size: 14px;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: 0;
}

.kh-blog-search input::placeholder {
	color: #777b80;
	opacity: 1;
}

.kh-blog-suggestions[hidden] {
	display: none !important;
}

.kh-blog-suggestions {
	position: absolute;
	z-index: 100;
	top: calc(100% + 9px);
	left: 0;
	width: min(430px, calc(100vw - 30px));
	max-height: 430px;
	padding: 7px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #dedfe1;
	border-radius: 9px;
	box-shadow: 0 18px 45px rgba(18, 24, 29, .16);
}

.kh-blog-suggestions__item {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	min-height: 70px;
	padding: 7px;
	color: var(--kh-ink) !important;
	text-decoration: none !important;
	border-radius: 6px;
}

.kh-blog-suggestions__item + .kh-blog-suggestions__item {
	border-top: 1px solid #eeeeef;
}

.kh-blog-suggestions__item:hover,
.kh-blog-suggestions__item.is-active {
	background: #f5f5f5;
}

.kh-blog-suggestions__media {
	display: block;
	width: 58px;
	height: 54px;
	overflow: hidden;
	background: #e9eaeb;
	border-radius: 5px;
}

.kh-blog-suggestions__media.is-placeholder {
	background: linear-gradient(135deg, #31566d, #15222b);
}

.kh-blog-suggestions__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kh-blog-suggestions__copy {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.kh-blog-suggestions__copy strong {
	display: -webkit-box;
	overflow: hidden;
	color: var(--kh-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.kh-blog-suggestions__copy small {
	color: var(--kh-orange);
	font-size: 10px;
	font-weight: 750;
	text-transform: uppercase;
}

.kh-blog-suggestions__empty {
	padding: 16px 14px;
	color: #656a70;
	font-size: 12px;
	text-align: center;
}

.kh-blog-categories {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: thin;
	padding: 3px 0;
}

.kh-blog-categories a {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 57px;
	padding: 9px 21px;
	color: #292c30;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	background: #f5f5f5;
	border: 1px solid #e7e7e7;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.kh-blog-categories a:hover {
	transform: translateY(-1px);
	border-color: #c9cbce;
}

.kh-blog-categories a.is-active {
	color: #fff;
	background: var(--kh-orange);
	border-color: var(--kh-orange);

}

.kh-blog-order {
	position: relative;
}

.kh-blog-order::after {
	content: '';
	position: absolute;
	right: 18px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #111;
	border-bottom: 2px solid #111;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.kh-blog-order select {
	width: 100%;
	height: 58px;
	padding: 0 45px 0 20px !important;
	margin: 0 !important;
	color: #202225;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	background: #fff !important;
	border: 1px solid #d9dadd !important;
	box-shadow: none !important;
	appearance: none;
	cursor: pointer;
}

.kh-blog-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
	align-items: start;
	gap: 38px;
}

.kh-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px 14px;
}

.kh-blog-card {
	display: flex;
	min-width: 0;
	min-height: 570px;
	flex-direction: column;
	overflow: hidden;
	background: #f8f8f8;
	border: 1px solid #eeeeef;
	box-shadow: 0 5px 18px rgba(20, 24, 28, .035);
	transition: transform .25s ease, box-shadow .25s ease;
}

.kh-blog-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 13px 30px rgba(20, 24, 28, .1);
}

.kh-blog-card__image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1.58 / 1;
	background-position: center;
	background-size: cover;
	text-decoration: none !important;
	overflow: hidden;
}

.kh-blog-card__image.is-placeholder,
.kh-single-hero.is-placeholder {
	background: linear-gradient(135deg, #31566d 0%, #15222b 55%, #0b1115 100%);
}

.kh-blog-card__image::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, .05), transparent 45%);
}

.kh-blog-card__category,
.kh-single-hero__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .015em;
	background: var(--kh-orange);
	border-radius: 2px;
}

.kh-blog-card__category {
	position: absolute;
	top: 24px;
	left: 22px;
	z-index: 2;
	padding: 7px 10px;
}

.kh-blog-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 13px 21px 20px;
}

.kh-blog-card__date {
	margin-bottom: 15px;
	color: #73777c;
	font-size: 12px;
	line-height: 1.2;
}

.kh-blog-card__title {
	margin: 0 0 10px !important;
	padding: 0 !important;
	font-size: clamp(19px, 1.22vw, 24px) !important;
	font-weight: 750 !important;
	line-height: 1.12 !important;
	letter-spacing: -.025em;
}

.kh-blog-card__title a {
	color: var(--kh-ink) !important;
	text-decoration: none !important;
}

.kh-blog-card__title a:hover {
	color: var(--kh-orange) !important;
}

.kh-blog-card__excerpt {
	margin: 0 0 22px !important;
	color: #2f3337;
	font-size: 14px;
	line-height: 1.48;
}

.kh-blog-card__meta {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-top: auto;
	color: #4d5156;
	font-size: 11px;
	white-space: nowrap;
}

.kh-blog-card__avatar,
.kh-single-hero__avatar {
	object-fit: cover;
	border-radius: 50% !important;
}

.kh-blog-card__avatar {
	width: 32px !important;
	height: 32px !important;
	margin-right: 2px;
}

.kh-blog-dot,
.kh-single-dot {
	display: inline-block;
	flex: 0 0 4px;
	width: 4px;
	height: 4px;
	background: var(--kh-orange);
	border-radius: 50%;
}

.kh-blog-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 72px;
	padding-top: 28px;
}

.kh-blog-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 285px;
	min-height: 52px;
	padding: 13px 25px;
	color: #15171a !important;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none !important;
	background: #fff;
	border: 2px solid #15171a;
	border-radius: 5px;
	transition: color .2s ease, background-color .2s ease;
}

.kh-blog-load-more:hover,
.kh-blog-load-more.is-loading {
	color: #fff !important;
	background: #15171a;
}

.kh-blog-load-more.is-loading {
	pointer-events: none;
	opacity: .75;
}

.kh-blog-pagination__previous {
	color: #555b60 !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
}

.kh-blog-empty {
	padding: 40px;
	margin: 0;
	text-align: center;
	background: var(--kh-panel);
	border: 1px solid var(--kh-line);
	border-radius: 8px;
}

/* Sidebar archiwum */
.kh-blog-sidebar {
	display: grid;
	gap: 30px;
}

.kh-blog-panel {
	padding: 28px 30px;
	background: var(--kh-panel);
	border: 1px solid #f0f0f0;
	box-shadow: 0 5px 18px rgba(20, 24, 28, .025);
}

.kh-blog-panel h2 {
	margin: 0 0 24px !important;
	padding: 0 !important;
	color: var(--kh-ink);
	font-size: 20px !important;
	font-weight: 750 !important;
	line-height: 1.2 !important;
}

.kh-blog-newsletter {
	padding-top: 34px;
}

.kh-blog-newsletter__heading {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 22px;
}

.kh-blog-newsletter__heading svg {
	width: 37px;
	height: 37px;
	fill: none;
	stroke: var(--kh-orange);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.kh-blog-newsletter__heading h2 {
	margin: 0 !important;
	font-size: 21px !important;
}

.kh-blog-newsletter > p {
	margin: 0 0 21px !important;
	color: #33373b;
	font-size: 14px;
	line-height: 1.65;
}

.kh-blog-newsletter__form {
	display: grid;
	gap: 14px;
}

.kh-blog-newsletter__form input {
	width: 100%;
	height: 55px;
	padding: 0 18px !important;
	margin: 0 !important;
	color: #202225;
	font: inherit;
	font-size: 13px;
	background: #fff !important;
	border: 1px solid #dedfe1 !important;
	box-shadow: none !important;
}

.kh-blog-newsletter__form button {
	width: 100%;
	height: 54px;
	padding: 0 15px !important;
	margin: 0 !important;
	color: #fff !important;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	background: var(--kh-orange) !important;
	border: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}

.kh-blog-newsletter small {
	display: block;
	margin-top: 16px;
	color: #777b80;
	font-size: 10px;
}

.kh-blog-tags__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.kh-blog-tags__list a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 32px;
	padding: 6px 11px;
	color: #4e5358 !important;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none !important;
	background: #fff;
	border: 1px solid #dedfe1;
	border-radius: 4px;
}

.kh-blog-tags__list a span {
	color: var(--kh-orange);
}

.kh-blog-tags__list a:hover {
	color: var(--kh-orange) !important;
	border-color: var(--kh-orange);
}

.kh-blog-guides__list > a {
	display: grid;
	grid-template-columns: 50px minmax(0, 1fr) 18px;
	align-items: center;
	gap: 14px;
	padding: 19px 0;
	color: var(--kh-ink) !important;
	text-decoration: none !important;
	border-top: 1px solid #dedfe1;
}

.kh-blog-guides__list > a:first-child {
	padding-top: 0;
	border-top: 0;
}

.kh-blog-guides__list > a:last-child {
	padding-bottom: 0;
}

.kh-blog-guides__icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.kh-blog-guides__icon svg {
	width: 42px;
	height: 42px;
	fill: none;
	stroke: #17191b;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.kh-blog-guides__copy {
	display: grid;
	gap: 5px;
}

.kh-blog-guides__copy strong {
	font-size: 13px;
	line-height: 1.25;
}

.kh-blog-guides__copy small {
	color: #555a5f;
	font-size: 10px;
	line-height: 1.35;
}

.kh-blog-guides__arrow {
	color: var(--kh-orange);
	font-size: 28px;
	line-height: 1;
}

/* Hero pojedynczego wpisu */
.kh-single-stage {
	position: relative;
    width: min(100%, 1120px);
    margin-inline: auto;
    padding: 0px;
    overflow: hidden;
}
.kh-blog-heroa .mcb-column-inner {
    height: 100%;
}

.kh-blog-heroa .desc {
    height: 100%;
}

.kh-blog-heroa section.kh-single-stage {
    height: 100%;
}
.kh-single-hero {
    height: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .35);
}

.kh-single-stage.has-no-related .kh-single-hero {
	width: min(100%, 720px);
}

.kh-single-hero::before {
	content: '';
	position: absolute;
	z-index: 0;
	inset: 0;
	background:
		linear-gradient(to bottom, rgba(0, 0, 0, .02) 20%, rgba(0, 0, 0, .2) 52%, rgba(0, 0, 0, .92) 100%),
		linear-gradient(to right, rgba(0, 0, 0, .16), transparent 55%);
}

.kh-single-hero__post-link {
	position: absolute;
	z-index: 1;
	inset: 0;
	text-decoration: none !important;
}

.kh-single-hero__badge {
	position: absolute;
	z-index: 2;
	top: 38px;
	left: 38px;
	padding: 10px 13px;
	font-size: 12px;
	pointer-events: none;
}

.kh-single-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 46px 42px 40px;
	pointer-events: none;
}

.kh-single-hero__terms {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.kh-single-hero__terms a {
	color: #fff !important;
	text-decoration: none !important;
	pointer-events: auto;
}

.kh-single-hero__terms a:first-child {
	color: var(--kh-orange) !important;
}

.kh-single-hero h1 {
	max-width: 630px;
	margin: 0 0 16px !important;
	padding: 0 !important;
	color: #fff !important;
	font-size: clamp(33px, 4.1vw, 31px) !important;
	font-weight: 780 !important;
	line-height: 1.04 !important;
	letter-spacing: -.035em;
}

.kh-single-hero__excerpt {
	max-width: 570px;
	margin: 0 0 28px !important;
	color: rgba(255, 255, 255, .93);
	font-size: 15px;
	line-height: 1.45;
}

.kh-single-hero__meta {
	display: flex;
	align-items: center;
	gap: 11px;
	color: #fff;
	font-size: 11px;
	line-height: 1;
	white-space: nowrap;
}

.kh-single-hero__avatar {
	width: 36px !important;
	height: 36px !important;
	margin-right: 2px;
	border: 1px solid rgba(255, 255, 255, .4) !important;
}

/* Mini shortcode'y pojedynczego wpisu */
.kh-post-meta-shortcode {
	color: inherit;
	pointer-events: auto;
}

.kh-post-meta-shortcode .kh-single-hero__avatar {
	border-color: rgba(20, 22, 24, .14) !important;
}

.kh-post-category-shortcode {
	position: static;
	vertical-align: middle;
}

/* Spis tresci dla naglowkow BeTheme */
.kh-post-toc[hidden] {
	display: none !important;
}

.kh-post-toc {
	width: 100%;
	padding: 25px 27px;
	color: var(--kh-ink);
	background: var(--kh-panel);
	border: 1px solid var(--kh-line);

}

.kh-post-toc__title {
	margin: 0 0 18px !important;
	padding: 0 !important;
	color: var(--kh-ink) !important;
	font-size: 20px !important;
	font-weight: 750 !important;
	line-height: 1.2 !important;
}

.kh-post-toc__list {
	display: grid;
	gap: 0;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
	counter-reset: kh-toc;
}

.kh-post-toc__item {
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
	counter-increment: kh-toc;
}

.kh-post-toc__item a {
	display: grid;
	grid-template-columns: 27px minmax(0, 1fr);
	gap: 5px;
	padding: 11px 4px;
	color: #303438 !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none !important;
	border-top: 1px solid #dedfe1;
}

.kh-post-toc__item:first-child a {
	border-top: 0;
}

.kh-post-toc__item a::before {
	content: counter(kh-toc) '.';
	color: var(--kh-orange);
	font-weight: 800;
}

.kh-post-toc__item a:hover {
	color: var(--kh-orange) !important;
}

.kh-post-toc__item.is-level-3 {
	margin-left: 18px !important;
}

.kh-post-toc__item.is-level-4 {
	margin-left: 36px !important;
}

.kh-post-toc__item.is-level-5,
.kh-post-toc__item.is-level-6 {
	margin-left: 50px !important;
}

.kh-toc-target {
	scroll-margin-top: 200px;
}

.kh-single-related {
	position: absolute;
    z-index: 1;
    top: 0;
    right: 0;
    bottom: 0;
    left: 67%;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
}

.kh-single-related a {
	display: block;
	background-color: #1a2227;
	background-position: center;
	background-size: cover;
	
	transition: filter .2s ease, transform .2s ease;
}

.kh-single-related a:hover {
	filter: brightness(1.1);
	transform: translateX(4px);
}

@media (max-width: 1500px) {
	.kh-blog-layout {
		grid-template-columns: minmax(0, 1fr) 340px;
		gap: 25px;
	}

	.kh-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1180px) {
	.kh-blog-toolbar {
		grid-template-columns: 310px minmax(0, 1fr) 170px;
		gap: 18px;
	}

	.kh-blog-layout {
		grid-template-columns: minmax(0, 1fr) 310px;
	}

	.kh-blog-card {
		min-height: 535px;
	}

	.kh-blog-panel {
		padding-inline: 23px;
	}
}

@media (max-width: 980px) {
	.kh-blog-toolbar {
		grid-template-columns: minmax(0, 1fr) 180px;
		margin-bottom: 36px;
	}

	.kh-blog-categories {
		grid-column: 1 / -1;
		grid-row: 2;
	}

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

	.kh-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.kh-blog-sidebar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.kh-blog-guides {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.kh-blog-toolbar {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.kh-blog-categories {
		grid-column: 1;
		grid-row: auto;
	}

	.kh-blog-search,
	.kh-blog-order select {
		height: 52px;
	}

	.kh-blog-grid,
	.kh-blog-sidebar {
		grid-template-columns: 1fr;
	}

	.kh-blog-guides {
		grid-column: auto;
	}

	.kh-blog-card {
		min-height: 0;
	}

	.kh-blog-card__title {
		font-size: 22px !important;
	}

	.kh-blog-pagination {
		flex-direction: column-reverse;
	}

	.kh-blog-load-more {
		width: 100%;
		min-width: 0;
	}

}

@media (max-width: 520px) {
	.kh-single-stage {
		min-height: 650px;
		padding: 14px;
	}

	.kh-single-hero,
	.kh-single-stage.has-no-related .kh-single-hero {
		width: 100%;
		min-height: 622px;
		border-radius: 8px;
	}

	.kh-single-related {
		display: none;
	}

	.kh-single-hero__badge {
		top: 24px;
		left: 23px;
	}

	.kh-single-hero__content {
		padding: 34px 23px 28px;
	}

	.kh-single-hero h1 {
		font-size: clamp(30px, 10vw, 42px) !important;
	}

	.kh-single-hero__excerpt {
		font-size: 14px;
	}

	.kh-single-hero__meta {
		flex-wrap: wrap;
		row-gap: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kh-blog-card,
	.kh-blog-categories a,
	.kh-blog-load-more,
	.kh-single-related a {
		transition: none;
	}
}

/* Samodzielna siatka shortcode'u [kh_other_posts]. */
.kh-other-posts .kh-blog-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

@media (max-width: 700px) {
	.kh-other-posts .kh-blog-grid {
		grid-template-columns: 1fr;
	}
}
