/* Conventional header navigation replaces the former mobile app bar. */
body { padding-top:112px; padding-bottom:0; }
.site-header .site-header__inner {
 grid-template-areas:"identity actions";
 grid-template-columns:minmax(0,1fr) auto;
 min-height:76px; padding-block:.65rem; row-gap:0;
}
.header-identity { grid-area:identity; display:flex; align-items:center; gap:.85rem; min-width:0; }
.site-header .header-identity .brand { flex:0 1 auto; grid-area:auto; }
.site-header .header-identity .nav-toggle {
 display:grid; place-items:center; flex:0 0 44px;
 width:44px; height:44px; padding:.65rem;
 border:1px solid var(--line); border-radius:50%;
 background:var(--panel); color:var(--heading);
}
.site-header .header-identity .nav-toggle .icon { width:21px; height:21px; }
.site-header .header-identity .nav-toggle:hover { background:var(--ghost-wash); border-color:var(--accent); }
.site-header .site-header__actions { grid-area:actions; }
.site-drawer {
 position:fixed; inset-block:0; inset-inline-start:0; inset-inline-end:auto;
 margin:0; padding:0; width:min(370px,calc(100% - 36px));
 height:100dvh; max-height:100dvh; max-width:none;
 border:0; border-inline-end:1px solid var(--line);
 border-radius:0 22px 22px 0;
 background:var(--bg); color:var(--text);
 box-shadow:0 0 60px rgba(0,0,0,.18);
 overflow:hidden;
}
:root[dir="rtl"] .site-drawer { border-radius:22px 0 0 22px; }
.site-drawer:not([open]) { display:none; }
.site-drawer[open] { display:flex; flex-direction:column; }
.site-drawer::backdrop { background:rgba(25,22,25,.4); backdrop-filter:blur(4px); }
.site-drawer__header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.4rem 1.25rem; border-bottom:1px solid var(--line); flex-shrink:0; }
.site-drawer__header p { font:600 1rem/1.6 var(--font-ui,var(--font-body)); margin:0 0 .35rem; }
.site-drawer__header span { display:block; font:400 .8125rem/1.7 var(--font-ui,var(--font-body)); color:var(--text-soft); }
.site-drawer__close { display:grid; place-items:center; width:42px; height:42px; flex-shrink:0; border:1px solid var(--line); border-radius:50%; background:var(--panel); color:var(--heading); }
.site-drawer__nav { overflow-y:auto; overscroll-behavior:contain; padding:.65rem .8rem max(1.3rem,env(safe-area-inset-bottom)); }
.site-drawer__nav ul { list-style:none; margin:0; padding:0; }
.site-drawer__nav a { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.85rem .8rem; min-height:48px; border-radius:10px; font:500 .875rem/1.8 var(--font-ui,var(--font-body)); }
.site-drawer__nav a .icon { width:15px; height:15px; color:var(--accent); flex-shrink:0; }
.site-drawer__nav a:hover,.site-drawer__nav a.is-active { background:var(--tag-bg); color:var(--accent); }
.menu-open,.menu-open body { overflow:hidden; }
@keyframes drawer-enter { from { opacity:.4; transform:translateX(-24px); } to { opacity:1; transform:none; } }
@keyframes drawer-enter-rtl { from { opacity:.4; transform:translateX(24px); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:no-preference) {
 .site-drawer[open] { animation:drawer-enter .22s ease-out; }
 :root[dir="rtl"] .site-drawer[open] { animation-name:drawer-enter-rtl; }
}
@media(max-width:820px) {
 body { padding-top:108px; padding-bottom:0; }
 .site-header .site-header__inner { grid-template-areas:"identity actions"; grid-template-columns:minmax(0,1fr) auto; gap:.5rem; min-height:76px; }
 .header-identity { gap:.45rem; }
 .site-header .header-identity .nav-toggle { width:38px; height:42px; flex-basis:38px; padding:.5rem; border-radius:12px; }
 .site-header .brand { gap:.4rem; }
 .site-header .site-header__actions { gap:.25rem; }
 .site-header .lang__button { min-width:48px; padding-inline:.4rem; }
 .site-header .theme-toggle { min-width:38px; width:38px; }
 .site-header .brand__sub,:root[lang="en"] .site-header .brand__sub,
 :root[lang="ur"] .site-header .brand__sub,:root[lang="ar"] .site-header .brand__sub { font-size:.75rem; line-height:1.5; }
 .to-top { display:grid; bottom:1rem; inset-inline-end:1rem; }
}
@media(max-width:420px) {
 body { padding-top:88px; }
 .site-header .site-header__inner { width:calc(100% - 1rem); min-height:64px; padding-block:.45rem; padding-inline:.5rem; gap:.35rem; }
 .header-identity { gap:.35rem; }
 .site-header .header-identity .nav-toggle { width:34px; height:36px; flex-basis:34px; padding:.4rem; border-radius:10px; }
 .site-header .brand { gap:.35rem; min-width:0; }
 .site-header .brand__mark { width:34px; height:34px; flex:0 0 34px; }
 .site-header .brand__mark img { width:100%; height:100%; }
 .site-header .brand__text { min-width:0; }
 .site-header .brand__name[lang="en"] { font-size:.88rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
 .site-header .brand__sub,:root[lang="en"] .site-header .brand__sub,
 :root[lang="ur"] .site-header .brand__sub,:root[lang="ar"] .site-header .brand__sub { font-size:.62rem; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
 .site-header .site-header__actions { gap:.2rem; }
 .site-header .site-header__actions :is(.theme-toggle,.lang__button) { min-height:34px; height:34px; }
 .site-header .lang__button { min-width:40px; padding-inline:.3rem; }
 .site-header .theme-toggle { min-width:34px; width:34px; }
}
@media(max-width:340px) {
 .site-header .brand__sub { display:none !important; }
 .site-header .brand__mark { display:none; }
}
@media print { .site-drawer { display:none !important; } }
/* Desktop keeps visible navigation; the drawer belongs to mobile/tablet. */
.site-header #primaryNav { display:none; }
@media(min-width:1101px) {
 .site-header .site-header__inner {
  grid-template-areas:"identity navigation actions";
  grid-template-columns:250px minmax(0,1fr) auto;
  column-gap:1.25rem;
 }
 .site-header .header-identity .nav-toggle { display:none; }
 .site-header #primaryNav {
  grid-area:navigation; display:block; position:static; inset:auto;
  min-width:0; width:100%; max-width:100%;
  background:transparent; border:0; border-radius:0; box-shadow:none;
 }
 .site-header #primaryNav ul { display:flex; flex-direction:row; align-items:center; justify-content:center; flex-wrap:nowrap; gap:1rem; padding:0; margin:0; }
 .site-header #primaryNav li { flex:0 0 auto; border:0; }
 .site-header #primaryNav a { display:block; width:auto; margin:0; padding:.65rem 0; white-space:nowrap; }
}
@media(min-width:1101px) and (max-width:1439px) {
 body { padding-top:150px; }
 .site-header .site-header__inner {
  grid-template-areas:"identity actions" "navigation navigation";
  grid-template-columns:minmax(0,1fr) auto;
  padding-top:.65rem; padding-bottom:.4rem;
 }
 .site-header #primaryNav { margin-top:.55rem; padding-top:.25rem; border-top:1px solid var(--line); }
 .site-header #primaryNav ul { gap:1.5rem; }
 .site-header #primaryNav a { padding:.55rem .25rem; }
}
