:root
{
  --slide-duration: 10s;
  --transition-duration: 800ms;

  /* Fluid sizes: they scale between 769px and large desktops */
  --hero-gutter: clamp(1rem, 2.4vw, 2.5rem);       /* shared left/right inset */
  --hero-card-h: clamp(96px, min(12vw, 18vh), 160px);
  --hero-card-gap: clamp(.5rem, 1.2vw, 1rem);
  --hero-copy-gap: 2.25rem;           /* space between the copy and the cards */
  --hero-ink: #0b2a4a;                /* dark navy used for text on white + focus rings */
  --hero-glass: rgba(9, 30, 62, .6);  /* glass panels: white text on this is >= 4.5:1 */
  --hero-scrim: 6, 24, 48;            /* RGB of the dark overlay behind the text */

  position: relative;
  display: flex;               /* centres the frame vertically on tall screens */
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  padding: 24px 0;
  overflow: hidden;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}

.tbm-nav {
  /* All menu sizes are in em, so the whole menu scales with this one value */
  font-size: clamp(12px, 1.2vw, 15px);

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: .25rem;
  margin: 0;
  padding: .375rem;
  list-style: none;
  background: rgba(9, 30, 62, .72);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
}

.tbm-link.level-1 {
  color: #fff;
}

.tbm-submenu-toggle
{
  background: transparent;
  color: #fff;
}

.tbm-submenu-toggle::before
{
  border: none !important;
  color: #fff;
  content: "\F282";
  display: block;
  font-family: var(--bs-icons-font);
}

.tbm-submenu-toggle:hover::before,
.tbm-submenu-toggle:hover::before,
.tbm-submenu-toggle:focus::before,
.is-pilled .tbm-submenu-toggle::before
{
  color: #222;
}

.tbm-link.level-1:hover, .tbm-link.level-1:focus {
  background-color: transparent;
}

 .tbm-nav > .tbm-item
{
  background: none;
}

#hero.animated-hero .tbm-submenu
{
  margin-top: 6px;
}

 .tbm-nav > .tbm-item.tbm-item--has-dropdown .tbm-link-container
{
  padding-right: .4em;
}

/* Compact, single-line top level */
 .tbm-nav {
  justify-content: space-between;
  gap: 0;
}

 .tbm-nav > .tbm-item {
  flex: 0 0 auto;
}

 .tbm-nav {
  position: relative;
}

 .tbm-nav > .tbm-item > .tbm-link-container {
  position: relative;
  z-index: 1; /* above the pill */
}

.hero-menu-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: var(--w, 0);
  height: var(--h, 0);
  background: #fff;
  border-radius: 999px;
  opacity: 0;
  transform: translate(var(--x, 0), var(--y, 0));
  pointer-events: none;
}

.hero-menu-pill.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-menu-pill.is-visible {
    transition:
      transform 350ms cubic-bezier(.4, 0, .2, 1),
      width 350ms cubic-bezier(.4, 0, .2, 1),
      height 350ms cubic-bezier(.4, 0, .2, 1),
      opacity 200ms ease;
  }
}

/* The pill replaces per-item hover/active backgrounds */
 .tbm-nav > .tbm-item > .tbm-link-container > .tbm-link,
 .tbm-nav > .tbm-item > .tbm-link-container > .tbm-link:hover {
  background: transparent;
}

/* Text on the pill is dark, everywhere else white */
 .tbm-nav > .tbm-item:not(.is-pilled) > .tbm-link-container > .tbm-link {
  color: #fff;
}

 .tbm-nav > .tbm-item.is-pilled > .tbm-link-container > .tbm-link,
 .tbm-nav > .tbm-item.is-pilled > .tbm-link-container > .tbm-submenu-toggle {
  color: var(--hero-ink);
}

 .tbm-nav > .tbm-item > .tbm-link-container {
  flex-wrap: nowrap;
  gap: .125em;
  align-items: center;
}

 .tbm-nav > .tbm-item > .tbm-link-container > .tbm-link {
  padding: .5em .75em;
  font-size: 1em; /* follows the font-size set on .tbm-nav */
  line-height: 1.2;
  font-weight: 500;
  white-space: nowrap;
}

 .tbm-nav > .tbm-item > .tbm-link-container > .tbm-submenu-toggle {
  flex: 0 0 auto;
  width: 1.6em;
  height: 1.6em;
  margin: 0;
  padding: 0;
}

 .tbm-nav > .tbm-item--has-dropdown:not(.tbm-justify) {
  position: relative;
}

/* Wide panels span the pill. Delete this block if they already line up. */
 .tbm-nav > .tbm-item.tbm-justify {
  position: static;
}

 .tbm-nav > .tbm-item.tbm-justify > .tbm-submenu {
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
}

.tbm-submenu-toggle:hover, .tbm-submenu-toggle:focus {
  background-color: transparent !important;
}

/* Current page: white pill, dark text (13:1) */
 a.is-active,
 a.active,
 a[aria-current="page"] {
  color: var(--hero-ink);
  background: #fff;
}

.tbm-item.level-1 {
  border-right: none;
}

/* --------------------------------------------------------------------------
   RESPONSIVE (769px and up)
   Most sizes above are fluid (clamp). These are the few layout changes.
   -------------------------------------------------------------------------- */

/* Tablets / small laptops: 7 menu items no longer fit on one line, so the
   pill wraps onto two centred lines */
@media (max-width: 1023px) {
   .tbm-nav {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: .125rem;
    border-radius: 28px;
  }

  #hero.animated-hero .hero-topbar {
    column-gap: 1rem;
  }
}

/* ---------------------For mobile------------------------*/

@media (max-width: 992px) {
  .tbm-button
  {
    background: var(--hero-glass);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 8px;
    padding: 5px;
  }

  .tbm-button-container span {
      background-color: var(--bs-white);
  }

  .tbm.tbm--mobile .tbm-nav {
      background: var(--bs-white);
  }

  .tbm.tbm--mobile .tbm-button
  {
    width: 48px;
    height: 48px;
  }

  .tbm.tbm--mobile .tbm-collapse {
      padding-top: 0;
  }

  .tbm.tbm--mobile.tbm--mobile-show .tbm-collapse
  {
    display: block;
    width: 40%;
    background: transparent;
  }

   .tbm-nav{
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 3px;
  }

  .tbm-button-container span:nth-child(2),
  .tbm-button-container span:nth-child(3) {
      top: calc(50% - 0.12rem);
  }

  .tbm-button-container span {
      height: 2.5px;
  }

  .tbm-button-container span:nth-child(1)
  {
    height: 2px;
  }

  #hero.animated-hero .tbm-submenu
  {
    background: transparent;
    margin-top: 15px;
    margin-bottom: 15px;
  }
  
  .level-1 .tbm-submenu a
  {
    color: #fff;
  }

  .tbm.tbm--mobile .level-1 .tbm-submenu .tbm-link {
    padding: 0 1.25rem;
  }

  .tbm.tbm--mobile .tbm-subnav
  {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .tbm-subnav > .tbm-item > .tbm-link-container > .tbm-link:hover, 
  .tbm-subnav > .tbm-item > .tbm-link-container > .tbm-link:focus
  {
    color: #1197f0;
  }

  .tbm-subnav > .tbm-item > .tbm-link-container > .tbm-link
  {
    color: #fff;
  }

  .tbm.tbm--mobile.tbm--mobile-show .tbm-collapse .tbm-item
  {
    width:100%;
  }

  .tbm-button-container {
    width: auto;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    height: auto;
    padding: 5px;
    position: relative;
    width: 100%;
  }

  .tbm-button-container span
  {
    position: static;
    display: inline-flex;
  }

  .tbm-button-container span:last-child
  {
    display: none;
  }

  /********************** Close button Menu ****************************/
  .tbm-button[aria-expanded="true"] .tbm-button-container span:nth-child(3) {
    transform: rotate(-45deg);
    width: 25px;
    position: absolute;
    left: 5px;
  }

  .tbm-button[aria-expanded="true"] .tbm-button-container span:nth-child(2) {
    transform: rotate(45deg);
    width: 25px;
    position: absolute;
    left: 5px;
  }

  -pill {
    display: none;
  }

  .tbm-nav > .tbm-item > .tbm-link-container {
    border-radius: 999px;
    transition: background-color 200ms ease;
  }

  /* Hover */
  .tbm-nav > .tbm-item:hover > .tbm-link-container {
    background: rgba(255, 255, 255, .22);
  }

  /* Current page: white pill, dark text. Keep this AFTER the hover rule. */
   .tbm-nav > .tbm-item.active > .tbm-link-container {
    background: #fff;
  }

   .tbm-nav > .tbm-item.active > .tbm-link-container > .tbm-link,
   .tbm-nav > .tbm-item.active > .tbm-link-container > .tbm-submenu-toggle {
    color: var(--hero-ink);
  }

   .tbm-nav > .tbm-item.active .tbm-submenu-toggle::before {
    color: #222;
  }
}