/* ==========================================================================
   1. CORE FONTS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Roboto:wght@400;500&display=swap');

:root {
  --edmix-dark-bg: #233142;     
  --edmix-blue-brand: #3a86ff;  
  --edmix-text: #1b2330;
}

/* ==========================================================================
   2. LOGO SIZE (90px) & PERFECT VERTICAL ALIGNMENT (DESKTOP)
   ========================================================================== */
@media (min-width: 992px) {
  #header .header-container,
  #header .header-row,
  .header-container .container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; 
    justify-content: space-between !important;
    flex-wrap: nowrap !important; 
  }

  /* Force Logo Width to 90px */
  #header .header-logo,
  #header .header-logo img,
  .navbar-brand img {
    max-width: 150px !important;   
    height: auto !important;
    display: block !important;
    margin-right: 40px;
  }

  #header .header-nav,
  #header .header-nav-main,
  #header .header-nav-main nav {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* FORCED GAP REDUCTION: Target Porto's native UL element */
  #header .header-nav-main nav > ul,
  #header .header-nav-main ul.menu-links-list,
  ul.menu-links-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important; /* Aggressively reduced gap */
    background: transparent !important;
    float: none !important;
    margin-bottom: 0 !important;
  }

  /* Strip Porto's native margins and padding off the list items */
  #header .header-nav.header-nav-stripe nav > ul > li,
  #header .header-nav-main nav > ul > li,
  #header .header-nav-main ul.menu-links-list li.nav-item,
  li.nav-item {
    display: block !important;
    float: none !important;
    background: transparent !important;
    margin: 0 !important; /* Kills theme spacing */
    padding: 0 !important; /* Kills theme spacing */
    white-space: nowrap !important;
  }
}

/* ==========================================================================
   3. MAIN NAVBAR TOP LEVEL LINKS (NUCLEAR OVERRIDE ENGINE)
   ========================================================================== */

/* We use Porto's EXACT heavy selector chain here to guarantee our 
   12px font size and reduced padding cannot be overridden by theme.css 
*/
#header .header-nav.header-nav-stripe nav > ul > li > a,
#header .header-nav-main nav > ul > li > a,
#header .header-nav-main nav > ul > li > span,
.navbar .nav-link {
  font-weight: 700 !important;
  font-size: 12px !important; /* FORCED OVERRIDE TO 12px */
  color: #ffffff !important; 
  
  /* Porto adds massive horizontal padding to links. 
     We shrink it to 6px here so the gap actually gets smaller! 
  */
  padding: 1.5rem 6px !important; 
  
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: color 0.2s ease !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

#header .header-nav.header-nav-stripe nav > ul > li > a.active,
#header .header-nav.header-nav-stripe nav > ul > li:hover > a,
.navbar .nav-link.active, 
.navbar .nav-link:hover { 
  color: var(--edmix-blue-brand) !important; 
}

.nav-arrow {
  font-size: 0.65rem !important;
  margin-left: 4px !important; /* Tighter arrow spacing */
}

/* ==========================================================================
   4. DROPDOWN BOXES & SIDE-BY-SIDE FLYOUTS (DESKTOP)
   ========================================================================== */
@media (min-width: 992px) {
  .custom-dropdown-parent { 
    position: relative !important; 
  }

  .standard-dropdown-box {
    position: absolute !important;
    left: 0 !important; 
    top: 100% !important;
    width: 280px !important; 
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    z-index: 1090 !important;
    display: none !important;
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .custom-dropdown-parent:hover > .standard-dropdown-box { 
    display: block !important;
    opacity: 1 !important;
  }

  .dropdown-submenu {
    position: relative !important;
  }

  .dropdown-submenu .submenu-level3,
  .dropdown-submenu .submenu-level4 {
    display: none !important;
    position: absolute !important;
    left: 100% !important; 
    top: 0 !important;      
    width: 280px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    z-index: 1100 !important;
    opacity: 0;
  }

  .dropdown-submenu:hover > .submenu-level3,
  .dropdown-submenu:hover > .submenu-level4 {
    display: block !important;
    opacity: 1 !important;
  }

  .dropdown-submenu::before {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 20px;
    height: 100%;
    background: transparent;
    z-index: -1;
  }
}

/* ==========================================================================
   5. DROPDOWN INTERIOR MENU FONTS & CUSTOM ARROW
   ========================================================================== */
.standard-dropdown-box li,
.submenu-level3 li,
.submenu-level4 li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.standard-dropdown-box .dropdown-item,
.submenu-level3 .dropdown-item,
.submenu-level4 .dropdown-item { 
  font-family: 'Roboto', sans-serif !important;
  font-size: 0.95rem !important; 
  font-weight: 500 !important; 
  color: #334155 !important; 
  padding: 14px 22px !important; 
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-transform: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  transition: all 0.1s ease;
  background: #ffffff !important;
}

.standard-dropdown-box .dropdown-item:hover,
.submenu-level3 .dropdown-item:hover,
.submenu-level4 .dropdown-item:hover { 
  background-color: #f8fafc !important; 
  color: var(--edmix-blue-brand) !important; 
}

.standard-dropdown-box li:last-child > .dropdown-item,
.submenu-level3 li:last-child > .dropdown-item,
.submenu-level4 li:last-child > .dropdown-item {
  border-bottom: none !important;
}

.sub-arrow {
  font-size: 0.7rem !important;
  font-weight: 900 !important;
  color: var(--edmix-blue-brand) !important;
  margin-left: auto !important;
  display: inline-block !important;
}

/* ==========================================================================
   6. MOBILE RESPONSIVE ACCORDION SYSTEM
   ========================================================================== */
@media (max-width: 991.98px) {
  #header .header-logo img,
  .navbar-brand img {
    max-width: 90px !important; /* Keep mobile logo at 90px as well */
    height: auto !important;
  }

  .standard-dropdown-box,
  .submenu-level3,
  .submenu-level4 { 
    position: static !important; 
    width: 100% !important; 
    box-shadow: none !important; 
    border: none !important;
    display: none !important; 
    padding: 0 0 0 15px !important;
    opacity: 1 !important;
    background: #f8fafc !important;
  }

  .custom-dropdown-parent.show > .standard-dropdown-box,
  .custom-dropdown-parent:hover > .standard-dropdown-box,
  .dropdown-submenu:hover > .submenu-level3,
  .dropdown-submenu:hover > .submenu-level4 {
    display: block !important;
  }

  .standard-dropdown-box .dropdown-item,
  .submenu-level3 .dropdown-item,
  .submenu-level4 .dropdown-item {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }
}

/* ==========================================================================
   7. UNCLICKABLE STATIC LINK PLACEHOLDERS
   ========================================================================== */
.menu-text-static {
  cursor: default !important;
  user-select: none;
  display: block;
  width: 100%;
}
span.dropdown-item.menu-text-static {
  color: #334155 !important; 
  background-color: transparent !important;
}
span.nav-link.menu-text-static[data-toggle="dropdown"],
span.nav-link.menu-text-static[data-bs-toggle="dropdown"] {
  cursor: pointer !important;
}

/* ==========================================================================
   8. PREVENT STICKY HEADER LOGO AND HEIGHT FROM SHRINKING
   ========================================================================== */
html .sticky-header-active #header .header-body {
  padding-top: 15px !important; 
  padding-bottom: 15px !important;
}

/* Force sticky logo to also remain 90px */
html .sticky-header-active #header .header-logo img,
html .sticky-header-active .navbar-brand img {
  width: 90px !important; 
  height: auto !important;
  max-width: 90px !important;
}

/* ==========================================================================
   9. THE NUCLEAR OPTION: DESTROY ALL PORTO/BOOTSTRAP JS-INJECTED ARROWS
   ========================================================================== */

/* Hide ANY HTML element inside the submenu link that is NOT our custom arrow */
.dropdown-menu .dropdown-item > *:not(.sub-arrow),
.dropdown-menu .menu-text-static > *:not(.sub-arrow) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

/* Hide ANY HTML element inside the top level link that is NOT our custom down arrow */
.navbar-nav .nav-link > *:not(.nav-arrow) {
  display: none !important;
}

/* Target every possible combination of submenu pseudo-elements and force-hide native carets */
.dropdown-submenu > .dropdown-item::after,
.dropdown-submenu > .dropdown-item::before,
.dropdown-submenu > .menu-text-static::after,
.dropdown-submenu > .menu-text-static::before,
.dropdown-submenu > a::after,
.dropdown-submenu > a::before,
.dropdown-submenu > span::after,
.dropdown-submenu > span::before,
.dropdown-menu .dropdown-item::after,
.dropdown-menu .dropdown-item::before,
.dropdown-menu li > a::after,
.dropdown-menu li > span::after,
.dropdown-toggle::after,
.nav-link::after,
.dropdown::after,
#header .header-nav-main nav > ul > li.dropdown > a::after {
  display: none !important;
  content: none !important;
  background: none !important;
  border: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}

/* Force hide any Porto JS wrappers */
.dropdown-menu .arrow,
.dropdown-menu span.arrow,
.dropdown-submenu .arrow,
#header .header-nav-main nav ul li.dropdown-submenu .arrow {
  display: none !important;
  content: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
