/* Sparkling Minds Blog — listing styles
   All rules are scoped under .sm-blog to avoid clashing with Impreza globals. */

.sm-blog {
	--sm-radius: 10px;
	--sm-card-radius: 14px;
	--sm-border: #e6eaf0;
	--sm-muted: #6b7280;
	--sm-text: #1f2937;
	--sm-bg-soft: #f6f9fc;
	--sm-cat-color: #0ea5e9;
	color: var(--sm-text);
	font: inherit;
}

.sm-blog *,
.sm-blog *::before,
.sm-blog *::after {
	box-sizing: border-box;
}

.sm-blog__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 20px 80px;
}

/* Hero */
.sm-blog__hero {
	text-align: center;
	padding: 24px 0 32px;
}
.sm-blog__hero-title {
	font-size: clamp(1.8rem, 3vw, 2.5rem);
	margin: 0 0 12px;
	font-weight: 700;
	color: inherit;
}
.sm-blog__hero-subtitle {
	max-width: 720px;
	margin: 0 auto 28px;
	color: var(--sm-muted);
	font-size: 1.05rem;
	line-height: 1.6;
}
.sm-blog__hero-eyebrow {
	margin: 32px 0 16px;
	font-weight: 600;
	font-size: 1.05rem;
}

/* Pills */
.sm-blog__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
	justify-content: center;
	margin: 0 auto 32px;
	max-width: 980px;
}
.sm-pill {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 8px;
	border: 1.5px solid var(--sm-cat-color);
	color: var(--sm-cat-color);
	background: #fff;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	line-height: 1.2;
	transition: background-color .15s ease, color .15s ease;
}
.sm-pill:hover,
.sm-pill.is-active {
	background: var(--sm-cat-color);
	color: #fff;
}
.sm-pill--sm {
	padding: 4px 10px;
	font-size: 0.8rem;
	border-width: 1.5px;
}
.sm-pill--solid {
	background: var(--sm-cat-color);
	color: #fff;
}

/* Search — overrides Impreza global button/form styles */
.sm-blog .sm-blog__search {
	position: relative;
	margin: 0 0 40px;
	display: block;
	width: 100%;
}
.sm-blog .sm-blog__search input[type="search"] {
	width: 100%;
	padding: 18px 60px 18px 22px;
	border: 1.5px solid #cfd8e3;
	border-radius: var(--sm-radius);
	font-size: 1rem;
	background: #fff;
	color: var(--sm-text);
	font: inherit;
	line-height: 1.4;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.sm-blog .sm-blog__search input[type="search"]:focus {
	outline: none;
	border-color: #2b6cb0;
	box-shadow: 0 0 0 3px rgba(43,108,176,.15);
}
.sm-blog .sm-blog__search .sm-blog__search-btn {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	background: transparent;
	background-color: transparent;
	background-image: none;
	border: 0;
	box-shadow: none;
	cursor: pointer;
	color: var(--sm-muted);
	padding: 8px;
	margin: 0;
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	-webkit-appearance: none;
	appearance: none;
}
.sm-blog .sm-blog__search .sm-blog__search-btn:hover,
.sm-blog .sm-blog__search .sm-blog__search-btn:focus {
	background: transparent;
	background-color: transparent;
	color: var(--sm-text);
	box-shadow: none;
}
.sm-blog .sm-blog__search .sm-blog__search-btn svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* Layout */
.sm-blog__body {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 28px;
	align-items: start;
}
@media (max-width: 860px) {
	.sm-blog__body { grid-template-columns: 1fr; }
}

/* Sidebar / filters */
.sm-blog__sidebar {
	position: sticky;
	top: 24px;
}
.sm-blog__filters {
	border: 1px solid var(--sm-border);
	border-radius: var(--sm-card-radius);
	padding: 20px;
	background: #fff;
}
.sm-blog__filters-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 14px;
}
.sm-blog__filters-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
}
.sm-blog__filters-clear {
	background: none;
	border: 0;
	padding: 0;
	color: var(--sm-muted);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}
.sm-blog__filters-clear:hover { color: var(--sm-text); }

.sm-blog__filter { margin-bottom: 12px; }
.sm-blog__filters-empty {
	margin: 0;
	color: var(--sm-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}
.sm-blog__filter select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--sm-border);
	border-radius: var(--sm-radius);
	background: #fff;
	font: inherit;
	color: var(--sm-text);
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M6 8L0 0h12z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 10px 6px;
}

/* Mobile filters: collapsed by default */
@media (max-width: 860px) {
	.sm-blog__sidebar { position: static; }
	.sm-blog__filters { padding: 14px; }
	.sm-blog__filters[data-collapsed="true"] .sm-blog__filter { display: none; }
}

/* Results grid */
.sm-blog__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 22px;
}
@media (max-width: 720px) {
	.sm-blog__grid { grid-template-columns: 1fr; }
}

/* Cards */
.sm-blog__card {
	border: 1px solid var(--sm-border);
	border-radius: var(--sm-card-radius);
	background: #fff;
	overflow: hidden;
	transition: box-shadow .15s ease, transform .15s ease;
}
.sm-blog__card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
	transform: translateY(-2px);
}
.sm-blog__card-link {
	display: grid;
	grid-template-columns: 1fr 140px;
	min-height: 160px;
	color: inherit;
	text-decoration: none;
}
.sm-blog__card-body {
	padding: 18px 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.sm-blog__card-title {
	margin: 4px 0 0;
	font-size: 1.05rem;
	line-height: 1.35;
	font-weight: 700;
	color: inherit;
}
.sm-blog__card-excerpt {
	margin: 0;
	color: var(--sm-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}
.sm-blog__card-author {
	margin: auto 0 0;
	color: var(--sm-muted);
	font-size: 0.85rem;
}
.sm-blog__card-thumb {
	overflow: hidden;
	background: var(--sm-bg-soft);
}
.sm-blog__card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
@media (max-width: 480px) {
	.sm-blog__card-link { grid-template-columns: 1fr; }
	.sm-blog__card-thumb { order: -1; aspect-ratio: 16/9; }
}

.sm-blog__empty {
	grid-column: 1 / -1;
	padding: 40px 20px;
	text-align: center;
	color: var(--sm-muted);
	background: var(--sm-bg-soft);
	border-radius: var(--sm-card-radius);
}

/* Pagination */
.sm-blog__pagination { margin-top: 28px; }
.sm-blog__pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}
.sm-blog__pager-link {
	min-width: 38px;
	padding: 8px 12px;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	text-decoration: none;
	color: var(--sm-text);
	text-align: center;
	background: #fff;
}
.sm-blog__pager-link:hover { border-color: #2b6cb0; }
.sm-blog__pager-link.is-current {
	background: #2b6cb0;
	border-color: #2b6cb0;
	color: #fff;
}

/* Loading state */
.sm-blog__grid.is-loading { opacity: .55; transition: opacity .15s ease; }

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px,1px,1px,1px);
	width: 1px; height: 1px;
	overflow: hidden;
}
