/* Approved child-only header exception; presets used where values exist. */
.urospot-header .urospot-header__row {
	gap: var(--wp--preset--spacing--12);
}
.urospot-header .urospot-header__controls {
	gap: var(--wp--preset--spacing--32);
	min-width: 0;
	flex: 1 1 0;
}
.urospot-header .urospot-header__nav {
	min-width: 0;
	flex: 1 1 0;
}
.urospot-header .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--32);
}
.urospot-header .wp-block-navigation-item__content {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
	padding: var(--wp--preset--spacing--0);
}
.urospot-header .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--black);
	color: var(--wp--preset--color--white);
	border: 0;
	border-top: thin solid var(--wp--preset--color--white);
	padding: var(--wp--preset--spacing--24);
	gap: var(--wp--preset--spacing--24);
	line-height: var(--wp--custom--line-height--b-3);
	font-weight: normal;
	min-width: max-content;
	width: max-content;
}
.urospot-header .wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0;
	white-space: nowrap;
}
.urospot-header .wp-block-navigation-submenu__toggle {
	margin-inline-start: var(--wp--preset--spacing--8);
	background-image: url('../../images/urospot-navigation-chevron.svg');
	background-repeat: no-repeat;
	background-position: center;
}
.urospot-header .wp-block-navigation-submenu__toggle svg {
	visibility: hidden;
}
.urospot-header .urospot-header__cta {
	flex: 0 0 auto;
}
.urospot-header a:focus-visible,
.urospot-header button:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: var(--wp--preset--spacing--4);
}
@media (max-width: 1024px) {
	.urospot-header .urospot-header__nav {
		order: 1;
	}
	.urospot-header .urospot-header__controls {
		gap: var(--wp--preset--spacing--16);
		flex: 0 1 auto;
	}
	.urospot-header .urospot-header__nav {
		flex: 0 0 auto;
	}
	.urospot-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}
	.urospot-header .wp-block-navigation__responsive-container-open {
		display: flex;
	}
	.urospot-header .wp-block-navigation__responsive-container.is-menu-open {
		padding: var(--wp--preset--spacing--24) var(--wp--custom--layout--site-gutter);
	}
	.urospot-header .is-menu-open .wp-block-navigation__submenu-container {
		border: 0;
		padding: var(--wp--preset--spacing--24) 0;
	}
}
@media (min-width: 1025px) {
	/* Core open-state selectors set a fixed minimum; retain intrinsic menu widths. */
	.urospot-header nav.wp-block-navigation .wp-block-navigation__container .has-child:is(:hover, :focus-within) > .wp-block-navigation__submenu-container {
		min-width: max-content;
		width: max-content;
	}

	.urospot-header nav.wp-block-navigation .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container {
		top: calc(100% + var(--wp--preset--spacing--32));
		left: 0;
		right: auto;
	}
	/* Keep pointer travel across the dropdown offset inside the hover target. */
	.urospot-header .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container::before {
		content: "";
		position: absolute;
		inset-inline: 0;
		bottom: 100%;
		height: var(--wp--preset--spacing--32);
	}

	.urospot-header .wp-block-navigation__responsive-container-open {
		display: none;
	}
	.urospot-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: block;
	}
}
/* Neutralize the inherited fixed-header offset only after this flowing header. */
header.wp-block-template-part:has(.urospot-header) + .has-fixed-header-offset {
	margin-top: var(--wp--preset--spacing--0);
}

@media (min-width: 1024px) and (max-width: 1280px) {
	.urospot-header .urospot-header__controls {
		gap: var(--wp--preset--spacing--18);
	}
	.urospot-header .urospot-header__nav {
		font-size: var(--wp--preset--font-size--b-4);
	}
	.urospot-header .wp-block-navigation__container {
		gap: var(--wp--preset--spacing--20);
	}
}

/* Animate a background underline without changing link dimensions. */
.urospot-header .wp-block-navigation-item__content {
	transition: color 0.2s ease, background-size 0.2s ease;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0% 2px;
}
.urospot-header .wp-block-navigation .wp-block-navigation-item__content:is(:hover, :focus-visible) {
	color: var(--wp--preset--color--primary);
	background-size: 100% 2px;
}
@media (prefers-reduced-motion: reduce) {
	.urospot-header .wp-block-navigation-item__content {
		transition: none;
	}
}

@media (max-width: 767px) {
	.urospot-header .urospot-header__logo img {
		width: 103px;
		height: 42px;
		object-fit: contain;
	}
	.urospot-header .urospot-header__cta .wp-block-button__link {
		padding: 6px 17px;
		font-size: 12px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.urospot-header .urospot-header__cta .wp-block-button__link {
		font-size: var(--wp--preset--font-size--b-5);
		padding: var(--wp--preset--spacing--8) var(--wp--preset--spacing--24);
	}
}

/* Yazdani mobile dialog styling, adapted to UROSPOT's native navigation. */
@media (max-width: 1024px) {
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-container-open,
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-container-close {
		width: 40px;
		height: 40px;
		align-items: center;
		justify-content: center;
		padding: 0;
	}
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-container.is-menu-open {
		overflow-y: auto;
		padding: 0;
	}
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-close {
		width: 100%;
	}
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-dialog {
		position: relative;
		margin: 0;
		min-height: 100vh;
		padding: var(--wp--preset--spacing--24);
	}
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-container-close {
		right: var(--wp--preset--spacing--24);
		top: var(--wp--preset--spacing--24);
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__responsive-container-content {
		width: 100%;
		padding-top: var(--wp--preset--spacing--96);
		align-items: stretch;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__container {
		width: 100%;
		gap: 0;
		align-items: stretch;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation-item {
		width: 100%;
		align-items: stretch;
		text-align: left;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
		border-bottom: 1px solid var(--wp--preset--color--primary);
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:last-child {
		border-bottom: 0;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding: var(--wp--preset--spacing--20) 0;
		font-size: var(--wp--preset--font-size--b-4);
		text-align: left;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__submenu-container {
		width: 100%;
		min-width: 0;
		border: 0;
		padding: 0 0 var(--wp--preset--spacing--16) var(--wp--preset--spacing--16);
		gap: 0;
		align-items: stretch;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		padding: var(--wp--preset--spacing--12) 0;
		font-size: var(--wp--preset--font-size--b-4);
		font-weight: 400;
		text-align: left;
		white-space: normal;
	}
}

@media (max-width: 1024px) {
	.urospot-header .urospot-header__nav .is-menu-open .has-child {
		position: relative;
	}
	.urospot-header .urospot-header__nav .is-menu-open .has-child > .wp-block-navigation-item__content {
		padding-right: var(--wp--preset--spacing--48);
	}
	.urospot-header .urospot-header__nav .is-menu-open .has-child > .wp-block-navigation-submenu__toggle {
		display: flex !important;
		position: absolute;
		right: 0;
		top: var(--wp--preset--spacing--12);
		width: 40px;
		height: 40px;
		margin: 0;
		align-items: center;
		justify-content: center;
	}
	.urospot-header .urospot-header__nav .is-menu-open .has-child > .wp-block-navigation__submenu-container {
		display: none !important;
	}
	.urospot-header .urospot-header__nav .is-menu-open .has-child.is-urospot-expanded > .wp-block-navigation__submenu-container {
		display: flex !important;
	}
	.urospot-header .urospot-header__nav .is-menu-open .is-urospot-expanded > .wp-block-navigation-submenu__toggle {
		transform: rotate(180deg);
	}
}

.urospot-mobile-menu__header {
	display: none;
}
@media (max-width: 1024px) {
	.urospot-header .is-menu-open .urospot-mobile-menu__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--wp--preset--spacing--12);
		padding-right: var(--wp--preset--spacing--48);
	}
	.urospot-header .is-menu-open .urospot-mobile-menu__header .urospot-header__logo {
		flex: 0 1 auto;
		min-width: 0;
	}
	.urospot-header .is-menu-open .urospot-mobile-menu__header .urospot-header__logo img {
		max-width: 100%;
	}
	.urospot-header .urospot-header__nav .is-menu-open .wp-block-navigation__responsive-container-content {
		padding-top: var(--wp--preset--spacing--32);
	}
}

@media (max-width: 419px) {
	.urospot-header .urospot-header__controls {
		gap: 6px;
	}
}

/* Keep the dialog brand row aligned with the closed header. */
@media (max-width: 1024px) {
	.urospot-header .urospot-header__nav .wp-block-navigation__responsive-dialog {
		padding-inline: var(--wp--custom--layout--site-gutter);
	}
	.urospot-header .is-menu-open .urospot-mobile-menu__header {
		padding-right: 0;
		gap: 0;
	}
	.urospot-header .is-menu-open .urospot-mobile-menu__header .urospot-header__cta {
		margin-left: auto;
		margin-right: var(--wp--preset--spacing--16);
	}
	.urospot-header .urospot-header__nav .urospot-mobile-menu__header .wp-block-navigation__responsive-container-close {
		position: static;
		flex: 0 0 40px;
	}
}
@media (max-width: 419px) {
	.urospot-header .is-menu-open .urospot-mobile-menu__header .urospot-header__cta {
		margin-right: 6px;
	}
}
@media (width: 1024px) {
	.urospot-header .is-menu-open .urospot-mobile-menu__header .urospot-header__cta {
		margin-right: var(--wp--preset--spacing--18);
	}
}

header.wp-block-template-part:has(.urospot-header) {
	position: sticky;
	top: 0;
	z-index: 100;
}
body.admin-bar header.wp-block-template-part:has(.urospot-header) {
	top: var(--wp-admin--admin-bar--height, 32px);
}
/* WordPress's phone admin bar scrolls with the document. */
@media (max-width: 600px) {
	body.admin-bar header.wp-block-template-part:has(.urospot-header) {
		top: 0;
	}
}
