/* Scoped menu and search refinement. */
.fh-menu-tools{display:none}
.home-search-input::-webkit-search-cancel-button,.home-search-input::-webkit-search-decoration{display:none;-webkit-appearance:none}
.home-search-panel{border-radius:20px;max-height:calc(100dvh - 154px);display:flex;flex-direction:column}
.home-search-results{min-height:0;flex:1;overscroll-behavior:contain}
.home-search-result:focus-visible,.fh-menu-search:focus-visible,.fh-menu-tabs button:focus-visible{outline:3px solid #6c9bc4;outline-offset:2px}
@media(max-width:768px){
body.fh-menu-open{overflow:hidden}
#nav-menu{top:105px!important;right:8px!important;left:8px!important;width:auto!important;max-height:calc(100dvh - 117px)!important;height:auto!important;border:1px solid #dbe5ee!important;border-radius:18px!important;background:#fff!important;box-shadow:0 20px 55px #102a4630!important;overflow:hidden!important}
#nav-menu.open{display:flex!important;flex-direction:column!important}
#nav-menu .nav-menu-header{display:flex!important;flex-shrink:0;min-height:62px!important;padding:14px 16px!important;background:#fff!important;border-bottom:0!important;box-shadow:none!important}
#nav-menu .nav-menu-title{color:#17334b!important;font-size:18px!important;font-weight:800!important;text-shadow:none!important}
#nav-menu .nav-menu-close{display:flex!important;align-items:center;justify-content:center;width:36px!important;height:36px!important;border:1px solid #dbe5ee!important;border-radius:10px!important;background:#f3f7fa!important;color:#17334b!important;box-shadow:none!important}
#nav-menu .nav-menu-close svg{width:20px;height:20px}
#hamburger-btn.open span{transform:none!important;opacity:1!important}
#nav-menu .fh-menu-tools{display:block;flex-shrink:0;padding:0 14px 12px}
.fh-menu-search{display:flex;align-items:center;gap:10px;width:100%;padding:13px 14px;border:1px solid #cbd9e5;border-radius:12px;background:#f7fafc;color:#52677c;font:inherit;font-size:15px;text-align:left;cursor:pointer}
.fh-menu-search svg{width:20px;height:20px;flex-shrink:0}
.fh-menu-tabs{display:flex;gap:4px;padding:4px;margin-top:12px;border-radius:11px;background:#edf3f7}
.fh-menu-tabs button{flex:1;border:0;border-radius:8px;padding:10px;background:transparent;color:#52677c;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.fh-menu-tabs button[aria-pressed="true"]{background:white;color:#17334b;box-shadow:0 2px 6px #17334b12}
#nav-menu>.dropdown{display:flex!important;flex:1;flex-direction:column;min-height:0;overflow:hidden}
#nav-menu>.dropdown:has(#guides-menu){display:none!important}
#nav-menu.fh-mobile-guides>.dropdown:has(#prisguider-menu){display:none!important}
#nav-menu.fh-mobile-guides>.dropdown:has(#guides-menu){display:flex!important}
#nav-menu>.dropdown>.dropdown-toggle{display:none!important}
#nav-menu .dropdown-menu{position:static!important;display:grid!important;grid-template-columns:1fr!important;visibility:visible!important;opacity:1!important;transform:none!important;overflow-y:auto!important;max-height:calc(100dvh - 303px)!important;min-height:0!important;padding:0 14px 14px!important;gap:5px!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;touch-action:pan-y!important}
#nav-menu .menu-section-label,#nav-menu .dropdown-menu::before,#nav-menu .dropdown-menu::after{display:none!important}
#nav-menu .dropdown-item{min-height:49px!important;padding:12px!important;border:1px solid #e1e9f0!important;border-radius:10px!important;background:#fff!important;color:#17334b!important;box-shadow:none!important;font-size:15px!important;line-height:1.4!important;animation:none!important;opacity:1!important;transform:none!important}
#nav-menu .dropdown-item:hover,#nav-menu .dropdown-item:focus-visible{background:#f1f6fa!important;border-color:#a8bfd2!important}
#nav-menu .dropdown-item svg{color:#52728e!important;background:none!important}
.home-search-panel{top:105px;border-radius:18px;max-height:calc(100dvh - 117px)}
.home-search-result{grid-template-columns:38px minmax(0,1fr);gap:4px 10px}
.home-search-result-icon{grid-row:1/3}
.home-search-result-type{display:inline-flex!important;grid-column:2;justify-self:start;margin-top:3px;font-size:10px;padding:3px 7px;letter-spacing:.02em}
}
@media(max-width:768px){
#nav-menu.open{align-items:stretch!important}
#nav-menu .nav-menu-header,#nav-menu .fh-menu-tools{width:100%!important;box-sizing:border-box!important}
#nav-menu .nav-menu-title{display:block!important;white-space:nowrap!important;grid-template-columns:none!important}
#nav-menu .nav-menu-title::after{display:none!important;content:none!important}
}
.home-search-panel:not(.open){display:none!important}
.home-search-panel.open{visibility:visible!important;opacity:1!important}

/* v118: compact, flush header panel and a single mobile search entry. */
@media(max-width:768px){
html body #home-search-toggle{display:none!important}
html body #nav-menu{position:fixed!important;top:var(--fh-header-bottom,105px)!important;left:0!important;right:0!important;width:100%!important;max-height:calc(100dvh - var(--fh-header-bottom,105px) - 8px)!important;border-radius:0 0 16px 16px!important;border-top:0!important;transform:none!important;transition:none!important;gap:0!important}
html body #nav-menu:not(.open){display:none!important;pointer-events:none!important}
html body #nav-menu .nav-menu-header{min-height:48px!important;padding:8px 14px!important}
html body #nav-menu .nav-menu-title{font-size:17px!important}
html body #nav-menu .fh-menu-tools{padding:0 14px 9px!important}
html body #nav-menu .fh-menu-search{padding:10px 12px!important;font-size:14px!important;min-height:44px}
html body #nav-menu .fh-menu-tabs{margin-top:8px!important;padding:3px!important;gap:3px!important}
html body #nav-menu .fh-menu-tabs button{padding:6px 10px!important;font-size:14px!important;min-height:36px!important;line-height:1.3!important}
html body #nav-menu .dropdown-menu{max-height:calc(100dvh - var(--fh-header-bottom,105px) - 166px)!important;scroll-behavior:auto!important}
html body #nav-menu .dropdown-item{min-height:46px!important;padding:10px 12px!important;transition:none!important}
html body.fh-menu-open{touch-action:pan-y!important}
html body .home-search-panel{top:var(--fh-header-bottom,105px)!important;max-height:calc(100dvh - var(--fh-header-bottom,105px) - 8px)!important}
}
/* v119: keep desktop navigation together at the right side of the header. */
@media(min-width:769px){
html body .nav-container>#nav-menu{margin-left:auto!important;flex:0 0 auto!important}
html body .nav-container>#home-search-toggle{flex:0 0 auto!important;margin-left:12px!important}
}
@media(min-width:769px){
html body .navbar .nav-container{position:relative!important}
html body .navbar #nav-menu,html body .navbar #nav-menu>.dropdown{position:static!important}
html body .navbar #nav-menu .dropdown-menu.mega-menu{left:auto!important;right:32px!important;top:calc(100% + 14px)!important;width:min(730px,calc(100vw - 64px))!important;min-width:0!important;max-width:calc(100vw - 64px)!important;box-sizing:border-box!important}
}

/* v122: a continuous hover target, with a short forgiving exit delay. */
@media(min-width:769px){
html body .navbar #nav-menu>.dropdown.fh-hover-open>.dropdown-menu.mega-menu{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important;transition-delay:0s!important}
html body .navbar #nav-menu>.dropdown.fh-hover-open::before{content:"";position:absolute;top:100%;right:32px;width:min(730px,calc(100vw - 64px));height:15px;background:transparent;z-index:1001}
}
@media(max-width:768px){
html.fh-choice-open{overflow:hidden!important;overscroll-behavior:none!important}
html.fh-choice-open body{position:fixed!important;top:var(--fh-locked-scroll)!important;left:0!important;right:0!important;width:100%!important;overflow:hidden!important}
html.fh-choice-open :is(#cta-modal-boks,.kloak-modal,.sticky-valg-modal,.tilbygning-valg-modal,.projekt-modal){overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch}
}
@media(min-width:769px){
html body .navbar #nav-menu>.dropdown.fh-hover-open::after{content:"";position:absolute;left:var(--fh-bridge-left);top:var(--fh-bridge-top);width:var(--fh-bridge-width);height:var(--fh-bridge-height);background:transparent;z-index:1001;pointer-events:auto}
}

/* v124: desktop opens immediately on hover, independently of click or JS. */
@media(min-width:769px){
html body .navbar #nav-menu>.dropdown:hover>.dropdown-menu.mega-menu{
 display:grid!important;opacity:1!important;visibility:visible!important;
 pointer-events:auto!important;transform:none!important;transition:none!important;
}
html body .navbar #nav-menu>.dropdown>.dropdown-toggle{position:relative!important}
html body .navbar #nav-menu>.dropdown:hover>.dropdown-toggle::before{
 content:"";position:absolute;top:100%;left:0;width:100%;height:48px;
 background:transparent;pointer-events:auto;z-index:1002;
}
html body .navbar #nav-menu>.dropdown:hover::before{
 content:"";position:absolute;top:100%;right:32px;
 width:min(730px,calc(100vw - 64px));height:15px;
 background:transparent;pointer-events:auto;z-index:1001;
}
}
