/* Inaya Quran Academy, public site styles
   Colours/fonts are variables so Admin Settings can change them. */
:root {
  --primary: #0F4C3A;
  --accent: #B8975A;
  --bg: #FBF7EE;
  --text: #26312C;
  --primary-ink: #0A3528;
  --accent-soft: #F1E9D6;
  --surface: #FFFDF8;
  --muted: #5E6A63;
  --border: #E6DFCC;
  --radius: 14px;
  --font-body: "Inter", "Hind Siliguri", "Noto Naskh Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Newsreader", "Hind Siliguri", Georgia, "Times New Roman", serif;
  --maxw: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-ink); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--primary); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.ar, [lang="ar"] { font-family: "Amiri", "Noto Naskh Arabic", serif; direction: rtl; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; color: color-mix(in srgb, var(--accent) 66%, #000); font-weight: 600; margin-bottom: .9rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead, .center .sec-head { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header { min-height: 69px; }
main { min-height: 70vh; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; max-width: 70vw; background: none; }
.brand .brand-text { font-family: var(--font-head); font-size: 1.35rem; color: var(--primary); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a.nav-link { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav a.nav-link:hover { color: var(--primary); background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.nav a.nav-link[aria-current="page"] { color: var(--primary); font-weight: 600; background: var(--accent-soft); }
.nav a.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav .btn { margin-left: 8px; }
.menu-btn { display: none; align-items: center; gap: 8px; background: none; border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; font: inherit; font-weight: 500; color: var(--primary); cursor: pointer; }
.menu-btn::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor; border-radius: 2px; }
.menu-btn[aria-expanded="true"]::before { box-shadow: none; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"]::after { content: ""; position: absolute; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 20px 18px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a.nav-link { padding: 14px 12px; border-radius: 12px; font-size: 1rem; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .96rem; padding: 12px 22px; border-radius: 999px; border: 1.5px solid var(--primary); background: var(--primary); color: #fff; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--primary-ink); border-color: var(--primary-ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary); color: #fff; }
.btn.sand { background: var(--accent); border-color: var(--accent); color: var(--primary-ink); }
.btn.light { background: #fff; color: var(--primary); border-color: #fff; }
.btn.light:hover { background: var(--accent-soft); color: var(--primary-ink); }
.btn.sm { padding: 8px 16px; font-size: .88rem; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }
.center .btn-row { justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.soft { background: var(--accent-soft); }
.section.green { background: var(--primary); color: #E9F0EC; }
.section.green h1, .section.green h2, .section.green h3 { color: #fff; }
.section.green .lead, .section.green .muted { color: #CFE0D8; }
.section.green a:not(.btn) { color: #fff; }
.sec-head { max-width: 62ch; margin-bottom: 2.2rem; }
.rich p:last-child { margin-bottom: 0; }
.rich ul { padding-left: 1.2em; margin: 0 0 1em; }
.rich h3 { margin-top: 1.4em; }
@media (max-width: 700px) { .section { padding: 52px 0; } }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: color-mix(in srgb, var(--accent) 82%, #000); }
.hero .lead { margin-bottom: 0; }
.hero-art { position: relative; justify-self: end; width: min(100%, 420px); }
.hero-art .arch { border-radius: 999px 999px 18px 18px; overflow: hidden; aspect-ratio: 4/4.6; background: var(--accent-soft); border: 1px solid var(--border); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero.center .hero-grid { grid-template-columns: 1fr; }
.hero.center .hero-art { display: none; }
@media (max-width: 860px) {
  .hero { padding: 36px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { justify-self: center; width: min(100%, 340px); }
}
.page-hero { padding: 56px 0 8px; }
.page-hero .lead { margin-bottom: 0; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.c3, .grid.c2, .grid.c4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.card h3 { margin-bottom: .35em; }
.card .sub { color: var(--muted); margin-bottom: 1rem; }
.card .more { margin-top: auto; padding-top: 1rem; font-weight: 600; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.icon-dot { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; }
.levels { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: 9px; }
.levels li { display: flex; align-items: baseline; gap: 10px; font-size: .95rem; }
.pill { flex: none; background: var(--accent); color: var(--primary-ink); font-size: .72rem; font-weight: 600; padding: 3px 11px; border-radius: 999px; letter-spacing: .02em; }
.steps { counter-reset: s; display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 600; margin-bottom: 14px; }
.section.green .step { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
.section.green .step::before { background: var(--accent); color: var(--primary-ink); }
.section.green .eyebrow { color: var(--accent); }
.section.green .hero h1 em { color: var(--accent); }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.section.green .step p { color: #CFE0D8; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.rev .split-media { order: -1; }
.split-media img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.rev .split-media { order: 0; } }
.stat { text-align: center; padding: 18px; }
.stat b { display: block; font-family: var(--font-head); font-size: 2.3rem; color: var(--primary); }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; border: 1px solid var(--border); }
.quote { font-family: var(--font-head); font-size: 1.1rem; }
.gallery img { border-radius: 10px; width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid var(--border); }
.cta-box { text-align: center; max-width: 720px; margin: 0 auto; }

/* ---------- Program detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.level-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.level-block h3 { display: flex; gap: 10px; align-items: center; font-size: 1.08rem; margin-bottom: .2em; }
.level-block p { margin: 0; color: var(--muted); font-size: .95rem; }
.aside-card { position: sticky; top: 90px; }
.notice { background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: 10px; padding: 12px 16px; font-size: .92rem; color: var(--text); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.center .faq { margin: 0 auto; text-align: left; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--primary); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 0 16px; color: var(--muted); }
.faq-cat { margin: 28px 0 10px; font-size: 1.05rem; }

/* ---------- Forms ---------- */
.form-wrap { max-width: 720px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
@media (max-width: 560px) { .form-card { padding: 20px; } }
.field { margin-bottom: 18px; }
.field label, .field .lbl { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--primary); }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.field .err { color: #A12B2B; font-size: .84rem; margin-top: 4px; min-height: 0; }
.req { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=date], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1.5px solid #D9D2BE; border-radius: 10px; padding: 11px 13px; min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input.invalid, select.invalid, textarea.invalid { border-color: #A12B2B; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.hp { position: absolute !important; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; }
.alert.ok { background: #E8F3EC; border: 1px solid #A9CDB8; color: #124B31; }
.alert.bad { background: #FBECEC; border: 1px solid #E5B4B4; color: #7A1F1F; }
.success-card { text-align: center; padding: 40px 24px; }
.success-card .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 18px; }
.code-badge { display: inline-block; background: var(--accent-soft); border: 1px solid var(--border); padding: 6px 14px; border-radius: 8px; font-weight: 600; letter-spacing: .06em; color: var(--primary); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .k { min-width: 92px; color: var(--muted); font-size: .88rem; padding-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #D9E6DF; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .94rem; }
.foot-logo { display: inline-block; margin-bottom: 14px; }
.foot-logo img { max-width: 100%; height: 44px; width: auto; display: block; background: none; }
.foot-logo img.mono { filter: brightness(0) invert(1); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 36px; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .85rem; color: #B7CBC0; }

/* ---------- Floating WhatsApp + consent ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: #1F8F5A; color: #fff; text-decoration: none; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; box-shadow: 0 8px 22px rgba(0,0,0,.18); display: inline-flex; gap: 8px; align-items: center; }
.wa-float:hover { background: #187548; color: #fff; }
.consent-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 620px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: 0 12px 34px rgba(0,0,0,.18); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.consent-bar .btn-row { margin: 0; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 32px; border: 1px dashed var(--border); border-radius: var(--radius); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* select: one clean chevron instead of the browser's default arrow */
select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: var(--surface, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667a70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }

/* ================= Motion =================
   Calm, purposeful movement: sections rise into view once, cards follow one after another,
   buttons and cards respond to the pointer. Only opacity and transform are animated, so nothing
   shifts the layout. Content is never hidden unless JavaScript has switched motion on (html.mo),
   and everything is disabled for people who ask their device for reduced motion. */
html { scroll-behavior: smooth; }
:root { --ease: cubic-bezier(.22, 1, .36, 1); }

.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s var(--ease), box-shadow .25s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 55%, transparent); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.card { transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 34px -18px color-mix(in srgb, var(--primary) 40%, transparent); border-color: color-mix(in srgb, var(--primary) 28%, var(--border)); }
.nav a.nav-link { position: relative; transition: color .2s ease, background-color .2s ease; }
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .45); }
.card .more, .more { transition: letter-spacing .2s ease, gap .2s ease; }
.hero-art .arch img { transition: transform 1.2s var(--ease); }
.hero-art:hover .arch img { transform: scale(1.04); }
.hero > .container { position: relative; }

html.mo [data-anim], html.mo [data-st] { opacity: 0; transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); will-change: opacity, transform; }
html.mo [data-anim="up"], html.mo [data-st] { transform: translateY(14px); }
html.mo [data-anim="zoom"] { transform: scale(.95); }
html.mo [data-anim="left"] { transform: translateX(-36px); }
html.mo [data-anim="right"] { transform: translateX(36px); }
html.mo [data-anim="none"] { opacity: 1; transition: none; }
html.mo [data-anim].in, html.mo [data-st].in { opacity: 1; transform: none; will-change: auto; }
/* once a card has appeared, give hover its own quicker timing back */
html.mo .card[data-st].in { transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease, opacity .8s var(--ease); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  html.mo [data-anim], html.mo [data-st] { opacity: 1 !important; transform: none !important; }
}
html.mo .card[data-st].in:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }

/* keep the footer out of sight until the page body exists, so it cannot jump when content arrives */
main:empty + footer { visibility: hidden; }

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; margin-inline-start: auto; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--primary); cursor: pointer; }
.lang-btn:hover { background: var(--accent-soft); }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgba(15,60,45,.16); padding: 8px; z-index: 70; display: grid; gap: 2px; }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: block; width: 100%; text-align: start; background: none; border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; }
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu button[aria-checked="true"] { color: var(--primary); font-weight: 600; background: var(--accent-soft); }
.lang-menu .more { display: block; border-top: 1px solid var(--border); margin-top: 6px; padding: 10px 4px 2px; font-size: .78rem; color: var(--muted); }
.lang-menu .more select { width: 100%; margin-top: 6px; font-size: .9rem; padding-top: 8px; padding-bottom: 8px; }
.header-in .lang-switch + .nav { margin-inline-start: 0; }
@media (min-width: 861px) { .header-in { gap: 12px; } .header-in .nav { order: 1; } .header-in .lang-switch { order: 2; margin-inline-start: 4px; } }
@media (max-width: 860px) { .lang-switch { margin-inline-start: auto; } }


/* ---------- Bangla and Arabic typography ---------- */
html.lang-bn body, html.lang-bn { font-family: "Hind Siliguri", var(--font-body); }
html.lang-bn h1, html.lang-bn h2, html.lang-bn h3, html.lang-bn h4 { font-family: "Hind Siliguri", var(--font-head); letter-spacing: 0; line-height: 1.35; font-weight: 600; }
html.lang-bn .eyebrow, html.lang-ar .eyebrow { letter-spacing: .04em; text-transform: none; }
html.lang-ar body { font-family: "Noto Naskh Arabic", "Amiri", var(--font-body); line-height: 1.85; }
html.lang-ar h1, html.lang-ar h2, html.lang-ar h3, html.lang-ar h4 { font-family: "Amiri", "Noto Naskh Arabic", serif; letter-spacing: 0; line-height: 1.5; font-weight: 700; }
html.lang-ar .btn, html.lang-ar .nav-link, html.lang-ar .lang-btn { font-family: "Noto Naskh Arabic", var(--font-body); }

/* ---------- Right-to-left ---------- */
[dir="rtl"] .nav .btn { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .rich ul { padding-left: 0; padding-right: 1.2em; }
[dir="rtl"] .checklist li { padding-left: 0; padding-right: 28px; }
[dir="rtl"] .checklist li::before { left: auto; right: 4px; }
[dir="rtl"] .req { margin-left: 0; margin-right: 4px; }
[dir="rtl"] .wa-float { right: auto; left: 18px; }
[dir="rtl"] .center .faq { text-align: right; }
html[dir="rtl"].mo [data-anim="left"] { transform: translateX(36px); }
html[dir="rtl"].mo [data-anim="right"] { transform: translateX(-36px); }
html[dir="rtl"].mo [data-anim="left"].in, html[dir="rtl"].mo [data-anim="right"].in { transform: none; }
[dir="rtl"] select { background-position: left 12px center; padding-right: 14px; padding-left: 36px; }
[dir="rtl"] .nav a.nav-link[aria-current="page"]::after { left: 14px; right: 14px; }
@media (max-width: 860px) { [dir="rtl"] .nav .btn { margin-right: 0; } }
body { overflow-x: clip; }
[dir="rtl"] .hp, [dir="rtl"] .skip:not(:focus) { left: auto; right: -5000px; }
[dir="rtl"] .skip:focus { left: auto; right: 8px; }

/* ---------- Calm editorial layouts ---------- */
.hero { padding: 64px 0 80px; }
.hero-note { margin: 22px 0 0; font-size: .92rem; color: var(--muted); }
.hero-note span { color: var(--accent); }
.hero-art .arch { border-radius: 18px; aspect-ratio: 5/5.4; }
.hero-art:hover .arch img { transform: none; }
.eyebrow { letter-spacing: .14em; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.rw { display: grid; grid-template-columns: minmax(200px, 1fr) 1.7fr; gap: 12px 48px; padding: 26px 0; border-bottom: 1px solid var(--border); align-items: start; }
.rw h3 { margin: 0; font-size: 1.25rem; }
.rw p { margin: 0 0 .5rem; color: var(--muted); max-width: 62ch; }
.row-link { font-weight: 600; text-decoration: none; display: inline-block; }
.row-link:hover { text-decoration: underline; }
.row-link .arr { display: inline-block; transition: transform .2s ease; }
.row-link:hover .arr { transform: translateX(3px); }
[dir="rtl"] .arr { transform: scaleX(-1); }
[dir="rtl"] .row-link:hover .arr { transform: scaleX(-1) translateX(3px); }
@media (max-width: 760px) { .rw { grid-template-columns: 1fr; padding: 20px 0; } }

.prog-rows { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--border); counter-reset: pr; }
.pr { display: grid; grid-template-columns: 56px 1.3fr 1fr; gap: 12px 32px; padding: 30px 0; border-bottom: 1px solid var(--border); align-items: start; }
.pr-n { font-family: var(--font-head); font-size: 2rem; line-height: 1; color: var(--accent); }
.pr-main h3 { margin-bottom: .3em; font-size: 1.4rem; }
.pr-main h3 a { text-decoration: none; }
.pr-main h3 a:hover { text-decoration: underline; }
.pr-main p { color: var(--muted); margin-bottom: .6rem; }
.pr-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .95rem; }
.pr-levels .lv { display: inline-block; min-width: 64px; color: var(--muted); font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 820px) { .pr { grid-template-columns: 40px 1fr; } .pr-levels { grid-column: 2; } }

.split.top { align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: t; border-inline-start: 1px solid var(--border); }
.timeline li { counter-increment: t; position: relative; padding: 0 0 28px 34px; }
[dir="rtl"] .timeline li { padding: 0 34px 28px 0; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: counter(t); position: absolute; left: -15px; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); color: var(--primary); display: grid; place-items: center; font-size: .85rem; font-weight: 600; }
[dir="rtl"] .timeline li::before { left: auto; right: -15px; }
.section.soft .timeline li::before { background: var(--accent-soft); }
.timeline h3 { margin: 0 0 .25em; font-size: 1.12rem; }
.timeline p { margin: 0; color: var(--muted); }
.section.green .row-link { color: #fff; }

/* ---------- Header dropdown ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > .nav-link { padding-inline-end: 4px; }
.sub-toggle { background: none; border: 0; padding: 8px 6px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; border-radius: 8px; }
.sub-toggle:hover { color: var(--primary); background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.sub-toggle svg { transition: transform .18s ease; }
.nav-item.open .sub-toggle svg { transform: rotate(180deg); }
.sub-menu { position: absolute; inset-inline-start: 0; top: 100%; min-width: 270px; padding-top: 8px; z-index: 65; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .16s ease, transform .16s ease, visibility 0s .16s; }
.sub-menu > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,60,45,.12); padding: 6px; display: grid; }
.nav-item.open .sub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sub-menu a { text-decoration: none; color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: .94rem; line-height: 1.35; }
.sub-menu a:hover, .sub-menu a:focus-visible { background: var(--accent-soft); color: var(--primary); }
.sub-menu a small { display: block; color: var(--muted); font-size: .78rem; }
@media (max-width: 860px) {
  .nav-item { display: block; }
  .nav-item > .nav-link { display: block; }
  .sub-toggle { display: none; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; min-width: 0; padding: 0 0 6px 14px; }
  .sub-menu > div { border: 0; box-shadow: none; background: none; padding: 0; }
  .sub-menu a { padding: 10px 12px; color: var(--muted); font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { .sub-menu, .row-link .arr, .sub-toggle svg { transition: none; } }
.split.one { grid-template-columns: minmax(0, 66ch); }
