/* Refined STARLAB header: contained to header and navigation surfaces. */
.starlab-header {
	--starlab-header-shell: 1220px;
	--starlab-header-muted: #62576c;
	--starlab-header-purple: #9135a2;
	--starlab-header-purple-soft: #f5eafb;
	--starlab-header-rule: #eadff0;
	background: #fff;
	border-bottom: 1px solid #eee7f1;
	height: auto;
}

.starlab-topbar {
	background: #fbf7fc;
	border-bottom: 1px solid var(--starlab-header-rule);
	color: var(--starlab-header-muted);
	font-size: 13px;
	font-weight: 500;
	height: 40px;
}

.starlab-topbar .starlab-shell,
.starlab-header .starlab-shell { width: min(var(--starlab-header-shell), calc(100% - 48px)); }

.starlab-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	height: 40px;
}

.starlab-topbar__contacts,
.starlab-topbar__tools,
.starlab-topbar__socials { display: flex; align-items: center; }

.starlab-topbar__contacts { gap: clamp(12px, 1.5vw, 20px); min-width: 0; }

.starlab-topbar__contacts a,
.starlab-topbar__hours,
.starlab-topbar__socials a,
.starlab-topbar__socials > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	line-height: 1.2;
	text-decoration: none;
}

.starlab-topbar__contacts a,
.starlab-topbar__socials a,
.starlab-topbar .starlab-language-links a,
.starlab-primary-navigation a,
.starlab-search summary,
.starlab-menu-toggle {
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 120ms ease-out;
}

.starlab-topbar__contacts a:hover,
.starlab-topbar__contacts a:focus-visible,
.starlab-topbar__socials a:hover,
.starlab-topbar__socials a:focus-visible { color: var(--starlab-header-purple); }

.starlab-topbar__address { min-width: 0; }
.starlab-topbar__address-label { display: none; }
.starlab-topbar__address-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.starlab-topbar__contacts svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	color: var(--starlab-header-purple);
	fill: none;
}

.starlab-topbar__tools { gap: 12px; flex: 0 0 auto; }

.starlab-topbar .starlab-language-links {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border: 1px solid #e8dbee;
	border-radius: 999px;
	background: #fff;
	font-size: 11px;
	font-weight: 700;
}

.starlab-topbar .starlab-language-links a {
	padding: 4px 7px;
	border-radius: 999px;
	color: var(--starlab-header-muted);
	line-height: 1;
	text-decoration: none;
}

.starlab-topbar .starlab-language-links a[aria-current] {
	background: var(--starlab-header-purple);
	color: #fff;
	text-decoration: none;
}

.starlab-topbar__socials { gap: 6px; }

.starlab-topbar__socials a,
.starlab-topbar__socials > span {
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid #eadff0;
	border-radius: 50%;
	background: #fff;
	color: #7d6487;
}

.starlab-topbar__socials a:hover,
.starlab-topbar__socials a:focus-visible {
	border-color: #d8bddf;
	background: var(--starlab-header-purple-soft);
}

.starlab-topbar__socials svg { width: 13px; height: 13px; fill: currentColor; }

.starlab-header__inner {
	display: grid;
	grid-template-columns: 148px minmax(0, 1fr) 42px;
	align-items: center;
	gap: 14px;
	height: 88px;
	min-height: 88px;
}

.starlab-brand img,
.starlab-brand .custom-logo {
	display: block;
	width: 148px;
	max-width: 148px;
	height: auto;
	max-height: 57px;
}

.starlab-primary-navigation { justify-self: center; margin: 0; min-width: 0; }
.starlab-primary-navigation > ul { gap: clamp(10px, 1.25vw, 20px); }

.starlab-primary-navigation > ul > li > a {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	color: #403648;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	white-space: nowrap;
}

.starlab-primary-navigation > ul > li > a:hover,
.starlab-primary-navigation > ul > li > a:focus-visible {
	background: #faf4fc;
	color: var(--starlab-header-purple);
}

.starlab-primary-navigation > ul > .current-menu-item > a,
.starlab-primary-navigation > ul > .current_page_item > a {
	position: relative;
	background: var(--starlab-header-purple-soft);
	color: var(--starlab-header-purple);
}

.starlab-primary-navigation > ul > .current-menu-item > a::after,
.starlab-primary-navigation > ul > .current_page_item > a::after {
	position: absolute;
	right: 12px;
	bottom: 5px;
	left: 12px;
	height: 2px;
	border-radius: 99px;
	background: currentColor;
	content: '';
}

.starlab-primary-navigation .sub-menu {
	top: 100%;
	left: -8px;
	padding: 8px 12px;
	border-color: var(--starlab-header-rule);
	border-radius: 12px;
	box-shadow: 0 12px 28px rgba(67, 34, 76, 0.12);
}

.starlab-primary-navigation .sub-menu a {
	padding: 8px 6px;
	border-radius: 7px;
	color: #4a3c51;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
}

.starlab-primary-navigation .sub-menu a:hover,
.starlab-primary-navigation .sub-menu a:focus-visible {
	background: #faf4fc;
	color: var(--starlab-header-purple);
}

.starlab-search { justify-self: end; margin: 0; }

.starlab-search summary {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #e5d9e9;
	border-radius: 12px;
	background: #fff;
	color: var(--starlab-header-purple);
	list-style: none;
	cursor: pointer;
}

.starlab-search summary::-webkit-details-marker { display: none; }

.starlab-search summary:hover,
.starlab-search[open] summary,
.starlab-search summary:focus-visible {
	border-color: #d6b8df;
	background: var(--starlab-header-purple-soft);
}

.starlab-search summary svg { width: 20px; height: 20px; }

.starlab-search summary:active,
.starlab-menu-toggle:active,
.starlab-topbar__socials a:active { transform: scale(0.97); }

.starlab-search .starlab-search-form {
	top: calc(100% + 8px);
	padding: 14px;
	border-color: var(--starlab-header-rule);
	border-radius: 12px;
	box-shadow: 0 12px 28px rgba(67, 34, 76, 0.14);
}

.starlab-header .starlab-search-form input { border-color: #ddcce4; border-radius: 8px; }
.starlab-header .starlab-search-form button { border-radius: 8px; background: var(--starlab-header-purple); }

.starlab-desktop-languages { display: none; }
.starlab-topbar .starlab-desktop-languages { display: block; }

.starlab-header a:focus-visible,
.starlab-header button:focus-visible,
.starlab-topbar a:focus-visible {
	outline: 2px solid #9135a2;
	outline-offset: 3px;
}


@media (max-width: 1100px) {
	.starlab-topbar__hours,
	.starlab-topbar__socials { display: none; }
}

@media (max-width: 1200px) {
	.starlab-header__inner { display: flex; gap: 8px; height: 72px; min-height: 72px; }
	.starlab-brand img,
	.starlab-brand .custom-logo { width: auto; max-width: 148px; }
	.starlab-search { margin-left: 0; }

	.starlab-menu-toggle {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		margin-left: auto;
		padding: 8px;
		border: 1px solid #e5d9e9;
		border-radius: 12px;
		background: #fff;
	}

	.starlab-menu-toggle:hover,
	.starlab-menu-toggle:focus-visible { border-color: #d6b8df; background: var(--starlab-header-purple-soft); }

	.starlab-menu-toggle span:not(.screen-reader-text) {
		width: 20px;
		height: 2px;
		margin: 3px auto;
		background: var(--starlab-header-purple);
	}
}

@media (max-width: 800px) {
	.starlab-topbar { height: auto; }
	.starlab-topbar__inner { display: block; height: auto; min-height: 54px; padding: 7px 0; }

	.starlab-topbar__contacts {
		display: grid;
		grid-template-columns: max-content minmax(0, 1fr);
		column-gap: 10px;
		row-gap: 5px;
		font-size: 12px;
	}

	.starlab-topbar__contacts a {
		gap: 4px;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.starlab-topbar__contacts svg { width: 14px; height: 14px; }
	.starlab-topbar__address { grid-column: 1 / -1; max-width: 100%; }
	.starlab-topbar__hours,
	.starlab-topbar__tools { display: none; }

	.starlab-header .starlab-shell { width: min(var(--starlab-header-shell), calc(100% - 32px)); }
	.starlab-brand img,
	.starlab-brand .custom-logo { max-width: 128px; }
}

@media (max-width: 359px) {
	.starlab-topbar__contacts { column-gap: 6px; font-size: 11px; }
	.starlab-header__inner { gap: 6px; }
	.starlab-brand img,
	.starlab-brand .custom-logo { max-width: 116px; }
}

@media (prefers-reduced-motion: reduce) {
	.starlab-topbar__contacts a,
	.starlab-topbar__socials a,
	.starlab-topbar .starlab-language-links a,
	.starlab-primary-navigation a,
	.starlab-search summary,
	.starlab-menu-toggle { transition-duration: 0ms; }
}
