/* BoemBoost Theme — header.css
   Matches exact Suplusnis design: teal bg, Syne logo, mint CTA
   ============================================================= */

/* ----------------------------------------
   Nav bar wrapper
---------------------------------------- */
.bb-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000; /* backdrop-filter creates stacking context — must be above all page content */
  height: 72px;
  background: var(--bb-nav-bg, rgba(0, 59, 59, 0.97));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
  isolation: isolate;
}

.bb-nav-bar.is-scrolled {
  box-shadow: var(--bb-shadow-nav, var(--bb-shadow-md));
  /* v3.9.150 — scrolled background; valt terug op de gewone nav-bg, en daarna op de originele kleur */
  background: var(--bb-nav-bg-scrolled, var(--bb-nav-bg, rgba(0, 59, 59, 0.98)));
}

.bb-nav-bar__inner {
  width: 100%;
  padding: 0 5%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}

/* Nav right takes remaining space, pushes everything to the right */
.bb-nav-right {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-left: auto;
}

/* v3.9.155 — desktop hamburger mode: hide inline nav-right in the bar
   (it becomes the slide-in panel); keep Contact + hamburger visible. */
@media (min-width: 769px) {
  .bb-nav-bar--desktop-burger .bb-nav-right:not(.is-open):not([style*="fixed"]) {
    /* Once JS portals nav-right to <body>, this in-bar copy is gone anyway.
       Before JS runs, hide it so there's no flash of inline links. */
    display: none;
  }
  .bb-nav-bar--desktop-burger .bb-nav-cta {
    margin-left: auto;
    width: auto;
    flex-shrink: 0;
  }
  .bb-nav-bar--desktop-burger .bb-hamburger {
    margin-left: 1.5rem;
  }
}

/* ----------------------------------------
   Logo
---------------------------------------- */
.bb-nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  gap: 0;
}

.bb-nav-logo__name {
  font-family: var(--bb-font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1;
}

.bb-nav-logo__sub {
  font-family: var(--bb-font);
  font-size: 9px;
  font-weight: 300;
  color: var(--bb-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-left: 1px solid rgba(153, 255, 187, 0.35);
  margin-left: 14px;
  padding-left: 14px;
  line-height: 1.4;
}

/* Custom logo image — constrain to nav height */
.bb-nav-logo--image {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.bb-nav-logo--image a.custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

.bb-nav-logo--image img.custom-logo {
  height: 36px !important;
  width: auto !important;
  max-width: 200px !important;
  display: block !important;
}

/* ----------------------------------------
   Nav links
---------------------------------------- */
.bb-nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bb-nav__link {
  /* v3.9.153 — inline-flex + vaste line-height, zodat <a> en de dropdown-
     <button> exact even hoog zijn. Voorheen groeide de button mee met de
     body line-height (1.7) terwijl de inline <a> dat niet deed: 7px verschil. */
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 400;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  padding: 0.48rem 1.1rem;
  border-radius: var(--bb-r-sm);
}

.bb-nav__link:hover,
.bb-nav__item.is-current .bb-nav__link {
  color: var(--bb-accent);
}

/* ----------------------------------------
   Language switcher
---------------------------------------- */
.bb-lang {
  display: flex;
  align-items: center;
  border: 1px solid rgba(153, 255, 187, 0.2);
  border-radius: var(--bb-r-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.bb-lang__btn {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  border: none;
  border-right: 1px solid rgba(153, 255, 187, 0.15);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
  font-family: var(--bb-font);
}

.bb-lang__btn:last-child {
  border-right: none;
}

.bb-lang__btn:hover,
.bb-lang__btn.is-active {
  color: var(--bb-accent);
  background: rgba(153, 255, 187, 0.08);
}

/* ----------------------------------------
   CTA button
---------------------------------------- */
.bb-nav-cta {
  background: var(--bb-btn-nav-cta-bg, var(--bb-accent));
  color: var(--bb-btn-nav-cta-text, var(--bb-dark));
  padding: 0.48rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--bb-btn-nav-cta-radius, var(--bb-r-sm));
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
  font-family: var(--bb-font);
  line-height: 1;
}

.bb-nav-cta:hover {
  background: var(--bb-btn-nav-cta-hover-bg, var(--bb-accent-hover));
  color: var(--bb-btn-nav-cta-hover-text, var(--bb-btn-nav-cta-text, var(--bb-dark)));
}

/* ----------------------------------------
   Hamburger (mobile)
---------------------------------------- */
.bb-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.bb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bb-accent);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.bb-hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.bb-hamburger.is-open span:nth-child(2) { opacity: 0; }
.bb-hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ----------------------------------------
   Page body offset (fixed nav height)
---------------------------------------- */
.bb-main {
  padding-top: 72px;
}

/* ----------------------------------------
   Tablet (≤ 1024px)
---------------------------------------- */
@media (max-width: 1024px) {
  .bb-nav-links {
    gap: 1.2rem;
  }
}

/* ----------------------------------------
   Mobile (≤ 768px)
---------------------------------------- */
@media (max-width: 768px) {
  /* v3.9.387 — per-button mobile sizing. Only buttons that set a mobile value
     get the .bb-nav-btn--msize marker; others keep their inline desktop size.
     Each property falls back to the desktop default when its var isn't set. */
  .bb-nav-btn--msize {
    padding: var(--bb-nmb-pad-y, 0.7rem) var(--bb-nmb-pad-x, 1.6rem) !important;
    font-size: var(--bb-nmb-fs, 0.85rem) !important;
  }

  .bb-hamburger {
    display: flex;
  }

  .bb-nav-right {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bb-nav-bg, rgba(0, 59, 59, 0.98));
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--bb-s6) 5%;
    gap: var(--bb-s5);
    overflow-y: auto;
    z-index: 9999;
    margin-left: 0;
  }

  .bb-nav-right.is-open {
    display: flex;
  }

  /* Move lang switcher to top of drawer */
  .bb-nav-right .bb-lang {
    order: -1;
    width: 100%;
  }

  .bb-nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .bb-nav__item {
    width: 100%;
    border-bottom: 1px solid rgba(153, 255, 187, 0.1);
  }

  .bb-nav__link {
    display: block;
    padding: var(--bb-s4) 0;
    font-size: 1.25rem;
    font-family: var(--bb-font-heading);
    font-weight: 600;
    line-height: var(--bb-line-height, 1.7); /* v3.9.153 — mobiel blijft zoals het was */
  }

  .bb-nav-right .bb-nav-cta {
    width: 100%;
    text-align: center;
    padding: 0.75rem 1.1rem;
  }
  /* CTA now sits in the bar (outside drawer) — keep it compact on mobile */
  .bb-nav-bar__inner > .bb-nav-cta {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.72rem;
    margin-left: auto;
  }
}

/* ----------------------------------------
   Small mobile (≤ 480px) — hide lang in nav bar (too narrow), shown in drawer via 768px rules
---------------------------------------- */
@media (max-width: 480px) {
  .bb-nav-bar .bb-lang {
    display: none;
  }
}

/* ============================================================
   Submenu dropdown
============================================================ */
.bb-nav__item.has-submenu { position: relative; }

.bb-nav__toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.48rem 1.1rem;
    border-radius: var(--bb-r-sm);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.2; /* v3.9.153 — gelijk aan .bb-nav__link */
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.bb-nav__toggle:hover,
.bb-nav__item.has-submenu.is-open .bb-nav__toggle,
.bb-nav__item.is-current .bb-nav__toggle {
    color: var(--bb-accent);
}

.bb-nav__chevron {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.bb-nav__item.has-submenu.is-open .bb-nav__chevron {
    transform: rotate(180deg);
}

.bb-nav__submenu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    border: 1px solid;
    border-radius: 8px;
    box-shadow: var(--bb-shadow-nav-dropdown, var(--bb-shadow-md));
    list-style: none;
    padding: 6px 0;
    z-index: 600;
    white-space: nowrap;
}

.bb-nav__item.has-submenu.is-open .bb-nav__submenu {
    display: block;
}

.bb-nav__sublink {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.bb-nav__sublink:hover {
    background: rgba(0,0,0,0.05);
}

/* ============================================================
   Lang switcher — dropdown style
============================================================ */
.bb-lang--dropdown {
    position: relative;
    overflow: visible;  /* override .bb-lang { overflow: hidden } so panel shows */
    border: none;       /* dropdown has its own trigger styling */
    background: none;
}

.bb-lang__trigger {
    background: none;
    border: 1px solid rgba(153,255,187,0.3);
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    text-transform: uppercase;
    transition: background 0.15s;
}

.bb-lang__trigger:hover {
    background: rgba(153,255,187,0.1);
}

.bb-lang--dropdown.is-open .bb-lang__trigger {
    background: rgba(153,255,187,0.15);
}

.bb-lang__panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: var(--bb-shadow-nav-mobile, var(--bb-shadow-md));
    min-width: 70px;
    z-index: 600;
    overflow: hidden;
}

.bb-lang--dropdown.is-open .bb-lang__panel {
    display: block;
}

.bb-lang__option {
    display: block;
    padding: 7px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    color: #003b3b;
    transition: background 0.15s;
}

.bb-lang__option:hover {
    background: #f0fdf4;
}

/* ============================================================
   Mobile overrides — MUST be at end of file to win cascade over
   global submenu/toggle/lang rules defined above.
============================================================ */
@media (max-width: 768px) {

  /* Toggle button matches link style exactly */
  .bb-nav__toggle {
    display: flex;
    width: 100%;
    padding: var(--bb-s4) 0;
    font-size: 1.25rem;
    font-family: var(--bb-font-heading);
    font-weight: 600;
    justify-content: space-between;
    align-items: center;
    border-radius: 0;
    white-space: normal;
    color: rgba(255, 255, 255, 0.7);
  }

  /* Submenu stacks inline — not floating absolute */
  .bb-nav__submenu {
    display: none;
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 0 0.5rem 1rem !important;
    min-width: 0 !important;
    white-space: normal !important;
    background: transparent !important;
    z-index: auto !important;
  }

  .bb-nav__item.has-submenu.is-open .bb-nav__submenu {
    display: block;
  }

  .bb-nav__sublink {
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6) !important;
    background: none !important;
    display: block;
  }

  .bb-nav__sublink:hover {
    background: none !important;
    color: var(--bb-accent) !important;
  }

  /* Lang trigger: explicit light color on dark drawer */
  .bb-nav-right .bb-lang__trigger {
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(153, 255, 187, 0.3);
  }

  .bb-nav-right .bb-lang__trigger:hover {
    color: var(--bb-accent);
    background: rgba(153, 255, 187, 0.08);
  }

  /* Lang panel: open left-anchored near trigger */
  .bb-nav-right .bb-lang__panel {
    left: 0;
    right: auto;
  }

  /* 5px left indent on all top-level nav items */
  .bb-nav__link,
  .bb-nav__toggle {
    padding-left: 5px;
  }
}

/* ============================================================
   Mobile: hide nav on scroll down, show on scroll up
============================================================ */
@media (max-width: 768px) {
  .bb-nav-bar {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
  }
  .bb-nav-bar.is-nav-hidden {
    transform: translateY(-100%);
  }
}

/* ============================================================
   Nav favourites heart — mobile only
============================================================ */
.bb-nav-fav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  .bb-nav-fav {
    display: none; /* v3.9.387 — favourites live in the menu topbar on mobile */
  }
  .bb-nav-fav svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    fill: none;
    transition: fill 0.2s ease, stroke 0.2s ease;
  }
  .bb-nav-fav.is-active svg {
    fill: #ffffff;
    stroke: #ffffff;
  }
}

/* ============================================================
   v3.9.155 — Menu topbar (taalrij + Favorieten)
   Hidden by default; only shown inside the open drawer.
============================================================ */
.bb-menu-topbar { display: none; }
.bb-menu-close  { display: none; }
.bb-menu-backdrop { display: none; }

.bb-nav-right.is-open .bb-menu-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  order: -2;
}
.bb-menu-langrow { display: flex; gap: 12px; align-items: center; }
.bb-menu-langrow__lang {
  background: none; border: none; padding: 0;
  font-size: 13px; font-weight: 400; text-decoration: none;
  color: rgba(255,255,255,0.55); cursor: pointer;
}
.bb-menu-langrow__lang.is-active { font-weight: 600; color: #ffffff; }
.bb-menu-langrow__sep { color: rgba(255,255,255,0.3); }
.bb-menu-fav {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13px; font-weight: 500;
  color: #ffffff;
}
.bb-menu-fav svg { stroke: var(--bb-heart-active, currentColor); }

/* ============================================================
   v3.9.155 — Desktop hamburger mode
   Bar shows: logo + Contact + hamburger. Links/lang go in a
   right-side panel that slides in; page dimmed behind it.
============================================================ */
@media (min-width: 769px) {
  .bb-nav-bar--desktop-burger .bb-hamburger { display: flex; }

  /* Side panel (portaled to <body>) */
  .bb-nav-bar--desktop-burger ~ .bb-nav-right,
  body > .bb-nav-right {
    /* applies once JS portals it to body in desktop-burger mode */
  }

  .bb-nav-bar--desktop-burger .bb-nav-cta { display: inline-flex; }
}

/* The drawer itself, when portaled to body in desktop-burger mode */
@media (min-width: 769px) {
  body > .bb-nav-right {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    left: auto;
    width: 400px;
    max-width: 90vw;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 88px 32px 32px;
    gap: 20px;
    background: var(--bb-nav-bg, rgba(0,59,59,0.98));
    overflow-y: auto;
    z-index: 10000;
  }
  body > .bb-nav-right.is-open { transform: translateX(0); }

  body > .bb-nav-right .bb-nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  body > .bb-nav-right .bb-nav__item {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  body > .bb-nav-right .bb-nav__link,
  body > .bb-nav-right .bb-nav__toggle {
    display: block;
    width: 100%;
    padding: 14px 0;
    font-size: 1.1rem;
  }
  /* Hide the in-bar dropdown lang switcher inside the drawer (topbar replaces it) */
  body > .bb-nav-right .bb-lang { display: none; }

  body > .bb-nav-right .bb-menu-close {
    display: block;
    position: absolute;
    top: 24px; right: 24px;
    background: none; border: none; cursor: pointer;
    color: #ffffff; padding: 4px;
  }

  .bb-menu-backdrop.is-open {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
  }
}

/* Mobile: show close X and topbar lang switcher, hide the old dropdown/pill */
@media (max-width: 768px) {
  .bb-nav-right.is-open .bb-lang { display: none; }
  /* v3.9.359 — hide the in-drawer close X on mobile: the top nav bar's
     hamburger already becomes an X there, so this one was a duplicate.
     (Desktop side-panel keeps its close X — that rule is above, unchanged.) */
  .bb-nav-right.is-open .bb-menu-close {
    display: none !important;
  }
}

/* ============================================================
   v3.9.156 — Submenu ALWAYS expanded inside the drawer
   (mobile drawer + desktop side panel). No dropdown, sub-items
   permanently visible and indented under their parent.
============================================================ */
.bb-menu-panel .bb-nav__submenu {
  display: block !important;
  position: static !important;
  top: auto; left: auto;
  min-width: 0;
  width: 100%;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
  padding: 0 0 8px 0 !important;
  margin: 0;
}
.bb-menu-panel .bb-nav__submenu li { list-style: none; }
.bb-menu-panel .bb-nav__sublink {
  display: block;
  padding: 8px 0 8px 18px !important;   /* indent so sub-items read as children */
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--bb-menu-link, inherit) !important;
  background: none !important;
  opacity: 0.85;
}
.bb-menu-panel .bb-nav__sublink:hover {
  opacity: 1;
  color: var(--bb-menu-link-active, var(--bb-menu-link, inherit)) !important;
}
/* Parent toggle: no chevron, left-aligned, acts as a heading */
.bb-menu-panel .bb-nav__chevron { display: none; }
.bb-menu-panel .bb-nav__toggle {
  cursor: default;
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  justify-content: flex-start !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* v3.9.387 — mobile: favourites now lives in the menu topbar (right side),
   and the nav-bar heart is hidden. Reverses the v3.9.157 choice. */
@media (max-width: 768px) {
  .bb-menu-fav { display: inline-flex !important; }
  /* keep the language row left and the heart right */
  .bb-nav-right.is-open .bb-menu-topbar { justify-content: space-between; }
}
