/*
Theme Name: Windows Blog
Theme Type: child-theme
Template: twentytwentyfive
Version: 1.4.5
Description: Editorial child theme for the Windows Shortner blog. Replaces the full-content home feed with a card grid, gives articles a clean reading layout, and ships a professional brand header and multi-column footer. Places the Google Ad Manager display units on the home feed and inside every guide, with every unit editable from Settings > Windows Blog Ads.
Author: Windows Shortner
Text Domain: windows-blog
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
	--wb-ink: #101828;
	--wb-body: #475467;
	--wb-muted: #6b7688;
	--wb-faint: #8a93a6;
	--wb-line: #e4e7ee;
	--wb-soft: #f7f8fb;
	--wb-accent: #0e9384;
	--wb-accent-dark: #0a6f64;
	--wb-accent-soft: #e6f6f4;
	--wb-radius: 16px;
	--wb-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .14);
	--wb-shadow-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 40px -16px rgba(16, 24, 40, .24);
	--wb-measure: 740px;
}

/* ==========================================================================
   Shared brand blocks
   ========================================================================== */
/* The brand lockup is used in both the header and the footer. */
.wb-logo {
	align-items: center;
	display: flex;
	gap: 12px;
}

.wb-logo .wb-mark {
	flex: 0 0 auto;
	line-height: 0;
	margin: 0;
}

.wb-logo .wb-mark img {
	border-radius: 11px;
	display: block;
	height: 42px;
	width: 42px;
}

.wb-wordmark {
	font-weight: 700;
	letter-spacing: -.022em;
	line-height: 1.1;
	margin: 0;
}

.wb-wordmark a {
	color: var(--wb-ink);
	text-decoration: none;
}

.wb-wordmark a:hover {
	color: var(--wb-accent);
}

/* ==========================================================================
   Header
   ========================================================================== */
/* The header band is the template part wrapper. It spans the full viewport
   and carries the same root padding the page content uses, so the inner
   row lands on exactly the same grid as the article cards. */
.site-header {
	background: rgba(255, 255, 255, .97);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--wb-line);
	padding: 14px var(--wp--style--root--padding-right, 24px) 14px var(--wp--style--root--padding-left, 24px);
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 90;
}

.wb-header-inner {
	margin-inline: auto;
	max-width: var(--wp--style--global--wide-size, 1340px);
	width: 100%;
}

.wb-nav .wb-nav-item {
	color: var(--wb-body);
	font-size: .95rem;
	font-weight: 500;
	text-decoration: none;
}

.wb-nav .wb-nav-item:hover {
	color: var(--wb-accent);
}

.wb-nav .wb-nav-cta {
	margin-left: 4px;
}

.wb-nav .wb-btn {
	background: var(--wb-accent);
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
	color: #fff;
	display: inline-block;
	font-size: .92rem;
	font-weight: 600;
	padding: 10px 20px;
	text-decoration: none;
	transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.wb-nav .wb-btn:hover,
.wb-nav .wb-btn:focus-visible {
	background: var(--wb-accent-dark);
	box-shadow: 0 6px 16px -6px rgba(14, 147, 132, .55);
	color: #fff;
	transform: translateY(-1px);
}

/* Text blocks that sit on their own inside the header and the footer. */
.wb-note {
	color: var(--wb-muted);
	font-size: .85rem;
	line-height: 1.5;
	margin: 0;
}

.wb-intro-text {
	color: #5a6b8a;
	font-size: 1.12rem;
	line-height: 1.6;
}

.wb-note-brand {
	color: #5f6b80;
	font-size: .94rem;
	line-height: 1.65;
	max-width: 36ch;
}

.wb-empty {
	color: #5a6b8a;
	font-size: 1.1rem;
}

.wb-credit {
	color: #7b869a;
}

/* ==========================================================================
   Home: card grid
   ========================================================================== */
/* The theme caps every constrained child at the narrow content column, so the
   card grid and the intro block are widened explicitly. */
.is-layout-constrained > .wb-intro,
.is-layout-constrained > .wp-block-query,
.is-layout-constrained > .wb-ad-band {
	max-width: var(--wp--style--global--wide-size, 1340px);
}

.wp-block-post-template.is-layout-grid {
	gap: 32px;
	margin-block: 0;
	padding-block: 0;
	--wp--style--post-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

li.wp-block-post {
	background: var(--wb-surface);
	border: 1px solid var(--wb-line);
	border-radius: var(--wb-radius);
	box-shadow: var(--wb-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

li.wp-block-post:hover {
	transform: translateY(-3px);
	border-color: #c9e7e2;
	box-shadow: var(--wb-shadow-lift);
}

li.wp-block-post .wp-block-post-featured-image {
	margin: 0 0 18px;
	overflow: hidden;
}

li.wp-block-post .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 0;
	transition: transform .35s ease;
}

li.wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

li.wp-block-post .card-cat {
	margin: 0 0 10px;
}

li.wp-block-post .card-cat a {
	display: inline-block;
	background: var(--wb-accent-soft);
	border-radius: 999px;
	color: var(--wb-accent-dark);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	padding: 4px 11px;
	text-decoration: none;
	text-transform: uppercase;
}

li.wp-block-post h2.wp-block-post-title,
li.wp-block-post h3.wp-block-post-title {
	font-size: 1.28rem;
	font-weight: 600;
	letter-spacing: -.012em;
	line-height: 1.3;
	margin: 0 0 10px;
	padding: 0 22px;
}

li.wp-block-post h2.wp-block-post-title a,
li.wp-block-post h3.wp-block-post-title a {
	color: var(--wb-ink);
	text-decoration: none;
}

li.wp-block-post h2.wp-block-post-title a:hover,
li.wp-block-post h3.wp-block-post-title a:hover {
	color: var(--wb-accent);
}

li.wp-block-post .wp-block-post-excerpt {
	padding: 0 22px;
}

li.wp-block-post .wp-block-post-excerpt p {
	color: var(--wb-body);
	font-size: .95rem;
	line-height: 1.62;
}

li.wp-block-post .wp-block-post-excerpt .wp-block-post-excerpt__more-link {
	color: var(--wb-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

li.wp-block-post .wp-block-post-excerpt .wp-block-post-excerpt__more-link::after {
	content: "\2192";
	margin-left: 5px;
}

li.wp-block-post .wp-block-post-date {
	margin-top: auto;
	padding: 14px 22px 20px;
}

li.wp-block-post .wp-block-post-date time {
	color: var(--wb-faint);
	font-size: .8rem;
	font-weight: 500;
	letter-spacing: .01em;
}

/* pagination */
.wp-block-query-pagination {
	border-top: 1px solid var(--wb-line);
	margin-top: 48px;
	padding-top: 24px;
}

.wp-block-query-pagination .page-numbers {
	border-radius: 8px;
	color: var(--wb-body);
	font-weight: 600;
	padding: 6px 14px;
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers:hover {
	background: var(--wb-soft);
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wb-accent);
	color: #fff;
}

/* ==========================================================================
   Single post
   ========================================================================== */
.post-cat {
	margin-bottom: 12px;
}

.post-cat a {
	background: var(--wb-accent-soft);
	border-radius: 999px;
	color: var(--wb-accent-dark);
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	padding: 5px 12px;
	text-decoration: none;
	text-transform: uppercase;
}

.post-header {
	margin-bottom: 36px;
}

.post-header .wp-block-post-title {
	color: var(--wb-ink);
	font-weight: 700;
	letter-spacing: -.022em;
	line-height: 1.12;
	margin-bottom: 18px;
}

.post-byline {
	align-items: center;
	color: var(--wb-muted);
	font-size: .9rem;
	font-weight: 500;
	gap: 10px;
}

.post-byline a {
	color: var(--wb-muted);
	text-decoration: none;
}

.post-byline a:hover {
	color: var(--wb-accent);
}

/* the site has no avatar set, so keep the byline clean */
.wp-block-post-author .avatar,
.post-byline .avatar {
	display: none;
}

.post-hero {
	margin-bottom: 48px;
}

.post-hero img {
	border-radius: 14px;
	display: block;
	width: 100%;
}

/* body copy */
.wp-block-post-content {
	color: var(--wb-body);
	font-size: 1.06rem;
	line-height: 1.75;
}

.wp-block-post-content > p {
	margin-bottom: 1.45em;
}

.wp-block-post-content > p.lead {
	color: var(--wb-ink);
	font-size: 1.18rem;
	line-height: 1.65;
}

.wp-block-post-content h2 {
	color: var(--wb-ink);
	font-weight: 700;
	letter-spacing: -.018em;
	line-height: 1.24;
	margin: 2.1em 0 .65em;
}

.wp-block-post-content h3 {
	color: var(--wb-ink);
	font-weight: 650;
	letter-spacing: -.01em;
	line-height: 1.32;
	margin: 1.7em 0 .55em;
}

.wp-block-post-content a {
	color: var(--wb-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.wp-block-post-content strong {
	color: var(--wb-ink);
	font-weight: 650;
}

.wp-block-post-content ul,
.wp-block-post-content ol {
	padding-left: 1.4em;
}

.wp-block-post-content li {
	margin-bottom: .45em;
	padding-left: .25em;
}

.wp-block-post-content li::marker {
	color: var(--wb-accent);
}

.wp-block-post-content blockquote {
	background: var(--wb-soft);
	border-left: 3px solid var(--wb-accent);
	border-radius: 0 12px 12px 0;
	color: var(--wb-body);
	margin: 1.7em 0;
	padding: 1em 1.4em;
}

.wp-block-post-content figure {
	margin: 2em 0;
}

.wp-block-post-content figure img {
	border-radius: 10px;
}

.wp-block-post-content figure.featured {
	margin: 0 0 1.8em;
}

.wp-block-post-content figure.featured img {
	border-radius: 12px;
}

.wp-block-post-content figcaption {
	color: var(--wb-faint);
	font-size: .86rem;
	line-height: 1.5;
	text-align: center;
}

.wp-block-post-content table {
	background: var(--wb-surface);
	border-radius: 10px;
	overflow: hidden;
}

.wp-block-post-content th {
	background: var(--wb-soft);
	color: var(--wb-ink);
}

.wp-block-post-content pre {
	background: #0f172a;
	border: none;
	color: #dbe4f5;
}

.wp-block-post-content pre code {
	color: #dbe4f5;
}

.wp-block-post-content :not(pre) > code {
	background: var(--wb-soft);
	color: #0b3b57;
}

/* tags under the article */
.post-tags {
	border-top: 1px solid var(--wb-line);
	margin-top: 56px;
	padding-top: 24px;
}

.post-tags a {
	background: var(--wb-soft);
	border-radius: 999px;
	color: var(--wb-body);
	display: inline-block;
	font-size: .82rem;
	font-weight: 500;
	margin: 0 6px 8px 0;
	padding: 5px 12px;
	text-decoration: none;
}

.post-tags a:hover {
	background: var(--wb-accent-soft);
	color: var(--wb-accent-dark);
}

/* ==========================================================================
   Ad Manager slots
   ========================================================================== */
/* Each placement renders one unit for wide screens and, where it makes sense,
   a smaller one for phones. The two are in the same markup and the media
   queries below decide which one is shown. */
.wb-ad {
	display: flex;
	justify-content: center;
	margin-inline: auto;
	max-width: 100%;
}

.wb-ad__desktop,
.wb-ad__mobile {
	margin-inline: auto;
	max-width: 100%;
}

.wb-ad__unit {
	margin-inline: auto;
	max-width: 100%;
}

/* The frame holds the space for the ad. When Ad Manager has nothing to show
   it hides the slot itself, and without the frame the page would close up and
   the layout would jump. The frame keeps the slot the size it was made for. */
.wb-ad__frame {
	margin-inline: auto;
	max-width: 100%;
}

/* The narrow screen unit stays out of the way until it is needed. */
.wb-ad__mobile {
	display: none;
}

/* The band that carries the leaderboards is allowed to leave the reading
   column, so a wide unit still fits without stretching the text. */
.wb-ad-band {
	margin-block: 0 8px;
}

.wb-ad--lead {
	margin-block: 0 40px;
}

.wb-ad--inline {
	margin-block: 44px;
}

.wb-ad--end {
	margin-block: 8px 48px;
}

.wb-ad--home {
	margin-block: 0 40px;
}

/* ==========================================================================
   Article summary and related guides
   ========================================================================== */
/* The quick summary sits under the opening paragraph. It carries the three
   points that answer the question in the title, so a reader who only reads
   the top of the page still gets the answer. */
.wp-block-post-content .wb-summary {
	background: var(--wb-soft);
	border: 1px solid var(--wb-line);
	border-left: 3px solid var(--wb-accent);
	border-radius: 12px;
	margin: 0 0 2em;
	padding: 18px 22px;
}

.wp-block-post-content .wb-summary__title {
	color: var(--wb-accent-dark);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.wp-block-post-content .wb-summary__list {
	margin: 0;
	padding: 0 0 0 20px;
}

.wp-block-post-content .wb-summary__list li {
	margin: 0 0 8px;
	padding-left: 4px;
}

.wp-block-post-content .wb-summary__list li:last-child {
	margin-bottom: 0;
}

/* The related guides close the article with somewhere to go next. Each line
   says why the guide is worth opening, not only what it is called. */
.wp-block-post-content .wb-related {
	border-top: 1px solid var(--wb-line);
	margin-top: 2.6em;
	padding-top: 1.6em;
}

.wp-block-post-content .wb-related h2 {
	font-size: 1.25rem;
	margin: 0 0 .8em;
}

.wp-block-post-content .wb-related__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-block-post-content .wb-related__list li {
	margin: 0 0 14px;
	padding: 0 0 0 26px;
	position: relative;
}

.wp-block-post-content .wb-related__list li::before {
	color: var(--wb-accent);
	content: "\2192";
	font-weight: 700;
	left: 0;
	position: absolute;
}

.wp-block-post-content .wb-related__list a {
	font-weight: 600;
	text-decoration: none;
}

.wp-block-post-content .wb-related__list a:hover {
	text-decoration: underline;
}

.wp-block-post-content .wb-related__why {
	color: var(--wb-body);
	display: block;
	font-size: .95rem;
	line-height: 1.55;
	margin-top: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
/* The footer band is the template part wrapper, so the tinted background runs
   edge to edge while the columns stay on the same grid as the header. */
.site-footer {
	background: var(--wb-soft);
	border-top: 1px solid var(--wb-line);
	margin-top: 64px;
	padding: 52px var(--wp--style--root--padding-right, 24px) 0 var(--wp--style--root--padding-left, 24px);
}

.wb-footer-inner {
	margin-inline: auto;
	max-width: var(--wp--style--global--wide-size, 1340px);
	width: 100%;
}

.wb-footer-grid {
	display: grid;
	gap: 40px;
	grid-template-columns: 1.8fr 1fr 1fr 1fr;
	padding-bottom: 40px;
}

.wb-footer-brand .wb-logo .wb-mark img {
	height: 40px;
	width: 40px;
}

.wb-footer-heading {
	color: var(--wb-ink);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.wb-footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wb-footer-list li {
	margin: 0 0 8px;
}

.wb-footer-list a {
	color: var(--wb-body);
	font-size: .92rem;
	text-decoration: none;
}

.wb-footer-list a:hover {
	color: var(--wb-accent);
}

.wb-footer-bottom {
	border-top: 1px solid var(--wb-line);
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	justify-content: space-between;
	padding: 20px 0 26px;
}

.wb-footer-bottom p {
	margin: 0;
}

/* ==========================================================================
   Small screens
   ========================================================================== */
/* The rules that swap the wide unit for the phone sized one are printed by
   the theme, so that the widths in the stylesheet and the media queries the
   ad script uses come from the same number. */

@media (max-width: 1023px) {
	.wp-block-post-template.is-layout-grid {
		gap: 26px;
		--wp--style--post-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wb-footer-grid {
		gap: 32px;
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 780px) {
	.wb-header-inner {
		gap: 12px 20px;
	}

	.wb-nav {
		gap: 14px 18px;
		justify-content: flex-start;
		width: 100%;
	}

	.wb-nav .wb-nav-cta {
		margin-left: auto;
	}
}

@media (max-width: 640px) {
	.wp-block-post-template.is-layout-grid {
		--wp--style--post-template-columns: 1fr;
		grid-template-columns: 1fr;
	}

	li.wp-block-post h2.wp-block-post-title,
	li.wp-block-post h3.wp-block-post-title {
		font-size: 1.16rem;
	}

	.wp-block-post-content {
		font-size: 1.02rem;
		line-height: 1.7;
	}

	.wp-block-post-content > p.lead {
		font-size: 1.1rem;
	}

	.wp-block-post-content h2 {
		font-size: 1.6rem;
	}

	.wb-nav .wb-nav-cta {
		margin-left: auto;
	}

	.wb-footer-grid {
		gap: 28px;
		grid-template-columns: 1fr;
	}

	.wb-footer-bottom {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 560px) {
	/* The topic link is still in the footer, so the mobile header keeps a
	   single tidy row instead of wrapping onto three lines. */
	.wb-nav-topic {
		display: none;
	}

	.site-header {
		padding-bottom: 12px;
		padding-top: 12px;
	}
}
