/* ------------------------------------------------------------
   2. GLOBAL HEADER — Neo-Brutalist paper bar
   ------------------------------------------------------------ */
body .site-header.ord-header {
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	z-index: 900;
	background: var(--ord-paper);
	border-bottom: 2.5px solid var(--ord-ink);
	box-shadow: 0 5px 0 0 var(--ord-ink);
	/* Fully opaque, so no blur is needed — and none is wanted: a blurred sticky
	   bar is re-computed on every scroll frame. A single unprefixed declaration
	   is used because the minifier collapses the prefixed/unprefixed pair down
	   to the prefixed one, which nothing then honours. */
	backdrop-filter: none;
	transition: box-shadow 0.25s ease;
}

body .site-header.ord-header::after {
	display: none;
}

body .site-header.ord-header.scrolled {
	background: var(--ord-paper);
	box-shadow: 0 8px 0 0 var(--ord-ink);
}

.ord-header-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 74px;
}

.ord-logo {
	font-family: var(--ord-font-heading);
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--ord-ink);
	display: inline-flex;
	align-items: center;
	gap: 2px;
	text-decoration: none;
}

.ord-logo:hover {
	color: var(--ord-ink);
}

.ord-logo-accent {
	color: var(--ord-mint);
}

/* On light surfaces the signature mint (#ffd21e ≈ 1.9:1) is too faint for a
   brand wordmark — use the deeper mint for the header + drawer logos. The
   footer logo (dark bg) keeps the bright mint. */
.ord-header .ord-logo-accent,
.ord-drawer-head .ord-logo-accent {
	color: var(--ord-mint-deep);
}

.ord-logo-badge {
	display: inline-block;
	margin-left: 8px;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: var(--ord-ink);
	color: var(--ord-paper);
	border: 2px solid var(--ord-ink);
	border-radius: var(--ord-pill);
	padding: 3px 9px;
	transform: translateY(-1px);
}

.ord-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* "Mode Bisnes" dropdown — homepage ad-link variants (slide panel) */
.ord-mode-field {
	display: block;
	width: 100%;
	padding: 10px 36px 10px 13px;
	border: 2px solid var(--ord-ink);
	border-radius: 14px;
	background-color: var(--ord-paper);
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23241046' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	font-family: var(--ord-font-body);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ord-ink);
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.ord-mode-field:hover {
	background-color: var(--ord-mist);
}

.ord-mode-field:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--ord-mint);
}

/* Primary nav (desktop) */
.ord-nav ul {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ord-nav ul li {
	margin: 0;
}

.ord-nav ul li a {
	display: inline-block;
	padding: 8px 14px;
	font-family: var(--ord-font-body);
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ord-ink-soft);
	border: 2px solid transparent;
	border-radius: var(--ord-pill);
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ord-nav ul li a:hover,
.ord-nav ul li.current-menu-item > a,
.ord-nav ul li.current_page_item > a {
	color: var(--ord-ink);
	border-color: var(--ord-ink);
	background: var(--ord-mist);
	transform: translateY(-1px);
}

/* main.css styles the WP nav via the `#primary-menu` ID (1,1,1), which beats
   `.ord-nav ul li a` (0,1,3) — its light-gray `--color-text-secondary` was
   making the nav links invisible on the white paper header. Override with the
   ID included (1,2,1) and strip the old orange underline/hover. */
.ord-nav #primary-menu {
	display: flex;
	align-items: center;
	gap: 2px;
}

.ord-nav #primary-menu .menu-item > a {
	display: inline-block;
	padding: 8px 14px;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ord-ink-soft);
	background: transparent;
	border: 2px solid transparent;
	border-radius: var(--ord-pill);
}

.ord-nav #primary-menu .menu-item > a::after {
	display: none;
}

.ord-nav #primary-menu .menu-item > a:hover,
.ord-nav #primary-menu .menu-item.current-menu-item > a,
.ord-nav #primary-menu .menu-item.current_page_item > a {
	color: var(--ord-ink);
	background: var(--ord-mist);
	border-color: var(--ord-ink);
	transform: translateY(-1px);
}

/* Burger */
.ord-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: var(--ord-paper);
	border: 2.5px solid var(--ord-ink);
	border-radius: 12px;
	box-shadow: 4px 4px 0 0 var(--ord-ink);
	cursor: pointer;
	padding: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ord-burger span {
	display: block;
	width: 18px;
	height: 2.5px;
	background: var(--ord-ink);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.ord-burger:hover {
	transform: translate(-1px, -1px);
	box-shadow: 6px 6px 0 0 var(--ord-ink);
}

.ord-burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7.5px) rotate(45deg);
}

.ord-burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.ord-burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7.5px) rotate(-45deg);
}

/* Header menu longer than the allowed maximum (see
   binaweb_header_menu_max_items()): the desktop nav is replaced by the
   mobile-style slide panel, so the burger stays visible at every width. */
.ord-header--nav-overflow .ord-nav { display: none; }
.ord-header--nav-overflow .ord-burger { display: inline-flex; }

/* The Global / Personalized toggle lives in the slide panel, so on the home
   page it needs a way in at every width — the burger is otherwise hidden
   above 1024px when the desktop nav fits. */
.ord-header--scope .ord-burger { display: inline-flex; }

/* ------------------------------------------------------------
   SLIDE PANEL (drawer) — paper panel, purple/white/yellow system
   Full-height, scrollable, sticky header, pill nav rows.
   ------------------------------------------------------------ */
body.menu-open,
html.menu-open {
	overflow: hidden;
}

.ord-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 940;
	background: rgba(36, 16, 70, 0.52);
	-webkit-backdrop-filter: blur(5px) saturate(1.05);
	backdrop-filter: blur(5px) saturate(1.05);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.32s ease, visibility 0.32s ease;
}

.ord-drawer-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

.ord-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 950;
	width: min(392px, 92vw);
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: var(--ord-paper);
	background-image:
		radial-gradient(115% 52% at 100% 0%, rgba(109, 40, 217, 0.13) 0%, rgba(109, 40, 217, 0) 64%),
		linear-gradient(180deg, #fbf9ff 0%, #ffffff 54%);
	border-left: 2.5px solid var(--ord-ink);
	border-radius: 24px 0 0 24px;
	box-shadow: -9px 9px 0 0 var(--ord-ink), -28px 0 64px -22px rgba(36, 16, 70, 0.55);
	transform: translateX(105%);
	visibility: hidden;
	transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.42s;
	padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(36, 16, 70, 0.22) transparent;
}

.ord-drawer.is-open {
	transform: translateX(0);
	visibility: visible;
}

.ord-drawer::-webkit-scrollbar {
	width: 8px;
}

.ord-drawer::-webkit-scrollbar-track {
	background: transparent;
}

.ord-drawer::-webkit-scrollbar-thumb {
	background: rgba(36, 16, 70, 0.2);
	border-radius: var(--ord-pill);
}

.ord-drawer::-webkit-scrollbar-thumb:hover {
	background: rgba(36, 16, 70, 0.34);
}

/* Sticky glass header so the logo/close stay reachable while scrolling. */
.ord-drawer-head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 16px 16px 22px;
	background: linear-gradient(180deg, #fbf9ff 0%, #ffffff 100%);
	border-bottom: 1.5px solid rgba(36, 16, 70, 0.1);
	box-shadow: 0 12px 20px -22px rgba(36, 16, 70, 0.9);
}

.ord-drawer-close {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0 2px;
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1;
	background: var(--ord-paper);
	color: var(--ord-ink);
	border: 2px solid var(--ord-ink);
	border-radius: 12px;
	box-shadow: 3px 3px 0 0 var(--ord-ink);
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ord-drawer-close:hover {
	background: var(--ord-mist);
	transform: translate(-1px, -1px);
	box-shadow: 4px 4px 0 0 var(--ord-ink);
}

.ord-drawer-close:active {
	transform: translate(1px, 1px);
	box-shadow: 1px 1px 0 0 var(--ord-ink);
}

.ord-drawer-close:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--ord-mint);
}

/* Account card */
.ord-drawer-user {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 14px 18px 0;
	padding: 12px 14px;
	background: linear-gradient(135deg, #f8f5ff 0%, #ffffff 78%);
	border: 2px solid rgba(36, 16, 70, 0.14);
	border-radius: 18px;
	box-shadow: 0 16px 32px -28px rgba(36, 16, 70, 0.95);
}

.ord-drawer-avatar {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	font-weight: 700;
	background: linear-gradient(140deg, var(--ord-violet) 0%, var(--ord-violet-deep) 100%);
	color: #ffffff;
	border: 2px solid var(--ord-ink);
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(255, 210, 30, 0.55);
	overflow: hidden;
}

.ord-drawer-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.ord-drawer-avatar-icon {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ord-drawer-user-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ord-drawer-user-name {
	font-family: var(--ord-font-heading);
	font-size: 0.98rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ord-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ord-drawer-user-role {
	margin-top: 2px;
	font-size: 0.75rem;
	line-height: 1.35;
	color: var(--ord-ink-soft);
}

/* "Mode Bisnes" dropdown inside the slide panel — front page only. */
.ord-drawer-scope {
	margin: 12px 18px 0;
	padding: 12px 13px 10px;
	background: rgba(248, 245, 255, 0.8);
	border: 1.5px solid rgba(109, 40, 217, 0.16);
	border-radius: 16px;
}

.ord-drawer-scope-label {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 9px;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ord-violet-deep);
}

.ord-drawer-scope-label::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ord-mint);
	box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.22);
}

.ord-drawer-scope .ord-mode-field {
	padding: 10px 34px 10px 12px;
	border-radius: 12px;
	box-shadow: 2px 2px 0 0 rgba(36, 16, 70, 0.12);
}

.ord-drawer-scope-hint {
	margin: 9px 0 0;
	font-size: 0.72rem;
	line-height: 1.45;
	color: var(--ord-ink-soft);
}

/* Section label above the nav */
.ord-drawer-section-label {
	display: block;
	margin: 16px 24px 6px;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ord-ink-soft);
}

.ord-drawer-nav {
	margin: 0 12px;
	padding: 0;
}

.ord-drawer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ord-drawer-nav ul li {
	position: relative;
	margin: 2px 0;
	border: 0;
}

.ord-drawer-nav ul li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 14px;
	font-family: var(--ord-font-body);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ord-ink);
	text-decoration: none;
	border: 1.5px solid transparent;
	border-radius: 12px;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, padding 0.16s ease;
}

.ord-drawer-nav ul li a::after {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin-right: 2px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	opacity: 0;
	transition: opacity 0.16s ease, transform 0.16s ease;
}

.ord-drawer-nav ul li a:hover,
.ord-drawer-nav ul li a:focus-visible {
	outline: none;
	background: var(--ord-mist);
	border-color: rgba(109, 40, 217, 0.2);
	color: var(--ord-violet-deep);
}

.ord-drawer-nav ul li a:hover::after,
.ord-drawer-nav ul li a:focus-visible::after {
	opacity: 0.65;
	transform: rotate(45deg) translate(1px, -1px);
}

.ord-drawer-nav ul li.current-menu-item > a,
.ord-drawer-nav ul li.current_page_item > a,
.ord-drawer-nav ul li.current-menu-ancestor > a {
	padding-left: 18px;
	background: linear-gradient(90deg, rgba(109, 40, 217, 0.1) 0%, rgba(255, 210, 30, 0.24) 100%);
	border-color: rgba(109, 40, 217, 0.24);
	color: var(--ord-violet-deep);
	font-weight: 700;
}

.ord-drawer-nav ul li.current-menu-item > a::before,
.ord-drawer-nav ul li.current_page_item > a::before,
.ord-drawer-nav ul li.current-menu-ancestor > a::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 50%;
	width: 3px;
	height: 18px;
	margin-top: -9px;
	border-radius: var(--ord-pill);
	background: var(--ord-violet);
}

/* Sub items (menus created with nested entries) */
.ord-drawer-nav .sub-menu {
	margin: 2px 0 6px 12px;
	padding: 0 0 0 10px;
	border-left: 1.5px dashed rgba(36, 16, 70, 0.2);
}

.ord-drawer-nav .sub-menu li a {
	padding: 9px 12px;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--ord-ink-soft);
}

/* Footer buttons */
.ord-drawer-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 9px;
	margin: 16px 18px 0;
}

.ord-drawer-actions .ord-btn {
	width: 100%;
	padding: 13px 20px;
	font-size: 0.92rem;
	box-shadow: 4px 4px 0 0 var(--ord-ink);
}

.ord-drawer-actions .ord-btn:hover {
	box-shadow: 6px 6px 0 0 var(--ord-ink);
}

.ord-drawer-actions .ord-btn:active {
	box-shadow: 1px 1px 0 0 var(--ord-ink);
}

/* Social / copyright */
.ord-drawer-foot {
	margin: auto 18px 0;
	padding-top: 14px;
	border-top: 1.5px solid rgba(36, 16, 70, 0.1);
	font-size: 0.76rem;
	line-height: 1.6;
	color: var(--ord-ink-soft);
	text-align: center;
}

/* main.css's global `a { color:#ffd21e }` (orange) leaks onto this plain
   link; pin it to the v4 palette instead. */
.ord-drawer-foot a {
	color: var(--ord-violet-deep);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.16s ease;
}

.ord-drawer-foot a:hover,
.ord-drawer-foot a:focus-visible {
	color: var(--ord-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Staggered entrance for the panel's blocks */
.ord-drawer > *:not(.ord-drawer-head) {
	opacity: 0;
	transform: translateX(18px);
	transition: opacity 0.34s ease, transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.ord-drawer.is-open > *:not(.ord-drawer-head) {
	opacity: 1;
	transform: translateX(0);
}

.ord-drawer.is-open > *:nth-child(2) { transition-delay: 0.05s; }
.ord-drawer.is-open > *:nth-child(3) { transition-delay: 0.09s; }
.ord-drawer.is-open > *:nth-child(4) { transition-delay: 0.13s; }
.ord-drawer.is-open > *:nth-child(5) { transition-delay: 0.17s; }
.ord-drawer.is-open > *:nth-child(6) { transition-delay: 0.21s; }
.ord-drawer.is-open > *:nth-child(7) { transition-delay: 0.25s; }

@media (max-width: 640px) {
	.ord-drawer {
		width: min(420px, 92vw);
		border-radius: 20px 0 0 20px;
		box-shadow: -7px 7px 0 0 var(--ord-ink), -22px 0 52px -24px rgba(36, 16, 70, 0.5);
		padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	}

	.ord-drawer-head {
		padding: 14px 14px 13px 18px;
	}

	.ord-drawer-user {
		margin: 14px 14px 0;
		padding: 12px;
		gap: 11px;
	}

	.ord-drawer-avatar {
		width: 44px;
		height: 44px;
		flex: 0 0 44px;
	}

	.ord-drawer-scope {
		margin: 12px 14px 0;
	}

	.ord-drawer-section-label {
		margin: 18px 20px 6px;
	}

	.ord-drawer-nav {
		margin: 0 8px;
	}

	.ord-drawer-nav ul li a {
		padding: 11px 12px;
		font-size: 0.94rem;
	}

	.ord-drawer-actions {
		margin: 16px 14px 0;
	}

	.ord-drawer-foot {
		margin: auto 14px 0;
	}
}

/* Phones: the panel takes the full screen — no floating card edges. */
@media (max-width: 380px) {
	.ord-drawer {
		width: 100%;
		border-left: 0;
		border-radius: 0;
		box-shadow: none;
	}
}

/* Short viewports (landscape phones): trim the vertical rhythm. */
@media (max-height: 620px) {
	.ord-drawer-head {
		padding-top: 12px;
		padding-bottom: 11px;
	}

	.ord-drawer-user {
		margin-top: 12px;
		padding: 10px 12px;
	}

	.ord-drawer-scope {
		margin-top: 10px;
		padding: 11px 12px 9px;
	}

	.ord-drawer-section-label {
		margin-top: 14px;
	}

	.ord-drawer-nav ul li a {
		padding: 10px 12px;
	}

	.ord-drawer-actions {
		margin-top: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ord-drawer,
	.ord-drawer-backdrop,
	.ord-drawer-close {
		transition-duration: 0.01ms;
	}

	.ord-drawer > *:not(.ord-drawer-head),
	.ord-drawer-nav ul li a,
	.ord-drawer-nav ul li a::after {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
