/* ==========================================================================
   Deercoffe — "Baza wiedzy" (home.php index + single.php article view)
   Loaded on is_home() and is_singular('post'). Reuses .home-* layout
   primitives (home.css) for spacing/containers/buttons and adds
   page-specific pieces here.
   ========================================================================== */

.deercoffe-baza-wiedzy {
	font-family: var(--deercoffe-font-body);
	color: var(--deercoffe-color-text);
	font-size: 15px;
}

.deercoffe-baza-wiedzy h1,
.deercoffe-baza-wiedzy h2,
.deercoffe-baza-wiedzy h3 {
	font-family: var(--deercoffe-font-heading);
	font-weight: 400;
	color: var(--deercoffe-color-text);
	margin: 0;
}

.deercoffe-baza-wiedzy img {
	max-width: 100%;
	display: block;
}

.kb-eyebrow {
	font-family: var(--deercoffe-font-body);
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--deercoffe-color-accent);
	margin: 0;
}

/* Hero ---------------------------------------------------------------- */

.kb-hero {
	padding: 100px 0;
}

.kb-hero-content {
	max-width: 780px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.kb-hero-eyebrow {
	display: none;
	font-family: var(--deercoffe-font-body);
	font-size: 12px;
	color: var(--deercoffe-color-accent);
	margin: 0;
}

.kb-hero-content h1 {
	font-size: clamp(1.6rem, 2.5vw, 2.125rem);
}

.kb-hero-content p {
	color: var(--deercoffe-color-muted);
	line-height: 1.5;
	margin: 0;
}

/* Wyróżniony artykuł ---------------------------------------------------- */

.kb-featured {
	padding: 50px 0;
	background: var(--deercoffe-color-cream-light);
}

.kb-featured-card {
	display: flex;
	background: #fff;
	color: inherit;
}

.kb-featured-card:hover,
.kb-featured-card:focus {
	text-decoration: none;
}

.kb-featured-img {
	flex: 0 0 52.4%;
	display: block;
}

.kb-featured-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kb-featured-body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 50px 64px;
}

.kb-featured-badge {
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--deercoffe-color-accent);
}

.kb-featured-title {
	font-family: var(--deercoffe-font-heading);
	font-size: 27px;
	letter-spacing: 0.04em;
}

.kb-featured-excerpt {
	color: var(--deercoffe-color-muted);
	font-size: 14px;
	line-height: 1.5;
}

.kb-featured-link {
	font-size: 15px;
	text-decoration: underline;
}

/* Najnowsze artykuły ------------------------------------------------------ */

.kb-latest {
	padding: 75px 0;
}

.kb-latest-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}

.kb-latest-head h2 {
	font-size: clamp(1.6rem, 2.5vw, 2.125rem);
}

.kb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 54px 20px;
}

.kb-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: inherit;
}

.kb-card:hover,
.kb-card:focus {
	text-decoration: none;
}

.kb-card-img {
	display: block;
	background: var(--deercoffe-color-bg);
	aspect-ratio: 400 / 270;
	overflow: hidden;
}

.kb-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kb-card-badge {
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--deercoffe-color-accent);
}

.kb-card-title {
	font-family: var(--deercoffe-font-heading);
	font-size: 21px;
	letter-spacing: 0.04em;
}

.kb-card-excerpt {
	color: var(--deercoffe-color-muted);
	font-size: 14px;
	line-height: 1.5;
}

.kb-card-link {
	font-size: 15px;
	text-decoration: underline;
	margin-top: auto;
}

.kb-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 56px;
}

.kb-load-more {
	padding-left: 0;
	padding-right: 0;
}

/* Newsletter ---------------------------------------------------------------- */

.kb-newsletter {
	position: relative;
	overflow: hidden;
	background: var(--deercoffe-color-primary);
	padding: 90px 0;
}

.kb-newsletter-dots {
	position: absolute;
	left: 0;
	bottom: -230px;
	width: 560px;
	height: 300px;
	opacity: 0.5;
	pointer-events: none;
}

.kb-newsletter-dots svg {
	display: block;
	width: 100%;
	height: 100%;
}

.kb-newsletter-inner {
	position: relative;
	z-index: 1;
	text-align: center;
	max-width: 480px;
	margin: 0 auto;
}

.kb-newsletter h2 {
	color: #fff;
	font-size: clamp(1.6rem, 2.6vw, 2.125rem);
	margin-bottom: 16px;
}

.kb-newsletter p {
	color: var(--deercoffe-color-cream-light);
	line-height: 1.6;
	margin-bottom: 32px;
}

.kb-newsletter-form {
	margin: 0 auto;
}

.kb-newsletter-form-row {
	display: flex;
	background: var(--deercoffe-color-cream-light);
}

.kb-newsletter-form .field-error {
	margin-top: 8px;
	color: #ffb3b3;
}

.kb-newsletter-form input {
	flex: 1;
	border: 0;
	border-radius: 0;
	background: none;
	font-family: inherit;
	font-size: 0.9rem;
	text-align: left;
	padding: 10px 25px;
	height: 51px;
}

.kb-newsletter-form .btn {
	border-radius: 0;
	padding: 10px 24px;
}

/* Pojedynczy wpis ------------------------------------------------------------- */

.kb-single-hero {
	position: relative;
	overflow: hidden;
	padding: 100px 0;
}

.kb-single-hero-bg {
	position: absolute;
	inset: 0;
}

.kb-single-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kb-single-hero-content {
	position: relative;
	max-width: 973px;
	background: #fff;
	padding: 24px 32px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.kb-single-hero-content h1 {
	font-size: clamp(1.6rem, 2.5vw, 2.125rem);
}

.kb-single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: var(--deercoffe-color-muted);
}

.kb-single-meta li:not(:first-child)::before {
	content: "•";
	margin-right: 24px;
}

.kb-single-content {
	max-width: 760px;
	margin: 0 auto;
	padding: 50px 0;
}

.kb-single-content > *:first-child {
	margin-top: 0;
}

.kb-single-content p {
	font-size: 18px;
	line-height: 1.6;
	color: var(--deercoffe-color-muted);
	margin: 0 0 24px;
}

.kb-single-content h2 {
	font-size: 27px;
	margin: 48px 0 12px;
}

.kb-single-content h3 {
	font-size: 21px;
	margin: 32px 0 12px;
}

.kb-single-content img {
	margin: 24px 0;
}

/* Responsive ------------------------------------------------------------------ */

@media (max-width: 900px) {
	.kb-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.kb-hero {
		padding: 75px 0;
	}

	.kb-hero-eyebrow {
		display: block;
	}

	.kb-single-hero {
		padding: 50px 0;
	}

	.kb-single-hero-content {
		max-width: none;
		padding: 12px;
	}

	.kb-single-content {
		padding: 36px 0;
	}

	.kb-featured {
		padding: 50px 0;
	}

	.kb-featured-card {
		flex-direction: column;
	}

	.kb-featured-img {
		flex-basis: auto;
		height: 400px;
	}

	.kb-featured-body {
		padding: 50px 20px;
	}

	.kb-latest {
		padding: 50px 0;
	}

	.kb-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.kb-newsletter-form-row {
		flex-direction: column;
	}

	.kb-newsletter-form .btn {
		width: 100%;
	}
}
