/* =====================================================================
 * Single news / activity post (newsberg/single.php).
 * Uses the --sc-* tokens from site-chrome.css; class-scoped selectors +
 * !important where the theme's global !important font sizes must lose.
 * ===================================================================== */
#content.ps { padding: 0 !important; }
.ps { background: #faf7fd; color: var(--sc-text); overflow-x: clip; }
.ps-wrap { max-width: var(--sc-max); margin: 0 auto; padding: 0 24px; }
.ps a { text-decoration: none; }
.ps a:focus-visible, .ps button:focus-visible { outline: 2px solid var(--sc-purple); outline-offset: 3px; border-radius: 6px; }

/* ---------- Hero ---------- */
.ps-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 40px 0 44px;
	background: linear-gradient(180deg, #fff 0%, #fbf8fe 100%);
}
.ps-hero::before {
	content: "";
	position: absolute;
	inset: -40% -10%;
	z-index: -1;
	background:
		radial-gradient(34% 50% at 10% 20%, rgba(168, 85, 247, .14), transparent 70%),
		radial-gradient(30% 45% at 92% 70%, rgba(245, 196, 81, .09), transparent 70%);
}
.ps-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 22px; font-size: 13.5px !important; color: var(--sc-muted); }
.ps-crumbs a { color: var(--sc-muted) !important; font-weight: 600; }
.ps-crumbs a:hover { color: var(--sc-purple) !important; }
.ps-crumbs i { font-size: 9px !important; opacity: .6; }
.ps-crumbs span { color: var(--sc-ink); font-weight: 600; max-width: 52ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ps-chip {
	padding: 5px 13px;
	border-radius: 999px;
	background: var(--sc-lavender);
	color: var(--sc-purple) !important;
	font-size: 12.5px !important;
	font-weight: 700;
	transition: background .2s ease, color .2s ease;
}
.ps-chip:hover { background: var(--sc-purple); color: #fff !important; }
.ps .ps-title {
	max-width: 900px;
	margin: 0 0 20px;
	font-size: clamp(26px, 3.2vw, 40px) !important;
	font-weight: 800;
	line-height: 1.35;
	color: var(--sc-ink);
	text-wrap: balance;
}
.ps-meta { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ps-meta li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--sc-line);
	font-size: 13.5px !important;
	color: var(--sc-text);
}
.ps-meta i { color: var(--sc-purple); font-size: 13px !important; }
.ps-meta .ps-meta-event { background: var(--sc-purple); border-color: var(--sc-purple); color: #fff; font-weight: 600; }
.ps-meta .ps-meta-event i { color: #f5c451; }

/* ---------- Cover: the image at its own ratio over a blurred copy ---------- */
.ps-cover { margin: 0; padding: 0 0 8px; }
.ps-cover-frame {
	position: relative;
	display: flex;
	justify-content: center;
	overflow: hidden;
	border-radius: 24px;
	background: #1f1233;
	box-shadow: 0 24px 60px rgba(31, 18, 51, .16);
	cursor: zoom-in;
}
.ps-cover-frame::before {
	content: "";
	position: absolute;
	inset: -40px;
	background: var(--ps-cover) center / cover no-repeat;
	filter: blur(30px) saturate(1.2);
	opacity: .55;
}
.ps .ps-cover-img {
	position: relative;
	display: block;
	width: auto;
	max-width: 100%;
	max-height: min(620px, 72vh);
	height: auto;
	object-fit: contain;
}

/* ---------- Layout ---------- */
.ps-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
	padding-top: 32px;
	padding-bottom: 72px;
}
.ps-layout.no-cover { padding-top: 8px; }

/* ---------- Article ---------- */
.ps-content {
	padding: 40px 48px;
	border-radius: 22px;
	background: #fff;
	border: 1px solid var(--sc-line);
	box-shadow: 0 18px 44px rgba(31, 18, 51, .05);
	font-size: 17px;
	line-height: 1.95;
	color: #3d3550;
}
.ps-content > :first-child { margin-top: 0 !important; }
.ps-content > :last-child { margin-bottom: 0 !important; }
.ps .ps-content p { margin: 0 0 18px; font-size: 17px !important; line-height: 1.95; text-align: left !important; }
.ps .ps-content p em { color: var(--sc-muted); font-size: 15px; }
.ps .ps-content h2,
.ps .ps-content h3,
.ps .ps-content h4 { margin: 36px 0 14px; font-weight: 700; line-height: 1.45; color: var(--sc-ink); }
.ps .ps-content h2 { font-size: 24px !important; }
.ps .ps-content h3 { font-size: 21px !important; }
.ps .ps-content h4 { font-size: 18px !important; }
.ps .ps-content a {
	color: var(--sc-purple);
	text-decoration: underline;
	text-decoration-color: rgba(106, 13, 173, .3);
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}
.ps .ps-content a:hover { text-decoration-color: currentColor; }
.ps .ps-content ul,
.ps .ps-content ol { margin: 0 0 20px; padding-left: 24px; }
.ps .ps-content li { margin-bottom: 8px; }
.ps .ps-content li::marker { color: var(--sc-purple); }
.ps .ps-content blockquote { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--sc-line); border-radius: 16px; background: #faf7fd; }
.ps .ps-content img { max-width: 100% !important; height: auto !important; border-radius: 14px; }
.ps .ps-content figure { margin: 0 0 22px; }
.ps .ps-content figcaption { margin-top: 8px; font-size: 13.5px; color: var(--sc-muted); text-align: center; }
.ps .ps-content iframe { max-width: 100%; border-radius: 16px; }
.ps .ps-content table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.ps .ps-content th, .ps .ps-content td { padding: 10px 14px; border-bottom: 1px solid #f1ebfa; }

/* Photo grid (newsberg_single_photo_grid) */
.ps .ps-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 8px 0 24px;
}
.ps .ps-gallery[data-count="2"],
.ps .ps-gallery[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps .ps-photo {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 14px;
	background: var(--sc-lavender);
	cursor: zoom-in;
}
.ps .ps-photo img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0;
	transition: transform .5s ease;
}
.ps .ps-photo::after {
	content: "\f00e";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: #fff;
	background: rgba(31, 18, 51, .35);
	opacity: 0;
	transition: opacity .25s ease;
}
.ps .ps-photo:hover img { transform: scale(1.06); }
.ps .ps-photo:hover::after,
.ps .ps-photo:focus-visible::after { opacity: 1; }
/* First photo of a larger set gets a feature tile. */
.ps .ps-gallery[data-count]:not([data-count="2"]):not([data-count="3"]):not([data-count="4"]) .ps-photo:first-child { grid-column: span 2; grid-row: span 2; }

.ps-pages { margin-top: 20px; font-weight: 700; }

/* Tags */
.ps-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; color: var(--sc-muted); }
.ps-tags a { padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--sc-line); font-size: 13px !important; color: var(--sc-text) !important; }
.ps-tags a:hover { border-color: var(--sc-purple); color: var(--sc-purple) !important; }

/* Previous / next */
.ps-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.ps-pager-link {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding: 14px;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--sc-line);
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.ps-pager-link:hover { border-color: #d9c7ef; box-shadow: 0 14px 30px rgba(106, 13, 173, .1); transform: translateY(-2px); }
.ps-pager-link.is-next { flex-direction: row-reverse; text-align: right; }
.ps-pager-thumb { flex-shrink: 0; width: 64px; height: 64px; overflow: hidden; border-radius: 12px; background: var(--sc-lavender); }
.ps-pager-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ps-pager-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ps-pager-dir { font-size: 12px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-purple); }
.ps-pager-dir i { font-size: 10px !important; }
.ps-pager-title {
	font-size: 14.5px !important;
	font-weight: 700;
	line-height: 1.5;
	color: var(--sc-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Comments (base styling: newsberg_comments_style) — the form is the
   single card here, matching the article card. */
.ps-comments { margin-top: 24px; }
.ps .ps-comments .comments-area { padding: 0 !important; margin: 0 !important; background: transparent !important; box-shadow: none !important; border: 0 !important; }
.ps .comment-respond { margin: 0; padding: 32px 40px; border-radius: 22px; border: 1px solid var(--sc-line); box-shadow: none; }
.ps .comments-area .comment-reply-title { font-size: 22px !important; }
.ps #commentform textarea { height: 150px; min-height: 120px; }
.ps .comments-area > .comment-list { margin-bottom: 24px; }

/* ---------- Side panel ---------- */
.ps-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.admin-bar .ps-side { top: 128px; }
.ps-card { padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--sc-line); box-shadow: 0 12px 30px rgba(31, 18, 51, .05); }
.ps .ps-card-label { margin: 0 0 12px; font-size: 12px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sc-muted); }

.ps-event { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #4b0880, var(--sc-purple)); border: 0; color: #fff; }
.ps-event .ps-card-label { margin-bottom: 4px; color: rgba(255, 255, 255, .7); }
.ps-event-date {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 76px;
	padding: 10px 8px;
	border-radius: 16px;
	background: #fff;
	color: var(--sc-purple);
	line-height: 1.15;
	text-align: center;
}
.ps-event-date strong { font-size: 22px !important; font-weight: 800; }
.ps-event-date span { font-size: 12px !important; font-weight: 700; }
.ps-event-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px !important; font-weight: 700; color: #fff !important; }
.ps-event-link i { font-size: 11px !important; transition: transform .2s ease; }
.ps-event-link:hover i { transform: translateX(3px); }

.ps-share { display: flex; gap: 10px; }
.ps-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--sc-line);
	background: #fff;
	color: var(--sc-ink) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.ps-share-btn i { font-size: 16px !important; }
.ps-share-btn:hover { transform: translateY(-2px); color: #fff !important; }
.ps-share-btn.is-fb:hover { background: #1877f2; border-color: #1877f2; }
.ps-share-btn.is-line:hover { background: #06c755; border-color: #06c755; }
.ps-share-btn.is-x:hover { background: #111; border-color: #111; }
.ps-share-btn.is-copy:hover { background: var(--sc-purple); border-color: var(--sc-purple); }
.ps .ps-copied { min-height: 1em; margin: 8px 0 0; font-size: 12.5px !important; font-weight: 600; color: var(--sc-purple); }

.ps-latest { list-style: none; margin: 0; padding: 0; }
.ps-latest li + li { margin-top: 4px; }
.ps-latest a { display: flex; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 12px; transition: background .2s ease; }
.ps-latest a:hover { background: #faf6fe; }
.ps-latest-thumb {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--sc-lavender);
	color: #c9b2e8;
}
.ps-latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ps-latest-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-latest-title {
	font-size: 13.5px !important;
	font-weight: 700;
	line-height: 1.5;
	color: var(--sc-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ps-latest a:hover .ps-latest-title { color: var(--sc-purple); }
.ps-latest-date { font-size: 12px !important; color: var(--sc-muted); }

/* ---------- Related ---------- */
.ps-related { padding: 64px 0 80px; background: #fff; border-top: 1px solid var(--sc-line); }
.ps-related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ps .ps-related-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px) !important; font-weight: 700; color: var(--sc-ink); }
.ps-related-head a { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px !important; font-weight: 700; color: var(--sc-purple) !important; }
.ps-related-head a i { font-size: 11px !important; }
.ps-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ps-rcard {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--sc-line);
	transition: transform .25s ease, box-shadow .25s ease;
}
.ps-rcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31, 18, 51, .1); }
.ps-rcard-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sc-lavender); color: #c9b2e8; font-size: 30px; }
.ps-rcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ps-rcard:hover .ps-rcard-media img { transform: scale(1.05); }
.ps-rcard-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.ps-rcard-date { font-size: 12.5px !important; color: var(--sc-muted); }
.ps-rcard-date i { color: var(--sc-purple); }
.ps .ps-rcard h3 { margin: 0; font-size: 15.5px !important; font-weight: 700; line-height: 1.55; }
.ps-rcard h3 a {
	color: var(--sc-ink) !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ps-rcard h3 a::after { content: ""; position: absolute; inset: 0; }
.ps-rcard:hover h3 a { color: var(--sc-purple) !important; }

/* ---------- Lightbox ---------- */
html.ps-lb-open { overflow: hidden; }
.ps-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px;
	background: rgba(18, 10, 32, .92);
	backdrop-filter: blur(6px);
}
.ps-lb[hidden] { display: none; }
.ps-lb-stage { margin: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.ps-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.ps-lb-btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	min-width: 0;
	padding: 0 !important;
	border-radius: 50% !important;
	border: 1px solid rgba(255, 255, 255, .3) !important;
	background: rgba(255, 255, 255, .1) !important;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .25s ease, border-color .25s ease;
}
.ps-lb-btn:hover { background: var(--sc-purple) !important; border-color: var(--sc-purple) !important; }
.ps-lb-btn:focus { outline: none; }
.ps-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ps-lb-btn i { font-size: 16px !important; }
.ps-lb-close { position: absolute; top: 18px; right: 18px; }
.ps-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.ps-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.ps-lb.is-single .ps-lb-prev,
.ps-lb.is-single .ps-lb-next { display: none; }
.ps-lb-count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13.5px !important; font-weight: 600; color: rgba(255, 255, 255, .8); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.ps-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
	.ps-content { padding: 32px 32px; }
}
@media (max-width: 900px) {
	.ps-layout { grid-template-columns: 1fr; }
	.ps-side { position: static; }
	.ps-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ps-related-grid .ps-rcard:nth-child(3) { display: none; }
}
@media (max-width: 640px) {
	.ps-wrap { padding: 0 16px; }
	.ps-hero { padding: 26px 0 28px; }
	.ps-crumbs span { max-width: 24ch; }
	.ps-meta li { padding: 6px 12px; font-size: 12.5px !important; }
	.ps-cover-frame { border-radius: 18px; }
	.ps-layout { padding-top: 20px; padding-bottom: 48px; gap: 16px; }
	.ps-content { padding: 24px 20px; border-radius: 18px; }
	.ps .ps-content p { font-size: 16px !important; line-height: 1.9; }
	.ps .ps-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.ps .ps-photo { border-radius: 10px; }
	.ps-pager { grid-template-columns: 1fr; }
	.ps-pager-link.is-next { flex-direction: row; text-align: left; }
	.ps .comment-respond { padding: 24px 20px; }
	.ps-related { padding: 48px 0 56px; }
	.ps-related-head { flex-wrap: wrap; }
	.ps-related-grid { grid-template-columns: 1fr; }
	.ps-related-grid .ps-rcard:nth-child(3) { display: flex; }
	.ps-lb { padding: 64px 12px; }
	.ps-lb-prev, .ps-lb-next { top: auto; bottom: 10px; transform: none; }
	.ps-lb-prev { left: 12px; }
	.ps-lb-next { right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.ps *, .ps *::before, .ps *::after { transition: none !important; }
}
