/* =============================================================
   Labuan Bajo Luxury — Header
   Transparent over hero → solid white on scroll (luxury feel).
   Single source of truth for header styling.
   ============================================================= */

:root {
  --lbl-brown: #A8784A;
  --lbl-brown-dark: #8d6238;
  --lbl-cream: #f5efe6;
  --lbl-ink: #1a1a1a;
  --lbl-header-h: 64px;
  --lbl-header-h-scrolled: 56px;
  --lbl-topbar-h: 37px;            /* desktop utility bar height */
  --lbl-header-total: calc(var(--lbl-header-h) + var(--lbl-topbar-h));
  --lbl-page-gap: 24px;            /* breathing room between header & hero on inner pages */
}

/* ---------- Body base ----------
   Sticky header takes its own space at the top of the document — no
   padding-top compensation needed on body. Keeps spacing identical on
   every breakpoint. */
body {
  background-color: var(--lbl-cream) !important; /* override body bg-black */
}
/* Lock background scroll while the mobile drawer is open */
body.lbl-drawer-open { overflow: hidden; touch-action: none; }
/* Topbar removed everywhere — keep the bar tight and on-palette */
header.lbl-header .lbl-header__topbar {
  display: none;
}
/* Header is solid from the start (no transparent-over-hero state) */
header.lbl-header {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}
header.lbl-header .lbl-header__logo img { filter: none; height: 36px; }
header.lbl-header .nav-menu > li > a { color: var(--lbl-ink); }
header.lbl-header .nav-menu > li > a:hover { color: var(--lbl-brown); }
header.lbl-header .nav-menu .ti-chevron-down { color: var(--lbl-ink); }
header.lbl-header .hamburger-menu { color: var(--lbl-brown); }
header.lbl-header .lbl-header__row { height: var(--lbl-header-h-scrolled); }

/* ---------- Reset legacy header rule ---------- */
header.lbl-header,
header.lbl-header * {
  box-sizing: border-box;
}

/* ---------- Base ----------
   Sticky positioning: header stays in document flow, so it takes its own
   space at the top of the page and pins to viewport on scroll. No body
   padding-top needed, spacing is consistent across all breakpoints. */
header.lbl-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform 0.35s ease, background-color 0.35s ease,
              border-color 0.35s ease, box-shadow 0.35s ease,
              backdrop-filter 0.35s ease;
}

header.lbl-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* ---------- Top utility bar (desktop) ---------- */
.lbl-header__topbar {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.35s ease, color 0.35s ease,
              border-color 0.35s ease, max-height 0.35s ease,
              padding 0.35s ease, opacity 0.35s ease;
  max-height: 60px;
  overflow: hidden;
}
header.lbl-header.is-scrolled .lbl-header__topbar {
  background: var(--lbl-cream);
  color: var(--lbl-ink);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  max-height: 0;
  padding: 0;
  opacity: 0;
}
.lbl-header__topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.lbl-header__topbar-link:hover {
  color: var(--lbl-brown);
}
.lbl-header__topbar-link i {
  font-size: 14px;
  opacity: 0.85;
}
.lbl-header__topbar-tag {
  font-style: italic;
  font-weight: 300;
  opacity: 0.85;
}

/* ---------- Main bar ---------- */
.lbl-header__main {
  padding: 0;
}
.lbl-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--lbl-header-h);
  transition: height 0.35s ease;
}
header.lbl-header.is-scrolled .lbl-header__row {
  height: var(--lbl-header-h-scrolled);
}

/* ---------- Logo ---------- */
.lbl-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.lbl-header__logo img {
  height: 56px;
  width: auto;
  display: block;
  transition: height 0.35s ease, filter 0.35s ease;
  filter: brightness(0) invert(1); /* white on hero */
}
header.lbl-header.is-scrolled .lbl-header__logo img {
  height: 44px;
  filter: none; /* original colors when scrolled */
}

/* ---------- Navigation (desktop) ---------- */
.lbl-header .main-nav {
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.lbl-header .nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lbl-header .nav-menu > li {
  position: relative;
}
.lbl-header .nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}
.lbl-header .nav-menu > li > a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.lbl-header .nav-menu > li > a:hover::after,
.lbl-header .nav-menu > li.current-menu-item > a::after,
.lbl-header .nav-menu > li.current-menu-parent > a::after {
  transform: scaleX(1);
}
.lbl-header .nav-menu > li > a:hover {
  color: #ffcb30;
}
header.lbl-header.is-scrolled .nav-menu > li > a {
  color: var(--lbl-ink);
}
header.lbl-header.is-scrolled .nav-menu > li > a:hover {
  color: var(--lbl-brown);
}

/* Chevron */
.lbl-header .nav-menu .ti-chevron-down {
  font-size: 14px;
  color: #ffffff;
  transition: transform 0.25s ease, color 0.25s ease;
}
header.lbl-header.is-scrolled .nav-menu .ti-chevron-down {
  color: var(--lbl-ink);
}
.lbl-header .nav-menu > li:hover > a > .ti-chevron-down {
  transform: rotate(180deg);
}

/* ---------- Submenu / Dropdown ---------- */
.lbl-header .submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.14),
              0 2px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 8px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 1001;
}
.lbl-header .submenu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px; /* hover bridge */
}
.lbl-header .nav-menu > li:hover > .submenu,
.lbl-header .nav-menu > li:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lbl-header .submenu li {
  position: relative;
}
.lbl-header .submenu li a {
  display: block;
  padding: 10px 14px;
  color: var(--lbl-ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}
.lbl-header .submenu li a:hover {
  background: var(--lbl-cream);
  color: var(--lbl-brown);
  padding-left: 18px;
}
/* Nested submenu */
.lbl-header .submenu .submenu {
  top: -8px;
  left: calc(100% + 8px);
}

/* ---------- CTA Button ---------- */
.lbl-header__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 12px;
}
.lbl-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--lbl-brown);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--lbl-brown);
  box-shadow: 0 6px 18px rgba(168, 120, 74, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease,
              box-shadow 0.2s ease, border-color 0.2s ease;
}
.lbl-header__cta:hover {
  background: var(--lbl-brown-dark);
  border-color: var(--lbl-brown-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(168, 120, 74, 0.36);
}
.lbl-header__cta i {
  font-size: 16px;
}

/* ---------- Hamburger ---------- */
.hamburger-menu {
  display: none;
  background: none;
  border: 0;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  padding: 6px 8px;
  z-index: 1002;
  transition: color 0.2s ease;
}
.hamburger-menu__icon {
  display: block;
  width: 28px;
  height: 28px;
  stroke: currentColor;
}
.hamburger-menu__icon--close { display: none; }
.hamburger-menu.is-active .hamburger-menu__icon--open { display: none; }
.hamburger-menu.is-active .hamburger-menu__icon--close { display: block; }

header.lbl-header.is-scrolled .hamburger-menu {
  color: var(--lbl-brown);
}

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
  :root {
    --lbl-header-h: 72px;
    --lbl-header-h-scrolled: 64px;
  }

  /* The sticky header uses backdrop-filter, which creates a new
     containing block for position:fixed descendants in Chromium/WebKit.
     That collapsed our drawer to 0 height (top:72 + bottom:0 measured
     against the 72px header, not the viewport). Disabling blur on the
     mobile header lets the drawer anchor to the viewport again.
     The .is-scrolled rule above has specificity (0,2,1), so we beat it
     by chaining both base classes plus !important on the actual filter
     to defeat any future inline overrides. */
  header.lbl-header.lbl-header--mobile,
  header.lbl-header.lbl-header--mobile.is-scrolled {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  header.lbl-header--mobile .lbl-header__row {
    height: var(--lbl-header-h);
    padding: 0 18px;
  }
  header.lbl-header--mobile.is-scrolled .lbl-header__row {
    height: var(--lbl-header-h-scrolled);
  }
  .lbl-header--mobile .lbl-header__logo img {
    height: 42px;
  }
  header.lbl-header--mobile.is-scrolled .lbl-header__logo img {
    height: 36px;
  }

  .hamburger-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* ---------- Mobile row fit ----------
     This was the site-wide horizontal overflow: every page scrolled 8px at
     375px and 51px at 320px. Cause was here, not on the pages. The logo
     lockup measures 297px and carried `flex-shrink: 0` (see the base
     .lbl-header__logo rule), so with the 44px hamburger and the row's 24px
     gap the row needed 365px of content inside a 339px box — and since the
     logo refused to shrink, the button was pushed past the viewport edge
     and clipped.

     Fixed by letting the lockup shrink rather than by resizing anything:
     the brand name keeps its full 0.95rem and simply wraps to two lines on
     narrow screens. Row height is unchanged at 72px, so nothing else in
     the header moves. `min-width: 0` is the part that actually matters —
     a flex item's automatic minimum size is its content, which is what
     silently defeats flex-shrink here. */
  header.lbl-header--mobile .lbl-header__row { gap: 12px; }
  header.lbl-header--mobile .lbl-header__logo { flex-shrink: 1; min-width: 0; }
  header.lbl-header--mobile .bcc-logo__text { min-width: 0; }
  header.lbl-header--mobile .hamburger-menu { flex: 0 0 auto; }

  /* ============ Drawer container ============ */
  .lbl-header--mobile .main-nav {
    display: none;
    position: fixed;
    top: var(--lbl-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    /* Explicit viewport-relative height as a fallback when an ancestor
       inadvertently becomes a containing block (transform/filter/etc.).
       100dvh accounts for mobile browser chrome collapse. */
    height: calc(100dvh - var(--lbl-header-h));
    width: 100%;
    flex-direction: column;
    /* Override base `.lbl-header .main-nav { align-items: center }` which —
       combined with column direction here — was shrinking topbar/scroll/footer
       to their content width and centering them. */
    align-items: stretch;
    padding: 0;
    background: #ffffff;
    z-index: 999;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
  .lbl-header--mobile .main-nav.active { display: flex; }

  /* ============ Sticky topbar (only in child view) ============ */
  .lbl-mobile-topbar {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #ffffff;
  }
  .lbl-header--mobile .main-nav.is-child-view .lbl-mobile-topbar {
    display: flex;
  }
  .lbl-mobile-back {
    background: none;
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--lbl-brown);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.18s ease;
  }
  .lbl-mobile-back:active,
  .lbl-mobile-back:focus-visible { background: var(--lbl-cream); outline: none; }
  .lbl-mobile-back i {
    font-size: 20px;
    color: var(--lbl-brown); /* override tailwind base `i { color: #fff }` */
  }
  .lbl-mobile-title {
    font-family: 'Domine', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--lbl-ink);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ============ Scrollable region ============ */
  .lbl-mobile-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 22px 20px;
    overscroll-behavior: contain;
    background: #ffffff; /* defensive — guarantees opaque even if parent collapses */
  }

  /* ============ Sticky footer with CTA ============ */
  .lbl-mobile-footer {
    flex-shrink: 0;
    padding-bottom: 25px;
    padding-left: 20px;
    padding-right: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent; /* bleed to edges */
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.04);
  }
  .lbl-header__cta--mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
  }
  .lbl-header__cta--mobile i { font-size: 18px; }

  /* ============ Nav list (root view) ============ */
  .lbl-header--mobile .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  .lbl-header--mobile .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .lbl-header--mobile .nav-menu > li:last-child { border-bottom: 0; }
  .lbl-header--mobile .nav-menu > li > a {
    /* Force display:flex (overrides base inline-flex) so width:100% truly fills
       the row — inline-flex with width:100% can collapse to content width. */
    display: flex;
    align-items: center;
    color: var(--lbl-ink);
    padding: 18px 4px;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
  }
  /* Chevron pushed to the right edge as a drill-in affordance */
  .lbl-header--mobile .nav-menu > li > a .ti-chevron-down {
    margin-left: auto;
  }
  .lbl-header--mobile .nav-menu > li > a::after { display: none; }

  /* Chevron rotated → "›" — signals drill-in (not accordion toggle) */
  .lbl-header--mobile .menu-item-has-children > a .ti-chevron-down {
    transform: rotate(-90deg);
    color: rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, color 0.25s ease;
  }
  .lbl-header--mobile .menu-item-has-children > a:active .ti-chevron-down {
    color: var(--lbl-brown);
  }

  /* Submenu (depth 2+, currently unused with mega — kept harmless) */
  .lbl-header--mobile .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 4px 0 14px 14px;
    background: transparent;
    opacity: 1;
    visibility: hidden;
    transform: none;
    height: 0;
    overflow: hidden;
    transition: height 0.25s ease, visibility 0.25s;
  }
  .lbl-header--mobile .menu-item-has-children.active > .submenu {
    visibility: visible;
    height: auto;
  }
}

/* ---------- Desktop guard ---------- */
@media (min-width: 768px) {
  .hamburger-menu { display: none !important; }
  .lbl-header--desktop .main-nav { display: flex !important; }
}

/* ---------- Hide legacy gradient pseudo (kept absent) ---------- */
header.lbl-header::before { content: none; }

/* =============================================================
   Mega Menu (desktop) — top-level parents with children
   Walker tags those <li> with `.has-mega` and renders a
   <div class="mega-panel"> instead of the legacy <ul.submenu>.
   ============================================================= */

/* Anchor mega panel to the full-width main bar so it can center
   relative to the VIEWPORT (margin auto inside nav-menu would only
   center relative to nav-menu's narrow width). */
.lbl-header__main { position: relative; }
.lbl-header .nav-menu > li.has-mega { position: static; }

.lbl-header .mega-panel {
  position: absolute;
  top: calc(100% + 6px);
  /* Center via left:0 / right:0 + margin auto (transform stays free for animation) */
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: min(960px, calc(100vw - 32px));
  max-height: 75vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14),
              0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 1001;
}

/* Hover bridge so cursor can travel from trigger into panel */
.lbl-header .mega-panel::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.lbl-header .nav-menu > li.has-mega:hover > .mega-panel,
.lbl-header .nav-menu > li.has-mega:focus-within > .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Rotate the chevron on the trigger (parity with .submenu) */
.lbl-header .nav-menu > li.has-mega:hover > a > .ti-chevron-down {
  transform: rotate(180deg);
}

/* ---------- Left side: link columns ---------- */
.lbl-header .mega-panel__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-content: start;
}
.lbl-header .mega-col {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lbl-header .mega-col li + li {
  margin-top: 2px;
}
.lbl-header .mega-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--lbl-ink);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}
.lbl-header .mega-link:hover {
  background: var(--lbl-cream);
  color: var(--lbl-brown);
  padding-left: 18px;
}

/* ---------- Third level: a depth-1 item that owns children becomes the
     column heading, its children the links beneath it. ---------- */
.lbl-header .mega-group + .mega-group {
  margin-top: 14px;
}
.lbl-header .mega-heading {
  display: block;
  padding: 8px 12px 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lbl-brown);
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 25, 47, 0.1);
  margin-bottom: 4px;
  transition: color 0.18s ease;
}
.lbl-header .mega-heading:hover {
  color: var(--lbl-ink);
}
.lbl-header .mega-sub {
  list-style: none;
  margin: 0;
  /* Indented under its heading so the two tiers read apart. Sits on the left
     padding .mega-link already carries, so hover still slides from 12 to 18. */
  padding: 0 0 0 12px;
}
/* The 2px rhythm belongs to sibling links, not to the heading that opens
   a group — otherwise every heading sits 2px low against its column. */
.lbl-header .mega-col > li.mega-group + li.mega-group {
  margin-top: 14px;
}

/* ---------- Right side: featured card ---------- */
.lbl-header .mega-panel__feature {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: var(--lbl-cream);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.lbl-header .mega-panel__feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.lbl-header .mega-panel__feature img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.lbl-header .mega-panel__feature-placeholder {
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, var(--lbl-cream), #e8dccb);
}
.lbl-header .mega-panel__feature-body {
  padding: 16px 18px 18px;
}
.lbl-header .mega-panel__feature h4 {
  margin: 0 0 6px;
  font-family: 'Domine', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--lbl-ink);
  line-height: 1.25;
}
.lbl-header .mega-panel__feature p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(26, 26, 26, 0.65);
}
.lbl-header .mega-panel__feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lbl-brown);
}
.lbl-header .mega-panel__feature-cta i {
  font-size: 14px;
  color: inherit; /* inherit brown from .mega-panel__feature-cta */
  transition: transform 0.2s ease;
}
.lbl-header .mega-panel__feature:hover .mega-panel__feature-cta i {
  transform: translateX(4px);
}

/* Tablet: shrink panel, stack link columns to 1 */
@media (max-width: 1023.98px) and (min-width: 768px) {
  .lbl-header .mega-panel {
    width: min(760px, calc(100vw - 24px));
    padding: 22px;
    gap: 22px;
    grid-template-columns: 1.4fr 1fr;
  }
  .lbl-header .mega-panel__cols {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .lbl-header .mega-panel__feature img,
  .lbl-header .mega-panel__feature-placeholder { height: 140px; }
  .lbl-header .mega-panel__feature h4 { font-size: 17px; }
}

/* =============================================================
   Mega Menu (mobile) — drill-in panel inside drawer
   JS toggles `.is-child-view` on .main-nav and `.is-active-parent`
   on the tapped <li>. Sticky topbar (back + title) appears, CTA
   stays sticky at bottom. Featured card is a compact horizontal
   row to keep vertical space for the link list.
   ============================================================= */
@media (max-width: 767.98px) {
  /* Hide non-active parents when drilled in */
  .lbl-header--mobile .main-nav.is-child-view .nav-menu > li:not(.is-active-parent) {
    display: none;
  }
  /* Active parent's own link row collapses — title lives in the sticky topbar */
  .lbl-header--mobile .main-nav.is-child-view .nav-menu > li.is-active-parent > a {
    display: none;
  }
  .lbl-header--mobile .main-nav.is-child-view .nav-menu > li.is-active-parent {
    border-bottom: 0;
    animation: lbl-slide-in-right 0.28s ease both;
  }
  @keyframes lbl-slide-in-right {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: none; }
  }

  /* Mega panel: inline inside drawer, no card chrome */
  .lbl-header--mobile .mega-panel {
    position: static;
    transform: none;
    width: 100%;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 16px;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .lbl-header--mobile .main-nav.is-child-view .nav-menu > li.is-active-parent > .mega-panel {
    display: grid;
  }
  .lbl-header--mobile .mega-panel::before { content: none; }

  /* Compact horizontal featured card — image left, body right */
  .lbl-header--mobile .mega-panel__feature {
    order: -1;
    flex-direction: row;
    align-items: center;
    padding: 10px;
    gap: 14px;
    border-radius: 14px;
  }
  .lbl-header--mobile .mega-panel__feature img,
  .lbl-header--mobile .mega-panel__feature-placeholder {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 10px;
  }
  .lbl-header--mobile .mega-panel__feature-body {
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
  }
  .lbl-header--mobile .mega-panel__feature h4 {
    font-size: 16px;
    margin: 0 0 4px;
  }
  .lbl-header--mobile .mega-panel__feature p {
    font-size: 12.5px;
    line-height: 1.45;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .lbl-header--mobile .mega-panel__feature-cta { font-size: 12px; }

  /* Link list — full-width rows with dividers */
  .lbl-header--mobile .mega-panel__cols {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .lbl-header--mobile .mega-link {
    padding: 16px 4px;
    font-size: 15.5px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
  }
  .lbl-header--mobile .mega-link:active,
  .lbl-header--mobile .mega-link:hover {
    padding-left: 4px;
    background: transparent;
    color: var(--lbl-brown);
  }
  .lbl-header--mobile .mega-col:last-child .mega-link:last-of-type {
    border-bottom: 0;
  }
  .lbl-header--mobile .mega-col li + li { margin-top: 0; }
}

/* =============================================================
   Auto-hide on scroll
   Scrolling down tucks the bar away so the content gets the whole
   viewport; scrolling up brings it straight back, which is exactly
   when people are reaching for navigation. Driven by the scroll
   script in templates/header.php.

   `transform: none` on the resting state is deliberate — it is NOT
   the same as translateY(0). Any non-none transform (and likewise
   `will-change: transform`) turns the header into the containing
   block for its position:fixed mobile drawer, which is the same
   failure the backdrop-filter note further up describes.
   ============================================================= */
header.lbl-header {
  transform: none;
}
header.lbl-header.is-hidden {
  transform: translateY(-100%);
}
/* Drawer open — the bar stays put, and stays transform-free so the
   fixed drawer keeps measuring against the viewport. */
body.lbl-drawer-open header.lbl-header {
  transform: none !important;
}

/* ---------- Front page ----------
   The bar overlays the hero photo from the very top, so above the fold it
   dresses itself as the hero's own overlay nav — transparent, hero-sized
   padding and monogram, text shadowed for legibility over sky — then
   contracts into the solid navy bar as soon as the reader scrolls.

   front-page.php hides the global desktop bar outright via
   `header.lbl-header--desktop { display:none !important }` inside its
   #rayc-hero-editorial block. We win that on specificity here rather than
   editing the hero, so front-page.php stays untouched.

   `position: fixed` (not sticky) keeps the bar out of flow, so the hero
   still starts at y=0 at its full height.

   Scoped to >=1024px because below that the desktop bar is off and the
   mobile bar takes over (see the override in templates/header.php). */
@media (min-width: 1024px) {
  body.home header.lbl-header--desktop {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  /* Above the fold — worn as the hero's overlay nav. */
  body.home header.lbl-header--desktop:not(.is-scrolled) {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom-color: transparent;
    box-shadow: none;
  }
  body.home header.lbl-header--desktop:not(.is-scrolled) .rayc-bar__row {
    padding: clamp(1.75rem, 3.2vw, 2.75rem) clamp(1.75rem, 4vw, 4rem);
  }
  body.home header.lbl-header--desktop:not(.is-scrolled) .rayc-bar__link,
  body.home header.lbl-header--desktop:not(.is-scrolled) .rayc-bar__burger-label {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
  }
  body.home header.lbl-header--desktop:not(.is-scrolled) .rayc-bar__cta {
    padding: 0.9rem 2.1rem;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  }
}

/* The bar animates between its hero dress and its scrolled dress. */
.rayc-bar__row,
.rayc-bar__cta {
  transition: padding 0.35s ease, font-size 0.35s ease, box-shadow 0.35s ease,
              background 0.3s ease, transform 0.3s ease;
}

/* Logged-in editors: the WordPress toolbar is fixed at the top of the
   viewport above 782px, so a top:0 header would sit behind it. Below 782px
   the toolbar switches to position:absolute and scrolls away, which is why
   this offset must not apply there. */
@media screen and (min-width: 783px) {
  body.admin-bar header.lbl-header { top: 32px; }
  body.admin-bar .rayc-menu__sheet { top: 32px; }
}

/* First paint: apply the resting state without animating into it. */
header.lbl-header.is-booting {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  header.lbl-header {
    transition: background-color 0.35s ease, border-color 0.35s ease,
                box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  }
}

/* =============================================================
   Editorial bar — the desktop header, carrying the hero's visual
   language (see #rayc-hero-editorial in front-page.php).

     [☰ Menu  DESTINATIONS  TRAVEL STYLES]   RA·   [WHAT WE DO (ENQUIRE)]

   The link set is deliberately short so the bar keeps the hero's
   airy rhythm; the complete WordPress menu lives in .rayc-menu.

   Note on `color: inherit` below: the Tailwind base layer hardcodes
   `i { color:#fff }` and `span { color:#fff }`, so any currentColor
   used inside an <i>/<span> resolves to white unless we hand the
   parent's colour back down. Same trap front-page.php patches for
   the cream badges.
   ============================================================= */
header.lbl-header.rayc-bar {
  --rayc-ivory:   #F4EFE3;   /* sail white  */
  --rayc-gold:    #C6A664;   /* champagne   */
  --rayc-gold-lt: #E3D2A4;   /* light gold  */
  --rayc-sand:    #E7DCC4;   /* warm sand   */
  --rayc-ink:     #101A24;   /* slate ink   */

  background: rgba(22, 33, 42, 0.95);   /* --rayc-surface at 95% */
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(198, 166, 100, 0.18);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.rayc-bar__row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 2rem);
  padding: clamp(0.8rem, 1.3vw, 1.15rem) clamp(1.75rem, 4vw, 4rem);
}

.rayc-bar__group {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.2vw, 2.25rem);
  flex: 1 1 0;
  min-width: 0;
}
.rayc-bar__group--right { justify-content: flex-end; }

/* ---------- Links ---------- */
.rayc-bar__link {
  color: var(--rayc-sand);
  font-family: 'Jost', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.rayc-bar__link:hover { color: var(--rayc-gold-lt); }

/* WP menu rendered in the bar (location "bar_menu") — mirror .rayc-bar__link */
.rayc-bar__menu {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.2vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rayc-bar__menu li { margin: 0; }
.rayc-bar__menu a {
  color: var(--rayc-sand);
  font-family: 'Jost', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.rayc-bar__menu a:hover { color: var(--rayc-gold-lt); }
.rayc-bar__menu .current-menu-item > a { color: var(--rayc-gold-lt); }

/* ---------- Hamburger ---------- */
.rayc-bar__burger {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--rayc-sand);
  transition: color 0.3s ease;
}
.rayc-bar__burger:hover { color: var(--rayc-gold-lt); }
.rayc-bar__burger-box {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
  color: inherit;
}
.rayc-bar__burger-box span {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  color: inherit;
}
.rayc-bar__burger-box span:nth-child(2) { width: 68%; }
.rayc-bar__burger-label {
  color: inherit;
  font-family: 'Jost', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Centred monogram ---------- */
.rayc-bar__brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-decoration: none;
  line-height: 1;
}
.rayc-bar__brand--static {
  position: static;
  transform: none;
}
.rayc-bar__logo {
  display: block;
  height: clamp(2.6rem, 3.4vw, 3.4rem);
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}
body.home header.lbl-header--desktop:not(.is-scrolled) .rayc-bar__logo {
  height: clamp(3rem, 4vw, 3.9rem);
}

/* ---------- Enquire pill ---------- */
.rayc-bar__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.68rem 1.65rem;
  border-radius: 999px;
  background: var(--rayc-gold);
  color: var(--rayc-ink) !important;
  font-family: 'Jost', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: background 0.3s ease, transform 0.3s ease;
}
.rayc-bar__cta:hover {
  background: var(--rayc-gold-lt);
  transform: translateY(-1px);
}

/* =============================================================
   Full menu panel — everything the short bar leaves out.
   Renders the WordPress menu as a directory: each top-level item
   becomes a column, its mega panel flattened into a plain list.
   ============================================================= */
.rayc-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.rayc-menu[hidden] { display: none; }

.rayc-menu__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 15, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.rayc-menu.is-open .rayc-menu__scrim { opacity: 1; }

.rayc-menu__sheet {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-height: 100dvh;
  overflow-y: auto;
  padding: clamp(1.1rem, 1.8vw, 1.75rem) clamp(1.75rem, 4vw, 4rem) clamp(2rem, 3vw, 3rem);
  background: var(--rayc-panel, #0F1821);
  border-bottom: 1px solid rgba(198, 166, 100, 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.rayc-menu.is-open .rayc-menu__sheet { transform: translateY(0); }

.rayc-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(1rem, 1.8vw, 1.6rem);
  border-bottom: 1px solid rgba(198, 166, 100, 0.15);
}
.rayc-menu__close {
  padding: 0.4rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  color: #E7DCC4;
  transition: color 0.25s ease;
}
.rayc-menu__close:hover { color: #C6A664; }
.rayc-menu__close i { color: inherit; }

/* ---------- The menu itself ---------- */
.rayc-menu__body { padding-top: clamp(1.4rem, 2.4vw, 2.4rem); }
.rayc-menu__body .custom-nav-container { width: 100%; }
.rayc-menu__body .nav-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1.4rem, 2.4vw, 2.4rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rayc-menu__body .nav-menu > li {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
}
.rayc-menu__body .nav-menu > li > a {
  display: block;
  padding: 0 0 0.7rem;
  font-family: 'Domine', Georgia, serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #F4EFE3;
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 166, 100, 0.18);
  transition: color 0.25s ease;
}
.rayc-menu__body .nav-menu > li > a:hover { color: #C6A664; }
.rayc-menu__body .nav-menu .ti-chevron-down { display: none; }

/* Flatten the mega panel: it is built to hang off a horizontal bar,
   which is meaningless inside a static directory column. */
.rayc-menu__body .mega-panel {
  position: static !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  margin-top: 0.8rem;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.rayc-menu__body .mega-panel__cols {
  display: block !important;
  grid-template-columns: none !important;
}
.rayc-menu__body .mega-col {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0 !important;
}
.rayc-menu__body .mega-col li + li { border: 0 !important; margin: 0; }
/* A heading that opens a new group (has its own sub-links, e.g. Pricing
   above FAQ/About) needs air before it so it doesn't read as one more
   plain link stacked under the previous one. */
.rayc-menu__body .mega-col li.mega-group { margin-top: 0.85rem !important; }
.rayc-menu__body .mega-link {
  display: block;
  padding: 0.4rem 0 !important;
  font-family: 'Jost', sans-serif;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(231, 220, 196, 0.8) !important;
  text-decoration: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  transition: color 0.2s ease;
}
.rayc-menu__body .mega-link:hover {
  color: #C6A664 !important;
  background: transparent !important;
}
.rayc-menu__body .mega-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1rem;
}
/* The feature card duplicates a link that is already in the column. */
.rayc-menu__body .mega-panel__feature { display: none !important; }

/* ---------- Panel footer ---------- */
.rayc-menu__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2.4rem);
  margin-top: clamp(1.8rem, 3vw, 3rem);
  padding-top: clamp(1.1rem, 1.8vw, 1.6rem);
  border-top: 1px solid rgba(198, 166, 100, 0.15);
}
.rayc-menu__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(231, 220, 196, 0.75);
  text-decoration: none;
  transition: color 0.25s ease;
}
.rayc-menu__meta:hover { color: #C6A664; }
.rayc-menu__meta i { color: #C6A664; }
.rayc-menu__tag {
  margin-left: auto;
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(231, 220, 196, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .rayc-menu__sheet,
  .rayc-menu__scrim { transition: none; }
}
