/* ==========================================================================
   PSG Blog — single posts, posts page, category archives
   Loaded only on blog views (see inc/blog.php). Uses tokens from style.css.
   ========================================================================== */

/* Astra wrapper reset so our sections control width and spacing */
.psg-blog-view .site-content,
.psg-blog-view .site-content > .ast-container {
	padding: 0 !important;
	margin: 0 auto !important;
	max-width: none !important;
	display: block !important;
	background: var( --psg-color-bg );
}

.psg-blog-view #primary.psg-blog {
	margin: 0 !important;
}

.psg-blog {
	width: 100%;
	color: var( --psg-color-text );
	font-family: var( --psg-font-body );
	padding-bottom: var( --psg-space-xl );
}

/* --------------------------------------------------------------------------
   Hero (matches service page hero card)
   -------------------------------------------------------------------------- */
.psg-hero {
	max-width: var( --psg-container );
	margin: 0 auto;
	padding: 0 16px;
}

.psg-hero__inner {
	background: linear-gradient( 135deg, var( --psg-color-dark ) 0%, var( --psg-color-primary ) 100% );
	border-radius: 0 0 var( --psg-radius-lg ) var( --psg-radius-lg );
	padding: 56px 48px 60px;
	text-align: center;
	color: var( --psg-color-text-light );
}

.psg-hero--post .psg-hero__inner {
	padding-bottom: 120px;
}

.psg-hero__eyebrow {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-xs );
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --psg-color-accent );
	margin: 0 0 14px;
}

.psg-blog .psg-hero__title {
	font-family: var( --psg-font-heading );
	font-size: clamp( 1.875rem, 4vw, 2.875rem );
	font-weight: 800;
	line-height: 1.2;
	color: var( --psg-color-text-light );
	max-width: 860px;
	margin: 0 auto 18px;
}

.psg-hero__intro {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: rgba( 255, 255, 255, 0.85 );
	max-width: 640px;
	margin: 0 auto;
}

.psg-breadcrumb {
	font-size: var( --psg-text-sm );
	color: rgba( 255, 255, 255, 0.7 );
	margin: 0 0 22px;
}

.psg-breadcrumb a {
	color: rgba( 255, 255, 255, 0.85 );
	min-height: 0;
}

.psg-breadcrumb a:hover,
.psg-breadcrumb a:focus {
	color: var( --psg-color-accent );
}

.psg-breadcrumb__sep {
	margin: 0 8px;
	color: rgba( 255, 255, 255, 0.45 );
}

.psg-post-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 10px;
	font-size: var( --psg-text-sm );
	color: rgba( 255, 255, 255, 0.8 );
	margin: 0;
}

.psg-post-meta__dot {
	color: var( --psg-color-accent );
}

/* --------------------------------------------------------------------------
   Featured image overlapping the hero
   -------------------------------------------------------------------------- */
.psg-post-featured {
	max-width: 980px;
	margin: -88px auto 0;
	padding: 0 16px;
	position: relative;
}

.psg-post-featured img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border-radius: var( --psg-radius-lg );
	box-shadow: var( --psg-shadow-lg );
}

/* --------------------------------------------------------------------------
   Layout: article + sticky sidebar
   -------------------------------------------------------------------------- */
.psg-post-layout {
	max-width: var( --psg-container );
	margin: 56px auto 0;
	padding: 0 16px;
	display: grid;
	grid-template-columns: minmax( 0, 760px ) 320px;
	justify-content: center;
	gap: 56px;
	align-items: start;
}

.psg-post-sidebar {
	position: sticky;
	top: 110px;
}

.psg-sidebar-card {
	background: var( --psg-color-bg-alt );
	border: 1px solid var( --psg-color-border );
	border-top: 4px solid var( --psg-color-accent );
	border-radius: var( --psg-radius-lg );
	padding: 28px 24px;
}

.psg-sidebar-card__eyebrow {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-xs );
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #8B6600;
	margin: 0 0 8px;
}

.psg-sidebar-card__title {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-xl );
	font-weight: 800;
	color: var( --psg-color-primary );
	margin: 0 0 8px;
	line-height: 1.3;
}

.psg-sidebar-card__text {
	font-size: var( --psg-text-sm );
	line-height: 1.6;
	color: var( --psg-color-text-muted );
	margin: 0 0 18px;
}

.psg-sidebar-card .psg-btn {
	display: flex;
	width: 100%;
	justify-content: center;
	margin-bottom: 10px;
}

.psg-sidebar-card__list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	font-size: var( --psg-text-sm );
	color: var( --psg-color-text );
}

.psg-sidebar-card__list li {
	position: relative;
	padding-left: 22px;
	margin: 0 0 6px;
}

.psg-sidebar-card__list li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var( --psg-color-success );
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Buttons (template + content)
   -------------------------------------------------------------------------- */
.psg-blog .psg-btn,
.psg-blog .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 28px;
	border-radius: var( --psg-radius-full );
	font-family: var( --psg-font-heading );
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	text-align: center;
	border: 2px solid transparent;
	transition: background-color var( --psg-transition ), color var( --psg-transition ), border-color var( --psg-transition );
	cursor: pointer;
}

.psg-blog .psg-btn--primary,
.psg-blog .psg-btn-primary .wp-block-button__link {
	background: var( --psg-color-accent );
	border-color: var( --psg-color-accent );
	color: var( --psg-color-primary ) !important;
}

.psg-blog .psg-btn--primary:hover,
.psg-blog .psg-btn--primary:focus,
.psg-blog .psg-btn-primary .wp-block-button__link:hover,
.psg-blog .psg-btn-primary .wp-block-button__link:focus {
	background: var( --psg-color-accent-dark );
	border-color: var( --psg-color-accent-dark );
	color: var( --psg-color-primary ) !important;
}

.psg-blog .psg-btn--outline,
.psg-blog .psg-btn-secondary .wp-block-button__link {
	background: transparent;
	border-color: var( --psg-color-primary );
	color: var( --psg-color-primary ) !important;
}

.psg-blog .psg-btn--outline:hover,
.psg-blog .psg-btn--outline:focus,
.psg-blog .psg-btn-secondary .wp-block-button__link:hover,
.psg-blog .psg-btn-secondary .wp-block-button__link:focus {
	background: var( --psg-color-primary );
	color: var( --psg-color-text-light ) !important;
}

.psg-blog .psg-btn--outline-light,
.psg-blog .psg-cta--band .psg-btn-secondary .wp-block-button__link {
	background: transparent;
	border-color: rgba( 255, 255, 255, 0.7 );
	color: var( --psg-color-text-light ) !important;
}

.psg-blog .psg-btn--outline-light:hover,
.psg-blog .psg-btn--outline-light:focus,
.psg-blog .psg-cta--band .psg-btn-secondary .wp-block-button__link:hover,
.psg-blog .psg-cta--band .psg-btn-secondary .wp-block-button__link:focus {
	background: var( --psg-color-text-light );
	border-color: var( --psg-color-text-light );
	color: var( --psg-color-primary ) !important;
}

/* --------------------------------------------------------------------------
   Post content typography
   -------------------------------------------------------------------------- */
.psg-post__content {
	font-size: 1.0625rem;
	line-height: 1.8;
}

.psg-post__content > * {
	margin-top: 0;
	margin-bottom: 1.35em;
}

.psg-post__content h2 {
	font-family: var( --psg-font-heading );
	font-size: clamp( 1.5rem, 2.6vw, 1.875rem );
	font-weight: 800;
	line-height: 1.25;
	color: var( --psg-color-primary );
	margin: 2.4em 0 0.7em;
}

.psg-post__content h3 {
	font-family: var( --psg-font-heading );
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	color: var( --psg-color-primary );
	margin: 1.8em 0 0.5em;
}

.psg-post__content h2 + h3 {
	margin-top: 0.8em;
}

.psg-post__content p a,
.psg-post__content li a,
.psg-post__content td a {
	color: var( --psg-color-secondary );
	text-decoration: underline;
	text-decoration-color: rgba( 45, 90, 142, 0.35 );
	text-underline-offset: 3px;
}

.psg-post__content p a:hover,
.psg-post__content li a:hover {
	color: var( --psg-color-primary );
	text-decoration-color: var( --psg-color-accent );
}

.psg-post__content ul,
.psg-post__content ol {
	padding-left: 1.3em;
}

.psg-post__content li {
	margin-bottom: 0.4em;
}

/* Tables */
.psg-post__content .wp-block-table {
	margin: 1.5em 0 1.6em;
	overflow-x: auto;
}

.psg-post__content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	table-layout: auto;
	font-size: 0.975rem;
	line-height: 1.5;
	border: 1px solid var( --psg-color-border );
	border-radius: var( --psg-radius-md );
	overflow: hidden;
}

.psg-post__content .wp-block-table th {
	background: var( --psg-color-primary );
	color: var( --psg-color-text-light );
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-sm );
	font-weight: 700;
	text-align: left;
	padding: 12px 16px;
	border: 0;
}

.psg-post__content .wp-block-table td {
	padding: 12px 16px;
	border: 0;
	border-top: 1px solid var( --psg-color-border );
	vertical-align: top;
}

.psg-post__content .wp-block-table tbody tr:nth-child( even ) td {
	background: var( --psg-color-bg-alt );
}

.psg-post__content .wp-block-table td:last-child {
	white-space: nowrap;
	font-weight: 600;
	color: var( --psg-color-primary );
}

/* Images */
.psg-post__content .wp-block-image {
	margin: 1.8em 0;
}

.psg-post__content .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
	border-radius: var( --psg-radius-lg );
}

.psg-post__content figcaption {
	font-size: var( --psg-text-sm );
	line-height: 1.5;
	color: var( --psg-color-text-muted );
	margin-top: 10px;
	text-align: center;
}

/* --------------------------------------------------------------------------
   In-content CTAs
   -------------------------------------------------------------------------- */
.psg-post__content .psg-cta {
	border-radius: var( --psg-radius-lg );
	margin: 2.4em 0;
}

.psg-post__content .psg-cta > * {
	margin-top: 0;
}

.psg-post__content .psg-cta--callout {
	background: #FFF9DB;
	border: 1px solid #F3E39A;
	border-left: 6px solid var( --psg-color-accent );
	padding: 28px 32px;
}

.psg-post__content .psg-cta__title {
	font-family: var( --psg-font-heading );
	font-size: 1.3125rem;
	font-weight: 800;
	line-height: 1.3;
	color: var( --psg-color-primary );
	margin: 0 0 8px;
}

.psg-post__content .psg-cta__text {
	margin: 0 0 18px;
	line-height: 1.65;
}

.psg-post__content .psg-cta__buttons,
.psg-post__content .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.psg-post__content .wp-block-button {
	margin: 0;
}

/* Safety alert box (e.g. "Smell gas right now?") */
.psg-post__content .psg-alert {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	border-left: 6px solid #B91C1C;
	border-radius: var( --psg-radius-lg );
	padding: 22px 28px;
	margin: 0 0 2em;
}

.psg-post__content .psg-alert > * {
	margin-top: 0;
}

.psg-post__content .psg-alert p {
	margin-bottom: 0.6em;
	line-height: 1.65;
}

.psg-post__content .psg-alert p:last-child {
	margin-bottom: 0;
}

.psg-post__content .psg-alert__title {
	font-family: var( --psg-font-heading );
	font-size: 1.1875rem;
	font-weight: 800;
	color: #991B1B;
}

.psg-post__content .psg-alert a {
	color: #991B1B;
	font-weight: 700;
	white-space: nowrap;
}

/* Inline phone links in body text: undo the site-wide tel: touch-target block styling */
.psg-post__content p a[href^="tel:"] {
	display: inline;
	min-height: 0;
	min-width: 0;
	padding: 0;
}

.psg-post__content .psg-cta--band {
	background: linear-gradient( 135deg, var( --psg-color-dark ) 0%, var( --psg-color-primary ) 100% );
	color: var( --psg-color-text-light );
	padding: 40px 40px 34px;
	text-align: center;
}

.psg-post__content .psg-cta--band .psg-cta__heading {
	color: var( --psg-color-text-light );
	margin: 0 0 12px;
}

.psg-post__content .psg-cta--band .psg-cta__text {
	color: rgba( 255, 255, 255, 0.88 );
	max-width: 560px;
	margin: 0 auto 22px;
}

.psg-post__content .psg-cta--band .psg-cta__buttons {
	justify-content: center;
}

.psg-post__content .psg-cta--band .psg-cta__note {
	font-size: var( --psg-text-sm );
	line-height: 1.6;
	color: rgba( 255, 255, 255, 0.75 );
	margin: 22px auto 0;
	max-width: 560px;
}

.psg-post__content .psg-cta--band .psg-cta__note a {
	color: var( --psg-color-accent );
	text-decoration-color: rgba( 239, 201, 0, 0.5 );
}

/* --------------------------------------------------------------------------
   Author box
   -------------------------------------------------------------------------- */
.psg-author {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-top: 48px;
	padding: 24px;
	border: 1px solid var( --psg-color-border );
	border-radius: var( --psg-radius-lg );
	background: var( --psg-color-bg-alt );
}

.psg-author__photo {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 72px;
}

.psg-author__name {
	font-family: var( --psg-font-heading );
	font-weight: 700;
	color: var( --psg-color-primary );
	margin: 0 0 6px;
}

.psg-author__bio {
	font-size: var( --psg-text-sm );
	line-height: 1.65;
	margin: 0 0 8px;
}

.psg-author__link {
	font-size: var( --psg-text-sm );
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Cards, listing, related posts
   -------------------------------------------------------------------------- */
.psg-blog-index__inner,
.psg-related__inner {
	max-width: var( --psg-container );
	margin: 56px auto 0;
	padding: 0 16px;
}

.psg-related {
	margin-top: 72px;
	padding: 56px 0 8px;
	background: var( --psg-color-bg-alt );
}

.psg-related__inner {
	margin-top: 0;
}

.psg-related__title {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-2xl );
	font-weight: 800;
	margin: 0 0 24px;
}

.psg-card-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 300px, 1fr ) );
	gap: 28px;
}

.psg-card {
	display: flex;
	flex-direction: column;
	background: var( --psg-color-bg );
	border: 1px solid var( --psg-color-border );
	border-radius: var( --psg-radius-lg );
	overflow: hidden;
	box-shadow: var( --psg-shadow-sm );
	transition: box-shadow var( --psg-transition ), transform var( --psg-transition );
}

.psg-card:hover {
	box-shadow: var( --psg-shadow-md );
	transform: translateY( -2px );
}

.psg-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: var( --psg-color-primary );
	overflow: hidden;
}

.psg-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.psg-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient( 135deg, var( --psg-color-dark ), var( --psg-color-primary ) );
}

.psg-card__body {
	padding: 22px 24px 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.psg-card__eyebrow {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-xs );
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8B6600;
	margin: 0 0 8px;
}

.psg-blog .psg-card__title {
	font-family: var( --psg-font-heading );
	font-size: 1.1875rem;
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 10px;
}

.psg-card__title a {
	color: var( --psg-color-primary );
}

.psg-card__title a:hover,
.psg-card__title a:focus {
	color: var( --psg-color-secondary );
}

.psg-card__excerpt {
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var( --psg-color-text );
	margin: 0 0 14px;
	flex: 1;
}

.psg-card__meta {
	font-size: var( --psg-text-xs );
	color: var( --psg-color-text-muted );
	margin: 0;
}

.psg-pagination {
	margin-top: 40px;
	text-align: center;
}

.psg-pagination .nav-links {
	display: inline-flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

.psg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var( --psg-color-border );
	border-radius: var( --psg-radius-full );
	font-weight: 600;
	color: var( --psg-color-primary );
}

.psg-pagination .page-numbers.current {
	background: var( --psg-color-primary );
	border-color: var( --psg-color-primary );
	color: var( --psg-color-text-light );
}

.psg-empty {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
	padding: 40px 24px;
	border: 1px dashed var( --psg-color-border );
	border-radius: var( --psg-radius-lg );
}

.psg-empty__title {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-xl );
	font-weight: 800;
	color: var( --psg-color-primary );
	margin: 0 0 8px;
}

/* Bottom band on listing pages */
.psg-band {
	max-width: var( --psg-container );
	margin: 72px auto 0;
	padding: 0 16px;
}

.psg-band__inner {
	background: linear-gradient( 135deg, var( --psg-color-dark ) 0%, var( --psg-color-primary ) 100% );
	border-radius: var( --psg-radius-lg );
	padding: 48px 32px;
	text-align: center;
	color: var( --psg-color-text-light );
}

.psg-band__title {
	font-family: var( --psg-font-heading );
	font-size: var( --psg-text-3xl );
	font-weight: 800;
	color: var( --psg-color-text-light );
	margin: 0 0 10px;
}

.psg-band__text {
	color: rgba( 255, 255, 255, 0.85 );
	max-width: 600px;
	margin: 0 auto 24px;
	line-height: 1.7;
}

.psg-band__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media ( max-width: 1100px ) {
	.psg-post-layout {
		grid-template-columns: minmax( 0, 760px );
	}

	.psg-post-sidebar {
		position: static;
	}
}

@media ( max-width: 767px ) {
	.psg-hero {
		padding: 0;
	}

	.psg-hero__inner {
		border-radius: 0;
		padding: 40px 20px 44px;
	}

	.psg-hero--post .psg-hero__inner {
		padding-bottom: 84px;
	}

	.psg-post-featured {
		margin-top: -60px;
	}

	.psg-post-featured img {
		max-height: 300px;
	}

	.psg-post-layout {
		margin-top: 36px;
		gap: 40px;
	}

	.psg-post__content {
		font-size: 1rem;
	}

	.psg-post__content .psg-cta--callout {
		padding: 22px 20px;
	}

	.psg-post__content .psg-cta--band {
		padding: 32px 20px 28px;
	}

	.psg-post__content .wp-block-buttons,
	.psg-post__content .psg-cta__buttons {
		flex-direction: column;
	}

	.psg-post__content .wp-block-button,
	.psg-post__content .wp-block-button__link {
		width: 100%;
	}

	.psg-post__content .wp-block-table td:last-child {
		white-space: normal;
	}

	.psg-author {
		flex-direction: column;
	}

	.psg-band {
		padding: 0;
	}

	.psg-band__inner {
		border-radius: 0;
		padding: 40px 20px;
	}
}
