/* The language control belongs to the masthead, never to a page hero. */
.estepps-site-language {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 2px;
	padding: 3px;
	border: 1px solid #cfdae3;
	border-radius: 999px;
	background: #eef3f7;
	white-space: nowrap;
}

.estepps-site-language .estepps-site-language__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	margin: 0;
	padding: 0.45rem 0.7rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--estepps-navy);
	font-family: var(--estepps-font-body);
	font-size: 0.775rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease;
}

.estepps-site-language .estepps-site-language__button:hover {
	background: #dce7ef;
	color: var(--estepps-navy);
}

.estepps-site-language .estepps-site-language__button[aria-pressed="true"] {
	background: var(--estepps-gold);
	color: var(--estepps-navy);
}

.estepps-site-language .estepps-site-language__button:focus-visible {
	outline: 2px solid var(--estepps-blue);
	outline-offset: 3px;
}

/* Spanish has longer words; keep the existing homepage panel contained. */
html[lang="es"] body.home .estepps-home-hero__content h1.elementor-heading-title {
	font-size: clamp(2.25rem, 3.6vw, 4rem) !important;
}

html[lang="es"] body.home .estepps-home-hero__content h1.elementor-heading-title span {
	white-space: normal !important;
}

/* More room for the added control and the longer Spanish navigation labels.
   Keep this breakpoint in sync with navigation.js. */
@media (min-width: 1281px) {
	/* Anchor the header groups, while letting translated menu labels use
	   their natural widths with consistent visible space between links. */
	.estepps-site-header__inner {
		display: grid;
		grid-template-columns: 196px minmax(0, 1fr) 384px;
		column-gap: 10px;
		max-width: 1360px;
	}

	.estepps-site-header .estepps-nav {
		width: 100%;
		min-width: 0;
		justify-content: center;
	}

	.estepps-site-header .estepps-nav__list {
		display: flex;
		gap: 22px;
		width: max-content;
		max-width: 100%;
	}

	.estepps-site-header .estepps-nav__list > li {
		flex: 0 0 auto;
		min-width: 0;
	}

	.estepps-site-header .estepps-nav__list > li > a {
		font-size: 15px;
	}

	.estepps-site-header .estepps-header-actions {
		display: grid;
		grid-template-columns: 148px 220px;
		gap: 16px;
		min-width: 0;
	}

	.estepps-site-header .estepps-site-language {
		width: 148px;
		justify-content: center;
	}

	.estepps-site-header .estepps-header-actions__cta {
		width: 220px;
		justify-content: center;
	}
}

@media (min-width: 1025px) and (max-width: 1280px) {
	.estepps-site-header .estepps-nav,
	.estepps-site-header .estepps-header-actions__cta {
		display: none;
	}

	.estepps-site-header .estepps-menu-toggle {
		display: inline-flex;
	}

	.estepps-site-header .estepps-mobile-nav {
		display: flex;
	}
}

@media (min-width: 1281px) and (max-width: 1439px) {
	.estepps-site-header__inner {
		grid-template-columns: 196px minmax(0, 1fr) 148px;
	}

	.estepps-site-header .estepps-header-actions {
		grid-template-columns: 148px;
	}

	.estepps-site-header .estepps-header-actions__cta {
		display: none;
	}
}

@media (max-width: 600px) {
	.estepps-site-header__inner {
		gap: 8px;
	}

	.estepps-header-actions {
		gap: 8px;
	}

	.estepps-site-header .estepps-branding__logo .estepps-branding__mark {
		width: 34px;
		height: 40px;
	}

	.estepps-site-header .estepps-branding__name {
		margin-left: 0.35rem;
		font-size: 1.3rem;
	}

	.estepps-site-language {
		padding: 2px;
	}

	.estepps-site-language .estepps-site-language__button {
		min-height: 38px;
		padding-inline: 0.5rem;
		font-size: 0.6875rem;
	}

	.estepps-site-header .estepps-menu-toggle {
		width: 40px;
		height: 44px;
	}
}

@media (max-width: 360px) {
	.estepps-site-header .estepps-branding__logo .estepps-branding__mark {
		width: 28px;
	}

	.estepps-site-header .estepps-branding__name {
		font-size: 1.1rem;
	}

	.estepps-site-header__inner,
	.estepps-header-actions {
		gap: 5px;
	}
}

/* The campaign has its own dark masthead, but the same language control. */
.ksr-masthead__actions {
	display: flex;
	flex: none;
	align-items: center;
	gap: 14px;
}

.ksr-masthead .estepps-site-language {
	border-color: rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.08);
}

.ksr-masthead .estepps-site-language__button {
	color: #fff;
}

.ksr-masthead .estepps-site-language__button:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.ksr-masthead .estepps-site-language__button[aria-pressed="true"] {
	color: var(--estepps-navy);
}

.ksr-masthead .estepps-site-language__button:focus-visible {
	outline-color: #fff;
}

@media (max-width: 620px) {
	.ksr-masthead__actions {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.ksr-masthead__actions .estepps-site-language {
		justify-self: center;
	}
}
