/* =====================================================================
   NAVBAR.CSS — Enlight Vocational Institute
   All navigation-bar styles: brand/logo, desktop links, "More" dropdown,
   Apply Now button, and the hamburger button + mobile menu panel.
   Mobile show/hide breakpoints live in responsive.css.
   ===================================================================== */

@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/zilla-slab/ZillaSlab-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/zilla-slab/ZillaSlab-Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/zilla-slab/ZillaSlab-SemiBold.woff2") format("woff2");
}

@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/zilla-slab/ZillaSlab-Bold.woff2") format("woff2");
}
/*------ NAV ---------------- */
/* position:fixed instead of sticky — style.css sets overflow-x:hidden on
   html and body (to fix an earlier sideways-scroll bug), and overflow on
   any ancestor breaks position:sticky in most browsers. fixed sidesteps
   that, but it takes the nav out of normal flow, so body gets a matching
   padding-top below to stop page content jumping underneath it. */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 60;
}

/* Matches .site-nav's rendered height (~0.8rem padding + 42px logo +
   1px border). Check this against the actual rendered height in devtools
   and adjust by a few px if there's a gap or overlap. */
body {
  padding-top: 70px;
}

.site-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}
.brand img {
  height: 42px;
  width: 42px;
}
.brand-name {
  font-family: "Zilla Slab";
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy-deep);
  line-height: 1.15;
  white-space: nowrap;
}
.brand-name small {
  display: block;
  font-family: "Zilla Slab";
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--slate);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--slate);
  font-family: "Zilla Slab";
  transition: color 0.2s;
  position: relative;
  padding: 0.3rem 0;
}
.nav-links a:hover {
  color: var(--navy);
}
.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--gold);
}

.nav-more {
  position: relative;
}
.nav-more > button {
  background: none;
  border: none;
  font: inherit;
  color: var(--slate);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0;
}
.nav-more > button:hover {
  color: var(--navy);
}
.nav-more .chev {
  width: 9px;
  height: 9px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 40px -18px rgba(16, 32, 63, 0.28);
  min-width: 180px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.18s;
}
.nav-more.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  font-family: "Zilla Slab";
  padding: 0.55rem 0.8rem;
  border-radius: 5px;
  font-size: 0.86rem;
  color: var(--ink);
}
.nav-dropdown a:hover {
  background: var(--blue-tint);
  color: var(--navy);
}
.nav-dropdown a.active {
  color: var(--navy);
  font-weight: 600;
}

.nav-cta {
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: var(--navy-deep);
}

.ham {
  display: none;
  position: relative;
  width: 22px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0.4rem;
}

.ham span {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--navy-deep);
  display: block;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    top 0.25s ease;
}

.ham span:nth-child(1) {
  top: 0;
}
.ham span:nth-child(2) {
  top: 7px;
}
.ham span:nth-child(3) {
  top: 14px;
}

/* hamburger -> X, driven purely by the existing .mobile-menu.open toggle
   (no extra JS or classes needed) */
.site-nav:has(.mobile-menu.open) .ham span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.site-nav:has(.mobile-menu.open) .ham span:nth-child(2) {
  opacity: 0;
}
.site-nav:has(.mobile-menu.open) .ham span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.mobile-menu {
  display: none;
}