@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/noto-nastaliq-urdu-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Noto Naskh Arabic";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/noto-naskh-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --green: #1b4d3e;
  --green-deep: #12352c;
  --gold: #c4a35a;
  --gold-text: #8a6d2b;
  --cream: #f7f1e5;
  --paper: #fffdf8;
  --ink: #1c241f;
  --muted: #5c675f;
  --line: #e4d9c4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Serif 4", "Noto Naskh Arabic", "Noto Nastaliq Urdu", Georgia, serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
}
h1, h2, h3 { line-height: 1.25; }

html[dir="rtl"] body {
  font-family: "Noto Nastaliq Urdu", "Source Serif 4", Georgia, serif;
  font-size: 1.125rem;
  line-height: 2.2;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
  line-height: 2;
  padding-block: 0.12em;
  overflow: visible;
}
html[dir="rtl"] nav a,
html[dir="rtl"] .lang,
html[dir="rtl"] .btn,
html[dir="rtl"] .wa-float,
html[dir="rtl"] .nav-toggle {
  line-height: 1.7;
  font-size: 1.02rem;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  z-index: 80;
  background: #fff;
  color: var(--green-deep);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 8px; }

:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--green-deep);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap { width: min(1100px, calc(100% - 32px)); margin-inline: auto; }

.site-header {
  background: var(--green-deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 64px;
  padding: 10px 0 12px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  margin-inline-end: 22px;
}
.logo {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  background: #fffbf2;
  border-radius: 10px;
  padding: 4px 8px;
  flex: 0 0 auto;
}
.tagline {
  margin: 0;
  max-width: 13.5rem;
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}
html[dir="rtl"] .tagline {
  max-width: 12.5rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.9;
  padding-block: 0.06em;
}
.logo img {
  display: block;
  height: 40px;
  width: auto;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  margin-top: 6px;
}
#site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}
#site-nav a {
  text-decoration: none;
  padding: 8px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.98rem;
}
#site-nav a:hover,
#site-nav a.active {
  background: rgba(196, 163, 90, 0.22);
  color: #f7f1e5;
}
.lang,
.nav-toggle {
  border: 1px solid var(--gold);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.lang, [lang="ur"] {
  font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", "Source Serif 4", sans-serif;
}
.lang {
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 14px;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  padding: 0;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  padding: 64px 0 72px;
  background: var(--green-deep);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(18, 53, 44, 0.9), rgba(27, 77, 62, 0.74));
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin: 0 0 12px;
  max-width: 18em;
  line-height: 1.25;
}
.hero p { max-width: 40em; font-size: 1.15rem; }
.hero .hero-note { font-size: 1.02rem; margin-top: 0; }
.ayah {
  font-family: "Noto Naskh Arabic", serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 2.15;
  margin: 0 0 4px;
  max-width: 22em;
}
.ayah-ref {
  margin: 0 0 8px;
  color: #f3e6c4;
  font-size: 0.95rem;
}
.ayah-meaning { margin-top: 0; max-width: 36em; }
html[dir="rtl"] .hero h1 { line-height: 2.35; padding-block: 0.2em; max-width: 16em; }
html[dir="rtl"] .hero p { line-height: 2.2; }
html[dir="rtl"] .ayah { line-height: 2.2; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 44px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.btn-gold { background: var(--gold); color: var(--green-deep); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-solid { background: var(--green); color: #fff; }
.btn-wa { background: #25d366; color: #083318; }

.demo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(18, 53, 44, 0.05);
}
.demo strong {
  color: var(--gold-text);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
html[dir="rtl"] .demo strong { letter-spacing: 0; }
.teacher-name { font-size: 1.4rem; margin: 0 0 8px; color: var(--green-deep); }

.wa-float {
  position: fixed;
  /* Below the sticky header (z-index 20) so an open menu and the
     hamburger stay tappable if the viewport is very short. */
  z-index: 15;
  /* Physical bottom-right in both LTR and RTL. The Netlify badge is off. */
  right: 16px;
  left: auto;
  bottom: 16px;
  background: #25d366;
  color: #083318;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

section { padding: 56px 0; }
.panel { background: var(--paper); }
h2 { font-size: 1.7rem; margin: 0 0 8px; color: var(--green-deep); }
.lead { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(18, 53, 44, 0.05);
}
.card h3 { margin: 0 0 8px; color: var(--green); }
.card p { margin: 0; color: var(--muted); }
.cards-core .card { border-inline-start: 4px solid var(--green); }
.also { margin-top: 36px; }
.also h2 { font-size: 1.15rem; color: var(--muted); }
.cards-also .card {
  background: transparent;
  box-shadow: none;
  padding: 14px 16px;
}
.cards-also .card h3 { font-size: 1.05rem; }

.page-title {
  background: var(--green);
  color: #fff;
  padding: 36px 0;
}
.page-title h1 { margin: 0; }
.page-title p { margin: 8px 0 0; }

form {
  display: grid;
  gap: 12px;
  max-width: 560px;
}
label { font-weight: 700; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.hp { display: none; }
.ltr-token,
bdi[dir="ltr"] {
  unicode-bidi: isolate;
  direction: ltr;
}
input[type="email"],
input[type="tel"],
input[type="url"],
input[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
}
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[dir="ltr"] {
  text-align: left;
}

.site-footer {
  background: var(--green-deep);
  color: #d7e4dd;
  /* Bottom padding keeps the copyright and phone above the button. */
  padding: 28px 0 96px;
  font-size: 0.95rem;
}
.site-footer a { color: #f3e6c4; }
.site-footer .foot-row { display: flex; flex-wrap: wrap; gap: 12px 22px; justify-content: space-between; align-items: center; }
a.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  font-size: 0.92rem;
}
.social a:hover { background: rgba(196, 163, 90, 0.22); }
html[dir="rtl"] .social a { line-height: 1.2; font-size: 0.92rem; }
.card p.fee {
  margin: 0 0 8px;
  color: var(--green-deep);
  font-weight: 700;
}
.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.facts li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.hero .hero-note a {
  color: #f3e6c4;
  text-underline-offset: 0.15em;
}
#site-nav {
  flex: 1 1 auto;
  min-width: 0;
}
.header-tools {
  flex: 0 0 auto;
}
.actions + h2 { margin-top: 28px; }

/* Shown for a child / Qaida starter. If :has() is unavailable the field stays visible. */
.child-age { display: grid; gap: 12px; }
form:not(:has(#level option[value="child"]:checked)):not(:has(#course option[value="qaida-nazra"]:checked)) .child-age {
  display: none;
}

.fee-scroll {
  max-width: 720px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18, 53, 44, 0.05);
}
.fee-table {
  width: 100%;
  border-collapse: collapse;
}
.fee-table th,
.fee-table td {
  text-align: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.fee-table thead th {
  background: var(--paper);
  color: var(--green-deep);
  font-weight: 700;
}
.fee-table tbody th {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.fee-table td {
  color: var(--green-deep);
  font-weight: 700;
}
.fee-amt {
  display: flex;
  flex-direction: column;
  width: fit-content;
  max-width: 100%;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.fee-amt span {
  font-weight: 400;
  color: var(--muted);
}
.fee-table tr:last-child th,
.fee-table tr:last-child td { border-bottom: 0; }
html[dir="rtl"] .fee-table th,
html[dir="rtl"] .fee-table td {
  line-height: 2;
  padding-block: 10px 14px;
}

@media (min-width: 861px) {
  .logo img { height: 48px; }
  .header-inner { min-height: 72px; }
  .site-footer .foot-row { padding-right: 150px; }
}

@media (max-width: 860px) {
  .brand { margin-inline-end: 12px; }
  .header-tools { margin-top: 4px; }
  /* Keep tappable controls off the physical bottom-right button.
     The trial form already has its own WhatsApp link, so the float
     is not shown over those fields. */
  .actions { padding-right: 136px; }
  body:has(form) .wa-float { display: none; }
  body:has(form) .actions { padding-right: 0; }
  .nav-toggle { display: inline-flex; }
  #site-nav {
    display: none;
    position: absolute;
    margin-top: 0;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--green-deep);
    border-bottom: 3px solid var(--gold);
    padding: 8px 16px 14px;
    gap: 2px;
    z-index: 30;
  }
  #site-nav.is-open { display: flex; }
  #site-nav a {
    width: 100%;
    border-radius: 10px;
    justify-content: flex-start;
  }
  .hero { padding: 48px 0 56px; }
}


/* Fee highlights & support note */
.fee-table tr.fee-popular {
  background: rgba(27, 77, 62, 0.06);
}
.fee-table tr.fee-popular th[scope="row"] {
  color: var(--green-deep);
}
.badge-pop {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--green-deep);
  color: #fff;
  font-size: 0.72em;
  font-weight: 600;
  vertical-align: middle;
  letter-spacing: 0.01em;
}
.fee-support {
  margin-top: 20px;
  padding: 16px 20px;
  border-inline-start: 4px solid var(--gold);
  background: var(--paper, #f8f6f0);
  border-radius: 10px;
  font-size: 0.96rem;
  line-height: 1.75;
}
.fee-support strong {
  color: var(--green-deep);
}
