/* NESkills canonical navigation — one component shared by every page. */

:root {
  --nav-navy: #34353a;
  --nav-teal: #06a1b1;
  --nav-gold: #fcb802;
  --nav-topbar-height: 30px;
  --nav-header-height: 70px;
  --nav-shell: 1280px;
  --nav-gutter: 24px;
  --nav-z: 220;
  --topbar-height: var(--nav-topbar-height);
  --header-height: var(--nav-header-height);
  --header-offset: calc(var(--nav-topbar-height) + var(--nav-header-height));
}

body.menu-open { overflow: hidden; }

.site-topbar {
  position: fixed;
  z-index: var(--nav-z);
  inset: 0 0 auto;
  height: var(--nav-topbar-height);
  border-bottom: 1px solid rgba(6, 161, 177, .48);
  background: var(--nav-navy);
  color: #d8e0e4;
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .625rem;
}

.site-topbar-inner {
  display: grid;
  width: min(var(--nav-shell), calc(100% - var(--nav-gutter) - var(--nav-gutter)));
  height: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-inline: auto;
}

.site-topbar-inner > span,
.site-topbar-inner > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-topbar-inner > span svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--nav-gold);
  stroke-width: 1.8;
}

.site-topbar-inner strong {
  color: #fff;
  font-size: .625rem;
  font-weight: 600;
  text-align: center;
}

.site-topbar-inner > a {
  justify-self: end;
  color: var(--nav-gold);
  font-weight: 700;
}

.site-header {
  position: fixed;
  z-index: calc(var(--nav-z) - 1);
  top: var(--nav-topbar-height);
  right: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: var(--nav-header-height);
  align-items: center;
  justify-content: space-between;
  padding-inline: max(var(--nav-gutter), calc((100vw - var(--nav-shell)) / 2));
  border-bottom: 1px solid rgba(6, 161, 177, .42);
  background: rgba(52, 53, 58, .97);
  color: #fff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header .brand {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
}

.site-header .brand > span { display: none; }

.site-header .brand-original-logo,
.site-header .brand > img:not(.brand-original-logo) {
  display: block;
  width: 46px;
  height: 46px;
  max-height: none;
  flex: 0 0 46px;
  padding: 0;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: .8125rem;
  font-weight: 600;
}

.desktop-nav > a:not(.nav-cta) {
  position: relative;
  padding: 25px 0 21px;
  color: #eef2f5;
  line-height: 1;
}

.desktop-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--nav-teal);
  transition: right .25s ease;
}

.desktop-nav > a:not(.nav-cta):is(:hover, :focus-visible, [aria-current="page"])::after {
  right: 0;
}

.desktop-nav > a:not(.nav-cta)[aria-current="page"] { color: #fff; }

.nav-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 999px;
  background: linear-gradient(180deg, #087989 0%, #076d7b 54%, #065e6b 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .30), 0 7px 18px rgba(6, 161, 177, .20);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease, box-shadow .2s ease;
}

.nav-cta::before {
  content: none;
}

.nav-cta:is(:hover, :focus-visible) {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 10px 22px rgba(6, 161, 177, .27);
}

.menu-button {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  cursor: pointer;
}

.menu-button svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.menu-button .close-icon { display: none; }
.menu-button[aria-expanded="true"] .open-icon { display: none; }
.menu-button[aria-expanded="true"] .close-icon { display: block; }

.mobile-menu {
  position: fixed;
  z-index: calc(var(--nav-z) - 2);
  inset: var(--header-offset) 0 0;
  display: none;
  overflow-y: auto;
  background: #fbfaf6;
  color: #20272d;
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .24s ease, transform .24s ease;
}

.mobile-menu > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(32, 39, 45, .14);
  color: #20272d;
  font-weight: 600;
}

.mobile-menu > a[aria-current="page"] { border-bottom-color: #b88b00; color: #006e7c; }

.mobile-menu > .nav-cta {
  justify-content: center;
  border: 0;
  background: #087c8c;
  color: #fff;
  box-shadow: none;
}

.mobile-menu > a[href*="wa.me"] {
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 9px;
  padding: 11px 20px;
  border: 1px solid #087c8c;
  border-radius: 999px;
  background: transparent;
  color: #006e7c;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}

.mobile-menu > a[href*="wa.me"]:hover,
.mobile-menu > a[href*="wa.me"]:focus-visible {
  background: #e6f1ef;
}

/* Tablet: dedicated menu composition rather than a compressed desktop row. */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --nav-shell: 940px;
    --nav-gutter: 17px;
  }

  .site-topbar-inner { grid-template-columns: 1fr 1fr; }
  .site-topbar-inner strong { display: none; }
  .desktop-nav { display: none; }
  .menu-button { display: grid; }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 25px max(32px, calc((100vw - 920px) / 2)) 36px;
  }
  .mobile-menu:is(.open, [aria-hidden="false"]) {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .mobile-menu > a {
    min-height: 62px;
    padding: 16px 0;
    font-size: 1.4rem;
    line-height: 1.15;
  }
  .mobile-menu > .nav-cta {
    width: min(320px, 100%);
    min-height: 48px;
    margin-top: 24px;
    padding-inline: 22px;
    font-size: 15px;
  }
  .mobile-menu > a[href*="wa.me"] { min-height: 48px; }
}

/* Mobile: compact header with a full-width, thumb-friendly menu. */
@media (max-width: 767px) {
  :root {
    --nav-topbar-height: 0px;
    --nav-header-height: 62px;
    --nav-shell: 100%;
    --nav-gutter: 14px;
  }

  .site-topbar { display: none; }
  .site-header { top: 0; padding-inline: var(--nav-gutter); }
  .site-header .brand-original-logo,
  .site-header .brand > img:not(.brand-original-logo) {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .desktop-nav { display: none; }
  .menu-button { display: grid; }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 17px 22px 24px;
  }
  .mobile-menu:is(.open, [aria-hidden="false"]) {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .mobile-menu > a {
    min-height: 56px;
    padding: 14px 0;
    font-size: clamp(1.18rem, 5vw, 1.38rem);
    line-height: 1.2;
  }
  .mobile-menu > .nav-cta {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    padding-inline: 20px;
    font-size: 15px;
  }
  .mobile-menu > a[href*="wa.me"] { min-height: 48px; padding: 11px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-cta,
  .nav-cta::before,
  .desktop-nav > a:not(.nav-cta)::after,
  .mobile-menu {
    animation: none;
    transition: none;
  }
}
