/* KS Blog System — public styles
 * Scoped to .ks-* classes. Inherits typography from kava-child theme.
 */

.ks-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ===== Breadcrumbs ===== */
.ks-breadcrumbs {
	margin: 24px 0 16px;
	font-size: 14px;
	color: #666;
}
.ks-breadcrumbs a {
	color: #56be99;
	text-decoration: none;
}
.ks-breadcrumbs a:hover { text-decoration: underline; }

/* ===== Blog archive ===== */
.ks-blog-archive {
	padding: 40px 20px 80px;
}
.ks-blog-archive__header {
	text-align: center;
	margin-bottom: 32px;
}
.ks-blog-archive__title {
	font-size: clamp(28px, 5vw, 48px);
	margin: 0 0 12px;
	font-weight: 700;
	color: #282828;
}
.ks-blog-archive__subtitle {
	font-size: 16px;
	color: #666;
	margin: 0;
}
.ks-blog-archive__empty {
	text-align: center;
	color: #888;
	padding: 48px 0;
}

/* ===== Rubric filter pills ===== */
.ks-rubric-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin: 0 0 40px;
}
.ks-rubric-filter__pill {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid #d0d0d0;
	border-radius: 20px;
	font-size: 14px;
	color: #393939;
	background: #fff;
	text-decoration: none;
	transition: all .15s ease-in-out;
}
.ks-rubric-filter__pill:hover {
	border-color: #56be99;
	color: #56be99;
}
.ks-rubric-filter__pill.is-active {
	background: #56be99;
	border-color: #56be99;
	color: #fff;
}

/* ===== Cards grid (archive + taxonomy + related-articles) ===== */
.ks-cards,
.ks-related-articles__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}
@media (min-width: 768px) {
	.ks-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.ks-cards { grid-template-columns: repeat(3, 1fr); }
}

.ks-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #eee;
	transition: box-shadow .2s, transform .2s;
}
.ks-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.08);
	transform: translateY(-2px);
}
.ks-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: #f5f5f5;
	overflow: hidden;
}
.ks-card__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ks-card__thumb--empty {
	background: linear-gradient(135deg, #e8f5ee 0%, #d4ebe0 100%);
}
.ks-card__body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.ks-card__rubric {
	display: inline-block;
	font-size: 12px;
	color: #56be99;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-decoration: none;
	margin-bottom: 10px;
	font-weight: 600;
}
.ks-card__title {
	margin: 0 0 12px;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 600;
}
.ks-card__title a {
	color: #282828;
	text-decoration: none;
}
.ks-card__title a:hover { color: #56be99; }
.ks-card__excerpt {
	color: #666;
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.5;
	flex: 1;
}
.ks-card__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
}
.ks-card__date { color: #999; }
.ks-card__more {
	color: #56be99;
	font-weight: 600;
	text-decoration: none;
}
.ks-card__more:hover { text-decoration: underline; }

/* ===== Pagination ===== */
.ks-pagination {
	margin-top: 48px;
	text-align: center;
}
.ks-pagination .nav-links {
	display: inline-flex;
	gap: 6px;
}
.ks-pagination a,
.ks-pagination .current {
	display: inline-block;
	min-width: 36px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	color: #393939;
	text-decoration: none;
	font-size: 14px;
}
.ks-pagination .current {
	background: #56be99;
	border-color: #56be99;
	color: #fff;
}
.ks-pagination a:hover { border-color: #56be99; color: #56be99; }

/* ===== Single article ===== */
.ks-article {
	padding: 24px 0 80px;
}
.ks-article__header { text-align: center; padding-bottom: 24px; }
.ks-article__title {
	font-size: clamp(26px, 4vw, 42px);
	margin: 16px 0 14px;
	line-height: 1.2;
	font-weight: 700;
	color: #282828;
}
.ks-article__meta {
	color: #888;
	font-size: 14px;
	display: inline-flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
}
.ks-article__meta a { color: #56be99; text-decoration: none; }
.ks-article__meta a:hover { text-decoration: underline; }
.ks-article__sep { color: #ccc; }
.ks-article__hero {
	max-width: 1000px;
	margin: 24px auto 32px;
}
.ks-article__hero-img {
	width: 100%;
	border-radius: 12px;
	display: block;
	height: auto;
}
.ks-article__body {
	max-width: 800px;
	font-size: 17px;
	line-height: 1.7;
	color: #282828;
}
.ks-article__body h2 { font-size: 26px; margin: 40px 0 16px; font-weight: 700; }
.ks-article__body h3 { font-size: 20px; margin: 32px 0 12px; font-weight: 600; }
.ks-article__body p { margin: 0 0 18px; }
.ks-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 16px 0;
}
.ks-article__body ul,
.ks-article__body ol {
	margin: 0 0 18px;
	padding-left: 22px;
}
.ks-article__body li { margin-bottom: 6px; }
.ks-article__body a { color: #56be99; }
.ks-article__links { max-width: 1000px; margin: 48px auto 0; }

/* ===== Related services ===== */
.ks-related-services {
	margin: 40px 0;
	padding: 24px 28px;
	border: 1px solid #eee;
	border-radius: 12px;
	background: #fafafa;
}
.ks-related-services__title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 14px;
	color: #282828;
}
.ks-related-services__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}
.ks-related-services__item a {
	color: #56be99;
	text-decoration: none;
	font-weight: 500;
}
.ks-related-services__item a::before { content: "→ "; opacity: .6; }
.ks-related-services__item a:hover { text-decoration: underline; }

/* ===== Related articles ===== */
.ks-related-articles { margin-top: 48px; }
.ks-related-articles__title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 20px;
}

/* ===== Tag cloud ===== */
.ks-tagcloud {
	margin: 40px 0;
	padding: 24px 28px;
	border: 1px solid #eee;
	border-radius: 12px;
}
.ks-tagcloud__title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 14px;
}
.ks-tagcloud__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ks-tagcloud__list a {
	display: inline-block;
	padding: 6px 16px;
	border: 1px solid #d0d0d0;
	border-radius: 20px;
	font-size: 14px;
	text-decoration: none;
	color: #393939;
	transition: all .15s ease-in-out;
}
.ks-tagcloud__list a:hover {
	background: #56be99;
	color: #fff;
	border-color: #56be99;
}

/* ===== CTA block ===== */
.ks-cta {
	margin-top: 48px;
	padding: 32px;
	background: linear-gradient(135deg, #56be99 0%, #3fa37e 100%);
	color: #fff;
	border-radius: 12px;
	text-align: center;
}
.ks-cta__heading {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 10px;
}
.ks-cta__text {
	margin: 0 0 18px;
	opacity: .95;
}
.ks-cta__button {
	display: inline-block;
	padding: 12px 28px;
	background: #fff;
	color: #3fa37e;
	border-radius: 28px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .15s ease-in-out;
}
.ks-cta__button:hover { transform: scale(1.03); }

/* ===== Mobile tweaks ===== */
@media (max-width: 767px) {
	.ks-article__body { font-size: 16px; }
	.ks-blog-archive { padding: 24px 16px 56px; }
	.ks-rubric-filter { justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.ks-rubric-filter__pill { white-space: nowrap; }
	.ks-cta { padding: 24px 20px; }
}
