/* ── Shared navbar used by every public page (landing + inner pages) ── */
#navbar.navbar-folded { transform: translateY(-100%); }
/* Built on Bootstrap's navbar/collapse components; visuals fully overridden here.
   Page-specific chrome (fixed no-scroll body, mini fixed footer) lives in each
   page's own stylesheet, NOT here — this file must stay safe to load on the
   landing page too. */

#navbar.navbar { padding: 0; }
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; min-height: 70px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229,231,235,0.7);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, transform 0.35s cubic-bezier(0.4,0,0.2,1);
  /* Safari (mac and iOS) tends to drop a fixed element off its own GPU
     layer mid-scroll when it combines backdrop-filter with an animated
     transform — it then has to repaint on the main thread before the
     transform change is reflected, which is exactly what reads as the
     navbar "not returning immediately" during a fast scroll-up. Promoting
     the layer up front (will-change + a 3D transform hint) keeps it
     composited throughout the scroll so the translateY responds instantly. */
  will-change: transform;
  -webkit-transform: translateZ(0); transform: translateZ(0);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 48px; width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.nav-logo.navbar-brand { margin-right: 0; padding: 0; font-size: 1rem; }
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo img { height: 34px; width: 34px; object-fit: contain; }
.nav-logo-name { font-size: 1.1rem; font-weight: 700; color: var(--text); line-height: 1; letter-spacing: -0.01em; transition: color 0.3s ease; }
.nav-logo-sub  { font-size: 0.58rem; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; transition: color 0.3s ease; }

.navbar-nav.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links .nav-link { position: relative; padding: 6px 12px; font-size: 0.85rem; font-weight: 500; color: var(--muted); transition: color 0.25s ease; white-space: nowrap; }
.nav-links .nav-link::after { content: ''; position: absolute; bottom: 2px; left: 12px; width: 0; height: 2px; background: var(--orange); border-radius: 2px; transition: width 0.3s cubic-bezier(0.4,0,0.2,1); }
.nav-links .nav-link:hover { color: var(--orange); }
.nav-links .nav-link:hover::after { width: calc(100% - 24px); }
.nav-links .nav-link.active { color: var(--orange); font-weight: 600; }
.nav-links .nav-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-login { font-size: 0.85rem; font-weight: 500; color: var(--muted); padding: 6px 12px; transition: color 0.2s ease; }
.nav-login:hover { color: var(--orange); }
.nav-login:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.nav-book { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; background: var(--orange); color: #fff; font-size: 0.85rem; font-weight: 600; border-radius: 999px; transition: opacity 0.25s ease, transform 0.25s ease; }
.nav-book:hover { }
.nav-book:active { transform: translateY(0); }
.nav-book:focus-visible { outline: 2px solid var(--orange-dk); outline-offset: 2px; }
.nav-link-login { display: none; }
.nav-link-logout { display: none; }
.nav-link-account { display: none; }
.nav-link-dashboard { display: none; }
.nav-link-book { display: none; }

/* Logged-in profile dropdown (replaces the desktop "Login" link via
   public-nav.js when a session is active) */
.nav-profile { position: relative; }
.nav-profile-btn { display: flex; align-items: center; gap: 8px; background: transparent; border: none; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; transition: background 0.2s ease; }
.nav-profile-btn:hover { background: rgba(127,127,127,0.1); }
.nav-profile-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.nav-profile-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; overflow: hidden; flex-shrink: 0; }
.nav-profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-profile-name { font-size: 0.85rem; font-weight: 600; color: var(--muted); white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.nav-profile-chevron { flex-shrink: 0; color: var(--muted); transition: transform 0.2s ease; }
.nav-profile-btn[aria-expanded="true"] .nav-profile-chevron { transform: rotate(180deg); }

.nav-profile-dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.14); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s; z-index: 1100; }
.nav-profile-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-profile-dropdown-head { padding: 8px 10px 10px; }
.nav-profile-dropdown-name { font-size: 0.85rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-profile-dropdown-email { font-size: 0.74rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-profile-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-profile-dropdown-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; border: none; background: transparent; font-family: 'Poppins', sans-serif; font-size: 0.84rem; font-weight: 500; color: var(--text); cursor: pointer; transition: background 0.15s ease, color 0.15s ease; text-decoration: none; }
.nav-profile-dropdown-item:hover { background: var(--orange-lt); color: var(--orange-dk); }
.nav-profile-logout { color: #DC2626; }
.nav-profile-logout:hover { background: #FEF2F2; color: #DC2626; }

/* Hamburger toggle (mobile) — a circular tap target that visibly responds
   to hover/press and shows a distinct "open" state, instead of three bare
   lines floating with no affordance. */
.nav-toggle.navbar-toggler { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: transparent; border: none; border-radius: 50%; padding: 0; cursor: pointer; flex-shrink: 0; }
.nav-toggle[aria-expanded="true"] { background: rgba(232,137,28,0.14); }
.nav-toggle:focus { box-shadow: none; }
.nav-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span { background: var(--orange); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop: a 3-column grid (1fr / auto / 1fr) instead of flex+space-between.
   The two equal 1fr side columns keep the middle nav-links column
   mathematically centered on the bar regardless of how wide the logo or
   nav-actions are — important because the logged-in profile widget
   (avatar + name + chevron) is noticeably wider than the plain "Login"
   text it replaces, which threw off the old "center the leftover flex
   space" approach and made the links look off-center while logged in. */
@media (min-width: 992px) {
  .nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-logo { grid-column: 1; justify-self: start; }
  .navbar-collapse { grid-column: 2; justify-self: center; justify-content: center; }
  .nav-actions { grid-column: 3; justify-self: end; }
}

/* Drawer pieces injected by public-nav.js — desktop never shows them */
.nav-drawer-head, .nav-backdrop, .nav-ico { display: none; }

@media (max-width: 991.98px) {
  .nav-toggle.navbar-toggler { display: flex; }

  /* ── Side drawer ──────────────────────────────────────────────────
     A one-sided panel that slides in from the right (same side as the hamburger) over a dimmed page
     (replaces the old full-width dropdown). #navbar always carries a
     transform (translateZ hint, and translateY when folded), which makes
     it the containing block for these position:fixed children — so the
     drawer/backdrop size themselves to the viewport explicitly (100vw /
     100dvh) instead of inset:0, and body.nav-drawer-open un-folds the bar
     so the drawer never rides up with it. Only transform/opacity animate. */
  .navbar-collapse {
    display: flex !important; flex-direction: column;
    /* Bootstrap sets .navbar-collapse { align-items:center } — in this
       column layout that shrinks the header to its content and centers it. */
    align-items: stretch;
    position: fixed; top: 0; right: 0; left: auto; z-index: 2;
    width: min(84vw, 320px); height: 100vh; height: 100dvh;
    box-sizing: border-box;
    background: #1C0E00;
    border-radius: 22px 0 0 22px;
    box-shadow: -12px 0 40px rgba(28,14,0,.28), -2px 0 8px rgba(28,14,0,.12);
    padding: 0 0 max(18px, env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .38s cubic-bezier(.32,.72,0,1), visibility 0s linear .38s;
  }
  .navbar-collapse.show {
    transform: translateX(0);
    visibility: visible;
    transition: transform .42s cubic-bezier(.32,.72,0,1), visibility 0s linear 0s;
  }
  .nav-backdrop {
    display: block; position: fixed; top: 0; left: 0; z-index: 1;
    width: 100vw; height: 100vh; height: 100dvh;
    background: rgba(20,12,4,.52);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
  }
  body.nav-drawer-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-drawer-open #navbar,
  body.nav-drawer-open #navbar.navbar-folded { transform: translateZ(0) !important; }

  /* Drawer header: logo + name + round close button */
  .nav-drawer-head {
    width: 100%; box-sizing: border-box;
    display: flex; align-items: center; gap: 10px;
    padding: max(18px, env(safe-area-inset-top)) 18px 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 8px;
  }
  .nav-drawer-head img { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; background: #fff; flex-shrink: 0; }
  .nav-drawer-name { flex: 1; min-width: 0; font-size: .95rem; font-weight: 700; color: #fff; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-drawer-close {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.85);
    border: none; cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
  }
  .nav-drawer-close:hover { background: rgba(255,255,255,.16); }
  .nav-drawer-close:active { transform: scale(.92); }
  .nav-drawer-close:focus-visible { outline: 2px solid #FDBA74; outline-offset: 2px; }

  /* Links */
  .navbar-nav.nav-links {
    flex: 1; display: flex; flex-direction: column !important; align-items: stretch !important;
    width: 100%; box-sizing: border-box; gap: 4px; padding: 4px 14px 0 !important; margin: 0;
  }
  .nav-links .nav-link {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 12px 14px; border-radius: 12px; text-align: left;
    font-size: .92rem; font-weight: 500;
    color: rgba(255,255,255,.78) !important;
    transition: color .2s ease, background-color .2s ease;
  }
  .nav-links .nav-link::after { display: none; }
  .nav-links .nav-link:hover { background: rgba(255,255,255,.07); color: #fff !important; }
  .nav-links .nav-link.active { background: rgba(232,137,28,.18); color: #FDBA74 !important; font-weight: 600; }
  .nav-ico { display: inline-flex; width: 20px; height: 20px; flex-shrink: 0; color: currentColor; opacity: .9; }
  .nav-ico svg { width: 20px; height: 20px; }

  /* Bottom group: Log In / account + Book Now pinned to the bottom */
  .nav-link-login, .nav-link-account { display: list-item; list-style: none; margin-top: auto; }
  .nav-link-login .nav-link {
    justify-content: center; margin-top: 18px;
    border: 1.5px solid rgba(255,255,255,.22); color: #fff !important; font-weight: 600;
  }
  .nav-link-login .nav-link:hover { background: rgba(255,255,255,.08); }
  .nav-link-account { border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
  .nav-mobile-account { display: flex; align-items: center; gap: 10px; padding: 4px 14px 10px; }
  .nav-mobile-account-name { font-size: .88rem; font-weight: 600; color: #fff; }
  .nav-link-dashboard, .nav-link-logout { display: list-item; list-style: none; }
  .nav-link-logout .nav-link { color: #FCA5A5 !important; }
  .nav-link-logout .nav-link:hover { background: rgba(220,38,38,.14); }
  .nav-link-book { display: list-item; list-style: none; margin-top: 8px; }
  .nav-link-book .nav-link {
    justify-content: center; background: var(--orange); color: #fff !important; font-weight: 600;
    box-shadow: 0 6px 18px -6px rgba(232,137,28,.6);
  }
  .nav-link-book .nav-link:hover { background: var(--orange); color: #fff !important; opacity: .9; }

  /* Bar itself */
  .nav-inner { flex-wrap: nowrap; padding: 0 16px; }
  #navbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,1); }
  .nav-actions .nav-login, .nav-actions .nav-profile, .nav-book { display: none; }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .navbar-collapse, .navbar-collapse.show, .nav-backdrop { transition: none; }
}

