/* ========================================
   PROJTEAMET – KOMPLETT HEADER CSS
======================================== */

/* --- Sticky: vit bakgrund + skugga --- */
#mysticky-nav.wrapfixed header.site-header,
#mysticky-nav.wrapfixed .ast-primary-header-bar {
  background: #ffffff !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  transition: all 0.35s ease;
}

/* --- Header krymper vid scroll --- */
#mysticky-nav.wrapfixed .ast-primary-header-bar {
  padding-top: 5px !important;
  padding-bottom: 7px !important;
}

/* --- Logga inverteras till svart + krymper --- */
#mysticky-nav.wrapfixed .custom-logo {
  filter: invert(1) !important;
  max-height: 30px !important;
  transition: all 0.35s ease;
}

/* --- Desktop menytext svart vid scroll --- */
#mysticky-nav.wrapfixed .main-header-menu > li > a {
  color: #0F172A !important;
}

/* --- Desktop hover blå --- */
#mysticky-nav.wrapfixed .main-header-menu > li > a:hover {
  color: #0067FF !important;
}

/* ========================================
   DESKTOP AKTIV MENY (FIXAD UTAN BUGG)
======================================== */

/* Ta bort ALLA gamla borders */
.main-header-menu > li.current-menu-item > a {
  border-bottom: none !important;
  position: relative !important;
}

/* Streck under aktiv länk */
#masthead .main-header-menu > li.current-menu-item > a::after,
#mysticky-nav.wrapfixed .main-header-menu > li.current-menu-item > a::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  width: 100% !important;
  height: 3px !important;
  background-color: #0067FF !important;
  bottom: -5px !important; /* 🔥 flyttat ner från 0.2em till en absolut postion under texten */
}

/* --- Desktop menytext i linje --- */
/* Fix för vertikal linjering: Säkerställ att hela li och a tar upp höjden, och centrera texten */
#masthead .main-header-menu > li,
#mysticky-nav.wrapfixed .main-header-menu > li {
  display: flex !important;
  align-items: center !important;
}

/* Återställer länkarnas padding för att hemknappen inte ska se intryckt ut */
#masthead .main-header-menu > li > a,
#mysticky-nav.wrapfixed .main-header-menu > li > a {
  display: flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Fix för undermenyn: Eftersom li nu använder flex, återställ positioneringen för undermenyn */
#masthead .main-header-menu > li > .sub-menu,
#mysticky-nav.wrapfixed .main-header-menu > li > .sub-menu {
  top: 100% !important;
  margin-top: 0 !important;
}

/* --- Hamburgar vit i transparent läge --- */
.menu-toggle.ast-mobile-menu-trigger-fill,
.menu-toggle.ast-mobile-menu-trigger-fill svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* --- Hamburgar svart i sticky läge --- */
#mysticky-nav.wrapfixed .menu-toggle.ast-mobile-menu-trigger-fill,
#mysticky-nav.wrapfixed .menu-toggle.ast-mobile-menu-trigger-fill svg {
  color: #0F172A !important;
  fill: #0F172A !important;
}

/* ========================================
   MOBILMENY - MÖRKBLÅ BAKGRUND
======================================== */

/* Mörkblå på alla möjliga container-element */
#ast-hf-menu-1-mobile,
#ast-hf-menu-1-mobile.ast-menu-shadow,
.main-header-bar-navigation.toggle-on,
.main-header-bar-navigation.toggle-on nav,
.main-header-bar-navigation.toggle-on .main-navigation,
.main-header-bar-navigation.toggle-on .main-navigation.ast-inline-flex,
#ast-mobile-popup,
#ast-mobile-popup .ast-mobile-popup-inner,
#ast-mobile-popup .ast-mobile-popup-content,
.ast-mobile-popup-drawer,
.ast-mobile-popup-drawer .ast-mobile-popup-inner {
  background-color: #0F172A !important;
  box-shadow: none !important;
}

/* Mörkblå på li-element */
#ast-hf-menu-1-mobile li,
#ast-mobile-popup .main-header-menu li {
  background-color: #0F172A !important;
  text-align: center !important;
}

/* Vit text */
.ast-theme-transparent-header #ast-hf-menu-1-mobile li a.menu-link,
.ast-theme-transparent-header #ast-hf-menu-1-mobile li a,
#ast-hf-menu-1-mobile li a.menu-link,
#ast-hf-menu-1-mobile li a,
#ast-mobile-popup .main-header-menu li a {
  color: #ffffff !important;
  text-align: center !important;
  display: block !important;
  padding: 6px 0 !important;
  font-size: 1rem !important;
  background-color: transparent !important;
}

/* Hover blå */
.ast-theme-transparent-header #ast-hf-menu-1-mobile li a.menu-link:hover,
#ast-hf-menu-1-mobile li a:hover,
#ast-mobile-popup .main-header-menu li a:hover {
  color: #0067FF !important;
}

/* Aktiv flik mobil (ORIGINAL – orörd) */
.ast-theme-transparent-header #ast-hf-menu-1-mobile li.current-menu-item a.menu-link,
.ast-theme-transparent-header #ast-hf-menu-1-mobile li a.menu-link[aria-current="page"],
#ast-hf-menu-1-mobile li.current-menu-item a,
#ast-hf-menu-1-mobile li a[aria-current="page"],
#ast-mobile-popup .main-header-menu li.current-menu-item a,
#ast-mobile-popup .main-header-menu li a[aria-current="page"] {
  color: #0067FF !important;
  border-bottom: 2px solid #0067FF !important;
  padding-bottom: 4px !important;
}

/* Popup header */
#ast-mobile-popup .ast-mobile-popup-header {
  background-color: #0F172A !important;
}

/* Stäng-knapp */
#ast-mobile-popup #menu-toggle-close svg,
#menu-toggle-close svg {
  fill: #ffffff !important;
}

/* --- Admin-bar kompensation --- */
.admin-bar #mysticky-nav.wrapfixed {
  top: 33px !important;
}

@media screen and (max-width: 782px) {
  .admin-bar #mysticky-nav.wrapfixed {
    top: 46px !important;
  }
}

/* Ta bort borders i mobil */
#ast-hf-menu-1-mobile *,
#ast-hf-menu-1-mobile li {
  border: none !important;
}

/* Flytta ner menytext mobil */
#ast-hf-menu-1-mobile {
  padding-top: 20px !important;
}
/* FIX: vit text på blå hover i sticky */
#mysticky-nav.wrapfixed .main-header-menu > li > a:hover {
  color: #ffffff !important;
}
/* Footer meny – vit text */
.site-footer a,
.site-footer .menu-link,
.site-footer .menu a {
  color: #ffffff !important;
}

/* Hover i footer */
.site-footer a:hover,
.site-footer .menu-link:hover {
  color: #0067FF !important; /* eller #ffffff om du vill ha helt vit */
}
/* Footer meny - svart text med Verdana */
.site-footer .menu-link,
.site-footer .menu a,
.site-footer a {
  color: #0F172A !important;
  font-family: Verdana, sans-serif !important;
}

/* Hover blå */
.site-footer .menu-link:hover,
.site-footer .menu a:hover {
  color: #0067FF !important;
}
/* Footer meny - svart text med Verdana */
.site-footer .menu-primary-menu-container a.menu-link,
.site-footer ul.menu a,
.site-footer nav a {
  color: #0F172A !important;
  font-family: Verdana, sans-serif !important;
}

/* Hover blå */
.site-footer .menu-primary-menu-container a.menu-link:hover,
.site-footer ul.menu a:hover,
.site-footer nav a:hover {
  color: #0067FF !important;
}
/* Elementor block meny - svart text med Verdana */
.elementor-element-0374df8 a,
.elementor-element-0374df8 .menu-link {
  color: #0F172A !important;
  font-family: Verdana, sans-serif !important;
}

/* Hover blå */
.elementor-element-0374df8 a:hover {
  color: #0067FF !important;
}
/* Elementor kontakt-block - svart text */
.elementor-element.elementor-element-0374df8 .elementor-icon-list-item a,
.elementor-element.elementor-element-0374df8 .elementor-icon-list-text {
  color: #0F172A !important;
  font-family: Verdana, sans-serif !important;
}
/* Nav widget i Elementor block - svart text Verdana */
.elementor-widget-nav-menu a,
.elementor-widget-wp-widget-nav_menu a,
.elementor-widget-wp-widget-nav_menu .menu-link,
#menu-primary-menu a {
  color: #0F172A !important;
  font-family: Verdana, sans-serif !important;
}

/* Hover blå */
.elementor-widget-nav-menu a:hover,
.elementor-widget-wp-widget-nav_menu a:hover,
#menu-primary-menu a:hover {
  color: #0067FF !important;
}
/* Fet text i footer-meny */
.elementor-widget-wp-widget-nav_menu .menu a,
.elementor-widget-wp-widget-nav_menu .menu-link,
#menu-primary-menu a {
  font-weight: 700 !important;
}