/* Updated: 2026-10-15 12:14 (Europe/Zurich) */

/* Header and navigation for norbertapter.ch (replaces Divi's main header) */

:root {
	--na-navy: #003388;
	--na-blue: #2953a1;
	--na-mist: #d3dcec;
	--na-paper: #ffffff;
	--na-wash: #f4f6fb;
	--na-ink: #23314f;
	--na-muted: #5b6784;
	--na-line: #dde3ef;
	--na-shadow: 0 14px 34px rgba(0, 35, 100, .14), 0 2px 6px rgba(0, 35, 100, .08);
	--na-ease: cubic-bezier(.2, .7, .2, 1);
	--na-font: "Open Sans", Arial, sans-serif;       /* site body font, as the original Divi menu */
	--na-display: Aclonica, Helvetica, Arial, Lucida, sans-serif; /* site heading font */
	--na-h: 84px;
	--na-h-compact: 62px;
	--na-top: 0px;
}
body.admin-bar { --na-top: var(--wp-admin--admin-bar--height, 32px); }

/* Space for the fixed header; overrides Divi's inline padding */
body.na-has-header #page-container { padding-top: var(--na-h) !important; }

.na-header, .na-panel { font-family: var(--na-font); }
.na-header *, .na-panel * { box-sizing: border-box; }
.na-header ul, .na-header ol, .na-panel ul, .na-panel ol { list-style: none; margin: 0; padding: 0; line-height: inherit; }
.na-header p, .na-panel p { padding: 0; }

/* ---------- Header bar ---------- */
.na-header { position: fixed; top: var(--na-top); left: 0; right: 0; z-index: 9990; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: box-shadow .3s var(--na-ease), border-color .3s var(--na-ease); }
.na-header.is-compact { box-shadow: 0 6px 18px rgba(0, 35, 100, .08); border-bottom-color: var(--na-line); }
.na-header__inner { position: relative; max-width: 1280px; margin: 0 auto; height: var(--na-h); display: flex; align-items: center; gap: 18px; padding: 0 24px; transition: height .3s var(--na-ease); }
.na-header.is-compact .na-header__inner { height: var(--na-h-compact); }

.na-logo { display: block; flex: none; line-height: 0; border-radius: 6px; }
.na-logo img { height: 56px; width: auto; max-width: none; transition: height .3s var(--na-ease); }
.na-header.is-compact .na-logo img { height: 42px; }
.na-logo:focus-visible { outline: 2px solid var(--na-navy); outline-offset: 4px; }

/* ---------- Desktop menu ---------- */
.na-nav { flex: 1; min-width: 0; }
.na-nav__list { display: flex; justify-content: center; gap: 2px; }
.na-top { display: flex; align-items: center; }
.na-top__btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; color: var(--na-navy); font: 600 15px/1 var(--na-font); padding: 11px; border-radius: 9px; position: relative; white-space: nowrap; text-decoration: none; }
.na-top__btn::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--na-blue); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--na-ease); }
.na-top:hover .na-top__btn::after, .na-top__btn:focus-visible::after, .na-top__btn[aria-expanded="true"]::after, .na-top__btn.is-active::after { transform: scaleX(1); }
.na-top__btn.is-active { color: var(--na-blue); }
.na-top__btn:focus-visible { outline: 2px solid var(--na-blue); outline-offset: 1px; }
.na-top__btn svg { transition: transform .25s var(--na-ease); }
.na-top__btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Panels open under the whole header so wide ones never overflow */
.na-drop { position: absolute; top: calc(100% - 6px); left: 50%; width: min(820px, calc(100% - 32px)); transform: translate(-50%, -6px); background: var(--na-paper); border: 1px solid var(--na-line); border-radius: 18px; box-shadow: var(--na-shadow); padding: 18px; opacity: 0; visibility: hidden; transition: opacity .2s var(--na-ease), transform .2s var(--na-ease), visibility 0s .2s; }
.na-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.na-top.is-open .na-drop { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s var(--na-ease), transform .2s var(--na-ease), visibility 0s; }
.na-drop__head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; padding: 0 4px 12px; margin-bottom: 12px; border-bottom: 1px solid var(--na-line); }
.na-drop__head strong { font-family: var(--na-display); font-weight: 400; color: var(--na-blue); font-size: 22px; line-height: 1.2; letter-spacing: .02em; }
.na-headlink { font-size: 14px; font-weight: 700; color: var(--na-navy); text-decoration: none; }
.na-headlink:hover, .na-headlink:focus-visible { color: var(--na-blue); text-decoration: underline; outline: none; }
.na-legend { margin: -4px 0 8px; padding: 0 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; color: var(--na-muted); }

/* Simple dropdowns (no mega panel): open under their own item, aligned left */
.na-top--simple { position: relative; }
.na-drop--simple { left: 0; width: max-content; min-width: 260px; max-width: 360px; padding: 12px; border-radius: 18px; transform: translate(var(--na-shift, 0px), -6px); }
.na-top.is-open .na-drop--simple { transform: translate(var(--na-shift, 0px), 0); }

/* Situation → solution cards */
.na-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.na-pair { display: grid; gap: 6px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--na-line); background: var(--na-paper); text-decoration: none; transition: border-color .2s var(--na-ease), background .2s var(--na-ease), transform .2s var(--na-ease); }
.na-pair:hover, .na-pair:focus-visible { border-color: var(--na-blue); background: var(--na-wash); outline: none; transform: translateY(-1px); }
.na-pair__q { display: flex; gap: 8px; align-items: flex-start; color: var(--na-muted); font-size: 14px; font-weight: 600; line-height: 1.4; }
.na-pair__q::before { content: "?"; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--na-mist); color: var(--na-navy); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.na-pair__a { display: flex; gap: 8px; align-items: center; color: var(--na-navy); font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.na-pair__a svg { flex: none; color: var(--na-blue); transition: transform .2s var(--na-ease); }
.na-pair:hover .na-pair__a svg, .na-pair:focus-visible .na-pair__a svg { transform: translateX(3px); }

/* Steps (a real sequence), benefits and plain lists */
.na-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: na-step; }
.na-steps a { display: block; background: var(--na-paper); transition: border-color .2s var(--na-ease), background .2s var(--na-ease), transform .2s var(--na-ease); height: 100%; padding: 14px 16px 16px; border-radius: 14px; border: 1px solid var(--na-line); color: var(--na-navy); font-weight: 600; text-decoration: none; line-height: 1.35; }
.na-steps a::before { counter-increment: na-step; content: counter(na-step); display: block; width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%; background: var(--na-mist); color: var(--na-navy); font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.na-benefits { display: grid; gap: 8px; }
.na-benefits a { transition: border-color .2s var(--na-ease), background .2s var(--na-ease), transform .2s var(--na-ease); display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-radius: 14px; color: var(--na-navy); font-weight: 600; text-decoration: none; border: 1px solid var(--na-line); background: var(--na-paper); }
.na-benefits a::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--na-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' stroke='%23003388' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.na-list { display: grid; gap: 8px; }
.na-list a { transition: border-color .2s var(--na-ease), background .2s var(--na-ease), transform .2s var(--na-ease); display: block; padding: 13px 16px; border-radius: 14px; color: var(--na-navy); font-weight: 600; text-decoration: none; border: 1px solid var(--na-line); background: var(--na-paper); }
.na-list__sub { margin-left: 18px; }
.na-list__sub a { position: relative; padding-left: 30px; font-weight: 400; color: var(--na-ink); }
.na-list__sub a::before { content: ""; position: absolute; left: 16px; top: 50%; width: 8px; height: 2px; background: var(--na-mist); }
.na-steps a:hover, .na-steps a:focus-visible, .na-benefits a:hover, .na-benefits a:focus-visible, .na-list a:hover, .na-list a:focus-visible { background: var(--na-wash); border-color: var(--na-blue); color: var(--na-blue); outline: none; transform: translateY(-1px); }

/* ---------- Language switch ---------- */
.na-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.na-lang { display: inline-flex; border: 1px solid var(--na-line); border-radius: 999px; padding: 3px; background: var(--na-paper); }
.na-lang a { font: 800 12px/1 var(--na-font); letter-spacing: .08em; color: var(--na-muted); padding: 8px 11px; border-radius: 999px; text-decoration: none; }
.na-lang a[aria-current="true"] { background: var(--na-blue); color: var(--na-paper); }
.na-lang a:not([aria-current="true"]):hover { color: var(--na-navy); background: var(--na-wash); }
.na-lang a:focus-visible { outline: 2px solid var(--na-navy); outline-offset: 1px; }

/* ---------- Mobile ---------- */
.na-burger { display: none; width: 46px; height: 46px; padding: 0; border: 1px solid var(--na-line); background: var(--na-paper); border-radius: 12px; cursor: pointer; place-items: center; color: var(--na-navy); }
.na-burger:focus-visible { outline: 2px solid var(--na-blue); outline-offset: 2px; }
.na-burger__lines { width: 20px; height: 14px; position: relative; display: block; }
.na-burger__lines i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; }
.na-burger__lines i:nth-child(1) { top: 0; } .na-burger__lines i:nth-child(2) { top: 6px; } .na-burger__lines i:nth-child(3) { top: 12px; }

.na-scrim { position: fixed; inset: 0; z-index: 99998; background: rgba(0, 25, 70, .35); opacity: 0; visibility: hidden; transition: opacity .3s var(--na-ease), visibility 0s .3s; }
.na-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999; width: min(92vw, 400px); background: var(--na-paper); display: flex; flex-direction: column; box-shadow: -12px 0 30px rgba(0, 35, 100, .15); transform: translateX(100%); visibility: hidden; transition: transform .38s var(--na-ease), visibility 0s .38s; }
html.na-menu-open .na-scrim { opacity: 1; visibility: visible; transition: opacity .3s var(--na-ease), visibility 0s; }
html.na-menu-open .na-panel { transform: none; visibility: visible; transition: transform .38s var(--na-ease), visibility 0s; }
html.na-menu-open, html.na-menu-open body { overflow: hidden; }
.na-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--na-line); }
.na-panel__head .na-logo img { height: 40px; }
.na-panel__close { width: 46px; height: 46px; padding: 0; border: 1px solid var(--na-line); background: var(--na-paper); border-radius: 12px; cursor: pointer; color: var(--na-navy); display: grid; place-items: center; }
.na-panel__close:focus-visible { outline: 2px solid var(--na-blue); outline-offset: 2px; }
.na-panel__nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 16px; }
.na-acc__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: none; cursor: pointer; padding: 15px 12px; font: 600 17px/1.25 var(--na-font); color: var(--na-navy); border-radius: 12px; text-align: left; text-decoration: none; }
.na-acc__btn.is-active { color: var(--na-blue); background: var(--na-wash); }
.na-acc__btn:focus-visible { outline: 2px solid var(--na-blue); outline-offset: -2px; }
.na-acc__btn svg { flex: none; transition: transform .25s var(--na-ease); }
.na-acc__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.na-acc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--na-ease); }
.na-acc.is-open { grid-template-rows: 1fr; }
.na-acc > div { overflow: hidden; }
.na-acc__inner { display: grid; gap: 8px; padding: 4px 4px 14px; }
.na-acc__inner .na-headlink { color: var(--na-blue); padding: 4px 10px; }
.na-panel .na-pairs, .na-panel .na-steps { grid-template-columns: 1fr; }
.na-panel__foot { display: flex; justify-content: center; padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--na-line); }

@media (max-width: 1180px) {
	.na-top__btn { padding: 11px 8px; font-size: 14px; }
	.na-top__btn::after { left: 8px; right: 8px; }
	.na-header__inner { gap: 10px; padding: 0 18px; }
	.na-logo img { height: 48px; }
}
@media (max-width: 1060px) {
	:root { --na-h: 68px; --na-h-compact: 58px; }
	.na-nav, .na-actions .na-lang { display: none; }
	.na-burger { display: grid; }
	.na-header__inner { justify-content: space-between; padding: 0 14px; }
	.na-logo img { height: 44px; }
	.na-header.is-compact .na-logo img { height: 38px; }
}
/* WordPress admin bar scrolls away below 600px */
@media (max-width: 600px) {
	body.admin-bar { --na-top: 0px; }
}

@media (prefers-reduced-motion: reduce) {
	.na-header *, .na-header, .na-panel, .na-panel *, .na-scrim { transition-duration: .01ms !important; }
}
