/**
 * V7 Obsidian Cyber — blog archive + single prose (Theme Builder).
 * Loaded only on is_home / singular post / tax archives.
 */

/* Archive cards — glass hover lift */
body.pwc-v7-shell .pwc-blog-cards .elementor-post__card {
	transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
	overflow: hidden;
}

body.pwc-v7-shell .pwc-blog-cards .elementor-post__card:hover {
	border-color: rgba(5, 255, 114, 0.45);
	transform: translateY(-3px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body.pwc-v7-shell .pwc-blog-cards .elementor-post__title,
body.pwc-v7-shell .pwc-blog-cards .elementor-post__title a {
	font-family: Outfit, sans-serif;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-decoration: none;
}

body.pwc-v7-shell .pwc-blog-cards .elementor-post__title a:hover {
	color: #05ff72;
}

body.pwc-v7-shell .pwc-blog-cards .elementor-post__read-more {
	font-family: "Share Tech Mono", monospace;
	font-size: 13px;
	text-decoration: none;
	letter-spacing: 0.02em;
}

body.pwc-v7-shell .pwc-blog-cards .elementor-post__badge {
	font-family: "Share Tech Mono", monospace;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

body.pwc-v7-shell .pwc-blog-cards .elementor-pagination .page-numbers {
	font-family: "Share Tech Mono", monospace;
	border-radius: 8px;
}

/* Single — reading column prose */
body.pwc-v7-shell .pwc-post-content {
	font-size: 1.0625rem;
	line-height: 1.75;
}

body.pwc-v7-shell .pwc-post-content h2,
body.pwc-v7-shell .pwc-post-content h3,
body.pwc-v7-shell .pwc-post-content h4 {
	font-family: Outfit, sans-serif;
	color: #f5f8f7;
	letter-spacing: -0.02em;
	margin-top: 2em;
	margin-bottom: 0.6em;
}

body.pwc-v7-shell .pwc-post-content a {
	color: #05ff72;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.pwc-v7-shell .pwc-post-content a:hover {
	color: #00e5ff;
}

body.pwc-v7-shell .pwc-post-content img {
	border-radius: 14px;
	border: 1px solid rgba(5, 255, 114, 0.12);
	max-width: 100%;
	height: auto;
}

body.pwc-v7-shell .pwc-post-content blockquote {
	border-left: 3px solid #05ff72;
	margin: 1.5em 0;
	padding: 0.25em 0 0.25em 1.25em;
	color: #7b9487;
	font-style: italic;
}

body.pwc-v7-shell .pwc-post-content code,
body.pwc-v7-shell .pwc-post-content pre {
	font-family: "Share Tech Mono", monospace;
	background: rgba(5, 9, 14, 0.9);
	border: 1px solid rgba(5, 255, 114, 0.12);
	border-radius: 8px;
}

body.pwc-v7-shell .pwc-post-content code {
	padding: 0.15em 0.4em;
	font-size: 0.9em;
}

body.pwc-v7-shell .pwc-post-content pre {
	padding: 1em 1.25em;
	overflow-x: auto;
}

body.pwc-v7-shell .pwc-post-featured img {
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

body.pwc-v7-shell .pwc-post-nav .post-navigation {
	border-top: 1px solid rgba(5, 255, 114, 0.12);
	padding-top: 1.5rem;
}

/* Right TOC rail — sticky like original .sticky-sidebar (top:100px under header) */
body.pwc-v7-shell .pwc-post-grid {
	align-items: flex-start;
	/* overflow:hidden on ancestors kills position:sticky */
	overflow: visible !important;
}

body.pwc-v7-shell #post-body,
body.pwc-v7-shell .pwc-post-body {
	overflow: visible !important;
}

@media (min-width: 1025px) {
	body.pwc-v7-shell .pwc-post-sidebar,
	body.pwc-v7-shell #post-sidebar {
		position: sticky !important;
		top: 100px !important;
		align-self: flex-start !important;
		width: 380px;
		max-width: 380px;
		box-sizing: border-box;
		z-index: 5;
		/* Keep the whole TOC card in view while the article scrolls */
		max-height: calc(100vh - 120px);
	}

	body.pwc-v7-shell .pwc-post-toc,
	body.pwc-v7-shell #blog-toc-container {
		position: static !important; /* disable Elementor JS sticky (leaves TOC behind) */
		top: auto !important;
		max-height: calc(100vh - 120px);
	}

	body.pwc-v7-shell .pwc-post-toc .elementor-toc__body {
		max-height: calc(100vh - 220px);
		overflow-y: auto;
	}
}

body.pwc-v7-shell .pwc-post-toc .elementor-toc__header-title {
	font-family: Outfit, sans-serif;
	font-weight: 700;
	letter-spacing: -0.02em;
}

body.pwc-v7-shell .pwc-post-toc .elementor-toc__list-item-text {
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 0.9375rem;
	line-height: 1.45;
}

/* Scroll-spy active item — match original sticky-sidebar .blog-toc a.active */
body.pwc-v7-shell .pwc-post-toc a.elementor-toc__list-item-text {
	display: block;
	padding: 6px 0 6px 12px;
	border-left: 2px solid transparent;
	text-decoration: none !important;
	transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease, background 0.2s ease;
	word-wrap: break-word;
	/* Neutralize Elementor's own --item-text-active-color until our spy owns the class */
	color: inherit;
}

body.pwc-v7-shell .pwc-post-toc a.elementor-toc__list-item-text:hover {
	color: #05ff72 !important;
	border-left-color: #05ff72;
	padding-left: 15px;
}

/* Only our spy class drives the highlight */
body.pwc-v7-shell .pwc-post-toc a.elementor-toc__list-item-text.pwc-toc-active {
	color: #05ff72 !important;
	border-left-color: #05ff72;
	font-weight: 600;
	background: rgba(0, 255, 65, 0.05);
	padding-left: 15px;
}

/* Mute Elementor's native active (we don't fight its class churn) */
body.pwc-v7-shell .pwc-post-toc {
	--item-text-active-color: var(--item-text-color, #cbdcd3);
	--item-text-active-decoration: none;
}

/* Avoid paint thrash from sticky + heavy transitions on every frame */
body.pwc-v7-shell .pwc-post-sidebar {
	will-change: auto;
	contain: layout style;
}

@media (max-width: 1024px) {
	body.pwc-v7-shell .pwc-post-grid {
		flex-direction: column !important;
	}

	body.pwc-v7-shell .pwc-post-sidebar,
	body.pwc-v7-shell .pwc-post-main {
		width: 100% !important;
		max-width: 100% !important;
	}
}
