/* ============================================================
   JTI University — Header & Nav  v0.0.8
   ============================================================ */

/*
  The theme targets a 430px mobile viewport (theme.json contentSize).
  Both the header bar and nav overlay are constrained to that width
  and centred, so desktop preview always matches mobile intent.
*/

/* ── Header bar ─────────────────────────────────────────────── */
#site-header {
  position: relative;
  z-index: 200;
  background: #fff;
}

#header-bar {
  background: #fff;
  position: relative;
  z-index: 300;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 430px;   /* match theme contentSize */
  margin: 0 auto;
  box-sizing: border-box;
}

/* ── Logo ────────────────────────────────────────────────────── */
.navbar-brand {
  text-decoration: none;
  color: #000;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}
.navbar-brand .site-logo {
  height: 48px;
  width: auto;
  display: block;
}

/* ── Right side (lang + toggler) ────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right .lang-item a {
  font-family: 'Seitu', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
}

/* ── Toggle button ───────────────────────────────────────────── */
#nav-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 300;
}
#nav-toggle:focus-visible {
  outline: 2px solid #00BB31;
  outline-offset: 2px;
}

.nav-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

#nav-toggle[aria-expanded="false"] .nav-icon--menu  { display: block; }
#nav-toggle[aria-expanded="false"] .nav-icon--close { display: none;  }
#nav-toggle[aria-expanded="true"]  .nav-icon--menu  { display: none;  }
#nav-toggle[aria-expanded="true"]  .nav-icon--close { display: block; }

/* ── Nav overlay ─────────────────────────────────────────────── */
/*
  Constrained to the same 430px as the header.
  Centred with left/transform so it aligns on any viewport.
  Starts flush under the header bar (69px).
*/
#site-nav {
  display: none;
  position: fixed;
  top: 69px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(100vh - 69px);
  background: #00BB31;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 60px;
}

#site-nav.is-open {
  display: block;
}

/* ── Nav list ────────────────────────────────────────────────── */
.site-nav__list {
  list-style: disc;
  margin: 0;
  padding-left: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* White bullet markers */
.site-nav__list > li {
  display: flex;
  align-items: center;  /* ← bullet stays centred regardless of text height */
  gap: 10px;
  margin-bottom: 2px;   /* tighter */
}
.site-nav__list > li::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  align-self: center;
}

/* Links */
.site-nav__list a {
  color: #fff;
  font-family: 'Seitu', sans-serif;
  font-size: 22px;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.5;
  display: inline-block;
  padding: 2px 0;
}
.site-nav__list a:hover,
.site-nav__list a:focus {
  color: rgba(255,255,255,0.8);
}

/* ── Current / active page → bold ───────────────────────────── */
.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-ancestor > a,
.site-nav__list .current-page-ancestor > a,
.site-nav__list .current_page_item > a {
  font-weight: 700;
}

/* ── Sub-menu ────────────────────────────────────────────────── */
.site-nav__list .sub-menu {
  list-style: none;
  padding-left: 1rem;
  margin-top: 4px;
}
.site-nav__list .sub-menu li::marker { color: transparent; }
.site-nav__list .sub-menu a { font-size: 18px; }

/* ── Divider items ───────────────────────────────────────────── */
/*
  Any menu item whose link is "#" becomes a divider line.
  No CSS class needed in WP — just set the URL to # .
  "menu-divider" class also works if you prefer.
*/
.site-nav__list li:has(> a[href$="#"]),
.site-nav__list li.menu-divider {
  list-style: none;
  pointer-events: none;
  margin: 14px 0;
}
.site-nav__list li:has(> a[href$="#"])::marker,
.site-nav__list li.menu-divider::marker {
  color: transparent;
}
.site-nav__list li:has(> a[href$="#"]) a,
.site-nav__list li.menu-divider a {
  display: none;   /* hide the link text */
}
.site-nav__list li:has(> a[href$="#"])::before,
.site-nav__list li.menu-divider::before {
  content: '';
  display: block;
  width: 120px;
  height: 3px;
  background: white;
}

body.nav-is-open,
html.nav-is-open {
  overflow: hidden;
}