/* =============================================================================
   ECR — Working Groups: the list page (/working-groups/) and each group's page
   See inc/working-groups/render.php.

   The list is built from the Committees/Delegations components
   (css/structure.css: .ecr-st header, .ecr-st-body card) and the Members
   directory search field (css/mep.css: .ecr-mep__searchform). This file only
   adds what a Working Group has and a committee does not: a picture, a short
   description and the group's lead Members. No colour, radius or type size is
   introduced that the site does not already use.
   ========================================================================== */

.ecr-wg {
	--wg-primary: var(--ecr-primary, #1866A5);
	--wg-text: var(--ecr-text, #1E293B);
	--wg-muted: #667085;
	--wg-border: var(--ecr-border, #E2E8F0);
}

/* --- search ---------------------------------------------------------------- */
.ecr-wg .ecr-wg__search {
	margin: 0 auto 40px;
}

.ecr-wg__status {
	text-align: center;
	color: var(--wg-muted);
	margin: -18px 0 28px;
}

.ecr-wg__status a {
	color: var(--wg-primary);
	margin-left: 8px;
}

/* --- the grid -------------------------------------------------------------- */
.ecr-wg__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: 24px;
}

.ecr-wg__cell {
	list-style: none;
	margin: 0;
	min-width: 0;
	display: flex;
}

.ecr-st .ecr-wg-card {
	flex: 1 1 auto;
	padding: 0;
	overflow: hidden;
	gap: 0;
	justify-content: flex-start;
}

.ecr-wg-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: #EFF6FF;
	overflow: hidden;
}

.ecr-wg-card__media .ecr-wg-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.ecr-wg-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px 24px 24px;
	flex: 1 1 auto;
}

.ecr-st .ecr-wg-card .ecr-wg-card__name {
	font-size: 1.125rem;
	line-height: 1.35;
	color: var(--wg-text);
}

.ecr-wg-card__summary {
	font-size: .9375rem;
	line-height: 1.55;
	color: var(--wg-muted);
}

.ecr-wg-card__lead {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--wg-border);
	font-size: .8125rem;
	font-weight: 600;
	color: var(--wg-primary);
	line-height: 1.4;
}

/* --- pagination ------------------------------------------------------------ */
.ecr-wg__pagination ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 40px 0 0;
	padding: 0;
}

.ecr-wg__pagination li { list-style: none; margin: 0; }

.ecr-wg__pagination a,
.ecr-wg__pagination span {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	border: 1px solid var(--wg-border);
	border-radius: 999px;
	color: var(--wg-primary);
	text-decoration: none;
}

.ecr-wg__pagination .current {
	background: var(--wg-primary);
	border-color: var(--wg-primary);
	color: #FFFFFF;
}

/* =============================================================================
   A GROUP'S PAGE
   One reading column (820px, the width of the other long-text pages).
   ========================================================================== */
.ecr-wg-single {
	--wg-primary: var(--ecr-primary, #1866A5);
	--wg-text: var(--ecr-text, #1E293B);
	--wg-muted: #667085;
	--wg-border: var(--ecr-border, #E2E8F0);
	max-width: 820px;
	margin: 0 auto;
	padding: 48px 0 80px;
	color: var(--wg-text);
}

/* "Back to Working Groups" is the shared .ecr-back component
   (css/section-spacing.css). */

.ecr-wg-single__header .ecr-st__eyebrow {
	display: inline-block;
	font-size: .75rem;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--wg-primary);
	font-weight: 700;
	margin-bottom: 10px;
}

/* The title is BLUE, as on ecrgroup.eu (client, September 2026). */
body.single-campaign .ecr-wg-single h1.ecr-wg-single__title {
	font-size: clamp(2rem, 3.4vw, 2.75rem);
	line-height: 1.15;
	font-weight: 700;
	color: var(--wg-primary);
	margin: 0 0 16px;
	text-align: left;
}

.ecr-wg-single__lead {
	font-size: 1.1875rem;
	line-height: 1.55;
	color: var(--wg-text);
	margin: 0 0 28px;
}

.ecr-wg-single__media {
	margin: 0 0 32px;
	border-radius: 18px;
	overflow: hidden;
	background: #EFF6FF;
}

.ecr-wg-single__media .ecr-wg-single__img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

.ecr-wg-single__text {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.ecr-wg-single__text > * + * { margin-top: 1em; }
.ecr-wg-single__text p { font-weight: 400; }
.ecr-wg-single__text img { max-width: 100%; height: auto; border-radius: 14px; }

/* --- BOARD ----------------------------------------------------------------- */
.ecr-wg-board { margin: 48px 0 0; }

.ecr-wg-board__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 18px;
}

.ecr-wg-board__item { list-style: none; margin: 0; min-width: 0; display: flex; }

.ecr-wg-person.ecr-mep-mini {
	flex: 1 1 auto;
	padding: 14px 14px 16px;
	border: 1px solid var(--wg-border);
	border-radius: 14px;
	background: #FFFFFF;
	text-align: center;
	gap: 6px;
	transition: transform .25s ease, box-shadow .25s ease;
}

.ecr-wg-person.ecr-mep-mini:hover,
.ecr-wg-person.ecr-mep-mini:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--ecr-shadow-hover, 0 20px 60px rgba(15, 23, 42, .12));
}

.ecr-wg-person .ecr-mep-mini__portrait {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 12px;
	background: #EFF6FF;
	margin-bottom: 4px;
}

.ecr-wg-person .ecr-mep-mini__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	display: block;
	margin: 0;
}

.ecr-wg-person .ecr-mep-mini__name {
	font-size: 1rem;
	color: var(--wg-primary);
}

.ecr-wg-person .ecr-mep-mini__role {
	display: block;
	font-size: .8125rem;
	line-height: 1.35;
	font-weight: 600;
	color: var(--wg-text);
}

@media (max-width: 690px) {
	.ecr-wg-single { padding: 28px 0 56px; }
	.ecr-wg__grid { grid-template-columns: 1fr; }
	.ecr-wg-board__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.ecr-wg-single__lead { font-size: 1.0625rem; }
}
