/*
 * JP Financial — Javier Rumbo responsive composition
 * Extracted intact in Phase 5 and loaded only on its consumer pages.
 */

/* Rich text keeps the editable Elementor typography and colour uniformly. */
body.jp-author-profile-page .jp-author-bio-text p,
body.jp-author-profile-page .jp-author-bio-text strong {
	color: inherit !important;
	font: inherit !important;
}

/* Team-page clones use the source document's real keyword list here. */
body.jp-author-profile-page .jp-author-keywords-widget .jp-author-keywords {
	color: #001c10;
	font-family: Inter, "DM Sans", Arial, sans-serif;
}

body.jp-author-profile-page .jp-author-keywords-widget .jp-author-keywords__title {
	margin: 0 0 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.4px;
	line-height: 1.2;
	text-transform: uppercase;
}

body.jp-author-profile-page .jp-author-keywords-widget .jp-author-keywords ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.jp-author-profile-page .jp-author-keywords-widget .jp-author-keywords li {
	margin: 0;
	padding: 9px 14px;
	border: 1px solid rgba(0, 53, 45, 0.18);
	border-radius: 999px;
	background: #eef8f4;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}

/*
 * Author profile hero — mobile/tablet Figma node 169:40.
 * Scoped late in the cascade because the author Elementor page has older
 * responsive values in Customizer and in the desktop scaling system.
 */
@media (max-width: 1024px) {
	body.jp-author-profile-page .jp-author-hero.jp-author-hero {
		height: auto !important;
		min-height: 0 !important;
		padding: clamp(108px, 30.53vw, 120px) 20px 120px !important;
		overflow: visible !important;
	}

	/*
	 * The stacked hero can be taller than the visual viewport on phones.
	 * Its scroll-linked translation must not inherit Elementor's 400ms
	 * transform transition, otherwise the following card catches up before
	 * the bottom of the hero has entered the viewport.
	 */
	body.jp-author-profile-page.jp-author-card-cover-ready .jp-author-hero.jp-author-hero {
		transition: background 0.3s, border 0.3s, box-shadow 0.3s !important;
		will-change: transform;
	}

	body.jp-author-profile-page .jp-author-hero.jp-author-hero > .e-con-inner {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0 !important;
		width: 100% !important;
		max-width: 640px !important;
		margin-inline: auto !important;
		padding: 0 !important;
	}

	body.jp-author-profile-page .jp-author-hero-copy,
	body.jp-author-profile-page .jp-author-hero-copy > .e-con-inner {
		display: contents !important;
	}

	body.jp-author-profile-page .jp-author-back {
		order: 1 !important;
		width: 100% !important;
		margin: 0 !important;
	}

	body.jp-author-profile-page .jp-author-role {
		order: 2 !important;
		width: 100% !important;
	}

	body.jp-author-profile-page .jp-author-role,
	body.jp-author-profile-page .jp-author-role .elementor-widget-container {
		font-family: "DM Sans", Inter, Arial, sans-serif !important;
		font-weight: 500 !important;
	}

	body.jp-author-profile-page .jp-author-title {
		order: 3 !important;
		width: 100% !important;
	}

	body.jp-author-profile-page .jp-author-title .elementor-heading-title {
		font-family: "DM Sans", Inter, Arial, sans-serif !important;
		font-size: clamp(44px, 12.22vw, 48px) !important;
		font-style: normal !important;
		white-space: normal !important;
		text-wrap: balance;
	}

	body.jp-author-profile-page .jp-author-title.is-long .elementor-heading-title {
		font-size: clamp(34px, 9.4vw, 42px) !important;
		letter-spacing: -1.2px !important;
		line-height: 1.08 !important;
	}

	body.jp-author-profile-page .jp-author-title .elementor-heading-title br {
		display: none !important;
	}

	body.jp-author-profile-page .jp-author-title .elementor-heading-title span::before {
		content: " ";
	}

	body.jp-author-profile-page .jp-author-title .elementor-heading-title span {
		color: #dafba2 !important;
		font-style: normal !important;
	}

	body.jp-author-profile-page .jp-author-intro {
		order: 4 !important;
		width: 100% !important;
	}

	body.jp-author-profile-page .jp-author-hero-media {
		order: 5 !important;
		width: 100% !important;
		margin: 30px 0 0 !important;
		padding: 0 !important;
		position: relative !important;
	}

	body.jp-author-profile-page .jp-author-main-image,
	body.jp-author-profile-page .jp-author-hero-media .jp-author-main-image,
	body.jp-author-profile-page .jp-author-main-image .elementor-widget-container {
		width: 100% !important;
		height: clamp(340px, 64vw, 500px) !important;
		margin: 0 !important;
		overflow: hidden !important;
		border-radius: 16px !important;
	}

	body.jp-author-profile-page .jp-author-main-image img,
	body.jp-author-profile-page .jp-author-hero-media .jp-author-main-image img {
		width: 100% !important;
		height: 100% !important;
		max-width: none !important;
		object-fit: cover !important;
		object-position: center center !important;
		border-radius: 16px !important;
	}

	body.jp-author-profile-page .jp-author-specialty {
		top: auto !important;
		right: auto !important;
		bottom: 14px !important;
		left: 16px !important;
		width: auto !important;
		max-width: calc(100% - 32px) !important;
		margin: 0 !important;
		box-shadow: 0 4px 6px rgba(0, 0, 0, 0.11) !important;
	}

	body.jp-author-profile-page .jp-author-specialty p:first-child {
		margin-bottom: 4px !important;
		color: #00352d !important;
		font-size: 10px !important;
		font-weight: 700 !important;
		letter-spacing: 0.5px !important;
		line-height: 1.2 !important;
		text-transform: uppercase !important;
	}

	body.jp-author-profile-page .jp-author-specialty p:last-child {
		margin: 0 !important;
		color: #001c10 !important;
		font-size: 14px !important;
		font-weight: 700 !important;
		line-height: 1.25 !important;
	}

	body.jp-author-profile-page .jp-author-actions {
		order: 6 !important;
		display: flex !important;
		flex-direction: row !important;
		align-items: stretch !important;
		gap: 12px !important;
		width: 100% !important;
		margin: 30px 0 0 !important;
		padding: 0 !important;
		position: relative !important;
		inset: auto !important;
	}

	body.jp-author-profile-page .jp-author-linkedin-button,
	body.jp-author-profile-page .jp-author-contact-button {
		flex: 1 1 0 !important;
		width: auto !important;
		min-width: 0 !important;
		margin: 0 !important;
	}

	body.jp-author-profile-page .jp-author-linkedin-button .elementor-button,
	body.jp-author-profile-page .jp-author-contact-button .elementor-button {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 100% !important;
		height: 47px !important;
		min-height: 47px !important;
		font-family: "DM Sans", Inter, Arial, sans-serif !important;
		white-space: nowrap !important;
	}

	body.jp-author-profile-page .jp-author-linkedin-button .elementor-button {
		color: #001208 !important;
	}

	body.jp-author-profile-page .jp-author-contact-button .elementor-button {
		border-color: rgba(255, 255, 255, 0.2) !important;
	}

	/*
	 * Author profile — Trayectoria mobile/tablet, Figma node 167:533.
	 * Keep Elementor widgets but force a one-column sequence:
	 * header, bio text, seated portrait, stats.
	 */
	body.jp-author-profile-page .jp-author-bio-card.jp-author-bio-card {
		height: auto !important;
		min-height: 0 !important;
		overflow: visible !important;
		position: relative !important;
		z-index: 2 !important;
	}

	body.jp-author-profile-page .jp-author-bio-card.jp-author-bio-card > .e-con-inner {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0 !important;
		width: 100% !important;
		max-width: 640px !important;
		margin-inline: auto !important;
	}

	body.jp-author-profile-page .jp-author-bio-copy,
	body.jp-author-profile-page .jp-author-bio-copy > .e-con-inner {
		display: contents !important;
	}

	body.jp-author-profile-page .jp-author-kicker {
		order: 1 !important;
		width: 100% !important;
		margin: 0 !important;
	}

	body.jp-author-profile-page .jp-author-kicker .elementor-widget-container {
		font-family: "DM Sans", Inter, Arial, sans-serif !important;
	}

	body.jp-author-profile-page .jp-author-bio-title {
		order: 2 !important;
		width: 100% !important;
		margin: 15px 0 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-title .elementor-heading-title {
		font-style: normal !important;
		margin: 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-title .elementor-heading-title span {
		color: #005c4e !important;
		font-style: italic !important;
	}

	body.jp-author-profile-page .jp-author-bio-text {
		order: 3 !important;
		width: 100% !important;
		margin: 32px 0 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-text p {
		margin: 0 0 16px !important;
		color: inherit !important;
		font: inherit !important;
	}

	body.jp-author-profile-page .jp-author-bio-text strong {
		color: inherit !important;
		font-weight: inherit !important;
	}

	body.jp-author-profile-page .jp-author-bio-media {
		order: 4 !important;
		width: 100% !important;
		max-width: none !important;
		margin: 16px 0 0 !important;
		padding: 0 !important;
	}

	body.jp-author-profile-page .jp-author-secondary-image,
	body.jp-author-profile-page .jp-author-secondary-image .elementor-widget-container {
		width: 100% !important;
		height: 240px !important;
		margin: 0 !important;
		overflow: hidden !important;
		border-radius: 12px !important;
		box-shadow: none !important;
	}

	body.jp-author-profile-page .jp-author-secondary-image img {
		display: block !important;
		width: 100% !important;
		height: 100% !important;
		max-width: none !important;
		filter: none !important;
		object-fit: cover !important;
		object-position: center 62% !important;
		border-radius: 12px !important;
	}

	body.jp-author-profile-page .jp-author-stats-widget {
		order: 5 !important;
		width: 100% !important;
		margin: 32px 0 0 !important;
	}

	body.jp-author-profile-page .jp-author-stats {
		display: flex !important;
		flex-direction: column !important;
		gap: 20px !important;
	}

	body.jp-author-profile-page .jp-author-stat__label {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 16px !important;
		margin-bottom: 8px !important;
		white-space: nowrap !important;
	}

	body.jp-author-profile-page .jp-author-stat__label span:first-child {
		color: #001c10 !important;
		font-family: Inter, "DM Sans", Arial, sans-serif !important;
		font-size: 16px !important;
		font-weight: 700 !important;
		line-height: 1.2 !important;
	}

	body.jp-author-profile-page .jp-author-stat__label span:last-child {
		color: #00352d !important;
		font-family: "DM Sans", Inter, Arial, sans-serif !important;
		font-size: 20px !important;
		font-weight: 700 !important;
		line-height: 1.2 !important;
	}

	body.jp-author-profile-page .jp-author-stat__track {
		width: 100% !important;
		height: 6px !important;
		border-radius: 99px !important;
		background: #b8e8e0 !important;
		overflow: hidden !important;
	}

	body.jp-author-profile-page .jp-author-stat__bar {
		display: block !important;
		width: var(--value) !important;
		height: 100% !important;
		border-radius: inherit !important;
		background: #00352d !important;
	}
}

/*
 * Author profile — Trayectoria desktop, Figma node 167:274.
 * Keep the Elementor content/widgets, but place them on the same desktop grid
 * as the approved frame. Mobile/tablet keep their existing stacked layout.
 */
@media (min-width: 1025px) {
	body.jp-author-profile-page .jp-author-title.is-long .elementor-heading-title {
		/* The desktop size is owned by the Elementor typography controls. */
		text-wrap: balance;
	}

	body.jp-author-profile-page .jp-author-bio-card.jp-author-bio-card {
		box-sizing: border-box !important;
		min-height: 860px !important;
		padding: 80px clamp(64px, 6.2vw, 89px) 90px !important;
		position: relative !important;
		z-index: 2 !important;
		overflow: hidden !important;
	}

	body.jp-author-profile-page .jp-author-bio-card.jp-author-bio-card > .e-con-inner {
		display: grid !important;
		grid-template-columns: minmax(520px, 43.5%) minmax(420px, 1fr) !important;
		grid-template-rows: auto auto 1fr !important;
		column-gap: clamp(56px, 7.1vw, 120px) !important;
		row-gap: 38px !important;
		width: 100% !important;
		max-width: 1320px !important;
		margin-inline: auto !important;
		padding: 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-copy,
	body.jp-author-profile-page .jp-author-bio-copy > .e-con-inner {
		display: contents !important;
	}

	body.jp-author-profile-page .jp-author-kicker {
		grid-column: 1 !important;
		grid-row: 1 !important;
		align-self: start !important;
		width: auto !important;
		margin: 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-title {
		grid-column: 2 !important;
		grid-row: 1 !important;
		align-self: start !important;
		width: 100% !important;
		margin: -8px 0 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-title .elementor-heading-title {
		font-size: clamp(44px, 3.61vw, 52px) !important;
		font-style: normal !important;
		max-width: 650px !important;
		margin: 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-title .elementor-heading-title span {
		color: #005c4e !important;
		font-style: italic !important;
	}

	body.jp-author-profile-page .jp-author-bio-text {
		grid-column: 1 !important;
		grid-row: 2 !important;
		width: 100% !important;
		max-width: 610px !important;
		margin: 26px 0 0 !important;
	}

	body.jp-author-profile-page .jp-author-bio-text p {
		margin: 0 0 16px !important;
		color: inherit !important;
		font: inherit !important;
	}

	body.jp-author-profile-page .jp-author-bio-text strong {
		color: inherit !important;
		font-weight: inherit !important;
	}

	body.jp-author-profile-page .jp-author-bio-media {
		grid-column: 2 !important;
		grid-row: 2 / span 2 !important;
		align-self: start !important;
		width: 100% !important;
		max-width: 545px !important;
		margin: 35px 0 0 !important;
		padding: 0 !important;
		justify-self: end !important;
	}

	body.jp-author-profile-page .jp-author-secondary-image,
	body.jp-author-profile-page .jp-author-secondary-image .elementor-widget-container {
		width: 100% !important;
		height: clamp(480px, 38.4vw, 553px) !important;
		margin: 0 !important;
		overflow: hidden !important;
		border-radius: 12px !important;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04) !important;
	}

	body.jp-author-profile-page .jp-author-secondary-image img {
		display: block !important;
		width: 100% !important;
		height: 100% !important;
		max-width: none !important;
		filter: none !important;
		object-fit: cover !important;
		object-position: center 58% !important;
		border-radius: 12px !important;
	}

	body.jp-author-profile-page .jp-author-stats-widget {
		grid-column: 1 !important;
		grid-row: 3 !important;
		width: 100% !important;
		max-width: 600px !important;
		margin: 6px 0 0 !important;
	}

	body.jp-author-profile-page .jp-author-stats {
		display: flex !important;
		flex-direction: column !important;
		gap: 34px !important;
	}

	body.jp-author-profile-page .jp-author-stat__label {
		display: grid !important;
		grid-template-columns: 1fr auto !important;
		align-items: center !important;
		gap: 24px !important;
		margin-bottom: 10px !important;
	}

	body.jp-author-profile-page .jp-author-stat__label span:first-child {
		color: #001c10 !important;
		font-family: Inter, "DM Sans", Arial, sans-serif !important;
		font-size: 20px !important;
		font-weight: 700 !important;
		letter-spacing: -0.3px !important;
		line-height: 1.3 !important;
	}

	body.jp-author-profile-page .jp-author-stat__label span:last-child {
		color: #00352d !important;
		font-family: "DM Sans", Inter, Arial, sans-serif !important;
		font-size: 29px !important;
		font-weight: 700 !important;
		letter-spacing: -1.44px !important;
		line-height: 1 !important;
	}

	body.jp-author-profile-page .jp-author-stat__track {
		width: 100% !important;
		height: 8px !important;
		border-radius: 999px !important;
		background: #b8e8e0 !important;
		overflow: hidden !important;
	}

	body.jp-author-profile-page .jp-author-stat__bar {
		display: block !important;
		width: var(--value) !important;
		height: 100% !important;
		border-radius: inherit !important;
		background: #00352d !important;
	}
}

/* Keep every specialty value on one line while preserving the Figma card. */
@media (min-width: 1025px) {
	body.jp-author-profile-page .jp-author-specialty {
		width: max-content !important;
		min-width: 249px !important;
		max-width: min(360px, calc(100% + 67px)) !important;
		white-space: nowrap !important;
	}
}

@media (max-width: 1024px) {
	body.jp-author-profile-page .jp-author-specialty {
		width: max-content !important;
		min-width: 0 !important;
		max-width: calc(100% - 32px) !important;
		font-size: clamp(12px, 3.8vw, 16px) !important;
		white-space: nowrap !important;
	}
}
