/* ==========================================================================
   Single Resource post: hero, two-column layout, sidebar cards
   ========================================================================== */

/* Outer wrapper: full width, grey background (match resources archive) */
.pla-single-resource-content {
	padding: 0;
}

.pla-single-resource-archive {
	background: var(--base);
	min-height: 50vh;
	padding: 1.5rem 1.5rem 3rem;
}

/* Inner content: centred, max width */
.pla-single-resource {
	max-width: var(--content-width, 1200px);
	margin: 0 auto;
}

/* Hero */
.pla-single-resource__hero {
	margin-bottom: 2rem;
}

.pla-single-resource__breadcrumbs {
	font-size: 0.875rem;
	color: var(--tarigo-grey, #6b7280);
	margin-bottom: 0.75rem;
}

.pla-single-resource__breadcrumbs a {
	color: var(--pla-cta-blue, #2271b1);
	text-decoration: none;
}

.pla-single-resource__breadcrumbs a:hover {
	text-decoration: underline;
}

.pla-single-resource__breadcrumbs-sep {
	margin: 0 0.35rem;
}

.pla-single-resource__breadcrumbs-current {
	color: var(--black, #1d1d1d);
}

.pla-single-resource__title {
	margin: 0 0 20px;
	font-size: 42px;
	line-height: 1.2em;
	font-weight: 500;
	color: var(--pla-accent);
}

.pla-single-resource__intro {
	margin: 0 0 1.5rem;
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--tarigo-grey, #374151);
}

.pla-single-resource__meta-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--global-color-10, #e5e7eb);
}

.pla-single-resource__author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.pla-single-resource__author-avatar {
	border-radius: 50%;
	display: block;
}

.pla-single-resource__author-name {
	display: block;
	font-weight: 600;
	color: var(--black, #1d1d1d);
	font-size: 0.9375rem;
}

.pla-single-resource__author-role {
	display: block;
	font-size: 0.8125rem;
	color: var(--tarigo-grey, #6b7280);
}

/* Inline gate for non-logged-in users (replaces modal on single resource) */
.pla-single-resource__gate {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.06);
	padding: 2rem;
	margin-bottom: 2rem;
	text-align: center;
}

.pla-single-resource__gate-message {
	margin: 0 0 1.25rem;
	font-size: 1.0625rem;
	color: var(--black, #1d1d1d);
}

.pla-single-resource__gate-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.pla-single-resource__gate-btn {
	padding: 0.6rem 1.25rem;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid rgba(0, 0, 0, 0.2);
	background: #fff;
	color: var(--black, #1d1d1d);
	transition: opacity 0.2s ease;
}

.pla-single-resource__gate-btn--primary {
	background: var(--pla-cta-blue, #2271b1);
	border-color: var(--pla-cta-blue, #2271b1);
	color: #fff;
}

.pla-single-resource__gate-btn:hover {
	opacity: 0.92;
}

.pla-single-resource__meta-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.875rem;
	color: var(--tarigo-grey, #6b7280);
}

.pla-single-resource__meta-icon {
	margin-right: 0.25rem;
}

/* Article writer card (ACF article_author relationship) */
.pla-single-resource__writer-card {
	background: #fff;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	padding: 1rem 1.25rem;
	margin-top: 1rem;
}

.pla-single-resource__writer {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.pla-single-resource__writer-avatar {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: 50%;
	overflow: hidden;
	background: var(--global-color-10, #f0f0f0);
}

.pla-single-resource__writer-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pla-single-resource__writer-avatar--placeholder {
	width: 100%;
	height: 100%;
}

.pla-single-resource__writer-text {
	min-width: 0;
}

.pla-single-resource__writer-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--tarigo-grey, #6b7280);
	text-transform: uppercase;
	margin-bottom: 0.15rem;
}

.pla-single-resource__writer-name {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	color: var(--black, #1d1d1d);
	margin-bottom: 0.25rem;
}

.pla-single-resource__writer-bio {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--tarigo-grey, #6b7280);
}

/* Two-column layout */
.pla-single-resource__layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 900px) {
	.pla-single-resource__layout {
		grid-template-columns: 1fr;
	}
}

.pla-single-resource__main {
	min-width: 0;
}

/* Video / Podcast embed */
.pla-single-resource__media {
	margin-bottom: 2rem;
}

.pla-single-resource__video-embed,
.pla-single-resource__podcast-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--black, #1a1a1a);
	border-radius: 8px;
	overflow: hidden;
}

.pla-single-resource__video-embed iframe,
.pla-single-resource__podcast-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.pla-single-resource__media-label {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--pla-cta-blue, #2271b1);
}

/* PDF download card */
.pla-single-resource__download {
	margin-bottom: 2rem;
	border: 2px solid var(--pla-cta-blue, #2271b1);
	border-radius: 8px;
	background: var(--base, #f9fafb);
	padding: 1.25rem 1.5rem;
}

.pla-single-resource__download-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.pla-single-resource__download-icon {
	font-size: 2rem;
	line-height: 1;
}

.pla-single-resource__download-text {
	flex: 1;
	min-width: 180px;
}

.pla-single-resource__download-title {
	display: block;
	font-weight: 700;
	color: var(--black, #1d1d1d);
	font-size: 1rem;
}

.pla-single-resource__download-sub {
	display: block;
	font-size: 0.875rem;
	color: var(--tarigo-grey, #6b7280);
}

.pla-single-resource__download-btn {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	background: var(--pla-cta-blue, #2271b1);
	color: #fff;
	font-weight: 600;
	font-size: 0.9375rem;
	border-radius: 6px;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.pla-single-resource__download-btn:hover {
	opacity: 0.9;
	color: #fff;
}

/* PDF flipbook: smaller, spread view (cover then 2-3, 4-5…) */
.pla-single-resource__pdf-wrap {
	margin-bottom: 2rem;
}

.pla-pdf-flipbook {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.06);
	padding: 1.25rem;
	position: relative;
}

.pla-pdf-flipbook__stage {
	min-height: 320px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}

/* Single page (cover): same width as one page in spread. Two-page spread: double width so each page is same size. */
.pla-pdf-flipbook__spread {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 4px;
	max-width: 420px;
	margin: 0 auto;
}

.pla-pdf-flipbook__spread:not(.pla-pdf-flipbook__spread--cover) {
	max-width: 844px;
}

.pla-pdf-flipbook__page {
	position: relative;
	flex: 1;
	min-width: 0;
	max-width: 50%;
	aspect-ratio: 3 / 4;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	background: #f5f5f5;
}

.pla-pdf-flipbook__page--empty {
	flex: 0;
	max-width: 0;
	min-width: 0;
	overflow: hidden;
	visibility: hidden;
}

.pla-pdf-flipbook__spread--cover .pla-pdf-flipbook__page--left {
	max-width: 100%;
}

.pla-pdf-flipbook__canvas-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
}

.pla-pdf-flipbook__canvas {
	max-width: 100%;
	max-height: 100%;
	width: auto !important;
	height: auto !important;
	display: block;
}

.pla-pdf-flipbook__loading {
	text-align: center;
	padding: 2rem;
	color: var(--tarigo-grey, #6b7280);
	font-size: 0.9375rem;
}

.pla-pdf-flipbook__loading[hidden],
.pla-pdf-flipbook__controls[hidden] {
	display: none !important;
}

.pla-pdf-flipbook__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.pla-pdf-flipbook__prev,
.pla-pdf-flipbook__next {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--global-color-10, #ddd);
	background: #fff;
	border-radius: 6px;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--black, #1d1d1d);
	transition: border-color 0.2s ease, background 0.2s ease;
}

.pla-pdf-flipbook__prev:hover,
.pla-pdf-flipbook__next:hover {
	border-color: var(--pla-cta-blue, #2271b1);
	background: rgba(34, 113, 177, 0.06);
}

.pla-pdf-flipbook__counter {
	font-size: 0.9375rem;
	color: var(--tarigo-grey, #6b7280);
}

/* Prominent download card (below flipbook) */
.pla-single-resource__download--prominent {
	margin-top: 0;
	margin-bottom: 0;
	border: 2px solid var(--pla-cta-blue, #2271b1);
	border-radius: 8px;
	background: var(--base, #f3f4f6);
	padding: 1.5rem 1.75rem;
}

.pla-single-resource__download--prominent .pla-single-resource__download-inner {
	gap: 1.25rem;
}

.pla-single-resource__download--prominent .pla-single-resource__download-icon {
	font-size: 2.5rem;
}

.pla-single-resource__download--prominent .pla-single-resource__download-title {
	font-size: 1.125rem;
}

.pla-single-resource__download--prominent .pla-single-resource__download-sub {
	font-size: 0.9375rem;
}

.pla-single-resource__download--prominent .pla-single-resource__download-btn {
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
}

/* Article body */
.pla-single-resource__body {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--black, #1d1d1d);
}

.pla-single-resource__body h2,
.pla-single-resource__body h3 {
	margin: 2rem 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--black, #1d1d1d);
}

.pla-single-resource__body p {
	margin: 0 0 1rem;
}

.pla-single-resource__body blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem 1rem 1.5rem;
	border-left: 4px solid var(--pla-cta-blue, #2271b1);
	background: var(--base, #f3f4f6);
	border-radius: 0 6px 6px 0;
	font-style: italic;
	color: var(--tarigo-grey, #374151);
}

.pla-single-resource__body ul,
.pla-single-resource__body ol {
	margin: 0 0 1rem;
	padding-left: 1.5rem;
}

.pla-single-resource__body li {
	margin-bottom: 0.35rem;
}

/* Sidebar cards */
.pla-single-resource__sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: sticky;
	top: 1.5rem;
}

.pla-single-resource__card {
	padding: 1.25rem;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.pla-single-resource__card-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--black, #1d1d1d);
}

/* Related resources card – light grey card, square placeholders, “View all” button */
.pla-single-resource__related {
	background: var(--global-color-10, #f5f5f5);
	border-color: rgba(0, 0, 0, 0.06);
}

.pla-single-resource__related .pla-single-resource__card-title {
	margin-bottom: 1rem;
}

.pla-single-resource__related-list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
}

.pla-single-resource__related-item {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	padding: 0.75rem 0;
	border-bottom: none;
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.pla-single-resource__related-item:last-child {
	border-bottom: 0;
}

.pla-single-resource__related-item:hover .pla-single-resource__related-title {
	color: var(--pla-cta-blue, #2271b1);
}

/* Featured image or square placeholder (pastel: lavender, mint, orange) */
.pla-single-resource__related-thumb,
.pla-single-resource__related-color {
	width: 48px;
	height: 48px;
	min-width: 48px;
	min-height: 48px;
	flex-shrink: 0;
	border-radius: 8px;
	display: block;
	overflow: hidden;
}

.pla-single-resource__related-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	vertical-align: middle;
}

.pla-single-resource__related-color {
	background: #c7d2fe; /* light lavender/blue */
}

.pla-single-resource__related-item:nth-child(2) .pla-single-resource__related-color { background: #a7f3d0; }
.pla-single-resource__related-item:nth-child(3) .pla-single-resource__related-color { background: #fde68a; }

.pla-single-resource__related-title {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--black, #1d1d1d);
	line-height: 1.35;
}

.pla-single-resource__related-meta {
	display: block;
	font-size: 0.8125rem;
	color: var(--tarigo-grey, #6b7280);
	margin-top: 0.2rem;
}

/* “View all Resources” as a centered button */
.pla-single-resource__related-all {
	display: block;
	text-align: center;
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--black, #1d1d1d);
	text-decoration: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.pla-single-resource__related-all:hover {
	background: #f9fafb;
	border-color: rgba(0, 0, 0, 0.18);
	text-decoration: none;
}

/* Newsletter card (dark blue) */
.pla-single-resource__newsletter {
	background: var(--pla-cta-blue, #1e3a5f);
	border-color: transparent;
	color: #fff;
}

.pla-single-resource__newsletter .pla-single-resource__card-title {
	color: #fff;
}

.pla-single-resource__newsletter-text {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	opacity: 0.95;
}

.pla-single-resource__newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.pla-single-resource__newsletter-form input[type="email"] {
	width: 100%;
	padding: 0.6rem 0.875rem;
	font-size: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	box-sizing: border-box;
}

.pla-single-resource__newsletter-form input::placeholder {
	color: rgba(255, 255, 255, 0.7);
}

.pla-single-resource__newsletter-btn {
	padding: 0.6rem 1rem;
	background: #fff;
	color: var(--pla-cta-blue, #1e3a5f);
	font-weight: 600;
	font-size: 0.9375rem;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.pla-single-resource__newsletter-btn:hover {
	opacity: 0.92;
}

/* Members only card */
.pla-single-resource__members {
	background: var(--base, #f3f4f6);
}

.pla-single-resource__members-icon {
	display: block;
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.pla-single-resource__members-text {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--tarigo-grey, #374151);
}

.pla-single-resource__members-link {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--pla-cta-blue, #2271b1);
	text-decoration: none;
}

.pla-single-resource__members-link:hover {
	text-decoration: underline;
}
