/* ========================================
   menu2.css
   Global reset, desktop layout, mobile layout
   ======================================== */

/* --- Custom Fonts --- */
@font-face {
  font-family: 'Foco';
  src: url('../fonts/FOCO.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Foco';
  src: url('../fonts/FOCOBOLD.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Global Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Foco;
}
dd {
  white-space: normal; /* definition list wrap */
}

/* ========================================
   MAIN MENU WRAPPER (ALL WIDTH + WHITE BG)
   ======================================== */
.main-menu {
  width: 100%;
  background: #fff;
  position: relative;
  max-height: 65px;
}

/* Den inre containern som centrerar */
.main-menu-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
  margin: 0 auto;
  padding-right: 5%;
}

/* --- Logo --- */
.main-menu-inner .logo {
background: #ffdc2e;
    height: 65px;
    display: flex;
    align-items: center;
    width: 181px;
    border-top: 2px solid #ffdc2e;
}

.main-menu-inner .logo img {
  height: 33px;
  margin-left: 30px;
}

/* --- Huvudmenyn (desktop bas) --- */
.main-menu-inner .menu {
  display: flex;
  list-style: none;
  margin-left: auto;
}
.main-menu-inner .menu > li {
  position: relative;
}
.main-menu-inner .menu > li > a {
  display: block;
  padding: 20px 30px;
  text-decoration: none;
  color: #000;
  font-weight: 400;
  font-size: 18px;
}
.main-menu-inner .menu > li > a:hover {
  background: #000;
  color: #fff;
}
/* Dropdown-rubriker utan länkmål (t.ex. "Våra områden", "Om") — visa pointer
   så användaren ser att rubriken är interaktiv (öppnar submeny på hover) */
.main-menu-inner .menu > li > a:not([href]) {
  cursor: pointer;
}
/* Dölj mobiltogglar på desktop */
.submenu-toggle {
  display: none;
}

/* --- Undermeny (desktop) --- */
.submenu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  padding: 20px 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  white-space: nowrap;
  z-index: 100;
}
/* Osynlig hover-brygga — täcker eventuell subpixel-glipa mellan menyitem och
   submeny så att hover-state inte tappas när musen rör sig långsamt nedåt. */
.submenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 8px;
}
.main-menu-inner .menu > li:hover .submenu {
  display: flex;
}

/* Grupp‐rubrik inuti kolumn */
.submenu-group-title {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-top: 7px;
  margin-bottom: 8px;
}

.submenu-subgroup-title {
  font-size: 16px;
  font-weight: 700;
  color: #0074A4;
  margin: .75em 0 .25em 0;
}
.submenu-subgroup-title::before {
  content: "- ";
  margin-right: 0px;
}

/* Undermeny nivå 1 och nivå 2 */
.submenu-level-1 li a:hover,
.submenu-level-2 li a:hover {
  text-decoration: underline;
}

/* -------- nivå 2 (undermeny) -------- */
.submenu-level-2 {
  list-style: none;    /* vi gör egna punkter nedan */
  margin: 0px 0 8px 14px;
}
.submenu-level-2 li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 10px;
}
.submenu-level-2 li a {
  font-size: 16px;
  font-weight: normal;   /* <–– normal, inte bold */
  color: #333;
  text-decoration: none;
  display: block;
  padding-left: 15px;
}
.submenu-level-2 li > a::before {
}
/* -------- nivå 1 (huvudlista i kolumnen) -------- */
.submenu-level-1 {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}
.submenu-level-1 li {
  margin-bottom: 6px;
}
.submenu-level-1 li a {
  font-size: 16px;
  font-weight: bold;     /* <–– nivå 1 får fet stil */
  color: #333;
  text-decoration: none;
  display: block;
}

/* Kolumner i undermeny */
.submenu-col {
  width: 250px;
}
.submenu-col h4 {
  font-size: 22px;
  margin-bottom: 10px;
}
.submenu-level-1 li > a::before {
  content: "- ";
  margin-right: 0px;
}
/* Dölj hamburgare på desktop */
.nav-toggle {
  display: none;
}

/* ========================================
   DESKTOP FULL-WIDTH & CENTERED HEADER
   ======================================== */
@media only screen and (min-width: 1024px) {
.mobile-logo {display:none;}

.main-menu {
    /* Gör headern sticky */
    position: sticky;
    top: 0;
    z-index: 1000;     /* se till att den ligger ovan övrigt innehåll */
    /* Behåll din bakgrund så att den inte blir transparent */
    background: #fff;  /* eller vilken bakgrundsfärg du har på headern */
  }

  .main-menu-inner {
    max-width: 1336px;
    justify-content: space-between;
    padding: 0 0px 0 0;
  }

  .main-menu-inner .menu {
    margin: 0;
  }
  /* Fullbredds-dropdown */
  .main-menu-inner .menu > li {
    position: static;
  }
  .main-menu-inner .submenu {
    top: 100%; left: 0;
    width: 100%;
    padding: 40px;
    white-space: normal;
    justify-content: center;
  }
  .main-menu-inner .menu > li:hover .submenu {
    display: flex;
  }
  /* Special‐wrappers om ni använder dem */
  .menuItem__container--containsSubMenu .subMenu_multipleInnerWrapper {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 40px !important;
  }
  .menuItem__container--containsSubMenu .subMenu_multipleListWrapper {
    width: 100% !important;
    justify-content: space-between !important;
  }
}

/* ========================================
   MOBILE LAYOUT
   ======================================== */
@media only screen and (max-width: 1023px) {
  /* --- Override för header‐raden (mobil‐logo) --- */
  .main-menu-inner .menu > li.menu-header {
    background: #fff !important;    /* vit bakgrund */
    margin-top: 0 !important;       /* ingen extra spacing */
    border-bottom: none !important; /* ingen underline */
    padding: 0 !important;          /* ta bort padding från generella regler */
  .main-menu-inner .menu > li.menu-header .mobile-logo {
    width: auto;                    /* anpassa bredden efter bilden */
    padding: 1rem 5%;               /* matcha övriga indent */
}
  }
  .main-menu-inner .menu > li.menu-header .mobile-logo img {
    height: 38px;                   /* samma höjd som desktop‐logo */
    margin-top: 5px;                      /* neutral placering */
  }

  /* Se till att övriga <li> fortfarande är gula och får rätt spacing */
  .main-menu-inner .menu > li:not(.menu-header) {
    background: #ffdc2e;            /* gul bakgrund på menypunkterna */
    margin-top: 1.4rem !important;  /* standardmarginal mellan rader */
  }

  /* Språkväljaren ska ha vit bakgrund i mobil-vy (override av regeln ovan) */
  .main-menu-inner .menu > li.lang-switcher-item {
    background: #fff;
    border-bottom: none;
  }

  .nav-toggle {
    display: flex !important;    /* tvinga visning */
  }
  .menu-header .nav-toggle {
    display: flex;               /* tvinga fram visning */
    position: fixed;             /* alltid på toppen av viewport */
    top: 16px;                   /* justera efter behov */
    right: 20px;                 /* samma som tidigare placering */
    z-index: 1002;               /* ovanpå både header och meny */
  }
  .main-menu-inner .mobile-logo {
    display: none;
  }
  .main-menu.menu-open .main-menu-inner .mobile-logo {
    display: block;
  }

.main-menu-inner .logo {
  background: #ffdc2e;
  height: 65px;
  display: flex;
  align-items: center;
  width: 140px;
}

  .menu .menu-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #fff;
    z-index: 1002;
  }


  .main-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
  }

  .main-menu-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .main-menu-inner .logo img {
    height: 32px;
    margin-left: 10px;
  }

.main-menu-inner .menu > li > a:hover {
  background: #ffdc2e;
  color: #000;
}
#footer .footer-menu {
  float: none;
  margin-top: 50px;
  width: min-content;
  min-width: 250px;
}

.submenu {box-shadow:none;}
.submenu-subgroup-title::before {content:""; margin-left: 15px;}
.submenu-level-1 li > a::before {content:""; margin-left: 15px;}

.submenu-group-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: normal;
}

.submenu-subgroup-title {
    font-size: 18px;
    font-weight: 700;
    color: #0074A4;
    margin: .75em 0 .25em 0;
}
.submenu-level-1 li a {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    display: block;
}

  /* Visa hamburgaren */
  .nav-toggle {
    position: relative;
    z-index: 1001;
    width: 50px;
    height: 50px;
    background: #000;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .nav-toggle img {
    width: 50px;
    height: 50px;
  }

  .main-menu-inner .menu {
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;

    flex-direction: column;
    margin: 0;
    padding: 10px 5% 5% 5%;
    overflow-y: auto;                     /* gör menyn scrollbar */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;     /* för mjuk scroll på iOS */

    max-height: 0;
    opacity: 0;

    transition: opacity 0.2s ease-in;
    pointer-events: none; /* inaktivera klick när dold */
  }

  /* När .open finns på menyn → expandera & fadea in */
  .main-menu-inner .menu.open {
    max-height: 100vh;  /* räcker för att fylla hela viewport */
    opacity: 1;
    pointer-events: auto;
  }

  /* Mobil‐logga */
  .menu .mobile-logo {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    padding-bottom: 35px;
  }
  .menu .nav-toggle {
    position: static;
    margin-bottom: 1rem;
    z-index: auto;
  }
  .main-menu-inner .menu > li {
    width: 100%;
    border-bottom: 1px solid #eee;
    background: #ffdc2e;
    position: relative;
    margin-top: 1.4rem !important;
  }
  .main-menu-inner .menu > li > a {
    display: block;
    padding: 8px 10px;
    font-weight: bold;
    font-size: 26px;
    color: #000;
  }

  /* Placera +/- exakt */
  .submenu-toggle {
    position: absolute;
    right: 20px;
    top: 12px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 36px;
    cursor: pointer;
    z-index: 200;
  }

  /* Dölj alla undermenyer i mobil-läge */
  .main-menu-inner .menu > li .submenu {
    position: static;
    width: 100%;
    padding: 10px 20px;
    background: #fff;
    display: none !important;
  }
  .main-menu-inner .menu > li.open-sub .submenu {
    display: block !important;
  }

  .submenu-col {
    margin: 10px 0;
    padding-top: 10px;
  }
  .submenu-col:first-child {
    border-top: none;
    padding-top: 0;
  }
  .submenu-col h4 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  .submenu-col ul li {
    margin: 6px 0;
  }
  .submenu-col ul li a {
    display: block;
  }
}
