@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700');

/* ---------- Modern base reset for menu ---------- */

#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
  line-height: 1;
  display: block;
  position: relative;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  z-index: 283;
}

#cssmenu:after,
#cssmenu > ul:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

#cssmenu {
  width: auto;
  font-family: 'Open Sans', Helvetica, sans-serif;
  background: #1f264d;
  margin-bottom: 30px;
  padding: 0 20px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .18);
}

/* ---------- Desktop layout with flex ---------- */

#cssmenu > ul {
  background: #1f264d;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

/* Remove legacy floats on desktop */
#cssmenu > ul > li {
  float: none;
  display: inline-block;
}

/* Align social icons to the right */
#cssmenu > ul > li.nav-social:first-of-type {
  margin-left: auto;
}

#cssmenu.align-center > ul {
  justify-content: center;
}
#cssmenu.align-right > ul {
  justify-content: flex-end;
}

/* ---------- Top-level links ---------- */

#cssmenu > ul > li > a {
  padding: 14px 14px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #e3ecff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

/* Subtle underline animation on hover/active */
#cssmenu > ul > li > a span {
  position: relative;
  z-index: 1;
}

#cssmenu > ul > li > a::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: linear-gradient(90deg, #e6c76f, #f6f1c6);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease-out;
}

#cssmenu > ul > li:hover > a,
#cssmenu > ul > li > a:hover,
#cssmenu > ul > li.active > a {
  color: #ffffff;
}

/* Gold bar on hover/focus only */
#cssmenu > ul > li > a:hover::before,
#cssmenu > ul > li > a:focus::before {
  transform: scaleX(1);
}

/* ---------- Dropdown caret for items with submenu ---------- */

#cssmenu > ul > li.has-sub > a {
  padding-right: 34px;
}

#cssmenu > ul > li.has-sub > a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #d3eced;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: border-top-color 0.18s ease, transform 0.18s ease;
}

#cssmenu > ul > li.has-sub:hover > a::after,
#cssmenu > ul > li.has-sub.active > a::after {
  border-top-color: #ffffff;
  transform: translateY(-50%) rotate(180deg);
}

/* ---------- Submenus ---------- */

#cssmenu ul ul {
  position: absolute;
  left: -99913px;
  top: 60px;
  padding-top: 6px;
  font-size: 13px;
  opacity: 0;
  -webkit-transition: top 0.2s ease, opacity 0.2s ease-in;
  -moz-transition: top 0.2s ease, opacity 0.2s ease-in;
  -ms-transition: top 0.2s ease, opacity 0.2s ease-in;
  -o-transition: top 0.2s ease, opacity 0.2s ease-in;
  transition: top 0.2s ease, opacity 0.2s ease-in;
}

#cssmenu > ul > li > ul::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-bottom-color: #ffffff;
  top: -4px;
  left: 20px;
}

#cssmenu > ul > li > ul {
  top: 120px;
}

#cssmenu > ul > li:hover > ul {
  top: 52px;
  left: 0;
  opacity: 1;
}

#cssmenu ul ul ul {
  padding-top: 0;
  padding-left: 6px;
}

#cssmenu ul ul > li:hover > ul {
  left: 180px;
  top: 0;
  opacity: 1;
}

#cssmenu ul ul li a {
  text-decoration: none;
  font-weight: 400;
  padding: 11px 25px;
  width: 180px;
  color: #555;
  background: #ffffff;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.15),
    0 0 1px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

#cssmenu ul ul li + li a {
  border-radius: 0;
}

#cssmenu ul ul li:hover > a,
#cssmenu ul ul li.active > a {
  color: #11182f;
  background: #f7f8ff;
}

#cssmenu ul ul li.has-sub > a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-left-color: #777777;
  right: 17px;
  top: 14px;
}

/* ---------- Social pills ---------- */

.social-pill {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.social-pill img {
  display: block;
  width: 18px;
  height: 18px;
}

/* Brand tints */
.social-facebook {
  background: radial-gradient(circle at 30% 0, #5b8dff, #1877f2);
}
.social-x {
  background: radial-gradient(circle at 30% 0, #ffffff, #111111);
}
.social-youtube {
  background: radial-gradient(circle at 30% 0, #ff8a8a, #ff0000);
}

/* Hover lift */
.nav-social a:hover.social-pill {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

/* ---------- Mobile styles & hamburger ---------- */

#cssmenu #menu-button {
  display: none;
}

/* High-res phones & tablets up to 1024px */
@media all and (max-width: 800px),
       only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px),
       only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px),
       only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1024px),
       only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px),
       only screen and (min-resolution: 192dpi) and (max-width: 1024px),
       only screen and (min-resolution: 2dppx) and (max-width: 1024px) {

  #cssmenu {
    background: #1f264d;
    border-radius: 0;
    padding: 0;
  }

  #cssmenu > ul {
    display: none;          /* the JS will add .open */
    flex-direction: column;
    box-shadow: none;
  }

  #cssmenu > ul.open {
    display: block;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  #cssmenu > ul > li,
  #cssmenu.align-right > ul > li {
    float: none;
    display: block;
  }

  #cssmenu > ul > li > a {
    padding: 16px 20px;
    border-right: 0;
  }

  /* Reset social alignment on mobile so they stack nicely */
  #cssmenu > ul > li.nav-social:first-of-type {
    margin-left: 0;
  }
  .nav-social {
    padding: 10px 20px 6px;
  }

  /* Shrink pills slightly for mobile */
  .social-pill {
    width: 30px;
    height: 30px;
  }
  .social-pill img {
    width: 17px;
    height: 17px;
  }

  #cssmenu #menu-button {
    display: block;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    padding: 16px 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #11182f;
    cursor: pointer;
    position: relative;
  }

  #cssmenu #menu-button::after {
    display: block;
    content: '';
    position: absolute;
    height: 4px;
    width: 22px;
    border-top: 2px solid #fff;
    border-bottom: 2px solid #fff;
    right: 22px;
    top: 15px;
  }

  #cssmenu #menu-button::before {
    display: block;
    content: '';
    position: absolute;
    height: 2px;
    width: 22px;
    border-bottom: 2px solid #fff;
    right: 22px;
    top: 25px;
  }

  /* Submenus become full-width stacked lists */
  #cssmenu ul ul,
  #cssmenu ul li:hover > ul,
  #cssmenu > ul > li > ul,
  #cssmenu ul ul ul,
  #cssmenu ul ul li:hover > ul {
    left: 0;
    right: auto;
    top: auto;
    opacity: 1;
    width: 100%;
    padding: 0;
    position: relative;
    text-align: left;
    box-shadow: none;
  }

  #cssmenu ul ul li {
    width: 100%;
  }

  #cssmenu ul ul li a {
    width: 100%;
    box-shadow: none;
    padding-left: 35px;
    border-radius: 0;
  }

  #cssmenu ul ul ul li a {
    padding-left: 45px;
  }

  #cssmenu > ul > li.has-sub > a::after,
  #cssmenu ul ul li.has-sub > a::after {
    display: none;
  }
}

/* Kill global underlines inside the nav, even if site-wide a{ text-decoration:underline } */
#cssmenu a,
#cssmenu a:link,
#cssmenu a:visited,
#cssmenu a:hover,
#cssmenu a:focus,
#cssmenu a:active {
  text-decoration: none !important;
}

/* --- Fix social pills layout --- */

/* Remove normal link padding/underline behaviour for social items */
#cssmenu > ul > li.nav-social > a {
  padding: 0 !important;
}

#cssmenu > ul > li.nav-social > a::before {
  content: none !important;   /* no gold bar under the pills */
}

/* Make sure the pill itself does the centering */
.nav-social .social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

/* Force the icon to sit dead centre */
.nav-social .social-pill img {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
}
