/* =========================================================
   JMV & EFTERÅRSHIKE – NAVBAR
   RWD: 320px → 1920px+
========================================================= */

:root{
  --fdf-primary:#5F8CB4;--fdf-secondary:#003255;
  --fdf-orange:#FF733C;--fdf-red:#D22832;
  --fdf-white:#fff;--fdf-black:#000;--fdf-light:#f5f8fb;
  --fdf-border:rgba(255,255,255,.15);
  --fdf-shadow:0 6px 20px rgba(0,0,0,.12);
  --navbar-height:80px;
}

/* =========================================================
   RESET
========================================================= */

.site-header *,.site-header *::before,.site-header *::after{box-sizing:border-box}
.site-header ul{margin:0;padding:0;list-style:none}
.site-header a{text-decoration:none}

/* =========================================================
   HEADER
========================================================= */

.site-header{
  position:relative;z-index:1000;width:100%;
  background:var(--fdf-white);color:var(--fdf-secondary);
  box-shadow:var(--fdf-shadow);
}

.header-inner{
  width:min(1440px,100%);min-height:var(--navbar-height);
  margin:auto;padding:0 24px;display:flex;align-items:center;
  justify-content:space-between;gap:25px;
}

/* =========================================================
   BRAND
========================================================= */

.brand{
  display:flex;align-items:center;flex-shrink:0;
  color:var(--fdf-primary);transition:.3s ease;
}

.brand-title{
  font-size:clamp(18px,2vw,30px);font-weight:700;
  line-height:1.1;white-space:nowrap;color:inherit;
}

.brand:hover{transform:scale(1.06) rotate(-3deg);color:var(--fdf-orange)}

.brand:focus-visible,
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.menu-open:focus-visible,
.menu-close:focus-visible{
  outline:2px solid var(--fdf-orange);
  outline-offset:3px;border-radius:6px;
}

/* =========================================================
   DESKTOP NAV
========================================================= */

.desktop-nav{display:flex;align-items:center;margin-left:auto}

.nav-list{
  display:flex;align-items:center;justify-content:flex-end;gap:3px;
}

.nav-item{position:relative}

.nav-link,.dropdown-toggle{
  position:relative;display:inline-flex;align-items:center;
  justify-content:center;gap:7px;min-height:44px;padding:9px 12px;
  border:0;border-radius:7px;background:transparent;
  color:var(--fdf-primary);white-space:nowrap;
  cursor:pointer;transition:.2s ease;
}

.nav-link:hover,.dropdown-toggle:hover,
.nav-link:focus-visible,.dropdown-toggle:focus-visible{
  color:var(--fdf-orange);
}

.nav-link span {
  color:var(--fdf-primary);
}

/* =========================================================
   ACTIVE
========================================================= */

.nav-link.active,
.nav-item.has-dropdown:has(.dropdown-menu a.active)>.dropdown-toggle{
  color:var(--fdf-orange);font-weight:700;
}

.nav-link.active::after,
.nav-item.has-dropdown:has(.dropdown-menu a.active)>.dropdown-toggle::after{
  content:"";position:absolute;left:12px;right:12px;bottom:3px;
  height:2px;border-radius:99px;background:var(--fdf-orange);
}

/* =========================================================
   DROPDOWN
========================================================= */

.dropdown-arrow{
  font-size:9px;transition:.2s ease;
}

.nav-item:hover .dropdown-arrow,
.nav-item:focus-within .dropdown-arrow,
.nav-item.is-open .dropdown-arrow{
  transform:rotate(180deg);color:var(--fdf-orange);
}

.dropdown-menu{
  position:absolute;top:calc(100% + 8px);left:50%;
  min-width:245px;padding:8px 0;
  background:var(--fdf-secondary);
  border:1px solid rgba(255,255,255,.1);
  border-top:3px solid var(--fdf-orange);
  border-radius:9px;box-shadow:0 12px 30px rgba(0,0,0,.2);
  opacity:0;visibility:hidden;pointer-events:none;
  transform:translate(-50%,-8px);transition:.2s ease;z-index:6000;
}

.nav-item:hover>.dropdown-menu,
.nav-item:focus-within>.dropdown-menu,
.nav-item.is-open>.dropdown-menu{
  opacity:1;visibility:visible;pointer-events:auto;
  transform:translate(-50%,0);
}

.nav-item.has-dropdown::after{
  content:"";position:absolute;left:0;right:0;bottom:-8px;height:10px;
}

.dropdown-menu a{
  display:flex;align-items:center;min-height:38px;padding:8px 17px;
  color:var(--fdf-white);font-size:15px;line-height:1.4;
  white-space:nowrap;transition:.2s ease;
}

.dropdown-menu a:hover,.dropdown-menu a:focus-visible{
  color:var(--fdf-orange);
  background:rgba(255,115,60,.1);padding-left:21px;
}

.dropdown-menu a.active{
  color:var(--fdf-orange);
  background:rgba(255,115,60,.08);font-weight:700;
}

.dropdown-menu-header{
  padding:8px 17px 4px;color:var(--fdf-primary);
  font-size:12px;font-weight:700;text-transform:uppercase;
  letter-spacing:.06em;
}

/* =========================================================
   LOGIN / KONTAKT
========================================================= */

.nav-login{gap:7px;margin-left:4px}
.nav-login i{font-size:16px}
.nav-login:hover{color:var(--fdf-orange)}

.nav-contact{
  margin-left:4px;padding:8px 15px;
  border:2px solid var(--fdf-primary);border-radius:99px;
}

.nav-contact:hover{
  color:var(--fdf-white);background:var(--fdf-orange);
  border-color:var(--fdf-orange);
}

/* =========================================================
   HAMBURGER
========================================================= */

.menu-open{
  display:none;position:relative;width:46px;height:46px;
  padding:0;border:0;border-radius:8px;background:transparent;
  cursor:pointer;
}

.menu-open span{
  position:absolute;left:11px;width:24px;height:3px;
  border-radius:99px;background:var(--fdf-secondary);
  transition:.2s ease;
}

.menu-open span:nth-child(1){top:14px}
.menu-open span:nth-child(2){top:21px}
.menu-open span:nth-child(3){top:28px}
.menu-open:hover span{background:var(--fdf-orange)}

/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu{
  position:fixed;inset:0;width:100%;height:100dvh;
  overflow-y:auto;background:var(--fdf-secondary);
  color:var(--fdf-white);z-index:2000;
}

.mobile-menu[hidden]{display:none}

.mobile-menu-header{
  min-height:var(--navbar-height);padding:0 20px;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--fdf-border);
}

.mobile-menu-title{
  color:var(--fdf-white);font-size:20px;font-weight:700;
}

/* =========================================================
   LUK MENU
========================================================= */

.menu-close{
  position:relative;width:44px;height:44px;
  border:0;background:transparent;cursor:pointer;
}

.menu-close span{
  position:absolute;left:10px;top:20px;width:24px;height:3px;
  border-radius:99px;background:var(--fdf-white);
}

.menu-close span:first-child{transform:rotate(45deg)}
.menu-close span:last-child{transform:rotate(-45deg)}
.menu-close:hover span{background:var(--fdf-orange)}

/* =========================================================
   MOBILE NAV
========================================================= */

.mobile-nav{
  display:grid;padding:15px 18px 35px;
}

.mobile-nav-item,.mobile-direct{
  border-bottom:1px solid var(--fdf-border);
}

.mobile-nav-link{
  width:100%;min-height:52px;padding:10px 20px;
  display:flex;align-items:center;justify-content:space-between;
  border:0;background:transparent;color:var(--fdf-white);
  font-size:16px;font-weight:600;text-align:left;
  cursor:pointer;transition:.2s ease;
}

/* Span følger linkets farve */
.mobile-nav-link span{
  color:var(--fdf-white);font-size:14px;font-weight:inherit;
}

.mobile-nav-link:hover,
.mobile-nav-link:hover span{
  color:var(--fdf-orange);
}

/* =========================================================
   MOBILE ACTIVE
========================================================= */

.mobile-nav-link.active,
.mobile-nav-link.active span,
.mobile-nav-item:has(.mobile-dropdown a.active)>.mobile-nav-link,
.mobile-nav-item:has(.mobile-dropdown a.active)>.mobile-nav-link span{
  color:var(--fdf-orange);
  font-weight:700;
}

/* =========================================================
   MOBILE DROPDOWN
========================================================= */

.mobile-dropdown{
  display:none;
  margin:0 8px 10px;
  padding:8px 8px 10px 13px;
  background:rgba(95,140,180,.10);
  border-left:2px solid var(--fdf-orange);
  border-radius:0 7px 7px 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.mobile-nav-item.is-open .mobile-dropdown{
  display:block;
}

/* =========================================================
   MOBILE DROPDOWN LINKS
========================================================= */

.mobile-dropdown a{
  display:block;
  padding:9px 12px;
  border-radius:6px;
  color:var(--fdf-white);
  font-size:17px;
  transition:.2s ease;
}

.mobile-dropdown a:hover{
  color:var(--fdf-orange);
  background:rgba(255,115,60,.10);
}

.mobile-dropdown a.active{
  color:var(--fdf-orange);
  background:rgba(255,115,60,.08);
  font-weight:700;
}

/* =========================================================
   MOBILE DROPDOWN OVERSKRIFT
========================================================= */

.mobile-dropdown-header{
  padding:8px 12px 4px;
  color:var(--fdf-primary);
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

/* =========================================================
   MOBILE DROPDOWN PIL
========================================================= */

.mobile-dropdown-arrow{
  font-size:13px;
  transition:.2s ease;
}

.mobile-nav-item.is-open .mobile-dropdown-arrow{
  transform:rotate(180deg);
  color:var(--fdf-orange);
}

/* =========================================================
   MOBILE ACTIVE SPAN
========================================================= */

.mobile-nav-link span{
  color:var(--fdf-white);
  font-size: 14px;
  font-weight: 700;
}

/* =========================================================
   MOBILE LOGIN
========================================================= */

.mobile-login{
  max-width:80%;margin-top:12px;padding:14px;
  justify-content:center;gap:8px;
  background:var(--fdf-orange);color:var(--fdf-white);
  border:1px solid var(--fdf-white);border-radius:8px;
}

.mobile-login:hover{
  color:var(--fdf-white);background:var(--fdf-orange);
  border-color:var(--fdf-orange);
}

/* =========================================================
   BODY
========================================================= */

body.menu-is-open{overflow:hidden}

/* =========================================================
   RWD – 1200PX
========================================================= */

@media(max-width:1200px){
  .header-inner{padding:0 20px;gap:12px}
  .nav-link,.dropdown-toggle{padding:8px;font-size:14px}
  .brand-title{font-size:24px}
}

/* =========================================================
   RWD – 1024PX
========================================================= */

@media(max-width:1024px){
  :root{--navbar-height:76px}
  .header-inner{min-height:76px;padding:0 18px}
  .desktop-nav{display:none}
  .menu-open{display:block}
}

/* =========================================================
   RWD – 600PX
========================================================= */

@media(max-width:600px){
  :root{--navbar-height:70px}
  .header-inner{min-height:70px;padding:0 14px}
  .brand-title{font-size:20px}
  .menu-open{width:44px;height:44px}
  .mobile-menu-header{min-height:70px;padding:0 16px}
  .mobile-menu-title{font-size:18px}
  .mobile-nav{padding:12px 14px 30px}
  .mobile-nav-link{min-height:50px;font-size:15px}
  .mobile-dropdown a{font-size:14px}
}

/* =========================================================
   RWD – 380PX
========================================================= */

@media(max-width:380px){
  .header-inner{padding:0 10px}
  .brand-title{font-size:18px}
  .menu-open{width:42px;height:42px}
  .menu-open span{left:9px;width:24px}
  .mobile-menu-header{padding:0 12px}
  .mobile-menu-title{font-size:17px}
  .mobile-nav{padding:10px 12px 25px}
  .mobile-nav-link{min-height:48px;font-size:14px}
  .mobile-dropdown{padding-left:9px}
  .mobile-dropdown a{font-size:13px;padding:8px 10px}
}

/* =========================================================
   RWD – 320PX
========================================================= */

@media(max-width:340px){
  .header-inner{gap:5px}
  .brand-title{font-size:17px}
  .menu-open{width:40px;height:40px}
  .mobile-menu-header{min-height:64px}
  .mobile-nav{padding-top:8px}
}

/* =========================================================
   REDUCERET MOTION
========================================================= */

@media(prefers-reduced-motion:reduce){
  .site-header *,
  .site-header *::before,
  .site-header *::after{
    transition:none!important;
    animation:none!important;
  }
}