/*
 * Header and mobile menu.
 * Two tiers on desktop: a thin graphite info bar and a white main bar.
 * After scrolling the info bar slides away and only the main bar stays.
 */

:root {
	--mj-topbar-h: 2.375rem;
	--mj-bar-h: 5rem;
	--mj-header-h: calc(var(--mj-topbar-h) + var(--mj-bar-h));
	--mj-line: rgba(22, 24, 29, 0.12);
}

@media (max-width: 960px) {
	:root {
		--mj-topbar-h: 0rem;
		--mj-bar-h: 4rem;
	}
}

.mj-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	color: var(--mj-graphite);
}

/* Logged-in admin bar sits above the fixed header */
.admin-bar .mj-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .mj-header {
		top: 46px;
	}
}

/* Info bar */
.mj-topbar {
	height: var(--mj-topbar-h);
	background: var(--mj-graphite);
	color: rgba(242, 240, 235, 0.72);
	font-size: 0.8125rem;
	overflow: hidden;
}

.mj-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	height: 100%;
}

.mj-topbar__note {
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mj-topbar__contact {
	display: flex;
	gap: 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
}

.mj-topbar__note {
	color: var(--mj-cream);
	font-weight: 500;
}

.mj-topbar__contact a {
	display: inline-flex;
	align-items: center;
	gap: 0.4375rem;
	color: var(--mj-cream);
	text-decoration: none;
	transition: color 0.2s;
}

.mj-topbar__contact .mj-icon {
	width: 0.875rem;
	height: 0.875rem;
	color: var(--mj-orange);
}

.mj-topbar__contact a:hover {
	color: var(--mj-orange);
}

/* Right part of the top bar: contact, then the language switcher behind a thin line */
.mj-topbar__end {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	height: 100%;
}

.mj-topbar__lang {
	display: flex;
	align-items: center;
	height: 1rem;
	padding-left: 1.75rem;
	border-left: 1px solid rgba(242, 240, 235, 0.2);
}

/* Language switcher: BA / EN / DE (an inactive language is not a link until it is translated) */
.mj-lang__list {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-lang__item {
	color: rgba(242, 240, 235, 0.6);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: color 0.2s;
}

a.mj-lang__item:hover,
a.mj-lang__item:focus-visible {
	color: var(--mj-orange);
}

.mj-lang__item.is-current {
	color: var(--mj-cream);
}

.mj-lang__item.is-disabled {
	color: rgba(242, 240, 235, 0.32);
	cursor: default;
}

/* Mobile menu: the switcher at the bottom, larger tap targets */
.mj-lang--menu {
	margin-top: 0.75rem;
}

.mj-lang--menu .mj-lang__list {
	justify-content: center;
	gap: 0.5rem;
}

.mj-lang--menu .mj-lang__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3rem;
	min-height: 2.75rem;
	font-size: 0.9375rem;
}

@media (max-width: 960px) {
	.mj-topbar {
		display: none;
	}
}

/* Main bar */
.mj-header__bar {
	position: relative;
	z-index: 2;
	height: var(--mj-bar-h);
	border-bottom: 1px solid var(--mj-line);
	background: #fff;
	transition: box-shadow 0.25s;
}

.mj-header.is-scrolled .mj-header__bar {
	box-shadow: 0 6px 24px rgba(22, 24, 29, 0.08);
}

/* Desktop: the info bar slides away after scrolling (no transform below 961 px:
   it would become the containing block of the fixed mobile menu) */
@media (min-width: 961px) {
	.mj-header {
		transition: transform 0.3s;
	}

	.mj-header.is-scrolled {
		transform: translateY(calc(-1 * var(--mj-topbar-h)));
	}
}

.mj-header__inner {
	display: flex;
	align-items: stretch;
	gap: 2.5rem;
	height: 100%;
}

.mj-header__logo {
	display: flex;
	flex: none;
	align-items: center;
	line-height: 0;
}

.mj-header__logo img {
	display: block;
	width: auto;
	height: 2.125rem;
}

/* Menu: right-aligned, each link as tall as the bar, orange rule on the bottom edge */
.mj-nav {
	display: flex;
	flex: 1;
	justify-content: flex-end;
}

.mj-nav__list {
	display: flex;
	gap: clamp(1.25rem, 2.2vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-nav__list li {
	display: flex;
}

.mj-nav__list a {
	position: relative;
	display: flex;
	align-items: center;
	color: var(--mj-graphite);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

/*
 * Hover / active: the link text turns orange (the darker orange, so the text stays readable
 * on the white bar). No underline, no marker.
 */
.mj-nav__list a {
	transition: color 0.2s;
}

.mj-nav__list a:hover,
.mj-nav__list a.is-active {
	color: var(--mj-orange-deep);
}

/* Actions */
.mj-header__actions {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-left: auto;
	padding-left: 2.5rem;
	border-left: 1px solid var(--mj-line);
}

.mj-nav + .mj-header__actions {
	margin-left: 0;
}

.mj-header__phone {
	display: none;
	flex-direction: column;
	color: var(--mj-graphite);
	line-height: 1.25;
	text-decoration: none;
	white-space: nowrap;
}

.mj-header__phone-label {
	color: rgba(22, 24, 29, 0.6);
	font-size: 0.75rem;
}

.mj-header__phone-number {
	font-family: var(--mj-font-display);
	font-size: 1.0625rem;
	font-weight: 800;
}

.mj-header__phone:hover .mj-header__phone-number {
	color: var(--mj-orange);
}

@media (min-width: 1181px) {
	.mj-header__phone {
		display: inline-flex;
	}
}

.mj-header__cta {
	min-height: 2.875rem;
}

/* Quick call button (phones and small tablets only) */
.mj-header__call {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--mj-radius);
	background: var(--mj-orange);
	color: var(--mj-graphite);
}

.mj-header__call .mj-icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* Burger */
.mj-header__toggle {
	display: none;
	width: 2.75rem;
	height: 2.75rem;
	margin-right: -0.5rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.mj-header__burger {
	position: relative;
	display: block;
	width: 1.5rem;
	height: 1.125rem;
	margin: auto;
}

.mj-header__burger span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.25s, opacity 0.2s, top 0.25s;
}

.mj-header__burger span:nth-child(1) {
	top: 0;
}

.mj-header__burger span:nth-child(2) {
	top: calc(50% - 1px);
}

.mj-header__burger span:nth-child(3) {
	top: calc(100% - 2px);
}

.mj-nav-open .mj-header__burger span:nth-child(1) {
	top: calc(50% - 1px);
	transform: rotate(45deg);
}

.mj-nav-open .mj-header__burger span:nth-child(2) {
	opacity: 0;
}

.mj-nav-open .mj-header__burger span:nth-child(3) {
	top: calc(50% - 1px);
	transform: rotate(-45deg);
}

/* Mobile menu (graphite panel under the white bar) */
.mj-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 1;
	padding-top: var(--mj-bar-h);
	background: var(--mj-graphite);
	color: var(--mj-cream);
	opacity: 0;
	transform: translateY(-0.5rem);
	transition: opacity 0.3s, transform 0.3s;
	overflow-y: auto;

	/* Dark surface: buttons invert to cream on hover */
	--mj-btn-hover-bg: var(--mj-cream);
	--mj-btn-hover-fg: var(--mj-graphite);
}

.admin-bar .mj-mobile-menu {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .mj-mobile-menu {
		top: 46px;
	}
}

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

.mj-nav-open .mj-mobile-menu {
	opacity: 1;
	transform: none;
}

.mj-mobile-menu__inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 2.5rem;
	min-height: calc(100svh - var(--mj-bar-h));
	padding-block: 1.5rem 2.5rem;
}

.mj-mobile-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-mobile-menu__list li + li {
	border-top: 1px solid rgba(242, 240, 235, 0.1);
}

.mj-mobile-menu__list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 0;
	color: var(--mj-cream);
	font-family: var(--mj-font-display);
	font-size: clamp(1.5rem, 6.5vw, 2rem);
	font-weight: 800;
	line-height: var(--mj-lh-display);
	text-decoration: none;
}

/* Orange knob (from the logo) marks the current section */
.mj-mobile-menu__list a::after {
	content: '';
	flex: none;
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	background: var(--mj-orange);
	transform: scale(0);
	transition: transform 0.2s;
}

.mj-mobile-menu__list a:hover::after,
.mj-mobile-menu__list a.is-active::after {
	transform: scale(1);
}

.mj-mobile-menu__contact {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.mj-mobile-menu__contact .mj-btn {
	width: 100%;
}

.mj-mobile-menu__hours {
	margin: 0.5rem 0 0;
	color: rgba(242, 240, 235, 0.7);
	font-size: 0.9375rem;
}

html.mj-nav-open {
	overflow: hidden;
}

@media (max-width: 1080px) and (min-width: 961px) {
	.mj-header__inner,
	.mj-header__actions {
		gap: 1.5rem;
	}

	.mj-header__actions {
		padding-left: 1.5rem;
	}
}

@media (max-width: 960px) {
	.mj-nav,
	.mj-header__cta {
		display: none;
	}

	.mj-header__logo img {
		height: 1.875rem;
	}

	.mj-header__toggle {
		display: block;
	}

	.mj-header__call {
		display: inline-flex;
	}

	.mj-header__actions,
	.mj-nav + .mj-header__actions {
		gap: 0.75rem;
		margin-left: auto;
		padding-left: 0;
		border-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mj-header,
	.mj-header__bar,
	.mj-mobile-menu,
	.mj-nav__list a,
	.mj-header__burger span {
		transition: none;
	}
}

/*
 * Cookie banner (inc/integrations.php, assets/js/consent.js): a graphite card bottom right on
 * desktop, across the bottom on phones. Two equal buttons ("Samo neophodni" / "Prihvati sve"):
 * same look and size, so neither choice is pushed.
 */
.mj-consent {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 200;
	width: min(25rem, calc(100vw - 3rem));
	padding: 1.5rem;
	border-top: 3px solid var(--mj-orange);
	border-radius: var(--mj-radius);
	background: var(--mj-graphite);
	box-shadow: 0 24px 60px -12px rgba(22, 24, 29, 0.55);
	color: var(--mj-cream);
	opacity: 0;
	transform: translateY(1rem);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.mj-consent[hidden] {
	display: none;
}

.mj-consent.is-visible {
	opacity: 1;
	transform: none;
}

.mj-consent__title {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
	font-family: var(--mj-font-display);
	font-size: 1.25rem;
	font-weight: 800;
	line-height: var(--mj-lh-display);
}

/* The orange ball from the logo */
.mj-consent__title::before {
	content: '';
	flex: none;
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	background: var(--mj-orange);
}

.mj-consent__text {
	margin: 0.75rem 0 0;
	color: rgba(242, 240, 235, 0.75);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.mj-consent__text a {
	color: var(--mj-cream);
	text-decoration: underline;
	text-decoration-color: var(--mj-orange);
	text-underline-offset: 0.2em;
}

.mj-consent__prefs {
	display: grid;
	gap: 0.5rem;
	margin-top: 1rem;
}

.mj-consent__prefs[hidden] {
	display: none;
}

.mj-consent__opt {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.75rem;
	align-items: start;
	padding: 0.75rem;
	border: 1px solid rgba(242, 240, 235, 0.14);
	border-radius: var(--mj-radius);
	color: rgba(242, 240, 235, 0.7);
	font-size: 0.875rem;
	line-height: 1.45;
	cursor: pointer;
}

.mj-consent__opt strong {
	display: block;
	margin-bottom: 0.125rem;
	color: var(--mj-cream);
	font-weight: 600;
}

.mj-consent__opt input {
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.15rem 0 0;
	accent-color: var(--mj-orange);
}

.mj-consent__opt:has(input:disabled) {
	cursor: default;
}

.mj-consent__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.mj-consent__btn {
	--mj-btn-hover-bg: var(--mj-cream);
	--mj-btn-hover-fg: var(--mj-graphite);
	padding-inline: 0.75rem;
	border-color: rgba(242, 240, 235, 0.45);
	background: transparent;
	color: var(--mj-cream);
}

.mj-consent__btn[hidden] {
	display: none;
}

.mj-consent__more {
	display: block;
	margin: 1rem auto 0;
	padding: 0.25rem 0.5rem;
	border: 0;
	background: none;
	color: rgba(242, 240, 235, 0.65);
	font: inherit;
	font-size: 0.875rem;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

.mj-consent__more:hover {
	color: var(--mj-cream);
}

.mj-consent__more[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.mj-consent {
		right: 0.75rem;
		bottom: 0.75rem;
		width: calc(100vw - 1.5rem);
		padding: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mj-consent {
		transition: none;
	}
}
