/* ==========================================================================
   Blog shell + single post.

   Shared by every blog post, the /category/*/ archives and /blog/ (which add
   category.css / blog.css on top): a content column beside a sticky sidebar,
   the Recent Posts widget, and the article typography.
   Builds on the ui-* tokens in site.css.
   ========================================================================== */

/* ------------------------------------------------------------------ shell */
.blog-shell {
	background:
		radial-gradient(60% 420px at 50% 0%, #e3f0f9 0%, rgba(227, 240, 249, 0) 100%),
		linear-gradient(180deg, #f7fbfd 0px, #fff 520px);
}
.site-content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 64px;
	padding: 72px 20px 112px;
}
.content-area { min-width: 0; }

/* ---------------------------------------------------------------- sidebar */
.inside-right-sidebar { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 16px; }
.widget { padding: 24px 24px 18px; border: 1px solid var(--ui-line); border-radius: 22px; background: #fff; }
.widget-title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ui-muted);
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget_recent_entries li { border-top: 1px solid var(--ui-line); }
.widget_recent_entries li:first-child { border-top: 0; }
.widget_recent_entries a { display: block; padding: 12px 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ui-ink); transition: color .2s; }
.widget_recent_entries a:hover, .widget_recent_entries a:focus, .widget_recent_entries a[aria-current] { color: var(--ui-blue); }
.widget--topics { padding-bottom: 22px; }
.widget-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px !important; }
.widget-topics a {
	display: block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ui-mist);
	font-size: 14px;
	font-weight: 600;
	color: var(--ui-ink);
	transition: background-color .2s, color .2s;
}
.widget-topics a:hover, .widget-topics a:focus { background: var(--ui-tint); color: var(--ui-blue-dark); }

/* ------------------------------------------------------------ entry header */
.entry-kicker { margin: 0 0 18px; }
.entry-kicker__cat {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--ui-tint);
	font-size: 13px;
	font-weight: 700;
	color: var(--ui-blue-dark);
}
.entry-kicker__cat:hover, .entry-kicker__cat:focus { background: #d6ebf7; color: var(--ui-blue-dark); }
.entry-title {
	margin: 0;
	font-size: 46px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.025em;
	color: var(--ui-ink);
	text-wrap: balance;
}
.entry-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 18px; font-size: 15px; line-height: 1.5; color: var(--ui-muted); }
.entry-meta a { color: var(--ui-muted); }
.entry-meta a:hover { color: var(--ui-blue); }
/* GeneratePress prints the modified time beside the published one and hides it. */
.entry-meta .updated:not(.published) { display: none; }
.entry-meta__by::before { content: "\00B7"; margin-right: 16px; }

.featured-image { margin: 36px 0 0; border-radius: 24px; overflow: hidden; line-height: 0; background: var(--ui-mist); }
.featured-image img { display: block; width: 100%; height: auto; }

/* ----------------------------------------------------------- entry content */
.entry-content { margin-top: 40px; font-size: 18px; line-height: 1.75; color: var(--ui-body); }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(15, 120, 176, .35); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content strong, .entry-content b { color: var(--ui-ink); }

.entry-content h2 { margin: 1.8em 0 .6em; font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -.018em; color: var(--ui-ink); }
.entry-content h3 { margin: 1.6em 0 .5em; font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--ui-ink); }
.entry-content h2 strong, .entry-content h3 strong { font-weight: 700; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }

.entry-content ul,
.entry-content ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.entry-content li { margin: 0 0 .5em; padding-left: .2em; }
.entry-content li::marker { color: var(--ui-blue); }

.entry-content blockquote {
	margin: 0 0 1.25em;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--ui-blue);
	font-size: 19px;
	color: var(--ui-ink);
}

/* figures and images — block-editor and classic-editor flavours */
.entry-content figure { margin: 2em 0; }
.entry-content img { border-radius: 14px; }
.entry-content figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.entry-content figcaption,
.entry-content .wp-caption-text { margin: 10px 0 0; font-size: 14px; line-height: 1.5; text-align: center; color: var(--ui-muted); }
.entry-content .bordered-img img { border: 1px solid var(--ui-line); }

/* WordPress alignment classes (the older posts use bare <img>s) */
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content::after { content: ""; display: table; clear: both; }
/* classic captions carry an inline pixel width */
.entry-content .wp-caption { max-width: 100%; }

.entry-content sub,
.entry-content sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; }
.entry-content sub { bottom: -.25em; }
.entry-content sup { top: -.5em; }

/* tables */
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content table { width: 100%; margin: 0 0 1.25em; border-collapse: collapse; font-size: 16px; }
.entry-content th,
.entry-content td { padding: 12px 14px; border: 1px solid var(--ui-line); text-align: left; vertical-align: top; }
.entry-content th, .entry-content thead td { background: var(--ui-mist); font-weight: 700; color: var(--ui-ink); }

/* responsive embeds (the YouTube figure in the unicode post) */
.wp-block-embed__wrapper { position: relative; border-radius: 16px; overflow: hidden; }
.wp-has-aspect-ratio .wp-block-embed__wrapper::before { content: ""; display: block; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { padding-top: 56.25%; }
.wp-has-aspect-ratio .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.entry-content iframe { max-width: 100%; }

/* --------------------------------------------------- call to action (post) */
.blog-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	margin-top: 64px;
	padding: 36px 40px;
	border-radius: 26px;
	background:
		radial-gradient(70% 120% at 100% 0%, rgba(37, 211, 102, .16) 0%, rgba(37, 211, 102, 0) 60%),
		var(--ui-navy);
	color: #cfe0ea;
}
.blog-cta__title { margin: 0 0 6px; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; color: #fff; }
.blog-cta__text { margin: 0; font-size: 15px; line-height: 1.55; }
.blog-cta__actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 10px; }
.blog-cta__actions .ui-btn { min-height: 44px; padding: 10px 22px; font-size: 15px; }

/* ----------------------------------------------------------- breakpoints */
@media (max-width: 1024px) {
	.site-content-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; max-width: 800px; padding: 56px 20px 88px; }
	.inside-right-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 767px) {
	.site-content-grid { padding: 40px 16px 64px; }
	.inside-right-sidebar { grid-template-columns: 1fr; }
	.entry-title { font-size: 32px; }
	.entry-meta { margin-top: 14px; font-size: 14px; }
	.featured-image { margin-top: 28px; border-radius: 18px; }
	.entry-content { margin-top: 32px; font-size: 17px; line-height: 1.7; }
	.entry-content h2 { font-size: 24px; }
	.entry-content h3 { font-size: 19px; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 0 0 1em; }
	.blog-cta { flex-direction: column; align-items: stretch; padding: 28px 22px; }
	.blog-cta__actions .ui-btn { width: 100%; }
}
