/* ═══════════════════════════════════════════════════════════════
   NAVIGATION — top bar, logo, links, hamburger, mobile drawer,
                language switcher
═══════════════════════════════════════════════════════════════ */

nav, .main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 70px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s, background .25s;
}
nav.scrolled {
  box-shadow: 0 1px 12px rgba(13,21,38,.06);
}
/* Force the bar fully opaque when the mobile drawer is open so the
   page below doesn't bleed through the .94 alpha. */
nav.menu-open {
  background: #FFFFFF;
}

/* ── Logo ───────────────────────────────────────────────────── */
.nav-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo-wrap .real-logo {
  width: 120px;
  height: 48px;
  object-fit: contain;
  object-position: center;
}

/* ── Links ──────────────────────────────────────────────────── */
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--rsm);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--navy); background: var(--bg2); }
.nav-links a.active {
  color: var(--gold);
  background: rgba(201,168,76,.08);
}
.nav-mobile-menu a.active { color: var(--gold); }

/* ── Right actions ─────────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-phone {
  font-size: 13px; font-weight: 600; color: var(--text2);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--rfull);
  border: 1px solid var(--border);
  transition: border-color .2s, color .2s;
}
.nav-phone:hover { border-color: var(--gold); color: var(--gold); }

.nav-cta-btn {
  background: var(--navy);
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--rfull);
  text-decoration: none;
  transition: background .2s;
}
.nav-cta-btn:hover { background: var(--navy2); }

/* ── Hamburger ──────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;             /* Apple/Google min tap target */
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--rsm);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.nav-hamburger:active { background: var(--bg2); }
.nav-hamburger:hover { border-color: var(--gold); }
.nav-hamburger span {
  display: block;
  width: 100%;                    /* explicit so they always render */
  height: 2.5px;
  background: #0D1526;            /* navy hard-coded as a safety net */
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ─────────────────────────────────────────── */
.nav-mobile-menu {
  position: fixed;
  height:auto; max-height: 80vh;
  top: 70px; left: 0; right: 0;
  background: var(--bg3);          /* a little darker than the page */
  padding: 20px 20px 28px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(13,21,38,.14);
  text-align: center;
}
.nav-mobile-menu[hidden] { display: none; }
.nav-mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 16px;                 /* roomier tap target */
  border-radius: var(--rsm);
  text-align: center;
  transition: background .15s, color .15s;
}
/* Clear colour change on tap/press */
.nav-mobile-menu a:hover,
.nav-mobile-menu a:active,
.nav-mobile-menu a:focus { color: var(--gold); background: rgba(201,168,76,.14); }
.nav-mobile-menu .nav-mobile-cta {
  margin-top: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: var(--rfull);
  font-size: 15px;
}
.nav-mobile-menu .nav-mobile-cta:hover { background: var(--gold); color: var(--navy); }

/* ── Language switcher ─────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--rfull);
  padding: 7px 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  color: var(--text2);
  cursor: pointer;
  transition: border-color .2s, color .2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.lang-btn .ic { width: 13px; height: 13px; opacity: .7; }
.lang-btn:hover { border-color: var(--gold); color: var(--gold); }
.lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--rmd);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 160px;
  display: none;
  flex-direction: column;
  gap: 1px;
  z-index: 9999;
}
.lang-dropdown.open { display: flex; }
.lang-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: none; border: none;
  padding: 9px 12px;
  border-radius: var(--rsm);
  font-size: 13px; font-weight: 500;
  color: var(--text2);
  cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
  font-family: 'Inter', sans-serif;
}
.lang-opt .lang-code {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 5px;
  min-width: 26px; text-align: center;
}
.lang-opt:hover { background: var(--bg2); color: var(--navy); }
.lang-opt.active { color: var(--gold); font-weight: 700; }
.lang-opt.active .lang-code { color: var(--gold); border-color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  /* Mobile/tablet: opaque navbar, hide desktop links, show hamburger.
     Also hide the CTA button — it lives in the drawer to avoid crowding
     the right side. */
  nav             { padding: 0 16px; background: #FFFFFF; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links      { display: none; }
  .nav-phone      { display: none; }
  .nav-cta-btn    { display: none; }
  .nav-hamburger  { display: flex; margin-left: 10px; }
  /* Push the language switcher to the right so it sits next to the
     hamburger instead of floating in the middle of the bar. */
  .nav-right      { gap: 8px; margin-left: auto; }
  .lang-btn       { font-size: 11px; padding: 5px 10px; border-color: black; }
}
@media (max-width: 480px) {
  nav              { height: 60px; padding: 0 12px; }
  .nav-mobile-menu { top: 60px; }
  .nav-logo-wrap .real-logo { width: 100px; height: 40px; }
  .lang-btn .ic    { display: none; }    /* tighter: just SQ */
  .lang-btn        { padding: 6px 9px; }
}

/* ── RTL ────────────────────────────────────────────────────── */
[dir="rtl"] nav            { flex-direction: row-reverse; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
