/* Main-nav dropdowns (Industries and More), 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 accordion rules hang. They key off .nav-links.open, the class
 * each page's own script puts on the drawer when the hamburger is pressed,
 * rather than a media query, so they hold wherever the drawer exists. The
 * pages' own CSS still disagrees on where that starts (720px on the home page,
 * 760px on the articles, 768px on the service pages); the block at the end of
 * this file now brings the drawer in at 1100px on all of them.
 *
 * 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);
}

/* ---- The rest of the bar ------------------------------------------------
   Arcane Charging Connect sits in the bar as an ordinary link. Its hover
   underline is the coral from its own brand pack (Skeats Designs usage
   guide, primary #E66B5B) rather than our gold. */
.nav-links > li > a.nav-arcane::after { background: #E66B5B; }

/* More holds About, Team, News and Contact, so on those pages it carries the
   current-page underline the plain links used to. */
.nav-drop-btn.is-current { color: #fff; }
.nav-drop-btn.is-current::after { width: 100%; }

/* "Arcane Charging Connect" is three words; a link never wraps onto two lines. */
.nav-links > li > a,
.nav-drop-btn { white-space: nowrap; }

/* A little extra room before the button pulls the text links towards the
   logo. Not inside the drawer, where it would indent the button. */
.nav-links:not(.open) > li:has(> .nav-cta) { margin-left: 24px; }

/* ---- When the drawer takes over ------------------------------------------
   Every page's own CSS switches to the hamburger at 720, 760 or 768px, but the
   full bar needs about 1100px; between the two the bar used to squash the logo
   and wrap the button over itself. These are each page's own drawer rules,
   copied once, at the one width where the bar stops fitting. This file loads
   after each page's <style> block, so at narrower widths the two agree. */
@media (max-width: 1100px) {
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(82vw, 320px);
    background: var(--navy, #0B1B3F);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 26px; padding: 40px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease, ease);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
    z-index: 999;
  }
  .nav-links.open { transform: translateX(0); }
  .nav:has(.nav-links.open) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transition: none !important; }
  .nav-toggle { display: flex; z-index: 1001; }
}
@media (min-width: 1101px) and (max-width: 1199px) {
  .nav-links { gap: 18px; }
}
