/* ==========================================================================
   core/navigation — header and footer menus
   Header: inline links from 1000px (the design's breakpoint, core uses 600px);
   below that the "MENU" toggle opens core's overlay, restyled as the design's
   panel under the header. Keyboard handling, Escape and focus trapping stay
   with core.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header — inline (desktop)
   -------------------------------------------------------------------------- */
/* Core sets link colour with a doubled class (color: inherit); colours are
   therefore set on the container and the doubled class is matched here. */
.wp-block-navigation.zt-nav-header {
	color: var(--wp--custom--color--text);
	font-size: 14px;
	font-weight: 600;
}

.zt-nav-header .wp-block-navigation-item__content.wp-block-navigation-item__content {
	text-decoration: none;
	transition: color 0.2s;
}

.zt-nav-header .wp-block-navigation-item:not(.is-cta) > .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--mint);
}

.zt-nav-header .wp-block-navigation-item:not(.is-cta).current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
.zt-nav-header .wp-block-navigation-item:not(.is-cta) > .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--mint);
	box-shadow: 0 2px 0 var(--wp--preset--color--mint);
}

/* "Start a project": compact skewed fill button. */
.zt-nav-header .is-cta {
	margin-left: 4px;
}

.zt-nav-header .is-cta > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	position: relative;
	z-index: 0;
	isolation: isolate;
	padding: 11px 20px;
	color: var(--wp--preset--color--navy-900);
	font-weight: 700;
	transition: transform 0.2s;
}

.zt-nav-header .is-cta > .wp-block-navigation-item__content::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--wp--preset--gradient--monogram);
	transform: skewX(var(--wp--custom--shape--skew));
}

.zt-nav-header .is-cta > .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--navy-900);
	transform: translateY(-2px);
}

.zt-nav-header .is-cta > .wp-block-navigation-item__content:focus-visible {
	outline: none;
	box-shadow: none;
}

.zt-nav-header .is-cta > .wp-block-navigation-item__content:focus-visible::before {
	outline: 3px solid var(--wp--preset--color--navy-900);
	box-shadow: 0 0 0 6px var(--wp--preset--color--mint);
}

/* --------------------------------------------------------------------------
   Header — toggle buttons ("MENU" / "CLOSE")
   -------------------------------------------------------------------------- */
.zt-nav-header .wp-block-navigation__responsive-container-open,
.zt-nav-header .wp-block-navigation__responsive-container-close {
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--wp--custom--color--line-toggle);
	background: transparent;
	color: var(--wp--custom--color--text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.zt-nav-header .wp-block-navigation__responsive-container-open::before,
.zt-nav-header .wp-block-navigation__responsive-container-close::before {
	content: "";
	flex: none;
	width: 18px;
	height: 8px;
	background:
		linear-gradient(var(--wp--preset--color--mint), var(--wp--preset--color--mint)) 0 0 / 18px 2px no-repeat,
		linear-gradient(var(--wp--preset--color--mint), var(--wp--preset--color--mint)) 0 6px / 12px 2px no-repeat;
}

/* Below 1000px: toggle instead of inline links (core switches at 600px). */
@media (max-width: 999px) {
	.zt-nav-header .wp-block-navigation__responsive-container-open:not(.always-shown),
	.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		display: flex;
	}

	.zt-nav-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Header — open panel
   The overlay covers only the header strip (transparent, so the header stays
   visible) plus the panel; the page below stays visible like in the design.
   -------------------------------------------------------------------------- */
.wp-block-navigation.zt-nav-header:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	bottom: auto;
	max-height: 100vh;
	max-height: 100dvh;
	padding: 0;
	overflow-y: auto;
	background: transparent;
	color: var(--wp--custom--color--text);
	animation: none;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	position: relative;
	padding-top: var(--wp--custom--header--height);
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: calc((var(--wp--custom--header--height) - 44px) / 2);
	right: var(--wp--style--root--padding-right, clamp(20px, 5vw, 48px));
	left: auto;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	padding: 12px var(--wp--style--root--padding-right, clamp(20px, 5vw, 48px)) 28px;
	border-top: 1px solid var(--wp--custom--color--line-soft);
	background: var(--wp--preset--color--navy-900);
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	width: 100%;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
	display: block;
	width: 100%;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid var(--wp--custom--color--line-soft);
	box-shadow: none;
	font-size: 20px;
	font-weight: 600;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .is-cta {
	margin: 24px 0 0;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .is-cta > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: flex;
	justify-content: center;
	padding: 16px;
	border: 0;
	background: var(--wp--preset--gradient--monogram);
	color: var(--wp--preset--color--navy-900);
	font-size: 17px;
	font-weight: 700;
	transform: none;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .is-cta > .wp-block-navigation-item__content::before {
	content: none;
}

/* --------------------------------------------------------------------------
   Footer menus
   -------------------------------------------------------------------------- */
.wp-block-navigation.zt-nav-footer {
	color: var(--wp--preset--color--mist);
	font-size: 14px;
	font-weight: 400;
}

.zt-nav-footer .wp-block-navigation-item__content.wp-block-navigation-item__content {
	text-decoration: none;
	transition: color 0.2s;
}

.zt-nav-footer .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.zt-nav-footer .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content {
	color: var(--wp--preset--color--mint);
}

/* While open, the close button takes the toggle's place in the header. */
.zt-nav-header:has(.is-menu-open) .wp-block-navigation__responsive-container-open {
	opacity: 0;
}

.zt-nav-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	background: var(--wp--preset--color--navy-900);
}

/* --------------------------------------------------------------------------
   Header — Croatian labels are longer than the English ones: each link stays
   on one line, and just above the 1000px breakpoint the gaps close up.
   -------------------------------------------------------------------------- */
.zt-nav-header .wp-block-navigation-item__content {
	white-space: nowrap;
}

@media (min-width: 1000px) and (max-width: 1199px) {
	.wp-block-navigation.zt-nav-header,
	.zt-nav-header .wp-block-navigation__container {
		gap: 18px;
	}

	.zt-header .zt-header__end {
		gap: 18px;
	}

	.zt-nav-header .is-cta > .wp-block-navigation-item__content.wp-block-navigation-item__content {
		padding: 11px 14px;
	}
}
