/* ==========================================================================
   UPA Site Core: components (header/footer nav, team displays, page parts).
   Loaded after upa.css. Kept separate so it can be updated on its own.
   ========================================================================== */

/* Header: the CTA button covers Contact on desktop; the menu keeps it for mobile */
.elementor-location-header .elementor-nav-menu--main .upa-menu-contact {
	display: none;
}

@media (max-width: 1024px) {
	.elementor-location-header .elementor-widget-nav-menu {
		order: 5;
		flex: 0 0 auto !important;
	}
}

/* Footer navigation */
.elementor-location-footer .elementor-nav-menu--main .elementor-item {
	padding: 6px 0 !important;
	color: #FFFFFF !important;
	font-family: "Figtree", sans-serif !important;
	font-size: 16px !important;
	font-weight: 500 !important;
	transition: color 0.25s;
}

.elementor-location-footer .elementor-nav-menu--main .elementor-item:hover,
.elementor-location-footer .elementor-nav-menu--main .elementor-item:focus-visible {
	color: var(--brand-amber) !important;
}

.elementor-location-footer .elementor-nav-menu--main .elementor-item::before,
.elementor-location-footer .elementor-nav-menu--main .elementor-item::after {
	display: none !important;
}

/* Team filmstrip: staggered portraits on desktop, swipeable strip on touch */
.fx-filmstrip {
	display: flex !important;
	gap: 18px;
	align-items: flex-start;
}

.fx-filmstrip > * {
	flex: 1 1 0;
	min-width: 0;
}

.fx-filmstrip > *:nth-child(even) {
	margin-top: 56px;
}

@media (max-width: 1024px) {
	.fx-filmstrip {
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 20px;
		scrollbar-width: thin;
	}

	.fx-filmstrip > * {
		flex: 0 0 210px;
		scroll-snap-align: start;
	}

	.fx-filmstrip > *:nth-child(even) {
		margin-top: 32px;
	}
}

.fx-member-card img {
	transition: transform 0.8s var(--upa-ease);
}

.fx-member-card:hover img,
.fx-member-card:focus-visible img {
	transform: scale(1.05);
}

.fx-member-card h3,
.fx-member-card h2 {
	transition: color 0.25s;
}

.fx-member-card:hover h3,
.fx-member-card:hover h2 {
	color: var(--upa-accent) !important;
}

/* Next-page rows ("Next: The UPA Organisation ->") */
.fx-next-row h2,
.fx-next-row h3 {
	transition: color 0.3s var(--upa-ease);
}

.fx-next-row h2::after,
.fx-next-row h3::after {
	content: "\2192";
	display: inline-block;
	margin-left: 0.4em;
	color: var(--upa-accent);
	transition: transform 0.35s var(--upa-ease);
}

.fx-next-row:hover h2,
.fx-next-row:hover h3,
.fx-next-row:focus-visible h2,
.fx-next-row:focus-visible h3 {
	color: var(--upa-accent) !important;
}

.fx-next-row:hover h2::after,
.fx-next-row:hover h3::after {
	transform: translateX(10px);
}

/* Timeline: gradient rail behind the milestone dots */
.fx-timeline::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 8px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--brand-sky), var(--brand-blue), var(--brand-leaf), var(--brand-amber));
	opacity: 0.55;
	z-index: 0;
}

@media (max-width: 1024px) {
	.fx-timeline::before {
		left: 8px;
		right: auto;
		top: 6px;
		bottom: 0;
		width: 2px;
		height: auto;
		background: linear-gradient(180deg, var(--brand-sky), var(--brand-blue), var(--brand-leaf), var(--brand-amber));
	}
}

/* Partner constellation: soft orbit rings behind the pills */
.fx-constellation::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 560px;
	height: 560px;
	transform: translate(-50%, -50%);
	border-radius: 999px;
	border: 1px dashed rgba(44, 104, 76, 0.25);
	box-shadow: 0 0 0 90px rgba(76, 172, 80, 0.04), 0 0 0 180px rgba(76, 172, 80, 0.03);
	pointer-events: none;
	z-index: 0;
}

.fx-constellation > * {
	position: relative;
	z-index: 1;
}

/* Team page: editorial rows that alternate sides, numbered automatically */
.fx-team-list {
	counter-reset: upa-member;
}

.fx-team-list > * {
	counter-increment: upa-member;
}

.fx-team-list > *:first-child .fx-team-row {
	border-top: 0 !important;
}

.fx-team-list > *:nth-child(even) .fx-team-row {
	flex-direction: row-reverse;
}

.fx-team-list > *:nth-child(even) .fx-member-num {
	right: auto !important;
	left: -26px;
}

@media (max-width: 767px) {
	.fx-team-list > *:nth-child(even) .fx-team-row {
		flex-direction: column;
	}

	.fx-team-list > *:nth-child(even) .fx-member-num {
		left: auto;
		right: -12px !important;
	}
}

.fx-member-num::before {
	content: counter(upa-member, decimal-leading-zero);
	font-family: "Fraunces", serif;
	font-size: 28px;
	line-height: 1;
	color: var(--upa-accent);
	font-variation-settings: "SOFT" 100;
}

.fx-team-row h2 a,
.fx-team-row a:has(> img) {
	color: inherit;
	text-decoration: none;
}

/* LinkedIn buttons: external-link arrow; hidden when no URL is set */
.fx-linkedin::after {
	content: "\2197" !important;
}

.fx-linkedin:not([href]),
.fx-linkedin[href=""],
.fx-linkedin[href="#"] {
	display: none !important;
}

/* Long-form biography text on profile pages */
.upa-prose p {
	margin: 0;
}

.upa-prose p:first-child::first-letter {
	font-family: "Fraunces", serif;
	float: left;
	font-size: 4.2em;
	line-height: 0.85;
	padding: 0.06em 0.12em 0 0;
	color: var(--upa-accent);
	font-variation-settings: "SOFT" 100;
}

.fx-member-num {
	display: flex !important;
	align-items: center;
	justify-content: center;
}

