/*
 * Blog index + blog post redesign (owner request 2026-10-08).
 * Loaded after bugfixes.css, only on the blog index, archives, search and single posts.
 * Markup: template-parts/post-list.php, index.php, single.php. FAQ accordion: faq.css.
 * Selectors are scoped (.pi-blog, .pi-single) so they do not touch the rest of the site.
 */
:root {
	--pi-ink: #12263a;
	--pi-text: #2b3d4f;
	--pi-muted: #5b6b7a;
	--pi-line: #e3eaf0;
	--pi-soft: #f4f9fc;
	--pi-accent: #1bbcf3;
	--pi-accent-d: #0b88b5;
	--pi-navy: #0c2236;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===================== Blog index ===================== */
.pi-blog {
	padding-top: 44px;
	padding-bottom: 70px;
}
.pi-blog__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	margin: 0 0 30px;
}
.pi-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pi-chips li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.pi-chips a {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--pi-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pi-ink);
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pi-chips a:hover,
.pi-chips a:focus-visible {
	border-color: var(--pi-accent);
	color: var(--pi-accent-d);
}
.pi-chips .is-active a {
	background: var(--pi-accent);
	border-color: var(--pi-accent);
	color: #fff;
}
.pi-search {
	position: relative;
	flex: 1 1 100%;
	max-width: 100%;
}
.pi-search input[type="search"] {
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	padding: 0 50px 0 18px;
	border: 1px solid var(--pi-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pi-ink);
	font-size: 15px;
	box-shadow: none;
}
.pi-search input[type="search"]:focus {
	outline: 0;
	border-color: var(--pi-accent);
	box-shadow: 0 0 0 3px rgba(27, 188, 243, 0.18);
}
.pi-search button {
	position: absolute;
	top: 5px;
	right: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pi-accent);
	color: #fff;
	cursor: pointer;
}
.pi-search button:hover {
	background: var(--pi-accent-d);
}

.pi-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
}
.pi-blog .pi-card.post-list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--pi-line);
	border-radius: 14px;
	background: #fff;
	transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.pi-blog .pi-card.post-list:hover {
	border-color: #cde9f6;
	box-shadow: 0 16px 36px rgba(18, 38, 58, 0.12);
	transform: translateY(-3px);
}
.pi-card__media {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--pi-navy);
}
.pi-card__media .thumbnail {
	margin: 0;
	height: 100%;
}
.pi-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.pi-card:hover .pi-card__media img {
	transform: scale(1.05);
}
.pi-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 20px;
	background: linear-gradient(135deg, #0c2236, #0b88b5);
	color: #fff;
	font-size: 18px;
	letter-spacing: 0.04em;
	text-align: center;
}
.pi-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 22px 24px 24px;
}
.pi-card__cat {
	align-self: flex-start;
	margin: 0 0 10px;
	padding: 4px 11px;
	border-radius: 999px;
	background: #e8f7fd;
	color: var(--pi-accent-d);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	line-height: 1.4;
	text-decoration: none;
	text-transform: uppercase;
}
.pi-card__cat:hover {
	background: var(--pi-accent);
	color: #fff;
}
.pi-blog .pi-card .post-title {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.35;
	font-weight: 500;
}
.pi-blog .pi-card .post-title a {
	color: var(--pi-ink);
	text-decoration: none;
	background: linear-gradient(var(--pi-accent), var(--pi-accent)) 0 100% / 0 2px no-repeat;
	transition: background-size 0.3s, color 0.2s;
}
.pi-blog .pi-card .post-title a:hover {
	color: var(--pi-accent-d);
	background-size: 100% 2px;
}
.pi-blog .pi-card .post-name {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	margin: 0;
	padding: 0 0 12px;
	border: 0;
	color: var(--pi-muted);
	font-size: 13px;
	font-style: normal;
}
.pi-blog .pi-card .post-name > span {
	white-space: normal;
}
.pi-blog .pi-card .post-name > span + span::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin: 0 10px 2px -12px;
	border-radius: 50%;
	background: #b5c3cf;
}
.pi-card__excerpt {
	display: -webkit-box;
	margin: 0 0 18px;
	overflow: hidden;
	color: var(--pi-muted);
	font-size: 15px;
	line-height: 1.65;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.pi-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	color: var(--pi-accent-d);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}
.pi-card__more::after {
	content: "\2192";
	transition: transform 0.2s;
}
.pi-card__more:hover::after {
	transform: translateX(4px);
}

/* Featured (first post on page 1): full width, image uncropped at 16:9 */
.pi-card--featured {
	grid-column: 1 / -1;
}
.pi-card--featured .pi-card__body {
	padding: 28px 32px 30px;
}
.pi-blog .pi-card--featured .post-title {
	font-size: 28px;
	line-height: 1.25;
}
.pi-card--featured .pi-card__excerpt {
	-webkit-line-clamp: 3;
	font-size: 16px;
}

/* Pagination */
.pi-blog .pagination {
	margin-top: 44px;
	text-align: center;
}
.pi-blog .pagination .page-numbers {
	min-width: 42px;
	margin: 0 3px 6px;
	padding: 10px 14px;
	border: 1px solid var(--pi-line);
	border-radius: 10px;
	background: #fff;
	color: var(--pi-ink);
	line-height: 1.2;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}
.pi-blog .pagination a.page-numbers:hover {
	border-color: var(--pi-accent);
	color: var(--pi-accent-d);
}
.pi-blog .pagination .page-numbers.current {
	background: var(--pi-accent);
	border-color: var(--pi-accent);
	color: #fff;
}
.pi-blog .pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

/* Empty state */
.pi-blog .pi-empty {
	padding: 40px 30px;
	border: 1px dashed var(--pi-line);
	border-radius: 14px;
	text-align: center;
}

/* Sidebar cards (index and post): each widget is its own separate card */
.pi-blog .blog-sidebar .widget,
.pi-single .blog-sidebar .widget {
	margin: 0 0 24px;
	padding: 22px 22px 18px;
	border: 1px solid var(--pi-line);
	border-radius: 14px;
	background: #fff;
}
.pi-blog .blog-sidebar .widget-title,
.pi-single .blog-sidebar .widget-title {
	position: relative;
	margin: 0 0 14px;
	padding-bottom: 12px;
	color: var(--pi-ink);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}
.pi-blog .blog-sidebar .widget-title::after,
.pi-single .blog-sidebar .widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 36px;
	height: 3px;
	border-radius: 3px;
	background: var(--pi-accent);
}
.pi-blog .blog-sidebar ul,
.pi-single .blog-sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.pi-blog .blog-sidebar li,
.pi-single .blog-sidebar li {
	margin: 0;
	padding: 9px 0;
	border-top: 1px solid var(--pi-line);
	font-size: 14.5px;
	line-height: 1.5;
	list-style: none;
}
.pi-blog .blog-sidebar li:first-child,
.pi-single .blog-sidebar li:first-child {
	border-top: 0;
}
.pi-blog .blog-sidebar li a,
.pi-single .blog-sidebar li a {
	color: var(--pi-text);
	text-decoration: none;
}
.pi-blog .blog-sidebar li a:hover,
.pi-single .blog-sidebar li a:hover {
	color: var(--pi-accent-d);
}
.recent-post-date {
	display: block;
	margin-top: 2px;
	color: var(--pi-muted);
	font-size: 12.5px;
}

/* ===================== Blog post ===================== */
.pi-progress {
	position: fixed;
	z-index: 100000;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	pointer-events: none;
}
.pi-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--pi-accent), #0b88b5);
	transform: scaleX(0);
	transform-origin: 0 50%;
}
html:has(body.single-post) {
	scroll-behavior: smooth;
}
.pi-single {
	padding-top: 34px;
	padding-bottom: 70px;
}
.pi-single .blog-detail-container h1.title {
	margin: 4px 0 18px;
	color: var(--pi-ink);
	font-size: 38px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

/* Byline as pills. The owner's mobile rules (Bug_7: grid + no-wrap spans) are overridden
   here on purpose: pills wrap onto new lines instead of running off the screen. */
.pi-single .blog-detail-container .post-name {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 26px;
	padding: 0;
	border: 0;
}
.pi-single .blog-detail-container .post-name > span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	padding: 6px 14px;
	border: 1px solid var(--pi-line);
	border-radius: 999px;
	background: var(--pi-soft);
	color: var(--pi-muted);
	font-size: 13.5px;
	font-style: normal;
	line-height: 1.3;
	white-space: normal;
}
.pi-single .post-name i {
	display: inline-flex;
}
.pi-single .post-name img {
	width: 15px;
	height: 15px;
}

.pi-single .post-featured-image {
	margin: 0 0 32px;
}
.pi-single .post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(18, 38, 58, 0.16);
}

/* Mobile "in this article" */
.pi-toc-inline {
	display: none;
	margin: 0 0 26px;
	border: 1px solid var(--pi-line);
	border-radius: 12px;
	background: var(--pi-soft);
}
.pi-toc-inline summary {
	padding: 14px 18px;
	color: var(--pi-ink);
	font-weight: 500;
	cursor: pointer;
	list-style: none;
}
.pi-toc-inline summary::-webkit-details-marker {
	display: none;
}
.pi-toc-inline summary::after {
	content: "+";
	float: right;
	color: var(--pi-accent-d);
	font-size: 20px;
	line-height: 1;
}
.pi-toc-inline[open] summary::after {
	content: "\2212";
}
.pi-toc-inline ol {
	margin: 0;
	padding: 0 18px 16px 38px;
}
.pi-toc-inline li {
	margin: 0;
	padding: 5px 0;
	font-size: 15px;
}
.pi-toc-inline a {
	color: var(--pi-accent-d);
}

/* Reading typography */
.pi-article {
	color: var(--pi-text);
	font-size: 17.5px;
	line-height: 1.8;
}
.pi-article > :first-child {
	margin-top: 0;
}
.pi-article p {
	margin: 0 0 1.25em;
}
.pi-article h2,
.pi-article h3,
.pi-article h4 {
	color: var(--pi-ink);
	font-weight: 500;
	scroll-margin-top: 110px;
}
.pi-article h2 {
	margin: 2.1em 0 0.65em;
	padding-left: 16px;
	border-left: 4px solid var(--pi-accent);
	font-size: 28px;
	line-height: 1.25;
}
.pi-article h3 {
	margin: 1.7em 0 0.5em;
	font-size: 22px;
	line-height: 1.3;
}
.pi-article h4 {
	margin: 1.5em 0 0.4em;
	font-size: 18px;
}
.pi-article a {
	color: var(--pi-accent-d);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.pi-article a:hover {
	color: var(--pi-ink);
}
.pi-article ul,
.pi-article ol {
	margin: 0 0 1.4em;
	padding-left: 1.4em;
}
.pi-article li {
	margin: 0 0 0.5em;
	padding-left: 0.2em;
}
.pi-article li::marker {
	color: var(--pi-accent-d);
}
.pi-article img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}
.pi-article blockquote {
	margin: 1.8em 0;
	padding: 18px 24px;
	border-left: 4px solid var(--pi-accent);
	border-radius: 0 12px 12px 0;
	background: var(--pi-soft);
	color: var(--pi-ink);
	font-size: 1.05em;
}
.pi-article blockquote p:last-child {
	margin-bottom: 0;
}
.pi-article table {
	display: block;
	width: 100%;
	margin: 1.6em 0;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 15.5px;
	line-height: 1.55;
}
.pi-article th,
.pi-article td {
	min-width: 120px;
	padding: 11px 14px;
	border: 1px solid var(--pi-line);
	text-align: left;
	vertical-align: top;
}
.pi-article th {
	background: var(--pi-soft);
	color: var(--pi-ink);
	font-weight: 500;
}
.pi-article tr:nth-child(even) td {
	background: #fbfdfe;
}
.pi-article hr {
	margin: 2.4em 0;
	border: 0;
	border-top: 1px solid var(--pi-line);
}

/* Share row */
.pi-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin: 40px 0 28px;
	padding: 18px 0;
	border-top: 1px solid var(--pi-line);
	border-bottom: 1px solid var(--pi-line);
}
.pi-share__label {
	color: var(--pi-ink);
	font-weight: 500;
}
.pi-share__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.pi-share__links a,
.pi-share__links button {
	padding: 7px 15px;
	border: 1px solid var(--pi-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pi-ink);
	font-size: 13.5px;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pi-share__links a:hover,
.pi-share__links button:hover {
	border-color: var(--pi-accent);
	background: #f1fbff;
	color: var(--pi-accent-d);
}

/* Call to action */
.pi-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 30px;
	margin: 0 0 10px;
	padding: 30px 34px;
	border-radius: 16px;
	background: linear-gradient(120deg, #0c2236 0%, #0f4560 60%, #0b88b5 130%);
	color: #fff;
}
.pi-cta h2 {
	margin: 0 0 6px;
	color: #fff;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.3;
}
.pi-cta p {
	max-width: 460px;
	margin: 0;
	color: #d6e8f2;
	font-size: 15.5px;
	line-height: 1.6;
}
.pi-cta__btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 999px;
	background: var(--pi-accent);
	color: #062033;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s, transform 0.2s;
}
.pi-cta__btn:hover {
	background: #fff;
	color: #062033;
	transform: translateY(-2px);
}

/* Post sidebar (2026-10-09, owner): Table of Contents, Categories and Recent Posts are three
   separate cards in normal page flow (no sticky box with its own scrollbar). Only a very long
   table of contents scrolls inside its own card. */
.pi-single .widget-toc ul {
	max-height: 55vh;
	overflow-y: auto;
	scrollbar-width: thin;
}
.pi-single .widget-toc li a.is-current {
	color: var(--pi-accent-d);
	font-weight: 500;
}
.pi-single .widget-toc li:has(a.is-current) {
	border-left: 3px solid var(--pi-accent);
	margin-left: -22px;
	padding-left: 19px;
}

/* Related posts */
.pi-related {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--pi-line);
}
.pi-related h2 {
	margin: 0 0 22px;
	color: var(--pi-ink);
	font-size: 26px;
	font-weight: 500;
}
.pi-related__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
.pi-rcard {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--pi-line);
	border-radius: 14px;
	background: #fff;
	color: var(--pi-ink);
	text-decoration: none;
	transition: box-shadow 0.25s, transform 0.25s;
}
.pi-rcard:hover {
	box-shadow: 0 14px 32px rgba(18, 38, 58, 0.12);
	transform: translateY(-3px);
	color: var(--pi-ink);
}
.pi-rcard__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, #0c2236, #0b88b5);
}
.pi-rcard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pi-rcard__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 18px;
}
.pi-rcard__cat {
	color: var(--pi-accent-d);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.pi-rcard__title {
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
}
.pi-rcard:hover .pi-rcard__title {
	color: var(--pi-accent-d);
}
.pi-rcard__date {
	color: var(--pi-muted);
	font-size: 13px;
}

/* ===================== Responsive ===================== */
@media (max-width: 991px) {
	.pi-toc-inline {
		display: block;
	}
	.pi-single .widget-toc {
		display: none;
	}
	.pi-single .blog-sidebar {
		margin-top: 40px;
	}
	.pi-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 767px) {
	.pi-blog {
		padding-top: 28px;
	}
	.pi-grid,
	.pi-related__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}
	.pi-card--featured .pi-card__body,
	.pi-card__body {
		padding: 20px;
	}
	.pi-blog .pi-card .post-title,
	.pi-blog .pi-card--featured .post-title {
		font-size: 19px;
		line-height: 1.35;
	}
	.pi-single .blog-detail-container h1.title {
		font-size: 26px;
		line-height: 1.25;
	}
	.pi-article {
		font-size: 16.5px;
		line-height: 1.75;
	}
	.pi-article h2 {
		font-size: 23px;
	}
	.pi-article h3 {
		font-size: 19px;
	}
	.pi-cta {
		padding: 24px 22px;
	}
	.pi-cta__btn {
		width: 100%;
		text-align: center;
	}
}
@media (prefers-reduced-motion: reduce) {
	html:has(body.single-post) {
		scroll-behavior: auto;
	}
	.pi-card,
	.pi-card__media img,
	.pi-rcard,
	.pi-cta__btn {
		transition: none !important;
	}
	.pi-card:hover,
	.pi-rcard:hover {
		transform: none !important;
	}
}
