/**
 * Rounded primary navigation and accessible drawer.
 */

.tw-desktop-nav {
	min-width: 0;
	justify-self: center;
}

.tw-primary-menu,
.tw-primary-menu ul,
.tw-mobile-menu,
.tw-mobile-menu ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.tw-primary-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(0.2rem, 0.55vw, 0.65rem);
	white-space: nowrap;
}

.tw-primary-menu > li {
	position: relative;
}

.tw-primary-menu a {
	display: flex;
	min-height: 44px;
	align-items: center;
	padding: 0.55rem 0.8rem;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--tw-header-text);
	font-size: clamp(0.78rem, 0.72vw, 0.9rem);
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
}

.tw-primary-menu a:hover {
	border-color: var(--tw-header-border);
	background: var(--tw-header-hover);
	color: var(--tw-header-text);
}

.tw-primary-menu > .current-menu-item > a,
.tw-primary-menu > .current-menu-ancestor > a {
	position: relative;
	border-color: transparent;
	background: transparent;
	color: var(--tw-header-text);
}

.tw-primary-menu > .current-menu-item > a::after,
.tw-primary-menu > .current-menu-ancestor > a::after {
	position: absolute;
	right: 0.8rem;
	bottom: 3px;
	left: 0.8rem;
	height: 2px;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		#009246 0%,
		#009246 31%,
		#f4f5f6 47%,
		#f4f5f6 53%,
		#e31937 69%,
		#e31937 100%
	);
	content: "";
}

.tw-primary-menu .sub-menu {
	position: absolute;
	z-index: 20;
	top: calc(100% - 0.1rem);
	left: 0;
	display: none;
	min-width: 230px;
	padding: 0.9rem 0.5rem 0.5rem;
	border: 1px solid var(--tw-header-border);
	border-radius: 1.15rem;
	background: var(--tw-header-bg);
	box-shadow: var(--tw-header-shadow);
}

.tw-primary-menu > .tw-menu-equipment > .sub-menu {
	right: auto;
	left: clamp(-220px, -12vw, -120px);
	width: min(820px, calc(100vw - 48px));
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.15rem 0.35rem;
	padding: 0.8rem;
}

.tw-primary-menu li:hover > .sub-menu,
.tw-primary-menu li:focus-within > .sub-menu {
	display: block;
}

.tw-primary-menu > .tw-menu-equipment:hover > .sub-menu,
.tw-primary-menu > .tw-menu-equipment:focus-within > .sub-menu {
	display: grid;
}

.tw-primary-menu .sub-menu a {
	padding: 0.7rem 0.85rem;
	border-radius: 0.8rem;
}

.tw-primary-menu .sub-menu > .tw-menu-divider-before {
	margin-top: 0.35rem;
	padding-top: 0.45rem;
	border-top: 1px solid var(--tw-header-border);
}

.tw-mobile-menu .sub-menu > .tw-menu-divider-before {
	margin-top: 0.4rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--tw-drawer-border);
}

.tw-mobile-toggle,
.tw-mobile-close {
	display: none;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	place-items: center;
	padding: 0;
	border: 1px solid var(--tw-header-border);
	border-radius: 999px;
	background: var(--tw-header-surface);
	color: var(--tw-header-text);
	cursor: pointer;
}

.tw-mobile-toggle:hover,
.tw-mobile-close:hover {
	border-color: var(--tw-header-accent);
	background: var(--tw-header-hover);
}

.tw-mobile-drawer[hidden] {
	display: none;
}

.tw-mobile-drawer {
	--tw-drawer-top-offset: 0px;
	position: fixed;
	z-index: 1200;
	top: var(--tw-drawer-top-offset);
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	padding: 8px;
}

.tw-mobile-drawer-backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: var(--tw-overlay);
	opacity: 0;
	transition: opacity var(--tw-transition);
}

.tw-mobile-drawer-panel {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(460px, 90vw);
	max-height: calc(100dvh - var(--tw-drawer-top-offset) - 16px);
	flex-direction: column;
	overflow-y: auto;
	border: 1px solid var(--tw-drawer-border);
	border-radius: 30px;
	background: var(--tw-drawer-bg);
	box-shadow: var(--tw-shadow-strong);
	transform: translateX(calc(100% + 16px));
	transition: transform 240ms ease;
	overscroll-behavior: contain;
}

.tw-mobile-drawer.is-open .tw-mobile-drawer-backdrop {
	opacity: 1;
}

.tw-mobile-drawer.is-open .tw-mobile-drawer-panel {
	transform: translateX(0);
}

.tw-mobile-drawer-header {
	display: flex;
	min-height: 68px;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0.85rem 0.6rem 1rem;
	border-bottom: 1px solid var(--tw-drawer-border);
}

.tw-mobile-drawer-brand {
	display: inline-flex;
	max-width: calc(100% - 60px);
	align-items: center;
	color: var(--tw-drawer-text);
}

.tw-mobile-drawer-brand__scheme {
	display: inline-flex;
	align-items: center;
}

.tw-mobile-drawer-brand__scheme--dark {
	display: none;
}

html[data-tw-theme="dark"] .tw-mobile-drawer-brand__scheme--light {
	display: none;
}

html[data-tw-theme="dark"] .tw-mobile-drawer-brand__scheme--dark {
	display: inline-flex;
}

.tw-mobile-drawer-brand__full {
	display: inline-flex;
	align-items: center;
}

.tw-mobile-drawer-brand__compact {
	display: none;
	align-items: center;
}

.tw-mobile-drawer-logo {
	display: block;
	width: auto;
	max-width: 150px;
	max-height: var(--tw-compact-logo-max-height, 40px);
	object-fit: contain;
}

.tw-mobile-drawer-logo--compact {
	max-width: 64px;
}

.tw-mobile-drawer-brand .tw-site-branding__compact-fallback {
	color: var(--tw-color-graphite);
}

.tw-mobile-close {
	display: grid;
	width: 48px;
	height: 48px;
	flex-basis: 48px;
	border-color: var(--tw-drawer-border);
	border-radius: 15px;
	background: var(--tw-drawer-surface);
	color: var(--tw-drawer-text);
}

.tw-mobile-drawer nav {
	padding: 0.65rem;
}

.tw-mobile-menu {
	display: grid;
	gap: 0.25rem;
}

.tw-mobile-menu a {
	display: flex;
	min-height: 50px;
	align-items: center;
	padding: 0.7rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 0.9rem;
	color: var(--tw-drawer-text);
	font-size: 1.02rem;
	font-weight: 740;
	line-height: 1.25;
	text-decoration: none;
}

.tw-mobile-menu a:hover,
.tw-mobile-menu .current-menu-item > a,
.tw-mobile-menu .current-menu-ancestor > a {
	border-color: var(--tw-drawer-border);
	background: var(--tw-drawer-hover);
	color: var(--tw-color-red);
}

.tw-mobile-menu .sub-menu {
	display: grid;
	gap: 0.2rem;
	padding: 0.25rem 0 0.25rem 1rem;
}

.tw-mobile-menu .sub-menu[hidden] {
	display: none;
}

.tw-mobile-menu > .menu-item-has-children {
	position: relative;
}

.tw-mobile-submenu-toggle {
	position: absolute;
	top: 3px;
	right: 3px;
	display: grid;
	width: 44px;
	height: 44px;
	place-items: center;
	padding: 0;
	border: 1px solid var(--tw-drawer-border);
	border-radius: 999px;
	background: var(--tw-drawer-hover);
	color: var(--tw-drawer-text);
	cursor: pointer;
}

.tw-mobile-submenu-toggle svg {
	transition: transform 180ms ease;
}

.tw-mobile-submenu-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.tw-mobile-menu > .menu-item-has-children > a {
	padding-right: 56px;
}

.tw-mobile-menu .menu-item-has-children > a::after {
	display: none;
}

.tw-menu-all-categories > a {
	color: var(--tw-color-red) !important;
}

.tw-mobile-menu .sub-menu a {
	min-height: 44px;
	color: var(--tw-drawer-muted);
	font-size: 0.94rem;
}


.tw-mobile-drawer-footer {
	display: grid;
	gap: 0.75rem;
	padding: 0.75rem;
	margin-top: auto;
	border-top: 1px solid var(--tw-drawer-border);
	background: var(--tw-drawer-bg);
}

.tw-mobile-drawer-footer .tw-header-actions {
	display: grid;
}

html.tw-nav-open,
body.tw-nav-open {
	overflow: hidden;
}

.admin-bar .tw-mobile-drawer {
	--tw-drawer-top-offset: 32px;
}

@media (max-width: 782px) {
	.admin-bar .tw-mobile-drawer {
		--tw-drawer-top-offset: 46px;
	}
}

@media (max-width: 767px) {
	.tw-mobile-drawer-brand__full {
		display: none;
	}

	.tw-mobile-drawer-brand__compact {
		display: inline-flex;
	}

	.tw-mobile-drawer-panel {
		width: calc(100vw - 16px);
		max-height: calc(100dvh - var(--tw-drawer-top-offset) - 16px);
		border-radius: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tw-mobile-drawer-backdrop,
	.tw-mobile-drawer-panel {
		transition: none;
	}
}
