/**
 * Resource Detail V3.
 * Scoped to automated technical Resource posts.
 */

.resource-detail-v3 {
	--rv3-navy: #081f3d;
	--rv3-deep: #05162b;
	--rv3-blue: #00539b;
	--rv3-copper: #c8752a;
	--rv3-copper-light: #e18a45;
	--rv3-text: #102033;
	--rv3-muted: #667487;
	--rv3-line: #dde5ee;
	--rv3-surface: #f5f7fa;
	--rv3-surface-2: #edf2f6;
	--rv3-shadow: 0 18px 44px rgba(8, 31, 61, 0.08);
	--rv3-shadow-hover: 0 24px 56px rgba(8, 31, 61, 0.13);
	background: #fff;
	color: var(--rv3-text);
}

.resource-v3-progress {
	position: fixed;
	top: var(--resource-progress-top, 0);
	left: 0;
	z-index: 1000;
	width: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--rv3-copper), var(--rv3-copper-light));
	pointer-events: none;
}

.resource-v3-header {
	border-bottom: 1px solid var(--rv3-line);
	background: #fff;
}

.resource-v3-header__inner,
.resource-v3-cover-wrap .section-shell,
.resource-v3-layout,
.resource-v3-related .section-shell,
.resource-v3-quote .section-shell {
	max-width: 1180px;
}

.resource-v3-header__inner {
	padding-top: 34px;
	padding-bottom: 38px;
}

.resource-v3-breadcrumb {
	display: flex;
	gap: 8px;
	align-items: center;
	min-width: 0;
	margin-bottom: 24px;
	color: var(--rv3-muted);
	font-size: 0.75rem;
	font-weight: 600;
}

.resource-v3-breadcrumb a,
.resource-v3-breadcrumb strong {
	min-width: 0;
	color: inherit;
}

.resource-v3-breadcrumb a:hover,
.resource-v3-breadcrumb a:focus-visible {
	color: var(--rv3-blue);
}

.resource-v3-breadcrumb strong {
	overflow: hidden;
	color: var(--rv3-navy);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.resource-v3-type {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 14px;
	color: var(--rv3-copper);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-type::before {
	width: 34px;
	height: 2px;
	background: var(--rv3-copper);
	content: "";
}

.resource-v3-header h1 {
	max-width: 980px;
	margin: 0;
	color: var(--rv3-navy);
	font-size: 3.35rem;
	line-height: 1.03;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-deck {
	max-width: 870px;
	margin: 20px 0 0;
	color: #526176;
	font-size: 1.08rem;
	font-weight: 400;
	line-height: 1.65;
}

.resource-v3-meta {
	display: flex;
	gap: 12px 22px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--rv3-line);
	color: var(--rv3-muted);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-meta strong {
	color: var(--rv3-navy);
	font-weight: 700;
}

.resource-v3-meta__tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-left: auto;
}

.resource-v3-meta__tags span {
	padding: 7px 9px;
	border-radius: 3px;
	background: var(--rv3-surface-2);
	color: var(--rv3-navy);
}

.resource-v3-cover-wrap {
	padding: 0 0 38px;
	background: #fff;
}

.resource-v3-cover {
	position: relative;
	height: 330px;
	overflow: hidden;
	border-radius: 14px;
	background: var(--rv3-deep);
	box-shadow: var(--rv3-shadow);
}

.resource-v3-cover::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(5, 22, 43, 0.92) 0%, rgba(5, 22, 43, 0.72) 42%, rgba(5, 22, 43, 0.08) 78%);
	content: "";
}

.resource-v3-cover__art,
.resource-v3-cover__art svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.resource-v3-cover__art svg {
	object-fit: cover;
}

.resource-v3-cover__copy {
	position: absolute;
	right: 42px;
	bottom: 34px;
	left: 42px;
	z-index: 2;
	max-width: 580px;
	color: #fff;
}

.resource-v3-cover__copy span {
	display: block;
	margin-bottom: 8px;
	color: var(--rv3-copper-light);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-cover__copy strong {
	display: block;
	font-size: 1.7rem;
	line-height: 1.12;
	text-transform: uppercase;
}

.resource-v3-article-area {
	padding: 54px 0 68px;
	background: var(--rv3-surface);
}

.resource-v3-layout {
	display: grid;
	grid-template-columns: minmax(0, 760px) minmax(270px, 1fr);
	gap: 42px;
	align-items: start;
}

.resource-v3-content {
	min-width: 0;
	padding: 44px 50px;
	border: 1px solid rgba(8, 31, 61, 0.04);
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--rv3-shadow);
}

.resource-v3-content > p:first-child {
	margin-top: 0;
	color: var(--rv3-text);
	font-size: 1.16rem;
	line-height: 1.75;
}

.resource-v3-content p {
	margin: 0 0 22px;
	color: #4f5f73;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.82;
}

.resource-v3-content h2 {
	margin: 48px 0 16px;
	padding-top: 30px;
	border-top: 1px solid var(--rv3-line);
	color: var(--rv3-navy);
	font-size: 1.95rem;
	line-height: 1.14;
	letter-spacing: 0;
	scroll-margin-top: 112px;
	text-transform: uppercase;
}

.resource-v3-content h2:first-of-type {
	margin-top: 36px;
}

.resource-v3-content h3 {
	margin: 28px 0 10px;
	color: var(--rv3-navy);
	font-size: 1.3rem;
	line-height: 1.25;
}

.resource-v3-content ul,
.resource-v3-content ol {
	margin: 0 0 24px;
	padding-left: 24px;
	color: #4f5f73;
	font-size: 1rem;
	line-height: 1.75;
}

.resource-v3-content li + li {
	margin-top: 7px;
}

.resource-v3-content a {
	color: var(--rv3-blue);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(0, 83, 155, 0.28);
	text-underline-offset: 3px;
}

.resource-v3-content blockquote {
	margin: 30px 0;
	padding: 22px 24px;
	border-left: 4px solid var(--rv3-copper);
	background: var(--rv3-surface);
	color: var(--rv3-navy);
	font-size: 1.08rem;
	font-weight: 600;
	line-height: 1.55;
}

.resource-v3-content figure {
	margin: 30px 0;
}

.resource-v3-content img {
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.resource-v3-content figcaption {
	margin-top: 10px;
	color: var(--rv3-muted);
	font-size: 0.75rem;
	text-align: center;
}

.resource-v3-content .key-takeaways {
	margin: 28px 0 34px;
	padding: 26px;
	border-top: 3px solid var(--rv3-copper);
	border-radius: 12px;
	background: linear-gradient(135deg, var(--rv3-deep), var(--rv3-navy));
	color: #fff;
}

.resource-v3-content .key-takeaways h2 {
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	color: #fff;
	font-size: 1.4rem;
}

.resource-v3-content .key-takeaways ul {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
}

.resource-v3-content .wp-block-table,
.resource-v3-content .article-table-wrap {
	overflow-x: auto;
	margin: 24px 0 30px;
	border: 1px solid var(--rv3-line);
	border-radius: 10px;
}

.resource-v3-content table {
	width: 100%;
	min-width: 650px;
	border: 0;
	border-collapse: collapse;
	font-size: 0.82rem;
}

.resource-v3-content th,
.resource-v3-content td {
	padding: 14px 13px;
	border: 0;
	border-bottom: 1px solid var(--rv3-line);
	text-align: left;
	vertical-align: top;
}

.resource-v3-content th {
	background: var(--rv3-surface);
	color: var(--rv3-navy);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-content td {
	color: var(--rv3-muted);
}

.resource-v3-content tr:last-child td {
	border-bottom: 0;
}

.resource-v3-sidebar {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 16px;
}

.resource-v3-sidebar-card {
	position: relative;
	overflow: hidden;
	padding: 22px;
	border: 1px solid rgba(8, 31, 61, 0.04);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(8, 31, 61, 0.065);
}

.resource-v3-sidebar-card h2 {
	margin: 0 0 14px;
	color: var(--rv3-navy);
	font-size: 1.1rem;
	line-height: 1.15;
	text-transform: uppercase;
}

.resource-v3-toc {
	display: grid;
	gap: 8px;
}

.resource-v3-toc a {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 10px 11px;
	border-radius: 8px;
	background: var(--rv3-surface);
	color: var(--rv3-navy);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.35;
	transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.resource-v3-toc a::before {
	width: 8px;
	height: 8px;
	flex: 0 0 auto;
	border: 2px solid var(--rv3-copper);
	border-radius: 50%;
	content: "";
}

.resource-v3-toc a:hover,
.resource-v3-toc a:focus-visible,
.resource-v3-toc a.is-active {
	background: var(--rv3-surface-2);
	color: var(--rv3-blue);
	transform: translateX(3px);
}

.resource-v3-sidebar-download {
	border-top: 3px solid var(--rv3-copper);
	background: linear-gradient(135deg, var(--rv3-deep), var(--rv3-navy));
	color: #fff;
}

.resource-v3-sidebar-download h2 {
	color: #fff;
}

.resource-v3-sidebar-download p {
	margin: 0 0 16px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.8rem;
	line-height: 1.6;
}

.resource-v3-sidebar-download .resource-v3-button {
	width: 100%;
}

.resource-v3-sidebar-back {
	display: flex;
	min-height: 44px;
	gap: 6px;
	align-items: center;
	justify-content: center;
	padding: 10px 14px;
	border: 1px solid var(--rv3-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(8, 31, 61, 0.045);
	color: var(--rv3-navy);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-sidebar-back:hover,
.resource-v3-sidebar-back:focus-visible {
	border-color: rgba(200, 117, 42, 0.55);
	color: var(--rv3-copper);
}

.resource-v3-band {
	padding: 62px 0;
}

.resource-v3-section-kicker {
	margin-bottom: 8px;
	color: var(--rv3-copper);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-related h2 {
	margin: 0;
	color: var(--rv3-navy);
	font-size: 2rem;
	line-height: 1.08;
	text-transform: uppercase;
}

.resource-v3-related .section-shell > p {
	max-width: 760px;
	margin: 11px 0 0;
	color: var(--rv3-muted);
	font-size: 0.88rem;
}

.resource-v3-related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin-top: 24px;
}

.resource-v3-related-card {
	position: relative;
	min-height: 205px;
	overflow: hidden;
	padding: 22px;
	border: 1px solid rgba(8, 31, 61, 0.04);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(8, 31, 61, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-v3-related-card:hover,
.resource-v3-related-card:focus-visible {
	box-shadow: var(--rv3-shadow-hover);
	transform: translateY(-3px);
}

.resource-v3-related-card__type {
	display: block;
	margin-bottom: 12px;
	color: var(--rv3-copper);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-related-card h3 {
	margin: 0 0 10px;
	color: var(--rv3-navy);
	font-size: 1.2rem;
	line-height: 1.2;
}

.resource-v3-related-card p {
	margin: 0 0 18px;
	color: var(--rv3-muted);
	font-size: 0.84rem;
	font-weight: 400;
	line-height: 1.65;
}

.resource-v3-related-card__arrow {
	position: absolute;
	right: 20px;
	bottom: 18px;
	color: var(--rv3-blue);
	font-size: 1.35rem;
}

.resource-v3-quote {
	padding-top: 0;
}

.resource-v3-quote__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 30px;
	align-items: center;
	padding: 38px 40px;
	border-top: 3px solid var(--rv3-copper);
	border-radius: 14px;
	background: radial-gradient(circle at 86% 18%, rgba(200, 117, 42, 0.18), transparent 26%), linear-gradient(135deg, var(--rv3-deep), var(--rv3-navy) 66%, #0b3158);
	box-shadow: 0 24px 58px rgba(8, 31, 61, 0.18);
	color: #fff;
}

.resource-v3-quote h2 {
	margin: 0 0 9px;
	color: #fff;
	font-size: 1.8rem;
	line-height: 1;
	text-transform: uppercase;
}

.resource-v3-quote p {
	max-width: 760px;
	margin: 0;
	color: rgba(255, 255, 255, 0.76);
	font-size: 0.92rem;
}

.resource-v3-quote__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.resource-v3-button {
	display: inline-flex;
	height: 46px;
	gap: 9px;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 2px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.resource-v3-button span {
	transition: transform 0.2s ease;
}

.resource-v3-button:hover span,
.resource-v3-button:focus-visible span {
	transform: translateX(4px);
}

.resource-v3-button--copper {
	border-color: var(--rv3-copper);
	background: var(--rv3-copper);
	color: #fff;
}

.resource-v3-button--outline {
	border-color: rgba(255, 255, 255, 0.46);
	background: transparent;
	color: #fff;
}

.resource-v3-motion-card {
	position: relative;
	overflow: hidden;
}

.resource-v3-motion-line {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 8;
	height: 3px;
	background: linear-gradient(90deg, var(--rv3-copper), var(--rv3-copper-light));
	opacity: 0;
	pointer-events: none;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.16s ease;
}

.resource-v3-motion-card:hover > .resource-v3-motion-line,
.resource-v3-motion-card:focus-within > .resource-v3-motion-line {
	opacity: 1;
	transform: scaleX(1);
}

@media (max-width: 1050px) {
	.resource-v3-layout {
		grid-template-columns: 1fr;
	}

	.resource-v3-sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.resource-v3-sidebar-back:last-child {
		grid-column: 1 / -1;
	}

	.resource-v3-related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.resource-v3-header__inner {
		padding-top: 26px;
		padding-bottom: 28px;
	}

	.resource-v3-breadcrumb {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.resource-v3-breadcrumb strong {
		width: 100%;
		white-space: normal;
	}

	.resource-v3-header h1 {
		font-size: 2.35rem;
	}

	.resource-v3-deck {
		font-size: 1rem;
	}

	.resource-v3-meta__tags {
		width: 100%;
		margin-left: 0;
	}

	.resource-v3-cover {
		height: 260px;
	}

	.resource-v3-cover__copy {
		right: 24px;
		bottom: 24px;
		left: 24px;
	}

	.resource-v3-cover__copy strong {
		font-size: 1.35rem;
	}

	.resource-v3-content {
		padding: 30px 24px;
	}

	.resource-v3-content h2 {
		font-size: 1.6rem;
	}

	.resource-v3-sidebar,
	.resource-v3-related-grid,
	.resource-v3-quote__inner {
		grid-template-columns: 1fr;
	}

	.resource-v3-sidebar-back:last-child {
		grid-column: auto;
	}

	.resource-v3-quote__inner {
		padding: 30px 24px;
	}

	.resource-v3-quote__actions {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.resource-detail-v3 {
		scroll-behavior: auto;
	}

	.resource-v3-toc a,
	.resource-v3-related-card,
	.resource-v3-button span,
	.resource-v3-motion-line {
		transition-duration: 0.01ms;
	}
}
