/* ========== SITE NAVIGATION ========== */
.site-header {
  position: relative;
  z-index: 100;
}
.site-header--solid {
  background: #fff;
  border-bottom: 1px solid #e8eaee;
}
.site-header--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 0;
}
.site-header--overlay .header-bar {
  margin-top: .85rem;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 10px 36px rgba(18, 28, 40, .12);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1rem 0;
  min-height: 88px;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1a2b3c;
  cursor: pointer;
  place-items: center;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem .85rem;
  min-width: 0;
}
.desktop-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .2rem .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}
.desktop-nav__list > li { position: relative; list-style: none; }
.desktop-nav__link {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .55rem .9rem;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: #1a2b3c;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.desktop-nav__link:hover {
  color: #1a2b3c;
  background: rgba(196, 165, 116, .16);
}
.desktop-nav__link.is-active {
  color: #1a2b3c;
  background: rgba(26, 43, 60, .08);
  box-shadow: inset 0 0 0 1px rgba(26, 43, 60, .08);
}
.desktop-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .28rem;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #c4a574;
  transform: translateX(-50%);
}
.desktop-nav__caret {
  font-style: normal;
  font-size: .55rem;
  opacity: .7;
}
.desktop-nav__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  margin: 0;
  padding: .45rem 0;
  list-style: none;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(232, 234, 238, .95);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(26, 43, 60, .14);
  backdrop-filter: blur(10px);
  z-index: 120;
}
.desktop-nav__menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.desktop-nav__item--drop:hover > .desktop-nav__menu,
.desktop-nav__item--drop:focus-within > .desktop-nav__menu {
  display: block;
}
.desktop-nav__menu a {
  display: block;
  padding: .62rem 1.05rem;
  font-size: .82rem;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.desktop-nav__menu a:hover {
  background: rgba(196, 165, 116, .12);
  color: #1a2b3c;
}

.nav-search {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1a2b3c;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background .2s ease;
}
.nav-search:hover { background: rgba(26, 43, 60, .08); }
.nav-search svg { width: 18px; height: 18px; }

.motto {
  font-family: "Caveat", cursive;
  font-size: 1.28rem;
  color: #1a2b3c;
  white-space: nowrap;
  line-height: 1.1;
  transform: rotate(-3deg);
  text-align: right;
  justify-self: end;
  padding-inline-end: .25rem;
}
.motto span { color: #d64545; }
body.locale-ur .motto,
body.locale-sd .motto {
  font-family: inherit;
  transform: none;
  letter-spacing: 0;
}

/* Language switcher */
.lang-switch {
  position: relative;
  flex: 0 0 auto;
  z-index: 90;
}
.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 40px;
  padding: .45rem .85rem .55rem;
  border: 1px solid rgba(26, 43, 60, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #1a2b3c;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.35;
  overflow: visible;
  transition: .2s ease;
}
.lang-switch__btn:hover,
.lang-switch.is-open .lang-switch__btn {
  border-color: #1a2b3c;
  background: #fff;
}
.lang-switch__code {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}
.lang-switch__native {
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.7;
  max-width: none;
  overflow: visible;
  white-space: nowrap;
  display: inline-block;
  padding-block: .15rem .25rem;
}
.lang-switch__caret {
  font-style: normal;
  font-size: .65rem;
  opacity: .7;
  line-height: 1;
  flex: 0 0 auto;
}
.lang-switch__menu {
  position: absolute;
  top: calc(100% + .35rem);
  inset-inline-end: 0;
  z-index: 120;
  min-width: 168px;
  margin: 0;
  padding: .4rem;
  list-style: none;
  border: 1px solid #e8eaee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 34, .12);
  overflow: visible;
}
.lang-switch__menu[hidden] { display: none !important; }
.lang-switch__option {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .75rem .75rem;
  border-radius: 8px;
  font-size: .84rem;
  line-height: 1.7;
  color: #1a2b3c;
  overflow: visible;
}
.lang-switch__option span:last-child {
  line-height: 1.7;
  padding-block: .1rem .2rem;
  display: inline-block;
}
.lang-switch__option:hover,
.lang-switch__option.is-active {
  background: #f3efe8;
}
.mobile-nav__lang {
  padding: 1rem 1.1rem .35rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-nav__lang .lang-switch { width: 100%; }
.mobile-nav__lang .lang-switch__btn {
  width: 100%;
  justify-content: space-between;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color: #fff;
  min-height: 46px;
  padding: .55rem .9rem .65rem;
}
.mobile-nav__lang .lang-switch__menu {
  inset-inline: 0;
  width: 100%;
}

/* Mobile panel + backdrop — always in DOM, off-canvas until open */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(16, 24, 34, .5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 2001;
  width: min(300px, 86vw);
  background: #fff;
  box-shadow: 8px 0 40px rgba(16, 24, 34, .18);
  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 1rem 0 2rem;
}
.mobile-nav__list > li {
  border-bottom: 1px solid #eef0f3;
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.05rem 1.25rem;
  font-size: 1.02rem;
  font-weight: 500;
  color: #1a2b3c;
  text-decoration: none;
  background: none;
  border: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.mobile-nav__link.is-active {
  color: #c4a574;
  font-weight: 600;
  background: #faf8f4;
}
.mobile-nav__drop i {
  font-style: normal;
  font-size: .75rem;
  opacity: .7;
  transition: transform .2s ease;
}
.mobile-nav__item--drop.is-open > .mobile-nav__drop i {
  transform: rotate(180deg);
}
.mobile-nav__submenu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #f6f7f9;
}
.mobile-nav__item--drop.is-open > .mobile-nav__submenu {
  display: block;
}
.mobile-nav__submenu a {
  display: block;
  padding: .85rem 1.25rem .85rem 1.85rem;
  font-size: .94rem;
  color: #445;
  text-decoration: none;
  border-top: 1px solid #e8eaee;
}
.mobile-nav__submenu a:hover,
.mobile-nav__submenu a:active {
  background: #eceff3;
  color: #1a2b3c;
}

body.nav-open {
  overflow: hidden;
}
body.nav-open .nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.nav-open .mobile-nav {
  transform: translateX(0);
  visibility: visible;
}
body.nav-open .site-header {
  z-index: 2002;
}

/* RTL: drawer opens from the right */
html[dir="rtl"] .mobile-nav {
  left: auto;
  right: 0;
  transform: translateX(105%);
  box-shadow: -8px 0 40px rgba(16, 24, 34, .18);
}
html[dir="rtl"] body.nav-open .mobile-nav {
  transform: translateX(0);
}
html[dir="rtl"] .motto {
  display: none !important;
}
html[dir="rtl"] .desktop-nav {
  justify-content: flex-end;
  gap: .45rem .7rem;
}
html[dir="rtl"] .lang-switch__btn {
  background: rgba(255,255,255,.88);
  border-color: rgba(26,43,60,.28);
  min-height: 44px;
  padding: .5rem .9rem .65rem;
  align-items: center;
}
html[dir="rtl"] .mobile-nav__link {
  text-align: right;
}
html[dir="rtl"] .mobile-nav__submenu a {
  padding: .85rem 1.85rem .85rem 1.25rem;
}

@media (max-width: 1100px) {
  .desktop-nav__list { gap: .1rem .7rem; }
  .desktop-nav__link { font-size: .78rem; }
  .motto { font-size: 1.1rem; }
  .logo-name { font-size: 2.1rem; }
}

/* Tablet / phone: hamburger + left drawer */
@media (max-width: 980px) {
  .brand-logo { height: 40px; max-width: 175px; }
  .brand-tag { font-size: .4rem; letter-spacing: .14em; }
  .motto { display: none !important; }
  .header-bar {
    grid-template-columns: auto 1fr auto;
    min-height: 64px;
    padding: .65rem 0;
    gap: .5rem .75rem;
  }
  .nav-toggle { display: flex; }
  .desktop-nav__list { display: none !important; }
  .site-header--overlay .header-bar {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 8px 28px rgba(18, 28, 40, .12);
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    margin: .55rem 0 0;
    padding: .55rem .85rem;
    border-radius: 18px;
  }
  .logo-name { font-size: 1.8rem; }
  .logo-word { letter-spacing: .36em; font-size: .64rem; }
  .logo-tag { font-size: .42rem; letter-spacing: .12em; }
}

@media (max-width: 480px) {
  .brand-logo { height: 36px; max-width: 155px; }
  .brand-tag { font-size: .36rem; letter-spacing: .12em; }
  .mobile-nav { width: min(290px, 88vw); }
  .site-header--overlay .header-bar {
    margin: .35rem 0 0;
    padding: .5rem .7rem;
  }
}
