/* wp-content/plugins/ceca-widgets/widgets/foundations/foundations.css */

/* Figma 2887:2187 (+2887:2186 FAQ variant): a slider, one profile at a
   time — photo 42.5% filling its half (cover, radius 5 on the left) beside
   a panel with a 1px #D4D4D4 border (radius 5 on the right); pagination
   dots centred 10px under the card (active #C65A93, rest #D9D9D9). Sliding
   is native horizontal scroll-snap (swipe/trackpad), dots jump to a
   profile. Every card in the row is as tall as the tallest, so the slider
   never changes height as it moves. On mobile the cards narrow to ~85% so
   the next one peeks, photo above panel. Logo slot centres logos of any
   height at 93px from the panel top; name 30/30 bold, role 22/30, body
   18/30, hairlines #CDCDCD. Interactive states use theme brand tokens,
   never Elementor kit colours. */

.ceca-fnd__heading {
	margin: 0 0 30px;
	font-size: 30px;
	line-height: 35px;
	font-weight: 700;
	color: #000000;
}

.ceca-fnd__slides {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.ceca-fnd__slides::-webkit-scrollbar {
	display: none;
}

.ceca-fnd__slide {
	flex: 0 0 100%;
	display: flex;
	min-height: 434px;
	scroll-snap-align: start;
	/* Section Index jumps land clear of the sticky header (as .ceca-th). */
	scroll-margin-top: 145px;
}

/* Cover, anchored to the top of the photo: when an answer opens and the
   card grows, more of the photo shows below rather than the crop shifting
   around the face (user, 2026-09-29). */
.ceca-fnd__photo {
	flex: none;
	position: relative;
	width: 42.5%;
	border-radius: 5px 0 0 5px;
	overflow: hidden;
	background: #E8E8E8;
}

.ceca-fnd__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0;
}

.ceca-fnd__panel {
	flex: 1;
	min-width: 0;
	background: #FFFFFF;
	border: 1px solid var(--ceca-border, #D4D4D4);
	border-radius: 0 5px 5px 0;
	padding: 0 40px 50px 50px;
}

/* Both design variants centre the logo's midline 93px from the panel top,
   whatever the logo's height — a fixed slot reproduces that. */
.ceca-fnd__logo {
	display: flex;
	align-items: center;
	height: 126px;
	margin-top: 30px;
}

.ceca-fnd__logo img {
	display: block;
	width: auto;
	height: auto;
	max-height: var(--ceca-fnd-logo-h, 126px);
	max-width: 262px;
}

.ceca-fnd__name {
	margin: 20px 0 0;
	font-size: 30px;
	line-height: 30px;
	font-weight: 700;
	color: #000000;
}

/* No company logo (e.g. the Wales directors): the logo slot normally gives
   the panel its top spacing, so the name takes the panel's 50px instead. */
.ceca-fnd__name:first-child {
	margin-top: 50px;
}

.ceca-fnd__role {
	margin: 3px 0 0;
	font-size: 22px;
	line-height: 30px;
	font-weight: 400;
	color: #000000;
}

.ceca-fnd__bio {
	margin-top: 26px;
	font-size: 18px;
	line-height: 30px;
	color: #000000;
}

.ceca-fnd__bio p {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 30px;
}

.ceca-fnd__bio p:last-child {
	margin-bottom: 0;
}

/* FAQ accordion: hairline-delimited rows, chevron flips open. Hover and
   focus turn the row plum with white text (brand, not kit, colours); the
   negative inline margins let the plum band breathe past the text without
   moving it. */
.ceca-fnd__faqs {
	margin-top: 34px;
	border-bottom: 1px solid var(--ceca-hairline, #CDCDCD);
}

.ceca-fnd__faq {
	border-top: 1px solid var(--ceca-hairline, #CDCDCD);
}

.ceca-fnd .ceca-fnd__faq-q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: calc(100% + 30px);
	margin: 0 -15px;
	padding: 9px 15px 10px;
	background: transparent;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	font-size: 18px;
	line-height: 30px;
	font-weight: 400;
	color: #000000;
	/* Elementor's kit sets buttons to nowrap — a long question then ran out
	   of the card on smaller screens. Wrap it between the hairlines. */
	white-space: normal;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ceca-fnd .ceca-fnd__faq-q > span {
	flex: 1 1 auto;
	min-width: 0;
	white-space: normal;
	overflow-wrap: anywhere;
}

.ceca-fnd .ceca-fnd__faq-q:hover,
.ceca-fnd .ceca-fnd__faq-q:focus-visible {
	background: var(--ceca-plum, #411024);
	color: #FFFFFF;
}

.ceca-fnd__faq-chevron {
	flex: none;
	width: 17.3px;
	height: 8.65px;
	color: currentColor;
	transition: transform 0.3s ease;
}

.ceca-fnd__faq-q[aria-expanded="true"] .ceca-fnd__faq-chevron {
	transform: rotate(180deg);
}

.ceca-fnd__faq-a {
	display: grid;
	grid-template-rows: 0fr;
	overflow: hidden;
	transition: grid-template-rows 0.35s ease;
}

.ceca-fnd__faq.is-open .ceca-fnd__faq-a {
	grid-template-rows: 1fr;
}

.ceca-fnd__faq-a-inner {
	min-height: 0;
	overflow: hidden;
	font-size: 18px;
	line-height: 30px;
	color: #000000;
}

.ceca-fnd__faq.is-open .ceca-fnd__faq-a-inner {
	padding-bottom: 14px;
}

.ceca-fnd__outro {
	margin-top: 30px;
	font-size: 18px;
	line-height: 30px;
	color: #000000;
}

.ceca-fnd__outro p {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 30px;
}

.ceca-fnd__outro p:last-child {
	margin-bottom: 0;
}

/* Optional card button: the site's black pill. */
.ceca-fnd a.ceca-fnd__button,
.ceca-fnd a.ceca-fnd__button:hover,
.ceca-fnd a.ceca-fnd__button:focus {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin-top: 30px;
	padding: 5px 28px;
	border-radius: 300px;
	background: #000000;
	color: #ffffff;
	font-size: 18px;
	line-height: 30px;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.ceca-fnd a.ceca-fnd__button:hover,
.ceca-fnd a.ceca-fnd__button:focus-visible {
	opacity: 0.85;
}

/* --- Layout option: Stacked — cards one beneath another, each its own
   height, no dots (Wales Foundation Group, user 2026-09-29). */
.ceca-fnd--stack .ceca-fnd__slides {
	flex-direction: column;
	overflow: visible;
	scroll-snap-type: none;
}

.ceca-fnd--stack .ceca-fnd__slide {
	flex: none;
}

/* --- Layout option: Plain — no card: a round photo above the name, and the
   text on the content column's own left edge, like the copy around it
   (Midlands Social Value Forum chair, user 2026-11-18). */
.ceca-fnd--plain .ceca-fnd__slide {
	flex-direction: column;
	align-items: flex-start;
	min-height: 0;
}

.ceca-fnd--plain .ceca-fnd__photo {
	width: 160px;
	max-width: 100%;
	aspect-ratio: 1;
	border-radius: 50%;
}

.ceca-fnd--plain .ceca-fnd__photo img {
	object-position: 50% 20%;
}

.ceca-fnd--plain .ceca-fnd__panel {
	align-self: stretch;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
}

/* Without boxes, people need clear air between them. */
.ceca-fnd--plain .ceca-fnd__slides {
	gap: 60px;
}

/* Photo | divider | company logo on one row (user, 2026-11-18) — the same
   lockup as the News Sidebar's region panel: a 1px #B5B5B5 rule inset from
   the top and bottom, with equal space either side of it. The logo keeps a
   70px cap (per-card logo heights included) so the photo stays the lead. */
.ceca-fnd--plain .ceca-fnd__media {
	--ceca-fnd-divider-gap: 30px;

	display: flex;
	align-items: center;
	max-width: 100%;
}

.ceca-fnd--plain .ceca-fnd__divider {
	flex: none;
	align-self: stretch;
	width: 1px;
	margin: 30px var(--ceca-fnd-divider-gap);
	background: #b5b5b5;
}

.ceca-fnd--plain .ceca-fnd__logo {
	flex: 0 1 auto;
	min-width: 0;
	height: auto;
	margin: 0;
}

.ceca-fnd--plain .ceca-fnd__logo img {
	max-height: min(var(--ceca-fnd-logo-h, 70px), 70px);
	max-width: min(220px, 100%);
}

.ceca-fnd--plain .ceca-fnd__name,
.ceca-fnd--plain .ceca-fnd__name:first-child {
	margin-top: 24px;
}

/* --- Photo option: Pinned to top — the whole photo (cut-outs on white)
   at the top of its half inside 30px, never cropped, so opening an answer
   only grows the card beneath it. The grey border then runs round the
   whole card rather than just the panel (user, 2026-09-29). In flow, not
   absolute: an absolute photo can't hold a short card open and got
   clipped. */
.ceca-fnd--photo-top .ceca-fnd__slide {
	border: 1px solid var(--ceca-border, #D4D4D4);
	border-radius: 5px;
	overflow: hidden;
}

.ceca-fnd--photo-top .ceca-fnd__photo {
	padding: 30px;
	border-radius: 0;
	background: #FFFFFF;
}

.ceca-fnd--photo-top .ceca-fnd__photo img {
	position: static;
	display: block;
	width: 100%;
	height: auto;
	object-fit: fill;
}

.ceca-fnd--photo-top .ceca-fnd__panel {
	border: 0;
	border-radius: 0;
}

/* Pagination (Figma "Group 313"): 3.78px dots, centred 10px under the
   card. Each is a 12px button so it can actually be hit; the dot is drawn
   inside it. */
.ceca-fnd__dots {
	display: flex;
	justify-content: center;
	margin-top: 4px;
}

.ceca-fnd .ceca-fnd__dot {
	position: relative;
	width: 12px;
	height: 12px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

.ceca-fnd .ceca-fnd__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3.78px;
	height: 3.78px;
	border-radius: 50%;
	background: #D9D9D9;
	transform: translate(-50%, -50%);
	transition: background-color 0.2s ease;
}

.ceca-fnd .ceca-fnd__dot:hover,
.ceca-fnd .ceca-fnd__dot:focus {
	background: transparent;
}

.ceca-fnd .ceca-fnd__dot:hover::before,
.ceca-fnd .ceca-fnd__dot:focus-visible::before,
.ceca-fnd .ceca-fnd__dot.is-active::before {
	background: #C65A93;
}

/* Mobile: each card ~85% wide so the next one peeks; photo above panel.
   (Interim until the mobile designs land.) */
@media (max-width: 767px) {
	.ceca-fnd__slides {
		gap: 16px;
	}

	.ceca-fnd__slide {
		flex: 0 0 85%;
		flex-direction: column;
		min-height: 0;
		scroll-margin-top: 95px;
	}

	.ceca-fnd__photo {
		width: 100%;
		aspect-ratio: 16 / 10;
		border-radius: 5px 5px 0 0;
	}

	.ceca-fnd__panel {
		flex: 1;
		border-top: 0;
		border-radius: 0 0 5px 5px;
		padding: 0 20px 30px;
	}

	.ceca-fnd__logo {
		height: 90px;
		margin-top: 20px;
	}

	.ceca-fnd__logo img {
		max-height: min(var(--ceca-fnd-logo-h, 90px), 90px);
		max-width: 200px;
	}

	.ceca-fnd--stack .ceca-fnd__slide {
		flex: none;
	}

	.ceca-fnd--photo-top .ceca-fnd__photo {
		aspect-ratio: auto;
		padding: 20px;
	}

	.ceca-fnd--plain .ceca-fnd__photo {
		width: 140px;
		aspect-ratio: 1;
		border-radius: 50%;
	}

	.ceca-fnd--plain .ceca-fnd__panel {
		padding: 0;
		border: 0;
	}

	.ceca-fnd--plain .ceca-fnd__slides {
		gap: 40px;
	}

	.ceca-fnd--plain .ceca-fnd__media {
		--ceca-fnd-divider-gap: 20px;
	}

	.ceca-fnd--plain .ceca-fnd__divider {
		margin-block: 25px;
	}

	.ceca-fnd--plain .ceca-fnd__logo img {
		max-height: min(var(--ceca-fnd-logo-h, 60px), 60px);
		max-width: min(160px, 100%);
	}
}

.ceca-fnd__notice {
	padding: 20px;
	background: #F3F3F3;
	border: 1px dashed #C4C4C4;
	font-size: 15px;
	line-height: 20px;
	color: #545454;
}

/* Phones: Elementor's flex column under-measures this widget (its
   aspect-ratio / stacked content is sized from an indefinite width), so
   the wrapper ends up shorter than its content and the next widgets paint
   over it. A block container measures it correctly; margins restore the
   container's row gap (user report via QA, 2026-10-02). */
@media (max-width: 767px) {
	.e-con-inner:has(> .elementor-widget-ceca-foundations),
	.e-con:has(> .elementor-widget-ceca-foundations) {
		display: block;
	}

	.e-con-inner:has(> .elementor-widget-ceca-foundations) > * + *,
	.e-con:has(> .elementor-widget-ceca-foundations) > * + * {
		margin-top: var(--row-gap, var(--widgets-spacing-row, 20px));
	}
}
