/* Industries dropdown, for the pages whose styles are inline.
 *
 * The industry pages themselves get these rules from assets/industry.css, which
 * carries its own copy alongside the rest of its navigation. Everything else on
 * the site keeps its CSS in a <style> block in the page, so the dropdown needs
 * somewhere shared to live rather than being pasted into fourteen heads.
 *
 * Note where the mobile rules hang. Those pages do not agree on a breakpoint —
 * the hamburger appears at 720px on the home page, 760px on the articles and
 * 768px on the service pages — so a fixed media query here would be wrong on
 * two thirds of them, and between 721px and 768px the menu would render as a
 * floating white panel inside a slide-out drawer. The rules key off
 * .nav-links.open instead, which is the class each page's own script puts on
 * the drawer when the hamburger is pressed. That is true at exactly the widths
 * where the drawer exists, whatever each page has decided those are.
 *
 * Colours are written with fallbacks because a couple of pages define a
 * narrower set of custom properties than the home page does.
 */

.nav-has-drop { position: relative; }

.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body, 'Inter', sans-serif);
  padding: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  position: relative;
  transition: color 0.3s var(--ease, ease);
}
.nav-drop-btn::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold, #E8DE25);
  transition: width 0.3s var(--ease, ease);
}
.nav-has-drop:hover .nav-drop-btn,
.nav-drop-btn[aria-expanded="true"] { color: #fff; }
.nav-has-drop:hover .nav-drop-btn::after,
.nav-drop-btn[aria-expanded="true"]::after { width: 100%; }

.nav-caret {
  width: 11px;
  height: 11px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease, ease);
}
.nav-has-drop:hover .nav-caret,
.nav-drop-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-links .nav-drop {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translate(-50%, -8px);
  min-width: 274px;
  list-style: none;
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 22px 60px rgba(7, 18, 51, 0.26), 0 2px 8px rgba(7, 18, 51, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease, ease), transform 0.25s var(--ease, ease), visibility 0.25s;
}
/* Bridges the gap between the button and the panel so the pointer can cross it
   without the panel closing underneath. */
.nav-links .nav-drop::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 18px;
}
.nav-has-drop:hover .nav-drop,
.nav-has-drop:focus-within .nav-drop,
.nav-drop-btn[aria-expanded="true"] + .nav-drop {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-links .nav-drop a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy, #0B1B3F);
  line-height: 1.35;
}
.nav-links .nav-drop a:hover,
.nav-links .nav-drop a[aria-current="page"] {
  background: var(--mist, #EFF2F8);
  color: var(--navy, #0B1B3F);
}
/* Several pages give every nav link an animated underline via ::after. Inside
   the white panel that lands as a stray bar, so it is switched off. */
.nav-links .nav-drop a::after { display: none !important; }

.nav-drop .nd-ico {
  flex: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--gold-deep, #C28F1C);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-links .nav-drop a.nd-all {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--warm-grey, #E1E7F2);
  border-radius: 0 0 8px 8px;
  color: var(--gold-deep, #C28F1C);
  font-weight: 700;
  font-size: 13.5px;
}

/* ---- Inside the mobile drawer -------------------------------------------
   An accordion rather than a floating panel, opened by the button's
   aria-expanded rather than by hover, since there is no hover here. */
.nav-links.open > li.nav-has-drop { width: 100%; }
.nav-links.open .nav-drop-btn {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 16px;
  text-align: left;
}
.nav-links.open .nav-drop-btn::after { display: none; }
.nav-links.open .nav-drop {
  position: static;
  transform: none;
  min-width: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 8px 14px;
  margin-left: 2px;
  opacity: 1;
  visibility: visible;
  display: none;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.nav-links.open .nav-drop::before { display: none; }
.nav-links.open .nav-has-drop:hover .nav-drop,
.nav-links.open .nav-has-drop:focus-within .nav-drop { transform: none; }
.nav-links.open .nav-drop-btn[aria-expanded="true"] + .nav-drop { display: block; }
.nav-links.open .nav-drop a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: 14.6px;
  padding: 9px 10px;
}
.nav-links.open .nav-drop a:hover,
.nav-links.open .nav-drop a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nav-links.open .nav-drop .nd-ico { stroke: var(--gold-soft, #F0E94D); }
.nav-links.open .nav-drop a.nd-all {
  border-top-color: rgba(255, 255, 255, 0.16);
  color: var(--gold-soft, #F0E94D);
}
