/* Unidos In Power — posts (single article + archive)
   ---------------------------------------------------------------------------
   Typography and layout for post content, expressed with the design system's
   own tokens. Loaded only on single posts and the posts archive. */

/* ---- article container ---- */

/* Articles share the pages' container but sit at 80% of it, so the article and
   the pages stay on the same grid while the line length stays readable. */
.uip-post .wrap {
	max-width: calc(var(--container-xl) * 0.8);
}

/* The News & Updates index and the archives follow the same standard as the
   pages with a hero (About, Get Involved...): content 80% of the container,
   centred. Home is the exception and keeps the full width. */
.uip-archive .wrap {
	max-width: calc(var(--container-xl) * 0.8);
}

/* ---- builder gutters ----
   The CSS isolation (§5.3) dequeues gdlr-style-custom.css on posts, and that
   file is the only place GoodLayers' column gutter lives: the 15px of side
   padding on .gdlr-core-item-pdlr is what separates one builder column from the
   next. page-builder.css, which does load, only ever sets that padding to 0.
   Without the gutter the columns butt straight against each other — that is why
   the migrated articles read as cramped. Restored here for the article only.

   Deliberately NOT restored: the same file's `max-width:1180px` on
   .gdlr-core-container. The article's width is set by `.uip-post .wrap` above. */
.uip-post .gdlr-core-item-pdlr { padding-left: 15px; padding-right: 15px; }
.uip-post .gdlr-core-item-mglr { margin-left: 15px; margin-right: 15px; }
.uip-post .gdlr-core-item-mgb { margin-bottom: 30px; }
.uip-post .gdlr-core-container { padding-left: 15px; padding-right: 15px; }
/* GoodLayers nests containers — the inner one must not double the inset */
.uip-post .gdlr-core-container .gdlr-core-container { padding-left: 0; padding-right: 0; }

/* ---- article body ---- */

.uip-post-body {
	font-family: var(--font-body);
	font-size: 17px;
	line-height: var(--leading-relaxed);
	color: var(--text-body);
}

.uip-post-body > p {
	margin: 0 0 20px;
}

.uip-post-body > h2 {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 26px;
	line-height: var(--leading-snug);
	color: var(--uip-indigo);
	margin: 40px 0 14px;
	text-wrap: pretty;
}

.uip-post-body > h3 {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 20px;
	line-height: var(--leading-snug);
	color: var(--uip-indigo);
	margin: 32px 0 12px;
}

.uip-post-body > ul,
.uip-post-body > ol {
	margin: 0 0 20px;
	padding-left: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.uip-post-body a {
	color: var(--uip-indigo);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.uip-post-body a:hover {
	color: var(--uip-coral-600);
}

.uip-post-body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
	display: block;
}

.uip-post-body figure {
	margin: 28px 0;
}

.uip-post-body figcaption {
	margin-top: 10px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--text-muted);
}

.uip-post-body blockquote {
	margin: 28px 0;
	padding: 20px 24px;
	border-left: 3px solid var(--uip-green);
	background: #fff;
	border-radius: var(--radius-md);
	font-family: var(--font-display);
	font-weight: 500;
	font-style: italic;
	font-size: 19px;
	line-height: 1.5;
	color: var(--uip-indigo);
}

/* ---- tags ---- */

.uip-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
}

.uip-post-tags .pill {
	text-decoration: none;
}

/* ---- article footer nav ---- */

/* ---- related posts ---- */

.uip-post-related {
	margin-top: 44px;
	padding-top: 32px;
	border-top: 1px solid var(--border-subtle);
}

.uip-post-related-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 22px;
	color: var(--uip-indigo);
	margin: 0 0 22px;
}

.uip-post-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

@media (max-width: 1080px) {
	.uip-post-related-grid {
		grid-template-columns: 1fr;
	}
}

/* ---- archive pagination ---- */

.uip-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.uip-pagination .page-numbers {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 14px;
	color: var(--uip-indigo);
	text-decoration: none;
	padding: 8px 14px;
	border-radius: var(--radius-pill);
	border: 2px solid var(--border-subtle);
}

.uip-pagination .page-numbers:hover {
	background: var(--uip-lavender);
}

.uip-pagination .page-numbers.current {
	background: var(--uip-indigo);
	border-color: var(--uip-indigo);
	color: #fff;
}

/* Same single breakpoint as the layout: no tablet tier. */
@media (max-width: 1080px) {
	.uip-post-body { font-size: 16px; }
	.uip-post .wrap h1 { font-size: 30px !important; }
}

/* ---- News & Updates sidebar ----
   Three fixed blocks: tags, latest posts, and the Get Involved box that mirrors
   the home page's accordion options. Built on the design system's own
   components (.pill, .navy-panel, .glass-row, .link-more, .eyebrow). */

/* Static, not sticky: following the reader down the page was distracting. It
   sits at the top of the results and stays there. */
.uip-sidebar {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.uip-widget {
	background: #fff;
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 6px 18px rgba(40, 42, 113, 0.07);
}

.uip-widget-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 16px;
	color: var(--uip-indigo);
	margin: 0 0 16px;
}

/* ---- tags ---- */

.uip-widget-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

/* The stock .pill is built for a full-width row: 12px uppercase with 0.08em of
   tracking, a 2px border, 13.6px of side padding and a 7px status dot. In a
   320px column that adds up to one tag per line. Tightened here so several fit
   per row, and sized in three tiers by usage so it reads as a cloud. */
.uip-widget-tags .pill {
	text-decoration: none;
	gap: 0;
	letter-spacing: 0.03em;
	padding: 0.28rem 0.6rem;
	border-width: 1px;
}

/* the status dot is meaningless on a tag and costs 15px of the row */
.uip-widget-tags .pill::before {
	display: none;
}

.uip-widget-tags .pill.is-t1 { font-size: 9.5px; }
.uip-widget-tags .pill.is-t2 { font-size: 11px; }
.uip-widget-tags .pill.is-t3 { font-size: 12.5px; }

/* ---- latest posts ---- */

/* Three posts, stacked: the image runs the full width of the sidebar with the
   headline and the date under it, rather than the small square thumbnail beside
   them it used to be. */
.uip-widget-posts {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.uip-widget-posts a {
	display: block;
	text-decoration: none;
}

.uip-widget-thumb {
	display: block;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 12px;
}

.uip-widget-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.uip-widget-post-text {
	display: block;
	min-width: 0;
}

.uip-widget-post-title {
	display: block;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.35;
	color: var(--uip-indigo);
}

.uip-widget-posts a:hover .uip-widget-post-title,
.uip-widget-posts a:focus-visible .uip-widget-post-title {
	color: var(--uip-coral-600);
}

.uip-widget-post-date {
	display: block;
	margin-top: 4px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.uip-widget-post-excerpt {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.55;
	color: var(--text-muted);
}

/* ---- Get Involved box ---- */

.uip-widget-involve {
	padding: 26px 24px;
	box-shadow: 0 10px 28px rgba(40, 42, 113, 0.18);
}

.uip-widget-involve-title {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 22px;
	line-height: 1.2;
	color: #fff;
	margin: 0;
}

.uip-widget-involve-copy {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--uip-gray-300);
	margin: 10px 0 18px;
}

.uip-widget-involve-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.uip-widget-involve-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	text-decoration: none;
}

.uip-widget-involve-row:hover,
.uip-widget-involve-row:focus-visible {
	background: rgba(255, 255, 255, 0.11);
}

.uip-widget-involve-arrow {
	color: var(--uip-green);
	font-size: 15px;
	flex: none;
}

/* Same single breakpoint as the layout: the sidebar drops below the list and
   stops sticking, and the two-up card grid goes to one column. */
@media (max-width: 1080px) {

	.uip-archive {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* ---- related post card ----
   Image, title, excerpt, date. The whole card is the link, so the hover state
   lives on the <a> and there is one tab stop per card. */

/* `.uip-post-body a` (above) underlines every link in the article body and
   outranks the single-class .uip-related-card on specificity, so the card
   link needs the same a.class pairing to win the override. */
.uip-post-body a.uip-related-card {
	text-decoration: none;
}

.uip-related-card {
	display: block;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(40, 42, 113, 0.07);
	transition: box-shadow var(--dur-base) var(--ease-standard),
		transform var(--dur-base) var(--ease-standard);
}

.uip-related-card:hover,
.uip-related-card:focus-visible {
	box-shadow: 0 12px 30px rgba(40, 42, 113, 0.14);
	transform: translateY(-2px);
}

.uip-related-card-media {
	display: block;
	background: var(--uip-lavender);
}

.uip-related-card-media img {
	width: 100%;
	height: auto;
	display: block;
}

/* The cards sit inside .uip-post-body, whose `img` rule rounds every image in the
   article. Here the card already clips its own corners (overflow:hidden), so the
   image must be square: rounded corners on it showed as notches at the seam with
   the white body. The extra class keeps this above the copy of that rule in
   real-size-post.css. */
.uip-related-card .uip-related-card-media img {
	border-radius: 0;
}

.uip-related-card-body {
	display: block;
	padding: 18px 20px 20px;
}

.uip-related-card-title {
	display: block;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	color: var(--uip-indigo);
}

.uip-related-card:hover .uip-related-card-title,
.uip-related-card:focus-visible .uip-related-card-title {
	color: var(--uip-coral-600);
}

.uip-related-card-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin-top: 8px;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--text-muted);
}

.uip-related-card-date {
	display: block;
	margin-top: 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

/* ---- News & Updates archive: one post per row -----------------------------
   Image column at 1/3, content column at 2/3, side by side — a single column
   only below the layout's own sidebar breakpoint. The carousel's cards are a
   different component (uip_news_card) and keep their own sizing. */

.uip-archive-list {
	display: flex;
	flex-direction: column;
	gap: 52px;
}

.uip-news-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 32px;
	align-items: start;
}

.uip-news-row-media {
	display: block;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(40, 42, 113, 0.12);
}

.uip-news-row-media img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform var(--dur-slow) var(--ease-standard);
}

.uip-news-row:hover .uip-news-row-media img {
	transform: scale(1.02);
}

.uip-news-row-meta {
	margin-top: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.uip-news-row-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 28px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 10px 0 0;
	text-wrap: pretty;
}

.uip-news-row-title a {
	color: var(--uip-indigo);
	text-decoration: none;
}

.uip-news-row-title a:hover,
.uip-news-row-title a:focus-visible {
	color: var(--uip-coral-600);
}

.uip-news-row-excerpt {
	font-size: 15px;
	line-height: 1.65;
	color: var(--text-muted);
	margin: 14px 0 18px;
	max-width: 68ch;
}

@media (max-width: 1080px) {
	.uip-archive-list {
		gap: 40px;
	}

	.uip-news-row {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.uip-news-row-title {
		font-size: 23px;
	}
}

/* ---- category filter, above the results and under the title ---- */

.uip-archive-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 34px;
}

.uip-archive-filter a {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 13px;
	line-height: 1;
	padding: 9px 16px;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: #fff;
	color: var(--uip-indigo);
	text-decoration: none;
	transition: background var(--dur-base) var(--ease-standard),
		border-color var(--dur-base) var(--ease-standard);
}

.uip-archive-filter a:hover {
	background: var(--uip-lavender);
	border-color: var(--uip-indigo);
}

.uip-archive-filter a.is-active {
	background: var(--uip-indigo);
	border-color: var(--uip-indigo);
	color: #fff;
}

.uip-archive-filter-count {
	opacity: 0.6;
	margin-left: 4px;
}
