/* ==========================================================================
   Neem Sarai Sariska — Site Header
   Transparent over the hero, turns solid on scroll, mobile slide-in drawer.
   Change the brand colours / sizes in the variables below.
   ========================================================================== */

.ns-header,
.ns-drawer {
  --ns-accent: #a4553a;        /* terracotta (Book Now, hovers) */
  --ns-accent-dark: #86412b;
  --ns-ink: #2b2420;           /* text on solid header */
  --ns-cream: #faf6f0;         /* solid header / drawer background */
  --ns-line: rgba(43, 36, 32, 0.12);
  --ns-h: 92px;                /* header height at top of page */
  --ns-h-solid: 74px;          /* header height after scrolling */
  --ns-logo-h: 54px;
  --ns-logo-h-solid: 44px;
  --ns-font: inherit;          /* uses your site font; or e.g. "Jost", sans-serif */
  --ns-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Keep these CSS variables available to the body offset rule */
:root { --ns-h-solid: 74px; }

.ns-header *,
.ns-drawer * { box-sizing: border-box; }

/* ---------- Header shell ---------- */
.ns-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  height: var(--ns-h);
  font-family: var(--ns-font);
  color: #fff;
  background: linear-gradient(to bottom, rgba(18, 14, 12, 0.55), rgba(18, 14, 12, 0));
  transition: height 0.35s var(--ns-ease), background-color 0.35s ease,
              box-shadow 0.35s ease, color 0.35s ease;
}

.admin-bar .ns-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ns-header { top: 46px; } }

.ns-header.is-solid,
.ns-header.is-scrolled {
  height: var(--ns-h-solid);
  color: var(--ns-ink);
  background: var(--ns-cream);
  box-shadow: 0 1px 0 var(--ns-line), 0 10px 30px rgba(43, 36, 32, 0.06);
}

/* Inner pages without a hero: push content below the fixed header */
body.ns-offset { padding-top: var(--ns-h-solid); }

.ns-header__inner {
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ---------- Logo (white on transparent, black on solid) ---------- */
.ns-header__logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}
.ns-logo {
  display: block;
  height: var(--ns-logo-h);
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: height 0.35s var(--ns-ease), opacity 0.3s ease;
}
.ns-logo--dark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}
.ns-header.is-solid .ns-logo,
.ns-header.is-scrolled .ns-logo { height: var(--ns-logo-h-solid); }
.ns-header.is-solid .ns-logo--light,
.ns-header.is-scrolled .ns-logo--light { opacity: 0; }
.ns-header.is-solid .ns-logo--dark,
.ns-header.is-scrolled .ns-logo--dark { opacity: 1; }

/* ---------- Desktop menu ---------- */
.ns-nav { flex: 1 1 auto; display: flex; justify-content: center; }

.ns-menu,
.ns-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ns-nav .ns-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ns-nav .ns-menu > li {
  position: relative;
  display: flex;
  align-items: center;
}

.ns-nav .ns-menu > li > a {
  position: relative;
  display: block;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ns-nav .ns-menu > li.menu-item-has-children > a { padding-right: 4px; }

/* animated underline */
.ns-nav .ns-menu > li > a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ns-ease);
}
.ns-nav .ns-menu > li.menu-item-has-children > a::after { right: 4px; }
.ns-nav .ns-menu > li > a:hover::after,
.ns-nav .ns-menu > li:focus-within > a::after,
.ns-nav .ns-menu > li.current-menu-item > a::after,
.ns-nav .ns-menu > li.current-menu-ancestor > a::after,
.ns-nav .ns-menu > li.current-menu-parent > a::after { transform: scaleX(1); }

.ns-header.is-solid .ns-nav .ns-menu > li > a:hover,
.ns-header.is-scrolled .ns-nav .ns-menu > li > a:hover { color: var(--ns-accent); }

/* submenu chevron button */
.ns-sub-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 2px;
}
.ns-sub-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform 0.3s var(--ns-ease);
}
.ns-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* dropdown panel */
.ns-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 250px;
  padding: 12px 0;
  background: var(--ns-cream);
  color: var(--ns-ink);
  border-top: 2px solid var(--ns-accent);
  box-shadow: 0 18px 40px rgba(43, 36, 32, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.3s var(--ns-ease), visibility 0s linear 0.3s;
  z-index: 5;
}
/* invisible bridge so the menu doesn't close while moving the mouse down */
.ns-nav .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  height: 22px;
}
.ns-nav .ns-menu > li:hover > .sub-menu,
.ns-nav .ns-menu > li:focus-within > .sub-menu,
.ns-nav .ns-menu > li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.25s ease, transform 0.3s var(--ns-ease), visibility 0s;
}
.ns-nav .ns-menu > li.is-closed > .sub-menu {   /* Esc pressed while hovering */
  opacity: 0;
  visibility: hidden;
}
.ns-nav .sub-menu a {
  display: block;
  padding: 11px 24px;
  color: var(--ns-ink);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.25s var(--ns-ease);
}
.ns-nav .sub-menu a:hover,
.ns-nav .sub-menu a:focus-visible,
.ns-nav .sub-menu .current-menu-item > a {
  color: var(--ns-accent);
  background: rgba(164, 85, 58, 0.07);
  padding-left: 30px;
}

/* ---------- Right side actions ---------- */
.ns-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.ns-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ns-phone svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ns-phone:hover { color: var(--ns-accent); }
.ns-header:not(.is-solid):not(.is-scrolled) .ns-phone:hover { color: #fff; opacity: 0.8; }

.ns-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  background: var(--ns-accent);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid var(--ns-accent);
  border-radius: 2px;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.ns-btn:hover { background: var(--ns-accent-dark); border-color: var(--ns-accent-dark); }
.ns-btn:active { transform: translateY(1px); }

/* ---------- Hamburger ---------- */
.ns-burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 -8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ns-burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ns-ease), opacity 0.2s ease;
}
.ns-burger span:nth-child(1) { top: 15px; }
.ns-burger span:nth-child(2) { top: 21px; }
.ns-burger span:nth-child(3) { top: 27px; right: 18px; }

/* ---------- Focus styles ---------- */
.ns-header a:focus-visible,
.ns-header button:focus-visible,
.ns-drawer a:focus-visible,
.ns-drawer button:focus-visible {
  outline: 2px solid var(--ns-accent);
  outline-offset: 3px;
}
.ns-header:not(.is-solid):not(.is-scrolled) a:focus-visible,
.ns-header:not(.is-solid):not(.is-scrolled) button:focus-visible { outline-color: #fff; }

/* ---------- Mobile drawer ---------- */
.ns-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(20, 16, 14, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.ns-overlay.is-open { opacity: 1; pointer-events: auto; }

.ns-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  width: min(420px, 88vw);
  display: flex;
  flex-direction: column;
  background: var(--ns-cream);
  color: var(--ns-ink);
  font-family: var(--ns-font);
  box-shadow: -20px 0 50px rgba(20, 16, 14, 0.2);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s var(--ns-ease), visibility 0s linear 0.45s;
}
.ns-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.45s var(--ns-ease), visibility 0s;
}
.admin-bar .ns-drawer { top: 32px; }
@media (max-width: 782px) { .admin-bar .ns-drawer { top: 46px; } }

.ns-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--ns-line);
}
.ns-drawer__top img { height: 40px; width: auto; display: block; }

.ns-drawer__close {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ns-ink);
  cursor: pointer;
}
.ns-drawer__close::before,
.ns-drawer__close::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 21px;
  height: 1.5px;
  background: currentColor;
}
.ns-drawer__close::before { transform: rotate(45deg); }
.ns-drawer__close::after { transform: rotate(-45deg); }

.ns-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 24px 24px;
}

.ns-drawer .ns-menu > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--ns-line);
}
.ns-drawer .ns-menu > li > a {
  flex: 1 1 auto;
  display: block;
  padding: 17px 0;
  color: var(--ns-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ns-drawer .ns-menu > li.current-menu-item > a,
.ns-drawer .ns-menu > li.current-menu-ancestor > a,
.ns-drawer .ns-menu a:hover { color: var(--ns-accent); }

.ns-drawer .ns-sub-toggle { width: 44px; height: 44px; margin-right: -12px; }
.ns-drawer .ns-sub-toggle svg { width: 14px; height: 14px; }

.ns-drawer .sub-menu {
  display: none;
  flex: 1 0 100%;
  padding: 0 0 12px 14px;
  border-left: 1px solid var(--ns-accent);
  margin: 0 0 14px 2px;
}
.ns-drawer li.is-open > .sub-menu { display: block; }
.ns-drawer .sub-menu a {
  display: block;
  padding: 9px 0;
  color: var(--ns-ink);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.ns-drawer__foot {
  padding: 20px 24px 28px;
  border-top: 1px solid var(--ns-line);
  display: grid;
  gap: 12px;
}
.ns-drawer__foot .ns-btn { width: 100%; padding: 15px 20px; }
.ns-drawer__foot .ns-phone {
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid var(--ns-line);
  border-radius: 2px;
  font-size: 14px;
  color: var(--ns-ink);
}
.ns-drawer__foot .ns-phone:hover { color: var(--ns-accent); border-color: var(--ns-accent); }

html.ns-lock,
html.ns-lock body { overflow: hidden; }

/* ---------- Breakpoints ---------- */
@media (max-width: 1280px) {
  .ns-phone__text { display: none; }
  .ns-nav .ns-menu > li > a { padding-left: 11px; padding-right: 11px; letter-spacing: 0.13em; }
  .ns-nav .ns-menu > li > a::after { left: 11px; right: 11px; }
}

@media (max-width: 1024px) {
  .ns-header,
  .ns-drawer {
    --ns-h: 76px;
    --ns-h-solid: 66px;
    --ns-logo-h: 44px;
    --ns-logo-h-solid: 38px;
  }
  :root { --ns-h-solid: 66px; }
  .ns-header__inner { padding: 0 20px; }
  .ns-nav { display: none; }
  .ns-burger { display: block; }
  .ns-header__actions { gap: 10px; }
  .ns-header__actions .ns-phone { display: none; }
  .ns-header__actions .ns-btn { padding: 10px 16px; font-size: 11px; letter-spacing: 0.14em; }
}

@media (max-width: 400px) {
  .ns-header__inner { padding: 0 14px; }
  .ns-header__actions .ns-btn { padding: 9px 12px; letter-spacing: 0.1em; }
  .ns-logo { max-width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .ns-header,
  .ns-header *,
  .ns-drawer,
  .ns-drawer *,
  .ns-overlay { transition: none !important; }
}
