/* Shared desktop and mobile navigation, using the existing Svanegården identity. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid #2a36570d;
  box-shadow: 0 4px 22px #2a365705;
}
html { scroll-padding-top: 116px; }
.skip { z-index: 60; }
.masthead .site-header { height: 100px; gap: 30px; }
.masthead .brand { gap: 14px; }
.masthead .brand-logo { width: 66px; height: 66px; }
.masthead .brand > span { font-size: 28px; }
.site-header nav.desktop-nav {
  display: flex;
  position: static;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}
.desktop-nav > a:not(.button),
.desktop-nav > details > summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 24px;
  color: var(--navy);
  transition: background .18s, color .18s;
}
.desktop-nav > a:not(.button):hover,
.desktop-nav > details > summary:hover,
.desktop-nav > details[open] > summary {
  background: #f0f6fa;
  color: #315f7d;
}
.desktop-nav > a:not(.button)[aria-current],
.desktop-nav .has-current > summary {
  background: #e8f2f8;
  color: var(--navy);
  font-weight: 600;
}
.nav-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s;
  margin: 0 3px 0 0;
  flex-shrink: 0;
}
details[open] > summary .nav-chevron { transform: translateY(2px) rotate(225deg); }
.desktop-nav .nav-signup {
  margin-left: 13px;
  min-height: 46px;
  padding: 12px 21px;
  gap: 22px;
  border-radius: 25px;
  box-shadow: 0 4px 12px #2a365712;
}
.desktop-nav .nav-signup[aria-current] { color: #fff; outline: 3px solid #b6d9eb; outline-offset: 3px; }
.desktop-nav .nav-submenu {
  position: absolute;
  top: calc(100% + 15px);
  left: -90px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 500px;
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid #e3ebf1;
  border-radius: 20px;
  box-shadow: 0 18px 50px #2a36571c, 0 3px 10px #2a365708;
  animation: nav-appear .18s ease-out;
}
.desktop-nav .nav-submenu::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 128px;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: #fff;
  border-top: 1px solid #e3ebf1;
  border-left: 1px solid #e3ebf1;
}
.desktop-nav .nav-submenu a,
.mobile-sublinks a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px;
  border-radius: 11px;
  font-size: 12px;
  line-height: 1.4;
}
.nav-item-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef5f9;
  color: #5585a1;
}
.nav-item-icon svg { width: 20px; height: 20px; }
.nav-item-arrow { margin-left: auto; color: #7997ac; opacity: 0; transition: opacity .18s; }
.nav-submenu a:hover,
.nav-submenu a[aria-current],
.mobile-sublinks a:hover,
.mobile-sublinks a[aria-current] { background: #edf5fa; color: var(--navy); }
.nav-submenu a:hover .nav-item-arrow,
.nav-submenu a:focus-visible .nav-item-arrow,
.nav-submenu a[aria-current] .nav-item-arrow { opacity: 1; }
.site-header .menu-toggle { display: none; }
.mobile-menu { display: none; }
.mobile-menu[open] {
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(420px, 100%);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  color: var(--navy);
  background: #fff;
  box-shadow: -15px 0 60px #16253b26;
  animation: drawer-in .22s ease-out;
  overflow: hidden;
}
.mobile-menu::backdrop { background: #17243e75; backdrop-filter: blur(3px); }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: max(18px, env(safe-area-inset-top)) 24px 18px;
  border-bottom: 1px solid #e7edf3;
}
#mobile-menu-title { font: 30px Salsa, Georgia, serif; }
.menu-close {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid #dbe7ef;
  border-radius: 50%;
  background: #f1f7fa;
  color: var(--navy);
  cursor: pointer;
}
.menu-close span { font: 30px/1 Arial, sans-serif; }
.menu-close:hover { background: #e0eef6; }
.mobile-menu-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 20px 24px max(24px, env(safe-area-inset-bottom));
}
#mobile-navigation > a:not(.button),
.mobile-about > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 12px;
}
#mobile-navigation > a:not(.button):hover,
#mobile-navigation > a[aria-current]:not(.button),
.mobile-about[open] > summary { background: #eaf3f9; color: var(--navy); }
#mobile-navigation > a[aria-current]:not(.button) { font-weight: 600; }
.mobile-about { margin-block: 5px; }
.mobile-sublinks {
  margin: 6px 0 12px 14px;
  border-left: 2px solid #dcebf3;
  padding-left: 8px;
}
.mobile-sublinks a { font-size: 13px; min-height: 52px; padding: 8px; }
.mobile-sublinks .nav-item-icon { flex-basis: 30px; height: 30px; background: transparent; }
.mobile-sublinks .nav-item-arrow { opacity: 1; }
#mobile-navigation .nav-signup {
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  margin-top: 24px;
  padding: 14px 20px;
  border-radius: 28px;
  font-size: 14px;
}
.mobile-menu-contact { margin-top: 28px; padding: 22px 4px 0; border-top: 1px solid #e3ebf2; }
.mobile-menu-contact a { display: block; font-size: 11px; overflow-wrap: anywhere; color: #62788e; }
.mobile-menu-contact a:first-child { display: flex; gap: 15px; align-items: center; font-size: 15px; color: var(--navy); margin-bottom: 8px; }
html.menu-open, html.menu-open body { overflow: hidden; overscroll-behavior: none; }
@keyframes nav-appear { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drawer-in { from { opacity: .5; transform: translateX(35px); } to { opacity: 1; transform: translateX(0); } }
@media (min-width: 961px) and (max-width: 1100px) {
  .masthead .site-header { gap: 16px; }
  .masthead .brand > span { font-size: 25px; }
  .masthead .brand-logo { width: 58px; height: 58px; }
  .site-header nav.desktop-nav { gap: 2px; font-size: 12px; }
  .desktop-nav > a:not(.button), .desktop-nav > details > summary { padding-inline: 12px; }
  .desktop-nav .nav-signup { margin-left: 6px; padding-inline: 17px; }
}
@media (max-width: 960px) {
  html { scroll-padding-top: 94px; }
  .masthead .site-header { min-height: 80px; height: auto; flex-wrap: wrap; padding-block: 10px; gap: 10px; }
  .masthead .brand-logo { width: 54px; height: 54px; }
  .masthead .brand > span { font-size: 26px; }
  .site-header nav.desktop-nav { width: 100%; flex-wrap: wrap; justify-content: center; }
  .nav-ready .site-header nav.desktop-nav { display: none; }
  .nav-ready .site-header .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 91px;
    min-height: 46px;
    padding: 10px 15px;
    border: 1px solid #d5e5ef;
    border-radius: 24px;
    color: var(--navy);
    background: #f0f6fa;
    font-size: 12px;
    font-weight: 600;
  }
  .menu-toggle:hover { background: #e3eff6; }
  .hamburger { display: flex; flex-direction: column; gap: 5px; width: 18px; }
  .hamburger span { height: 1.5px; background: currentColor; width: 18px; border-radius: 2px; }
  .hamburger span:last-child { width: 12px; align-self: flex-end; }
  .desktop-nav .nav-submenu { position: static; width: 100%; grid-template-columns: 1fr; margin-top: 8px; box-shadow: none; }
  .desktop-nav .nav-submenu::before { display: none; }
}
@media (max-width: 360px) {
  .masthead .brand { gap: 7px; }
  .masthead .brand-logo { width: 43px; height: 43px; }
  .masthead .brand > span { font-size: 23px; }
  .nav-ready .site-header .menu-toggle { min-width: 80px; padding-inline: 11px; gap: 8px; }
  .mobile-menu-header { padding-inline: 18px; }
  .mobile-menu-content { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-nav .nav-submenu, .mobile-menu[open] { animation: none; }
}
