/*
 * blog.css — owned by the theme (stream I, phase 2, 2026-10-24). The blog screens (posts index, single post,
 * category/tag archives, search) and the phase-2 header link. Loaded on the front end after theme.css and in the
 * block editor. Colours, fonts and radii are the Astro tokens from site.css (--color-*, --font-*, --radius-card).
 *
 * Unlayered on purpose, like theme.css: site.css is all cascade layers, and WordPress's own block CSS is
 * unlayered, so these rules win over both. Post-content rules use the prefix
 * `.wp-block-post-content.lsm-prose.prose` (3 classes) so they also outrank wp-bridge.css, which hands the
 * margins/link colours of everything inside .wp-block-post-content back to the layers (2 classes).
 */

/* ── Header: About + Blog fit beside the phone number and quote button only from Tailwind's xl (1280px) ─────── */
@media (max-width: 79.99rem) {
	.lsm-nav-xl {
		display: none;
	}
}

/* ── Pill links (category filter, post services card, tags) — the service-card pill look ─────────────────── */
.lsm-chip,
.lsm-post-tags a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--color-primary-tint);
	border-radius: 999px;
	background: #fff;
	padding: 0.4rem 0.95rem;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--color-primary);
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.lsm-chip:hover,
.lsm-post-tags a:hover {
	border-color: var(--color-primary);
	background: var(--color-primary-soft);
	color: var(--color-primary-dark);
}
.lsm-chip.is-current {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: #fff;
}

/* ── Blog hero search form ──────────────────────────────────────────────────────────────────────────────── */
.lsm-search .lsm-search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	padding: 0.8rem 1.3rem;
	font-size: 1rem;
	color: var(--color-ink);
	box-shadow: var(--shadow-sm);
	-webkit-appearance: none;
	appearance: none;
}
.lsm-search .lsm-search-input::placeholder {
	color: var(--color-muted);
}
.lsm-search .btn-cta {
	flex: 0 0 auto;
}

/* ── Post cards (blog index, archives, search, "Keep reading") ─────────────────────────────────────────── */
.wp-block-post-template.grid {
	margin: 0;
	padding: 0;
	list-style: none;
}
.wp-block-post-template.grid > li {
	margin: 0;
	min-width: 0;
}
.lsm-post-card .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
	background: var(--color-primary-soft);
}
.lsm-post-card .wp-block-post-featured-image a {
	display: block;
	height: 100%;
}
.lsm-post-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease-out;
}
.lsm-post-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}
/* A post without a featured image still gets a picture-shaped band: the deep purple gradient + white logo. */
.lsm-post-card:not(:has(.wp-block-post-featured-image))::before {
	content: "";
	display: block;
	aspect-ratio: 16 / 10;
	background: url("../images/logo-white.webp") center / auto 34% no-repeat,
		linear-gradient(160deg, #3c0d67, #581494 55%, #2a0a49);
}
.lsm-post-card .lsm-card-date {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-secondary-deep);
}
.lsm-post-card .lsm-card-title {
	margin: 0.5rem 0 0;
	line-height: 1.3;
}
.lsm-post-card .lsm-card-date + .lsm-card-title {
	margin-top: 0.5rem;
}
.type-page .lsm-post-card .lsm-card-date {
	display: none; /* search results can include pages: no date on those */
}
.lsm-post-card .lsm-card-title a {
	color: inherit;
	text-decoration: none;
}
/* The whole card is one link target (the title link stretched over the card), as on the service cards. */
.lsm-post-card .lsm-card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.lsm-post-card:hover .lsm-card-title a {
	color: var(--color-primary);
}
.lsm-post-card .lsm-card-title a:focus-visible {
	outline: none;
}
.lsm-post-card:has(.lsm-card-title a:focus-visible) {
	outline: 3px solid var(--color-secondary);
	outline-offset: 2px;
}
.lsm-post-card .lsm-card-excerpt {
	margin: 0.5rem 0 0;
}
.lsm-post-card .lsm-card-excerpt p {
	margin: 0;
}
.lsm-post-card .lsm-card-more {
	margin-top: auto;
	padding-top: 1rem;
	font-family: var(--font-heading);
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--color-primary);
	text-decoration: none;
}
.lsm-post-card .lsm-card-more::after {
	content: " →";
}

/* ── Pagination ─────────────────────────────────────────────────────────────────────────────────────────── */
.lsm-pagination {
	margin-top: 3rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}
.lsm-pagination .wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.lsm-pagination .page-numbers,
.lsm-pagination .wp-block-query-pagination-previous,
.lsm-pagination .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0 1rem;
	border: 1px solid var(--color-primary-tint);
	border-radius: 999px;
	background: #fff;
	font-family: var(--font-heading);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--color-primary);
	text-decoration: none;
}
.lsm-pagination a:hover {
	border-color: var(--color-primary);
	background: var(--color-primary-soft);
}
.lsm-pagination .page-numbers.current {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: #fff;
}
.lsm-pagination .page-numbers.dots {
	min-width: 0;
	padding: 0 0.25rem;
	border-color: transparent;
	background: transparent;
}

/* ── Single post: hero ──────────────────────────────────────────────────────────────────────────────────── */
.lsm-post-hero .wp-block-post-title {
	overflow-wrap: anywhere;
}
.lsm-post-hero .eyebrow a {
	color: inherit;
}
.lsm-byline p,
.lsm-byline .wp-block-post-date {
	margin: 0;
}
.lsm-byline .wp-block-post-date::before {
	content: "";
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	margin-right: 0.6rem;
	border-radius: 999px;
	background: var(--color-secondary);
	vertical-align: 0.12em;
}
.lsm-post-hero .lsm-post-image {
	margin: 0;
	overflow: hidden;
	border-radius: var(--radius-card);
	box-shadow: 8px 8px 0 var(--color-secondary);
}
.lsm-post-hero .lsm-post-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* No featured image: one column, the title gets the room. */
.lsm-post-hero:not(:has(.lsm-post-image)) {
	grid-template-columns: minmax(0, 1fr);
}
.lsm-post-hero:not(:has(.lsm-post-image)) > :first-child {
	max-width: var(--container-3xl);
}

/* ── Single post: the article (core blocks from the migrated posts) ───────────────────────────────────── */
.wp-block-post-content.lsm-prose.prose {
	font-size: 1.0625rem;
	line-height: 1.75;
	overflow-wrap: break-word;
}
.wp-block-post-content.lsm-prose.prose > :first-child {
	margin-top: 0;
}
.wp-block-post-content.lsm-prose.prose > :last-child {
	margin-bottom: 0;
}
.wp-block-post-content.lsm-prose.prose p {
	margin: 0 0 1.1em;
}
.wp-block-post-content.lsm-prose.prose :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--color-primary-dark);
	letter-spacing: -0.015em;
	line-height: 1.25;
	text-wrap: balance;
	scroll-margin-top: 6rem;
}
.wp-block-post-content.lsm-prose.prose :is(h1, h2) {
	margin: 1.9em 0 0.6em;
	font-size: 1.6rem;
}
.wp-block-post-content.lsm-prose.prose h3 {
	margin: 1.6em 0 0.5em;
	font-size: 1.25rem;
}
.wp-block-post-content.lsm-prose.prose :is(h4, h5, h6) {
	margin: 1.4em 0 0.4em;
	font-size: 1.05rem;
}
.wp-block-post-content.lsm-prose.prose a:not(.wp-element-button):not(.wp-block-button__link) {
	color: var(--color-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgb(88 20 148 / 0.35);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.wp-block-post-content.lsm-prose.prose a:not(.wp-element-button):not(.wp-block-button__link):hover {
	color: var(--color-primary-dark);
	text-decoration-color: var(--color-secondary);
}
.wp-block-post-content.lsm-prose.prose strong {
	color: var(--color-primary-dark);
}

/* Lists: green triangles on bullets (Astro .prose), purple numbers on ordered lists (Tailwind's reset removes them). */
.wp-block-post-content.lsm-prose.prose :is(ul, ol) {
	margin: 0 0 1.1em;
}
.wp-block-post-content.lsm-prose.prose ul {
	padding-left: 0;
	list-style: none;
}
.wp-block-post-content.lsm-prose.prose ol {
	padding-left: 1.6rem;
	list-style: decimal;
}
.wp-block-post-content.lsm-prose.prose li {
	margin: 0.45em 0;
}
.wp-block-post-content.lsm-prose.prose ol > li::marker {
	color: var(--color-primary);
	font-family: var(--font-heading);
	font-weight: 700;
}
.wp-block-post-content.lsm-prose.prose li > :is(ul, ol) {
	margin: 0.45em 0 0;
}
.wp-block-post-content.lsm-prose.prose ol > li::before {
	content: none;
}

/* Images and captions */
.wp-block-post-content.lsm-prose.prose :is(.wp-block-image, .wp-block-gallery, .wp-block-embed, .wp-block-video, .wp-block-table, .wp-block-media-text, figure) {
	margin: 2em 0;
}
.wp-block-post-content.lsm-prose.prose .wp-block-image img,
.wp-block-post-content.lsm-prose.prose .wp-block-gallery img {
	border-radius: 0.75rem;
	box-shadow: var(--shadow-sm);
}
.wp-block-post-content.lsm-prose.prose .wp-block-image.aligncenter,
.wp-block-post-content.lsm-prose.prose .wp-block-image .aligncenter {
	margin-left: auto;
	margin-right: auto;
}
@media (min-width: 40rem) {
	.wp-block-post-content.lsm-prose.prose .alignleft {
		float: left;
		max-width: 50%;
		margin: 0.35em 1.5em 1em 0;
	}
	.wp-block-post-content.lsm-prose.prose .alignright {
		float: right;
		max-width: 50%;
		margin: 0.35em 0 1em 1.5em;
	}
}
@media (max-width: 39.99rem) {
	.wp-block-post-content.lsm-prose.prose :is(.alignleft, .alignright) {
		float: none;
		max-width: 100%;
		margin: 2em 0;
	}
}
.wp-block-post-content.lsm-prose.prose :is(figcaption, .wp-element-caption) {
	margin: 0.6em 0 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--color-muted);
	text-align: center;
}
/* Anything with a box of its own starts below a floated (left/right-aligned) image instead of running under it. */
.wp-block-post-content.lsm-prose.prose :is(h1, h2, h3, blockquote, .wp-block-table, .wp-block-pullquote, hr, .wp-block-details, .wp-block-buttons, .wp-block-image:not(.alignleft):not(.alignright), .wp-block-embed) {
	clear: both;
}
.wp-block-post-content.lsm-prose.prose::after {
	content: "";
	display: table;
	clear: both;
}

/* Quotes */
.wp-block-post-content.lsm-prose.prose blockquote {
	margin: 2em 0;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid var(--color-secondary);
	border-radius: 0 0.75rem 0.75rem 0;
	background: var(--color-primary-soft);
	font-size: 1.1rem;
	font-style: normal;
	color: var(--color-primary-dark);
}
.wp-block-post-content.lsm-prose.prose blockquote p {
	margin: 0 0 0.6em;
}
.wp-block-post-content.lsm-prose.prose blockquote > :last-child {
	margin-bottom: 0;
}
.wp-block-post-content.lsm-prose.prose blockquote cite {
	display: block;
	margin-top: 0.6em;
	font-size: 0.875rem;
	font-style: normal;
	font-weight: 600;
	color: var(--color-muted);
}
.wp-block-post-content.lsm-prose.prose .wp-block-pullquote {
	margin: 2.5em 0;
	padding: 1.75rem 1.5rem;
	border-top: 4px solid var(--color-primary);
	border-bottom: 4px solid var(--color-primary);
	text-align: center;
}
.wp-block-post-content.lsm-prose.prose .wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--font-heading);
	font-size: 1.35rem;
	font-weight: 700;
}

/* Tables: purple header row, tinted stripes, scroll sideways on a phone instead of squashing */
.wp-block-post-content.lsm-prose.prose .wp-block-table {
	overflow-x: auto;
	border: 1px solid var(--color-primary-tint);
	border-radius: 0.75rem;
}
.wp-block-post-content.lsm-prose.prose table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.5;
}
.wp-block-post-content.lsm-prose.prose :is(thead, tfoot) {
	border: 0;
}
.wp-block-post-content.lsm-prose.prose :is(th, td) {
	padding: 0.7rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--color-primary-tint);
	text-align: left;
	vertical-align: top;
}
.wp-block-post-content.lsm-prose.prose th,
.wp-block-post-content.lsm-prose.prose thead td {
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-heading);
	font-weight: 700;
}
.wp-block-post-content.lsm-prose.prose tbody tr:nth-child(even) {
	background: var(--color-primary-soft);
}
.wp-block-post-content.lsm-prose.prose tbody tr:last-child > * {
	border-bottom: 0;
}
.wp-block-post-content.lsm-prose.prose .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: transparent;
}

/* Rules, code, details */
.wp-block-post-content.lsm-prose.prose hr {
	width: 100%;
	max-width: none;
	margin: 2.5em 0;
	border: 0;
	border-top: 2px solid var(--color-primary-tint);
}
.wp-block-post-content.lsm-prose.prose :not(pre) > code {
	padding: 0.1em 0.35em;
	border-radius: 0.3rem;
	background: var(--color-primary-soft);
	font-size: 0.9em;
}
.wp-block-post-content.lsm-prose.prose pre {
	margin: 2em 0;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	border-radius: 0.75rem;
	background: var(--color-ink);
	color: #fff;
	font-size: 0.9rem;
}
.wp-block-post-content.lsm-prose.prose .wp-block-details:not(.lsm-faq) {
	margin: 1em 0;
	padding: 0.9rem 1.25rem;
	border: 1px solid var(--color-primary-tint);
	border-radius: 0.75rem;
}
.wp-block-post-content.lsm-prose.prose .wp-block-details:not(.lsm-faq) > summary {
	cursor: pointer;
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--color-primary-dark);
}
.wp-block-post-content.lsm-prose.prose .wp-block-buttons {
	margin: 1.75em 0;
	gap: 0.75rem;
}

/* Tags line under the article */
.lsm-post-tags {
	margin-top: 2.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--color-muted);
}
.lsm-post-tags .wp-block-post-terms__separator {
	display: none;
}

/* "How we can help" card under the article */
.lsm-post-services ul {
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}
