/* ==========================================================
   Jamia Arabia Abdullah Bin Masood — Main stylesheet
   Palette taken from the institution's logo: lapis blue + gold
   ========================================================== */

:root {
  --lapis: #1E2F7A;
  --lapis-2: #263A92;
  --night: #0F1842;
  --night-2: #141F52;
  --gold: #C99A2E;
  --gold-2: #E3BE62;
  --gold-soft: #F3E3B6;
  --ivory: #FCFAF4;
  --sand: #F5EEDD;
  --ink: #1C2033;
  --muted: #5B6178;
  --line: #E7DEC8;
  --white: #FFFFFF;

  --f-display: "Cormorant Garamond", "Times New Roman", serif;
  --f-body: "Jost", "Segoe UI", system-ui, sans-serif;
  --f-arabic: "Amiri", "Traditional Arabic", serif;
  --f-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Amiri", serif;

  --wrap: 1200px;
  --radius: 14px;
  --arch: 999px 999px 16px 16px;
  --shadow: 0 18px 40px -22px rgba(15, 24, 66, .45);

  /* 8-point star lattice, used on dark sections */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23E3BE62' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M48 14l9.9 24.1L82 48l-24.1 9.9L48 82l-9.9-24.1L14 48l24.1-9.9z'/%3E%3Crect x='26' y='26' width='44' height='44' transform='rotate(45 48 48)'/%3E%3Crect x='26' y='26' width='44' height='44'/%3E%3Ccircle cx='48' cy='48' r='6'/%3E%3Cpath d='M0 0l14 14M96 0L82 14M0 96l14-14M96 96L82 82'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23C99A2E' stroke-opacity='.13' stroke-width='1'%3E%3Cpath d='M48 14l9.9 24.1L82 48l-24.1 9.9L48 82l-9.9-24.1L14 48l24.1-9.9z'/%3E%3Crect x='26' y='26' width='44' height='44' transform='rotate(45 48 48)'/%3E%3Crect x='26' y='26' width='44' height='44'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--lapis); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-soft); color: var(--night); }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--night);
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(2.05rem, 3.8vw, 3.1rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.ar { font-family: var(--f-arabic); direction: rtl; }
.ur { font-family: var(--f-urdu); direction: rtl; line-height: 2.1; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 68ch; }
.center { text-align: center; margin-inline: auto; }
/* Hidden above the page (not to one side: in Urdu, right-to-left, a side offset widens the page) */
.skip { position: absolute; inset-inline-start: 1rem; top: 0; transform: translateY(-120%); background: var(--gold); color: var(--night); padding: .6rem 1rem; z-index: 999; }
.skip:focus { transform: none; }

/* ---------- Section rhythm (light / sand / dark) ---------- */
.sec { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
.sec--sand { background: var(--sand); }
.sec--sand.patterned { background-image: var(--pattern-light); }
.sec--dark {
  background: var(--pattern), var(--night);
  color: #DCE1F3;
}
.sec--lapis {
  background: linear-gradient(160deg, var(--lapis) 0%, var(--night) 100%);
  color: #DCE1F3;
}
.sec--lapis::before {
  content: ""; position: absolute; inset: 0; background: var(--pattern); pointer-events: none;
}
.sec--dark h1, .sec--dark h2, .sec--dark h3, .sec--dark h4,
.sec--lapis h1, .sec--lapis h2, .sec--lapis h3, .sec--lapis h4 { color: var(--white); }
.sec--dark a:not(.btn), .sec--lapis a:not(.btn) { color: var(--gold-2); }
.sec > .wrap { position: relative; }

/* Section heading: Arabic word sits above, gold ornament below */
.head { margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.head .ar-kicker {
  display: block; font-family: var(--f-arabic); font-size: 1.35rem; color: var(--gold);
  margin-bottom: .35rem; direction: rtl; text-align: left;
}
.head.center .ar-kicker { text-align: center; }
.head p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.head.center p { margin-inline: auto; }
.sec--dark .head p, .sec--lapis .head p { color: #B9C1DE; }
.ornament {
  display: flex; align-items: center; gap: .75rem; color: var(--gold); margin: .9rem 0 1.2rem;
}
.head.center .ornament { justify-content: center; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 56px; background: currentColor; opacity: .55; }
.ornament svg { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-body); font-weight: 500; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
  line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--night); }
.btn--gold:hover { color: var(--night); transform: translateY(-1px); background: var(--gold-2); }
.btn--blue { background: var(--lapis); color: var(--white); }
.btn--blue:hover { background: var(--night); color: var(--white); }
.btn--ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn--ghost:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn--line { border-color: var(--lapis); color: var(--lapis); }
.btn--line:hover { background: var(--lapis); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--night); color: #C8CFEA; font-size: .86rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.topbar a { color: #C8CFEA; text-decoration: none; }
.topbar a:hover { color: var(--gold-2); }
.topbar .contacts { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar .contacts span { display: inline-flex; align-items: center; gap: .4rem; }
.topbar svg { width: 14px; height: 14px; color: var(--gold-2); }
.topbar .bismillah { font-family: var(--f-arabic); font-size: 1.05rem; color: var(--gold-2); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 250, 244, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 8px 24px -18px rgba(15,24,66,.4); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 84px; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--night); }
.brand img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; background: #fff; }
.brand .name { font-family: var(--f-display); font-weight: 700; font-size: 1.28rem; line-height: 1.1; display: block; }
.brand .ur-name { font-family: var(--f-urdu); font-size: .82rem; color: var(--gold); display: block; line-height: 1.9; direction: rtl; text-align: left; }
.brand:hover { color: var(--night); }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a:not(.btn) {
  text-decoration: none; color: var(--ink); font-size: .97rem; padding: .5rem .85rem; border-radius: 999px; position: relative;
}
.nav a:not(.btn):hover { color: var(--lapis); background: rgba(30,47,122,.06); }
.nav a[aria-current="page"] { color: var(--lapis); font-weight: 600; }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}
.nav .btn { margin-left: .6rem; padding: .7rem 1.25rem; }
.menu-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px; width: 46px; height: 46px;
  align-items: center; justify-content: center; cursor: pointer; color: var(--night);
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Home hero ---------- */
.hero {
  background: var(--pattern), var(--night);
  color: #DCE1F3; overflow: hidden; position: relative;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold));
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem);
}
.hero .calligraphy {
  font-family: var(--f-arabic); font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--gold-2);
  line-height: 1.4; direction: rtl; text-align: left; margin-bottom: .3rem;
}
.hero .ref { font-size: .9rem; color: #9AA4CC; margin-bottom: 1.8rem; display: block; }
.hero h1 { color: var(--white); margin-bottom: 1.2rem; }
.hero .lead { font-size: 1.15rem; color: #C6CDE8; max-width: 52ch; margin-bottom: 2rem; }
.hero-figure { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-figure .frame {
  border-radius: var(--arch); overflow: hidden; aspect-ratio: 4 / 5;
  border: 2px solid rgba(227,190,98,.6); padding: 10px; background: rgba(255,255,255,.03);
}
.hero-figure .frame .ph { border-radius: var(--arch); height: 100%; }
.hero-figure .seal {
  position: absolute; left: -28px; bottom: 34px; width: 132px; height: 132px; border-radius: 50%;
  background: var(--white); padding: 6px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.6);
}
.hero-figure .seal img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hero-figure .founded {
  position: absolute; right: -14px; top: 18%; background: var(--gold); color: var(--night);
  padding: .9rem 1.1rem; border-radius: 12px; text-align: center; line-height: 1.2; box-shadow: var(--shadow);
}
.hero-figure .founded strong { font-family: var(--f-display); font-size: 2rem; display: block; }
.hero-figure .founded span { font-size: .82rem; }

/* page-load sequence (the one orchestrated motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero .reveal { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
  .hero .reveal:nth-child(2) { animation-delay: .12s; }
  .hero .reveal:nth-child(3) { animation-delay: .24s; }
  .hero .reveal:nth-child(4) { animation-delay: .36s; }
  .hero .reveal:nth-child(5) { animation-delay: .48s; }
  .hero-figure.reveal { animation-delay: .3s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---------- Inner page hero ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--lapis), var(--night)); color: #C6CDE8; position: relative; overflow: hidden;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--pattern); }
.page-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold));
}
.page-hero .wrap { position: relative; padding: clamp(3.5rem, 8vw, 6rem) 0; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.page-hero h1 { color: var(--white); margin-bottom: .6rem; }
.page-hero p { max-width: 58ch; font-size: 1.12rem; margin: 0; }
.page-hero .ar-big { font-family: var(--f-arabic); color: var(--gold-2); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.3; opacity: .9; }
.crumbs { font-size: .9rem; margin-bottom: 1rem; color: #9AA4CC; }
.crumbs a { color: var(--gold-2); text-decoration: none; }

/* ---------- Photo slots with patterned fallback ---------- */
.ph {
  position: relative; overflow: hidden; background: var(--pattern), var(--lapis);
  display: block; width: 100%; margin: 0;
}
.ph::before { /* crescent mark shown when no photo */
  content: ""; position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23E3BE62' d='M38 8a24 24 0 1 0 18 40A20 20 0 1 1 38 8z'/%3E%3Cpath fill='%23E3BE62' d='M47 18l2.2 5 5.3.4-4 3.5 1.2 5.2-4.7-2.8-4.7 2.8 1.2-5.2-4-3.5 5.3-.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ph img { position: relative; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ph.missing img { display: none; }
.ph figcaption {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 2.2rem 1.1rem .9rem;
  background: linear-gradient(transparent, rgba(15,24,66,.85)); color: #fff; font-size: .92rem;
}

/* ---------- Home: intro ---------- */
.intro { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.intro .media { position: relative; }
.intro .media .ph { aspect-ratio: 4/5; border-radius: var(--arch); box-shadow: var(--shadow); }
.intro .media .stamp {
  position: absolute; right: -16px; bottom: 28px; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem 1.2rem; box-shadow: var(--shadow); max-width: 220px;
}
.intro .media .stamp .ar { color: var(--gold); font-size: 1.5rem; display: block; line-height: 1.4; }
.intro .media .stamp small { color: var(--muted); font-size: .85rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin-top: 2rem; border-top: 1px solid var(--line); }
.facts div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 1.2rem; border-right: 1px solid var(--line); }
.facts div:nth-child(even) { padding-left: 1.4rem; }
.facts dt { font-family: var(--f-display); font-size: 1.7rem; font-weight: 700; color: var(--lapis); line-height: 1.1; }
.facts dd { margin: .2rem 0 0; color: var(--muted); font-size: .94rem; }

/* ---------- Institutions (alternating rows) ---------- */
.inst { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.inst-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.inst-row:nth-child(even) .inst-media { order: 2; }
.inst-media .ph { aspect-ratio: 5/4; border-radius: 18px; box-shadow: var(--shadow); }
.inst-row .tag {
  display: inline-block; font-size: .85rem; color: var(--lapis); background: rgba(30,47,122,.08);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: .9rem;
}
.inst-row h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.inst-row .ur { color: var(--gold); font-size: 1.05rem; display: block; margin: -.3rem 0 .6rem; text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 1.4rem; padding: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--white); padding: .35rem .85rem; border-radius: 999px; font-size: .9rem; }
.sec--dark .chips li, .sec--lapis .chips li { background: rgba(255,255,255,.05); border-color: rgba(227,190,98,.3); color: #E4E8F6; }
.reg { font-size: .9rem; color: var(--muted); }
.reg strong { color: var(--ink); font-weight: 600; }

/* ---------- Path of study (sequence) ---------- */
.path { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.path h3 { margin-bottom: 1.4rem; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 1px; background: rgba(227,190,98,.35); }
.steps li { counter-increment: s; position: relative; padding: 0 0 1.25rem 3.4rem; }
.steps li::before {
  content: ""; position: absolute; left: 6px; top: 4px; width: 27px; height: 27px;
  background: var(--night); border: 1px solid var(--gold-2); transform: rotate(45deg);
}
.steps li::after {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 39px; height: 39px; display: grid; place-items: center;
  color: var(--gold-2); font-family: var(--f-display); font-weight: 700; font-size: 1.1rem;
}
.steps li strong { display: block; color: var(--white); font-weight: 500; font-size: 1.08rem; }
.steps li span { color: #A9B2D6; font-size: .93rem; }
.steps li.final strong { color: var(--gold-2); }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 900px; margin-inline: auto; }
.quote .ar { font-size: clamp(1.8rem, 4vw, 2.7rem); color: var(--lapis); line-height: 1.8; display: block; margin-bottom: 1rem; }
.quote blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.35; color: var(--night); font-style: italic; }
.quote cite { display: block; margin-top: 1.2rem; font-style: normal; color: var(--muted); font-size: .95rem; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; grid-auto-flow: dense; }
.gallery .ph { border-radius: 14px; height: 100%; }
.gallery .g-tall { grid-row: span 2; }
.gallery .g-wide { grid-column: span 2; }

/* ---------- Donate CTA band ---------- */
.cta-band {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center;
}
.cta-band .acct {
  background: rgba(255,255,255,.06); border: 1px solid rgba(227,190,98,.35); border-radius: 18px; padding: 1.6rem;
}
.cta-band .acct small { color: #A9B2D6; display: block; }
.cta-band .acct .num { font-family: var(--f-display); font-size: 1.6rem; color: var(--white); letter-spacing: .02em; word-break: break-all; }

/* ---------- Cards (used sparingly) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
}
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--lapis); color: var(--gold-2);
}
.card .icon svg { width: 24px; height: 24px; }
.card h4 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.sec--dark .card, .sec--lapis .card { background: rgba(255,255,255,.04); border-color: rgba(227,190,98,.25); }
.sec--dark .card p, .sec--lapis .card p { color: #B9C1DE; }

/* ---------- About page ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.story .pull {
  font-family: var(--f-display); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.35; color: var(--lapis);
  border-left: 3px solid var(--gold); padding-left: 1.3rem; margin: 1.5rem 0;
}
.milestone {
  display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: center; background: var(--white);
  border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; margin-top: 1.5rem;
}
.milestone .yr { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; color: var(--gold); line-height: 1; }
.milestone .yr small { display: block; font-family: var(--f-arabic); font-size: 1.1rem; color: var(--lapis); font-weight: 400; margin-top: .3rem; }

.namesake { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.namesake .ar-name { font-family: var(--f-arabic); color: var(--gold-2); font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.5; text-align: center; }
.namesake .ar-name small { display: block; font-size: 1.4rem; color: #A9B2D6; }

.logo-explain { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.logo-explain .logo-big { background: var(--white); border-radius: 50%; padding: 12px; box-shadow: var(--shadow); max-width: 420px; margin-inline: auto; }
.logo-explain .logo-big img { border-radius: 50%; }
.meaning { list-style: none; margin: 0; padding: 0; }
.meaning li { display: grid; grid-template-columns: 150px 1fr; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.meaning li:first-child { border-top: 1px solid var(--line); }
.meaning .ar { font-size: 1.25rem; color: var(--gold); text-align: right; line-height: 1.6; }
.meaning p { margin: 0; color: var(--muted); }
.meaning p strong { color: var(--ink); display: block; font-weight: 600; }

/* ---------- Education page: tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.8rem; }
.tab {
  font-family: var(--f-body); font-size: 1rem; padding: .8rem 1.4rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink); transition: all .2s;
}
.tab:hover { border-color: var(--lapis); }
.tab[aria-selected="true"] { background: var(--lapis); color: var(--white); border-color: var(--lapis); }
.panel[hidden] { display: none; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.panel h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.panel .ur { color: var(--gold); text-align: left; display: block; font-size: 1.1rem; margin-top: -.4rem; }
.dept-list { list-style: none; margin: 1.2rem 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.dept-list li { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.dept-list li strong { display: block; font-family: var(--f-display); font-size: 1.3rem; color: var(--lapis); line-height: 1.2; }
.dept-list li span { font-size: .9rem; color: var(--muted); }
.levels { background: var(--pattern), var(--night); color: #DCE1F3; border-radius: 20px; padding: 2rem; }
.levels h4 { color: var(--white); }
.levels .steps li { padding-bottom: 1rem; }
.levels .steps li strong { font-size: 1rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.badge { font-size: .86rem; border: 1px dashed var(--gold); color: var(--ink); border-radius: 8px; padding: .4rem .75rem; background: var(--gold-soft); }

/* ---------- Donate page ---------- */
.accounts { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.4rem; }
.acct-card { border-radius: 20px; overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.acct-card .top { background: var(--pattern), var(--night); padding: 1.5rem 1.6rem; display: flex; align-items: center; gap: 1rem; }
.acct-card .top .icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--night); display: grid; place-items: center; flex: none; }
.acct-card .top .icon svg { width: 24px; height: 24px; }
.acct-card .top small { color: var(--gold-2); display: block; font-size: .82rem; }
.acct-card .top strong { color: var(--white); font-family: var(--f-display); font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.acct-card .body { padding: 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.acct-card .body label { font-size: .85rem; color: var(--muted); }
.acct-card .body .acct-title { margin: 0 0 .5rem; font-weight: 600; font-size: 1.05rem; color: var(--night); }
.copy-field {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: var(--sand);
  border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem;
}
.copy-field code { font-family: var(--f-body); font-weight: 600; font-size: 1.12rem; color: var(--night); letter-spacing: .04em; word-break: break-all; }
.copy-btn {
  display: inline-flex; align-items: center; gap: .35rem; background: none; border: 1px solid var(--lapis); color: var(--lapis);
  font-family: var(--f-body); font-size: .85rem; padding: .4rem .75rem; border-radius: 999px; cursor: pointer; flex: none;
}
.copy-btn:hover { background: var(--lapis); color: var(--white); }
.copy-btn svg { width: 14px; height: 14px; }
.notice {
  display: flex; gap: 1rem; align-items: flex-start; margin: 2rem auto 0; max-width: 820px;
  background: var(--gold-soft); border: 1px solid #E8D29A; border-radius: 14px; padding: 1.2rem 1.4rem; color: var(--ink);
}
.notice svg { width: 22px; height: 22px; color: var(--gold); flex: none; margin-top: 3px; }
.notice p { margin: 0; }
.uses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid rgba(227,190,98,.3); border-bottom: 1px solid rgba(227,190,98,.3); }
.uses div { padding: 1.8rem 1.3rem; border-right: 1px solid rgba(227,190,98,.3); }
.uses div:last-child { border-right: 0; }
.uses svg { width: 28px; height: 28px; color: var(--gold-2); margin-bottom: .9rem; }
.uses h4 { font-size: 1.25rem; margin-bottom: .3rem; }
.uses p { font-size: .93rem; color: #B9C1DE; margin: 0; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.info-list li:first-child { border-top: 1px solid var(--line); }
.info-list .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--lapis); color: var(--gold-2); display: grid; place-items: center; }
.info-list .icon svg { width: 22px; height: 22px; }
.info-list strong { display: block; font-weight: 600; }
.info-list a { color: var(--ink); text-decoration: none; display: block; }
.info-list a:hover { color: var(--lapis); text-decoration: underline; }
.info-list span { color: var(--muted); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .92rem; font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--ivory); color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lapis); background: #fff; box-shadow: 0 0 0 3px rgba(30,47,122,.12); }
.field textarea { min-height: 140px; resize: vertical; }
.field .err { color: #A3261B; font-size: .85rem; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #A3261B; }
.field.invalid .err { display: block; }
.form-note { font-size: .88rem; color: var(--muted); margin-top: .8rem; }
.map { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 420px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pattern), var(--night); color: #B9C1DE; font-size: .96rem; position: relative; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-2), var(--gold)); }
.foot-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.1fr 1fr; gap: 2.5rem; padding: 4.5rem 0 3rem; }
.site-footer h4 { color: var(--white); font-size: 1.3rem; margin-bottom: 1.1rem; }
.site-footer a { color: #D3D9EF; text-decoration: none; }
.site-footer a:hover { color: var(--gold-2); }
.foot-brand { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.foot-brand img { width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 3px; }
.foot-brand strong { font-family: var(--f-display); color: var(--white); font-size: 1.35rem; line-height: 1.15; display: block; }
.foot-brand .ur { color: var(--gold-2); font-size: .82rem; display: block; text-align: left; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.foot-contact li { display: grid; grid-template-columns: 20px 1fr; gap: .7rem; }
.foot-contact svg { width: 18px; height: 18px; color: var(--gold-2); margin-top: 4px; }
.foot-ayah { font-family: var(--f-arabic); color: var(--gold-2); font-size: 1.6rem; direction: rtl; text-align: left; line-height: 1.6; }
.foot-bottom { border-top: 1px solid rgba(227,190,98,.2); padding: 1.3rem 0; font-size: .86rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: #8F99C2; }
.foot-bottom a { color: #8F99C2; }

/* ---------- Floating WhatsApp + toast ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -10px rgba(0,0,0,.45);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { color: #fff; transform: scale(1.05); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--night); color: #fff;
  padding: .8rem 1.3rem; border-radius: 999px; font-size: .95rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 70;
  border: 1px solid var(--gold);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1080px) {
  .nav a:not(.btn) { padding: .5rem .6rem; font-size: .93rem; }
  .accounts { grid-template-columns: 1fr 1fr; }
  .accounts .acct-card:first-child { grid-column: span 2; }
  .uses { grid-template-columns: repeat(3, 1fr); }
  .uses div:nth-child(3) { border-right: 0; }
  .uses div:nth-child(n+4) { border-top: 1px solid rgba(227,190,98,.3); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .menu-toggle { display: inline-flex; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ivory); }
  body.nav-open .site-header { z-index: 60; }
  .nav { visibility: hidden; }
  .nav.open { visibility: visible; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); background: var(--ivory); flex-direction: column; align-items: stretch;
    padding: 6rem 1.5rem 2rem; gap: .2rem; transform: translateX(100%); transition: transform .3s ease, visibility .3s; box-shadow: -20px 0 40px -20px rgba(0,0,0,.3);
    z-index: 55;
  }
  .nav.open { transform: none; }
  .nav a:not(.btn) { padding: .9rem 1rem; font-size: 1.05rem; border-radius: 10px; }
  .nav a[aria-current="page"] { background: rgba(30,47,122,.07); }
  .nav a[aria-current="page"]::after { display: none; }
  .nav .btn { margin: 1rem 0 0; justify-content: center; }
  .nav-close { position: absolute; top: 1.4rem; right: 1.4rem; }
  .menu-toggle { position: relative; z-index: 56; }
  body.nav-open { overflow: hidden; }
  .scrim { position: fixed; inset: 0; background: rgba(15,24,66,.45); z-index: 54; opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }

  .hero .wrap, .intro, .inst-row, .path, .cta-band, .story, .namesake, .logo-explain, .panel-grid, .contact-grid { grid-template-columns: 1fr; }
  .inst-row:nth-child(even) .inst-media { order: 0; }
  .hero-figure { width: min(380px, 88%); margin-top: 1rem; }
  .page-hero .wrap { grid-template-columns: 1fr; }
  .page-hero .ar-big { text-align: left; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .intro .media { max-width: 460px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .topbar .contacts span:nth-child(2) { display: none; }
  .topbar .bismillah { display: none; }
  .site-header .wrap { min-height: 72px; }
  .brand img { width: 48px; height: 48px; }
  .brand .name { font-size: 1.08rem; }
  .grid-3, .grid-2, .dept-list, .field-row, .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { border-right: 0; padding-right: 0; }
  .facts div:nth-child(even) { padding-left: 0; }
  .accounts { grid-template-columns: 1fr; }
  .accounts .acct-card:first-child { grid-column: auto; }
  .uses { grid-template-columns: 1fr; }
  .uses div { border-right: 0; border-top: 1px solid rgba(227,190,98,.3); }
  .uses div:first-child { border-top: 0; }
  .foot-grid { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero-figure .seal { width: 100px; height: 100px; left: -10px; }
  .hero-figure .founded { right: -6px; }
  .intro .media .stamp { right: 8px; }
  .meaning li { grid-template-columns: 1fr; gap: .3rem; }
  .meaning .ar { text-align: left; }
  .gallery { grid-auto-rows: 140px; gap: 10px; }
  .milestone { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================
   Founder, Quran journey, impact figures, Makatib directory
   ========================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.head .ar-kicker--ur, .ar-kicker--ur { font-family: var(--f-urdu); font-size: 1.15rem; line-height: 2.2; }

/* Impact figures */
.impact-band { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 2.5rem; border: 1px solid var(--line); border-radius: 18px; background: var(--white); overflow: hidden; }
.impact-band > div { padding: 1.5rem 1.2rem; text-align: center; border-left: 1px solid var(--line); }
.impact-band > div:first-child { border-left: 0; }
.impact-band dt { font-family: var(--f-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; color: var(--lapis); line-height: 1.1; }
.impact-band dd { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }
.impact-band--dark { background: rgba(255,255,255,.04); border-color: rgba(227,190,98,.3); }
.impact-band--dark > div { border-color: rgba(227,190,98,.3); }
.impact-band--dark dt { color: var(--gold-2); }
.impact-band--dark dd { color: #C9D0EA; }
.impact-ur { font-family: var(--f-urdu); color: var(--white); font-size: clamp(1.1rem, 2vw, 1.35rem); text-align: center; line-height: 2.3; max-width: 46ch; margin: 0 auto; }

/* Founder */
.founder { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.founder-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 1.8rem; text-align: center; box-shadow: var(--shadow); position: sticky; top: 110px; }
.founder-card h3 { font-size: 1.6rem; margin: 1.2rem 0 .2rem; }
.founder-frame { aspect-ratio: 4 / 5; border-radius: var(--arch); background: var(--pattern), var(--night); border: 4px solid var(--gold-soft); display: grid; place-items: center; padding: 1.5rem; box-shadow: inset 0 0 0 2px rgba(227,190,98,.35); }
.founder-frame span { font-family: var(--f-urdu); color: var(--gold-2); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 2.3; text-align: center; }
.founder-frame--sm { max-width: 300px; width: 100%; justify-self: center; }
.founder-ur { font-family: var(--f-urdu); color: var(--gold); font-size: 1.25rem; line-height: 2.2; margin: 0; }
.head .founder-ur { text-align: left; }
.founder-role { color: var(--muted); font-size: .95rem; margin: .2rem 0 1.2rem; }
.founder-points { list-style: none; margin: 0; padding: 1.2rem 0 0; text-align: left; display: grid; gap: .8rem; border-top: 1px solid var(--line); }
.founder-points li { font-size: .92rem; color: var(--muted); padding-left: 1.4rem; position: relative; }
.founder-points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.founder-points strong { display: block; color: var(--night); font-weight: 600; }
.founder-bio { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.6rem); font-family: var(--f-urdu); font-size: 1.12rem; line-height: 2.35; text-align: right; }
.founder-bio h3, .founder-bio h4 { font-family: var(--f-urdu); color: var(--night); font-weight: 600; line-height: 2; }
.founder-bio h3 { font-size: 1.5rem; border-bottom: 2px solid var(--gold-soft); padding-bottom: .4rem; margin-bottom: 1rem; }
.founder-bio h4 { font-size: 1.22rem; color: var(--lapis); margin: 1.6rem 0 .6rem; }
.founder-bio p { margin: 0 0 1rem; }
.bio-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .9rem; }
.bio-list li { padding-right: 1.4rem; position: relative; }
.bio-list li::before { content: ""; position: absolute; right: 0; top: 1.05em; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.bio-list strong { color: var(--night); }
.bio-dua { background: var(--sand); border-right: 4px solid var(--gold); border-radius: 12px; padding: 1rem 1.3rem; color: var(--night); }
.founder-intro { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.founder-intro .pull { font-family: var(--f-urdu); line-height: 2.3; text-align: right; }

/* Quran journey */
.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.journey-step { background: rgba(255,255,255,.04); border: 1px solid rgba(227,190,98,.28); border-radius: 18px; padding: 1.6rem; color: #C9D0EA; }
.journey-step h3 { color: var(--white); font-size: 1.5rem; }
.journey-step ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.journey-no { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-2); color: var(--gold-2); font-family: var(--f-arabic); font-size: 1.3rem; margin-bottom: .8rem; }
.journey-ur { font-family: var(--f-urdu); color: var(--gold-2); line-height: 2.3; text-align: right; margin: 0; padding-top: .9rem; border-top: 1px solid rgba(227,190,98,.25); }
.journey-img { margin-top: 2rem; aspect-ratio: 21 / 7; border-radius: 18px; }

/* Locations, services, quote */
.locations { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; background: var(--sand); border-radius: 18px; padding: clamp(1.4rem, 3vw, 2.2rem); }
.locations h3 { margin-bottom: .4rem; }
.locations p { margin: 0 0 .6rem; }
.locations-ur { font-family: var(--f-urdu); color: var(--gold); line-height: 2.2; text-align: left; }
.card--link { text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.card--link:hover { border-color: var(--gold); transform: translateY(-2px); color: inherit; }
.quote-ar { text-align: center; }
.quote-ar span { display: block; font-family: var(--f-arabic); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--gold-2); line-height: 1.6; }
.quote-ar small { color: #C9D0EA; }

/* Directory */
.dir-search { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: .8rem; }
.dir-search input, .dir-search select { font: inherit; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); }
.dir-search input { flex: 1 1 280px; }
.dir-count { color: var(--muted); font-size: .95rem; margin-bottom: 1.6rem; }
.dir-empty { text-align: center; background: var(--sand) var(--pattern-light); border-radius: 18px; padding: 3rem 1.5rem; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.dir-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.dir-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.dir-photo { display: block; aspect-ratio: 16 / 9; background: var(--pattern), var(--night); }
.dir-photo img { width: 100%; height: 100%; object-fit: cover; }
.dir-photo-empty { display: grid; place-items: center; height: 100%; font-family: var(--f-arabic); color: var(--gold-2); font-size: 2rem; }
.dir-body { padding: 1.1rem 1.3rem 1.3rem; }
.dir-body h3 { font-size: 1.45rem; margin-bottom: .1rem; }
.dir-body h3 a { color: var(--night); text-decoration: none; }
.dir-body h3 a:hover { color: var(--lapis); text-decoration: underline; }
.dir-ur { font-family: var(--f-urdu); color: var(--gold); margin: 0; line-height: 2; text-align: left; }
.dir-place { display: flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .93rem; margin: .3rem 0 0; }
.dir-place svg { width: 16px; height: 16px; flex: none; color: var(--gold); }
.chips--sm { margin: .7rem 0 .4rem; }
.chips--sm li { font-size: .8rem; padding: .2rem .65rem; }
.dir-meta { font-size: .88rem; color: var(--muted); margin: .4rem 0 0; }
.dir-detail { display: grid; grid-template-columns: 1fr minmax(260px, 340px); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.dir-facts { background: var(--sand); border-radius: 18px; padding: 1.6rem; position: sticky; top: 110px; }
.dir-facts dl { margin: 0 0 1.3rem; }
.dir-facts dl div { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.dir-facts dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.dir-facts dd { margin: .15rem 0 0; font-weight: 500; }
.dir-sub { font-size: 1.3rem; margin: 1.6rem 0 .5rem; }
.dir-list { margin: 0; padding-left: 1.1rem; }
.dir-hero-ph { aspect-ratio: 16 / 9; border-radius: 18px; }
.dir-grid--2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gallery--compact { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
.photo-credit { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 1.4rem; }

@media (max-width: 920px) {
  .founder, .founder-intro, .dir-detail { grid-template-columns: 1fr; }
  .founder-card, .dir-facts { position: static; }
  .founder-card .founder-frame { max-width: 260px; margin: 0 auto; }
  .journey { grid-template-columns: 1fr; }
  .impact-band { grid-template-columns: 1fr 1fr; }
  .impact-band > div:nth-child(3) { border-left: 0; }
  .impact-band > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .impact-band--dark > div:nth-child(n+3) { border-top-color: rgba(227,190,98,.3); }
  .locations { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .gallery--compact { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .journey-img { aspect-ratio: 16 / 9; }
  .dir-search select, .dir-search .btn { flex: 1 1 140px; }
}

/* ---------- Language switcher (public header) ---------- */
.lang-pick { position: relative; margin-left: auto; margin-right: .6rem; }
.lang-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: #fff; color: var(--night); border-radius: 999px; padding: .42rem .8rem; font: inherit; font-size: .88rem; cursor: pointer; }
.lang-btn svg { width: 18px; height: 18px; color: var(--gold); }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--gold); }
.lang-menu { position: absolute; right: 0; top: calc(100% + .4rem); list-style: none; margin: 0; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 150px; z-index: 60; }
.lang-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: .5rem .7rem; border-radius: 8px; cursor: pointer; color: var(--ink); }
.lang-menu button[lang="ur"], .lang-menu button[lang="sd"] { font-family: var(--f-urdu); line-height: 1.8; }
.lang-menu button[lang="ar"] { font-family: var(--f-arabic); font-size: 1.05rem; }
.lang-menu button:hover { background: var(--sand); }
.lang-menu button[aria-current] { background: var(--night); color: var(--gold-2); }
@media (min-width: 981px) { .lang-pick { order: 3; margin: 0 0 0 .8rem; } }
@media (max-width: 520px) { .lang-btn span { display: none; } .lang-btn { padding: .45rem; } }

/* Google's translation bar is replaced by the switcher above; right-to-left languages read right-to-left */
.goog-te-banner-frame, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.translated-rtl main p, .translated-rtl main li, .translated-rtl main h1, .translated-rtl main h2, .translated-rtl main h3,
.translated-rtl .nav a, .translated-rtl .site-footer p { direction: rtl; text-align: right; }
.translated-rtl .notranslate { direction: initial; }

/* ---------- Backgrounds: the logo watermark only (no star pattern) ---------- */
:root {
  --pattern: url("/assets/images/logo-watermark.png?v=3") center / 260px 260px repeat;
  --pattern-light: none;
}

/* Footer: Download the Android app */
.app-dl { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .55rem 1.1rem .55rem .85rem; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.25); line-height: 1.15; }
.app-dl:hover { background: #111; border-color: var(--gold-2); color: #fff; }
.app-dl svg { width: 26px; height: 26px; color: #3DDC84; flex: none; }
.app-dl span { display: flex; flex-direction: column; font-weight: 600; font-size: 1rem; }
.app-dl small { font-size: .68rem; font-weight: 400; color: #C8CFEA; text-transform: uppercase; letter-spacing: .05em; }
