/* ==========================================================================
   AMA category navigation
   ========================================================================== */
.block-cat-nav{
	color: var(--ama-white-color);
	background-color: var(--ama-primary-color)
}
* + .block-cat-nav,
.block-cat-nav + *{margin-top: 0}

/* Inline nav
   -------------------------------------------------------------------------- */
.ama-cat-nav {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch; /* all items share the height of the tallest one */
	justify-content: space-between;
	gap: 0 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow: hidden; /* clips items until JS has measured */
}

.ama-cat-nav__item {
	display: flex;
	flex: 0 0 auto;
}

.ama-cat-nav__item.is-hidden {
	display: none;
}

/* "All categories" always pinned to the right edge */
.ama-cat-nav__item--all {
	margin-left: auto;
}

/* Icon stacked on top of the label, content centered */
.ama-cat-nav a,
.ama-all-cat-toggle {
	font-size: .875rem;
	line-height: .9375rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: .375rem;
	width: 100%;
	padding: .625rem 0 .5rem 0;
	border: 0;
	border-bottom: .125rem solid transparent; /* reserved – no layout shift on hover */
	background: transparent;
	color: inherit;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease;
}
.ama-cat-nav__item.no-icon > a{
	align-items: center;
	justify-content: center
}

.ama-cat-nav a:hover,
.ama-cat-nav a:focus-visible,
.ama-cat-nav .is-active > a,
.ama-all-cat-toggle:hover,
.ama-all-cat-toggle:focus-visible {
	color: var(--ama-electric-green-color);
	border-bottom-color: currentColor;
}

/* Label wraps at every space – one word per line */
.ama-cat-nav .cat-name{width: min-content}
.ama-cat-nav .cat-name:only-child{align-self: center; justify-self: center}

.ama-cat-nav .cat-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	height: 1.5rem;
}

.cat-icon svg,
.cat-icon img {display: block; opacity: 0; margin: 0; max-width: 1.5rem; max-height: 1.5rem; width: auto; height: auto}

/* Offcanvas tree
   -------------------------------------------------------------------------- */
.ama-cat-offcanvas .ama-cat-tree {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* nested levels */
.ama-cat-tree .ama-cat-tree {
	padding-left: 1rem;
}

.ama-cat-tree__row {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.ama-cat-tree__row > a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.5rem 0.25rem;
	color: inherit;
	text-decoration: none;
}

.ama-cat-tree__row > a:hover,
.ama-cat-tree__row > a:focus-visible {
	text-decoration: underline;
}

.ama-cat-tree__row .cat-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ama-cat-tree__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 0.375rem;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ama-cat-tree__toggle:hover,
.ama-cat-tree__toggle:focus-visible {
	background: rgba(0, 0, 0, 0.05);
}

.ama-cat-tree__toggle svg {
	transition: transform 0.2s ease;
}

.ama-cat-tree__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}