/* ==========================================================================
   Knowledge Base — Stuff.io Support
   Scoped styles for /support/ archive, taxonomy, and single templates.
   Inherits typography and color tokens from the parent stuff-io theme
   (Bootstrap 5 + UnderStrap variables already in scope).
   ========================================================================== */

/* ---------- Shared layout ---------- */
.kb-page {
	padding: 3rem 0 5rem;
}
.kb-page .kb-breadcrumbs {
	margin-bottom: 1.25rem;
	font-size: 0.875rem;
}
.kb-page .kb-breadcrumbs .breadcrumb {
	background: transparent;
	padding: 0;
	margin: 0;
}
.kb-page .kb-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
	content: "›";
	padding: 0 0.5rem;
	color: rgba(255, 255, 255, 0.4);
}
.kb-page .kb-breadcrumbs a {
	color: inherit;
	opacity: 0.75;
	text-decoration: none;
}
.kb-page .kb-breadcrumbs a:hover {
	opacity: 1;
	text-decoration: underline;
}
.kb-page .kb-breadcrumbs .breadcrumb-item.active {
	opacity: 0.85;
}

/* ---------- Hero / search ---------- */
.kb-hero {
	text-align: center;
	margin-bottom: 3rem;
}
.kb-hero h1 {
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	margin-bottom: 0.5rem;
}
.kb-hero p.lead {
	opacity: 0.8;
	max-width: 36rem;
	margin: 0 auto 1.5rem;
}
.kb-hero--left {
	text-align: left;
}
.kb-hero--left p.lead {
	margin-left: 0;
}
.kb-search-form--left {
	margin-left: 0;
}
.kb-search-form {
	max-width: 32rem;
	margin: 0 auto;
	display: flex;
	gap: 0.5rem;
}
.kb-search-form input[type="search"] {
	flex: 1;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.05);
	color: inherit;
	font-size: 1rem;
}
.kb-search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--bs-primary, #00bfa5);
	background: rgba(255, 255, 255, 0.08);
}
.kb-search-form button {
	padding: 0.75rem 1.5rem;
	border-radius: 0.5rem;
	border: 0;
	background: var(--bs-primary, #00bfa5);
	color: #000;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Category grid (archive) ---------- */
.kb-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 1.25rem;
	margin: 2.5rem 0 4rem;
}
.kb-category-card {
	display: block;
	padding: 1.5rem;
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.kb-category-card:hover {
	transform: translateY(-2px);
	border-color: var(--bs-primary, #00bfa5);
	background: rgba(255, 255, 255, 0.06);
	color: inherit;
	text-decoration: none;
}
.kb-category-card h3 {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
}
.kb-category-card p {
	margin: 0 0 0.75rem;
	opacity: 0.75;
	font-size: 0.9rem;
}
.kb-category-card .kb-count {
	font-size: 0.8rem;
	opacity: 0.6;
}

/* ---------- Article list (taxonomy + recent) ---------- */
.kb-section-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 2rem 0 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding-bottom: 0.5rem;
}
.kb-article-list {
	list-style: none;
	padding: 0;
	margin: 0 0 3rem;
}
.kb-article-list li {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kb-article-list li:last-child {
	border-bottom: 0;
}
.kb-article-list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 0;
	color: inherit;
	text-decoration: none;
}
.kb-article-list a:hover .kb-article-title {
	color: var(--bs-primary, #00bfa5);
}
.kb-article-title {
	font-weight: 500;
	transition: color 0.15s ease;
}
.kb-article-meta {
	font-size: 0.8rem;
	opacity: 0.55;
	flex-shrink: 0;
}

/* ---------- Single article ---------- */
.kb-article {
	max-width: 48rem;
	margin: 0 auto;
}
.kb-article header.kb-article-header {
	margin-bottom: 2rem;
}
.kb-article h1 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.75rem;
}
.kb-category-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: rgba(0, 191, 165, 0.15);
	color: var(--bs-primary, #00bfa5);
	font-size: 0.8rem;
	font-weight: 500;
	text-decoration: none;
	margin-right: 0.5rem;
}
.kb-category-badge:hover {
	background: rgba(0, 191, 165, 0.25);
	color: var(--bs-primary, #00bfa5);
	text-decoration: none;
}
.kb-article-body {
	font-size: 1.05rem;
	line-height: 1.7;
}
.kb-article-body h2 {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 2rem 0 1rem;
}
.kb-article-body h3 {
	font-size: 1.2rem;
	font-weight: 600;
	margin: 1.5rem 0 0.75rem;
}
.kb-article-body p {
	margin: 0 0 1rem;
}
.kb-article-body img {
	max-width: 100%;
	height: auto;
	border-radius: 0.5rem;
	margin: 1rem 0;
}
.kb-article-body a {
	color: var(--bs-primary, #00bfa5);
}
.kb-article-body ul,
.kb-article-body ol {
	margin: 0 0 1rem 1.5rem;
}
.kb-article-body li {
	margin-bottom: 0.4rem;
}
.kb-article-body blockquote {
	border-left: 3px solid var(--bs-primary, #00bfa5);
	margin: 1.25rem 0;
	padding: 0.5rem 1rem;
	background: rgba(255, 255, 255, 0.03);
	font-style: italic;
}
.kb-article-body code {
	background: rgba(255, 255, 255, 0.08);
	padding: 0.1rem 0.35rem;
	border-radius: 0.25rem;
	font-size: 0.92em;
}
.kb-article-body pre {
	background: rgba(0, 0, 0, 0.3);
	padding: 1rem;
	border-radius: 0.5rem;
	overflow-x: auto;
}

/* ---------- Adjacent nav (prev/next) ---------- */
.kb-adjacent {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 3rem 0 1rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.kb-adjacent a {
	display: block;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.kb-adjacent a:hover {
	border-color: var(--bs-primary, #00bfa5);
	background: rgba(255, 255, 255, 0.05);
	color: inherit;
	text-decoration: none;
}
.kb-adjacent .kb-direction {
	font-size: 0.75rem;
	opacity: 0.6;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
}
.kb-adjacent .kb-next {
	text-align: right;
}
@media (max-width: 576px) {
	.kb-adjacent {
		grid-template-columns: 1fr;
	}
	.kb-adjacent .kb-next {
		text-align: left;
	}
}

/* ---------- Feedback widget placeholder ---------- */
.kb-feedback {
	margin: 2.5rem 0;
	padding: 1.25rem 1.5rem;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.03);
	text-align: center;
}
.kb-feedback p {
	margin: 0;
	opacity: 0.8;
	font-size: 0.95rem;
}
