/* wp-content/plugins/ceca-widgets/widgets/news-feed/news-feed.css */

/* Figma 78:24 "Latest news and updates": featured text col 307px + 634×400
   image + 306px events panel across the 1296 grid, 24px gaps; card row of
   306px columns beneath. Type: section title 22/32 Bold, featured title
   28/35 Bold, excerpt 18/24, card titles 25/30 Bold, dates 16, pills 14/20
   on #E3E3E3. */

.ceca-news {
	--ceca-news-gap: 24px;
	--ceca-news-pill-bg: #e3e3e3;
	--ceca-news-pill-color: #1a1a1a;
	--ceca-news-date: #545454;
	--ceca-news-title: #000;
}

.ceca-news__heading {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 700;
	line-height: 32px;
}

/* Hairline sits above each news item (Figma), not under the section
   heading — the featured image and the events panel carry none. Mobile has
   its own card rules below. */
@media (min-width: 768px) {
	.ceca-news__featured-text,
	.ceca-news__card {
		padding-top: 16px;
		border-top: 1px solid #e3e3e3;
	}
}

.ceca-news__top {
	display: grid;
	grid-template-columns: 307px minmax(0, 1fr);
	gap: var(--ceca-news-gap);
	align-items: stretch;
}

.ceca-news__top--with-events {
	grid-template-columns: 307px minmax(0, 1fr) 306px;
}

/* The featured article contributes its two blocks directly to the grid. */
.ceca-news__featured {
	display: contents;
}

.ceca-news__pill {
	display: inline-block;
	align-self: flex-start;
	padding: 2px 12px;
	border-radius: 300px;
	background: var(--ceca-news-pill-bg);
	color: var(--ceca-news-pill-color);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}

.ceca-news__date {
	margin: 10px 0 0;
	color: var(--ceca-news-date);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
}

.ceca-news__featured-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Scoped so the title keeps this size when set to H1 (the tag is a
   setting) — global h1 styles must not enlarge it. */
.ceca-news .ceca-news__featured-title {
	margin: 12px 0 0;
	font-size: 25px;
	font-weight: 700;
	line-height: 30px;
}

.ceca-news .ceca-news__featured-title a,
.ceca-news .ceca-news__card-title a {
	color: var(--ceca-news-title);
	text-decoration: none;
	transition: color 0.2s ease;
}

.ceca-news .ceca-news__featured-title a:hover,
.ceca-news .ceca-news__card-title a:hover {
	color: #411024;
}

.ceca-news__excerpt {
	margin: 14px 0 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.35;
}

.ceca-news__featured-image {
	display: block;
	min-height: 300px;
}

.ceca-news__featured-image img,
.ceca-news__card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ceca-news__featured-image img {
	aspect-ratio: 634 / 400;
	height: auto;
}

/* --- Cards row ------------------------------------------------------------- */

.ceca-news__cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: calc(var(--ceca-news-gap) * 2) var(--ceca-news-gap);
	margin-top: calc(var(--ceca-news-gap) * 2);
}

.ceca-news__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ceca-news__card-title {
	margin: 12px 0 16px;
	font-size: 25px;
	font-weight: 700;
	line-height: 30px;
	/* Capped at 3 lines (ellipsis) so a long headline can't make its card,
	   and the whole row, taller than its neighbours. Visual only — the full
	   title stays in the markup for screen readers and search. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.ceca-news__card-image {
	display: block;
	width: 100%;
	margin-top: auto;
}

.ceca-news__card-image img {
	aspect-ratio: 306 / 204;
	height: auto;
}

/* A brand cover / topic drawing picked for the post (CECA_Cover) takes the
   same slot shapes the photos use. */
.ceca-news__featured-image .ceca-cover.ceca-cover--fill {
	height: auto;
	aspect-ratio: 634 / 400;
}

.ceca-news__card-image .ceca-cover.ceca-cover--fill {
	height: auto;
	aspect-ratio: 306 / 204;
}

.ceca-news__empty {
	font-size: 16px;
	color: #6b6b6b;
}

/* --- Events panel (shared renderer markup) --------------------------------- */

.ceca-events-panel {
	--ceca-ev-bg: #f1f1f1;
	--ceca-ev-title: #1a1a1a;
	--ceca-ev-name: #1a1a1a;
	--ceca-ev-date: #545454;
	--ceca-ev-divider: #d9d9d9;

	padding: 20px;
	background: var(--ceca-ev-bg);
}

.ceca-events-panel__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.ceca-events-panel__title {
	margin: 0;
	color: var(--ceca-ev-title);
	font-size: 22px;
	font-weight: 700;
	line-height: 27px;
}

.ceca-events-panel .ceca-events-panel__viewall,
.ceca-events-panel .ceca-events-panel__viewall:visited {
	color: var(--ceca-ev-title);
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.ceca-events-panel .ceca-events-panel__viewall:hover {
	color: #411024;
}

.ceca-events-panel__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ceca-events-panel__item {
	padding: 16px 0;
}

.ceca-events-panel__item + .ceca-events-panel__item {
	border-top: 1px solid var(--ceca-ev-divider);
}

.ceca-events-panel__date {
	margin: 0 0 6px;
	color: var(--ceca-ev-date);
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
}

.ceca-events-panel .ceca-events-panel__name,
.ceca-events-panel .ceca-events-panel__name:visited {
	display: block;
	color: var(--ceca-ev-name);
	font-size: 18px;
	font-weight: 700;
	line-height: 23px;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ceca-events-panel a.ceca-events-panel__name:hover {
	color: #411024;
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 1024px) {
	.ceca-news__top,
	.ceca-news__top--with-events {
		grid-template-columns: 1fr;
	}

	.ceca-news__featured-image {
		min-height: 0;
	}

	.ceca-news__cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ceca-news__cards {
		grid-template-columns: 1fr;
	}
}

/* Dashboard variant (Figma 2654:1352): a news card completes the top row
   in place of the events panel. */
.ceca-news__top--with-side {
	grid-template-columns: 307px minmax(0, 1fr) 306px;
}

@media (max-width: 1024px) {
	.ceca-news__top--with-side {
		grid-template-columns: 1fr;
	}
}

/* --- mobile design pass (Figma 2372:7357) --------------------------------- */
/* Image-led featured, image-less hairline cards, events panel AFTER the
   cards (display:contents promotes the top row's children so flex order
   can re-sequence them). */
@media (max-width: 767px) {
	.ceca-news {
		display: flex;
		flex-direction: column;
	}

	.ceca-news .ceca-news__heading {
		order: 0;
		margin-bottom: 20px;
	}

	.ceca-news__top,
	.ceca-news__top--with-events,
	.ceca-news__top--with-side {
		display: contents;
	}

	.ceca-news__featured {
		order: 1;
		display: flex;
		flex-direction: column;
	}

	/* The featured post leads with its image on mobile — the only image in
	   the feed; the other cards stay image-less (Figma 2369:5781 / 2396:14682,
	   400×251, 20px above the pill). User, 2026-10-06 — supersedes the
	   2026-09-16 "no featured images on mobile". */
	.ceca-news__featured-image {
		order: -1;
		display: block;
		margin-bottom: 20px;
	}

	.ceca-news__featured-image img,
	.ceca-news__featured-image .ceca-cover.ceca-cover--fill {
		aspect-ratio: 400 / 251;
	}

	.ceca-news .ceca-news__excerpt {
		font-size: 16px;
		line-height: 26px;
	}

	.ceca-news__cards {
		order: 2;
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
		margin-top: 25px;
	}

	.ceca-news__card {
		border-top: 1px solid #e3e3e3;
		padding: 20px 0 25px;
	}

	.ceca-news__card-image,
	.ceca-news__side-card {
		display: none;
	}

	.ceca-news .ceca-news__card-title {
		font-size: 20px;
		line-height: 26px;
	}

	.ceca-news .ceca-events-panel {
		order: 3;
		margin-top: 20px;
	}
}

/* Mobile refinements (critic pass): pill + date inline on one row,
   tighter card rhythm. */
@media (max-width: 767px) {
	.ceca-news .ceca-news__pill {
		display: inline-flex;
		vertical-align: middle;
	}

	.ceca-news .ceca-news__date {
		display: inline-block;
		margin: 0 0 0 12px;
		vertical-align: middle;
		font-size: 15px;
	}

	.ceca-news .ceca-news__card {
		padding: 20px 0 22px;
	}
}

/* Meta wrapper: column on desktop (pill above date, as designed), one
   inline row on phones. */
.ceca-news__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

@media (max-width: 767px) {
	.ceca-news .ceca-news__meta {
		flex-direction: row;
		align-items: center;
		gap: 12px;
	}

	.ceca-news .ceca-news__meta .ceca-news__date {
		margin: 0;
	}
}
