:root {
    --clr-dark: 230 35% 7%;
    --clr-light: 231 77% 90%;
    --clr-white: 0 0% 100%;
}
body {
    font-family:'Public Sans'; 
}
* {
    padding: 0;
    margin: 0;
}
.flex {
    display: flex;
}

.logo {
    margin: 0;
    height: auto;
    max-height: 90px;
    padding-left: 0;
}

/* ================= HEADER (MOBILE FIRST) ================= */
.primary-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 35px;
  background: url(/images/header-banner.jpg) no-repeat center/cover;
  height: 100px;
  position: relative;
  z-index: 5000;   /* header above content */
  overflow: visible;
}

/* Mobile primary navigation */
.primary-navigation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  list-style: none;
  background: white;
  position: absolute;
  top: 100%;          /* directly below header */
  left: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  border-radius: 0 0 12px 12px;

  max-height: 0;      
  overflow: hidden;   
  opacity: 0;         
  transition: max-height 0.5s ease, opacity 0.5s ease;
  z-index: 7000;
}

.primary-navigation.open {
  max-height: 500px;  
  opacity: 1;
  z-index: 5500;      /* ✅ sits above toggle when open */
}

.primary-navigation li {
  width: 100%;
}

.primary-navigation a {
  display: block;
  width: 100%;           /* full clickable row */
  padding: 12px;
  color: black;
  text-decoration: none;
  font-size: 16px;
  pointer-events: auto;  /* ✅ ensure links are clickable */
}

.primary-navigation a:hover,
.primary-navigation a:focus {
  background: #0e2e52;
  color: white;
}

/* First item: no default highlight */
.primary-navigation li:first-child > a {
  background: transparent;
  color: black;
}

.primary-navigation li:first-child > a:hover,
.primary-navigation li:first-child > a:focus {
  background: #0b2340; /* darker hover */
  color: #fff;
}

/* Mobile toggle button */
.mobile-nav-toggle {
  display: block;
  margin-left: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding-top: 30px;
  position: relative;
  z-index: 5600;   /* sits above nav */
}

.burger-icon {
  width: 28px;
  height: 28px;
  display: block;
}

/* Hide close by default, show burger */
.mobile-nav-toggle .icon { display: none; }
.mobile-nav-toggle .icon-hamburger { display: block; }
.mobile-nav-toggle[aria-expanded="true"] .icon-hamburger { display: none; }
.mobile-nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ================= MOBILE DROPDOWN ================= */
.dropdown {


  z-index: 6400;          /* lower than nav */
}


.dropdown-toggle {
  display: block;
  margin-left: auto;
  margin-right: 23px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
}

.dropdown-toggle .icon-close { display: none; }
.dropdown-toggle[aria-expanded="true"] .burger-icon { display: none; }
.dropdown-toggle[aria-expanded="true"] .icon-close { display: inline-block; }


.dropdown .menu-list {
    display: flex;                 /* keep it in DOM for transitions */
    flex-direction: column;
    max-height: 0;                 /* collapsed */
    overflow: hidden;
    opacity: 0;
    pointer-events: none;          /* not clickable */
    padding: 0;                    /* ⬅️ CRITICAL: no box height */
    margin: 0;
    border: 0;
    box-shadow: none;              /* no visual layer while closed */
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    z-index: 4000;                 /* keep it under primary nav if stacked */
    
    
  }
.dropdown .menu-list.open {
    max-height: 600px;             /* expand when open */
    opacity: 1;
    pointer-events: auto;          /* clickable */
    padding: 6px 0;                /* restore spacing */
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    z-index: 6500;                 /* above content when open */
  }

.dropdown .menu-list > li {
  position: relative;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.dropdown .menu-list > li:first-child { border-top: none; }

.dropdown .menu-list a {
  display: flex;
  padding: 12px 16px;
  gap: 10px;
  color: #000;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  align-items: center;
}

/* Hover states */
.dropdown .menu-list > li > a:hover,
.dropdown .menu-list > li > a:focus {
  background: #0e2e52;
  color: white;
}
/* Reset first item default */
.dropdown .menu-list li:first-child > a {
  background: transparent;
  color: black;
}
.dropdown .menu-list li:first-child > a:hover,
.dropdown .menu-list li:first-child > a:focus {
  background: #0e2e52;
  color: white;
}

/* Submenu (mobile accordion default) */
.dropdown .submenu {
  list-style: none;
  margin: 0;
  padding: 0;                /* JS restores padding when open */
  background: #fff;
  z-index: 5500;
  position: relative;
  width: 100%;

  /* accordion behaviour */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#dropdown-menu .has-submenu.open > .submenu { display: block; }

.dropdown .submenu li a:hover,
.dropdown .submenu li a:focus {
  background: #0e2e52;
  color: white;
}

/* Base styles (apply everywhere) */
hr {
  border: none;
  height: 3px;
  width: 100%;
  margin: 0;
  background-color: #2A98A4; /* teal line */
}


/* ============================================================ DESKTOP (≥768px) ================================================================ */
/* ============================================================ DESKTOP (≥768px) ================================================================ */
/* ============================================================ DESKTOP (≥768px) ================================================================ */
/* ============================================================ DESKTOP (≥768px) ================================================================ */
/* ============================================================ DESKTOP (≥768px) ================================================================ */
@media screen and (min-width: 768px) {
  .mobile-nav-toggle, .submenu-toggle, .dropdown-toggle {
    display: none;
  }
  
  /* Remove hover background for top-level desktop items */
  .dropdown .menu-list > li > a:hover,
  .dropdown .menu-list > li > a:focus {
    background: transparent !important; /* no color change */
    color: black !important; /* keep text consistent */
  }

  .logo {
    max-height: 90px;
    padding-left: 55px;
  }
  header.primary-header {
      position: relative;
      z-index: 100;    /* keep header on top of page, but under dropdown */
    }
    
    .primary-navigation {
    display: flex;                /* <--- add this */
    flex-direction: row;
    justify-content: flex-end;
    align-items: stretch;
    gap: var(--gap, 1rem);
    position: static;
    width: 100%;
    padding-right: 30px;
    background: transparent;
    border-radius: 0;
    transform: none;
    transition: none;
    overflow: visible;
    height: 100px;
    z-index: 5100;
     /* reset mobile-only collapse */
    max-height: none;   /* instead of 100px */
    opacity: 1;         /* instead of 100% */
  }


  .primary-navigation li {
    display: flex;
    align-items: flex-end;
    height: 100%;
    
  }

  .primary-navigation a {
    padding-bottom: 16px;
    color: white;
  }
 /* ✅ Force first item to be white text on desktop */
  .primary-navigation li:first-child > a {
    color: #ffffff;
    background: transparent; /* remove the blue background from mobile */
  }

  .primary-navigation li:first-child > a:hover,
  .primary-navigation li:first-child > a:focus {
    color: #ffffff;
    background: #0e2e52; /* or transparent if you don’t want hover background */
  }
  
   .dropdown {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 5000;
  }

  .dropdown .menu-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: 12px 60px 12px 12px;
    gap: 25px;
    flex-wrap: nowrap;
    background: transparent;
    height: auto;
    pointer-events: auto !important;
    z-index: 8100;

    /* ✅ Reset mobile collapse */
    max-height: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
  }

  .dropdown .menu-list > li {
    display: flex;                     /* keep items inline-flex */
    position: relative;
  }

  .dropdown .menu-list > li.has-submenu {
    position: relative;   /* required for z-index to apply */
    z-index: 6000;        /* higher than wrapper-grid */
  }

  .dropdown .menu-list > li.has-submenu > .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 6100;        /* ensure submenu floats above everything */
  }

 /* ✅ Show submenu on hover */
  .dropdown .menu-list > li:hover > .submenu {
    display: block;
  }
  .dropdown .menu-list > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 12px;
    color: black;
    text-decoration: none;
    white-space: nowrap;               /* prevent wrapping */
  }

  /* Submenus float over content */
  .dropdown .menu-list .submenu {
    position: absolute;
    top: 100%;
    left: 0;                   /* align to parent li */
    min-width: 180px;
    margin-top: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 6000;
    display: none;             /* hidden until hover */
  }
  .dropdown .menu-list .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    margin-top: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 6000;

    /* desktop hover reset */
    display: none;
    max-height: none;   /* kill accordion */
    overflow: visible;
    transition: none;
  }

  /* Show submenu on hover (desktop only) */
  .dropdown .menu-list > li:hover > .submenu {
    display: block;
  }
  .dropdown .menu-list .submenu li a {
    display: block;
    padding: 12px 20px;
    color: black;
    text-decoration: none;
    white-space: nowrap;
  }
  .dropdown .menu-list .submenu li a:hover {
    background: #0e2e52;
    color: white;
  }
  .dropdown .menu-list li.open > .submenu { display: block; }


  
}
